aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Rogan Creswick <creswick@gmail.com>2013-01-02 15:34:28 -0800
committerGravatar Rogan Creswick <creswick@gmail.com>2013-01-02 15:34:28 -0800
commitb6130f353243712421042fa0b610985dd95c786c (patch)
tree92b772d71436bfe2a259905b7fded41464af2e87
parent91c8d16838b39c7726f6c0a0fb333f5ba38d2494 (diff)
updated ace
-rw-r--r--contexts/data/lib/ace/LICENSE.txt373
-rw-r--r--contexts/data/lib/ace/ace-compat-noconflict.js1
-rw-r--r--contexts/data/lib/ace/ace-compat-uncompressed-noconflict.js490
-rw-r--r--contexts/data/lib/ace/ace-compat-uncompressed.js490
-rw-r--r--contexts/data/lib/ace/ace-compat.js1
-rw-r--r--contexts/data/lib/ace/ace-noconflict.js1
-rw-r--r--contexts/data/lib/ace/ace-uncompressed-noconflict.js14194
-rw-r--r--contexts/data/lib/ace/ace-uncompressed.js14194
-rw-r--r--contexts/data/lib/ace/ace.js14282
-rw-r--r--contexts/data/lib/ace/ext-static_highlight.js96
-rw-r--r--contexts/data/lib/ace/ext-textarea.js591
-rw-r--r--contexts/data/lib/ace/keybinding-emacs-noconflict.js1
-rw-r--r--contexts/data/lib/ace/keybinding-emacs-uncompressed-noconflict.js415
-rw-r--r--contexts/data/lib/ace/keybinding-emacs-uncompressed.js415
-rw-r--r--contexts/data/lib/ace/keybinding-emacs.js365
-rw-r--r--contexts/data/lib/ace/keybinding-vim-noconflict.js1
-rw-r--r--contexts/data/lib/ace/keybinding-vim-uncompressed-noconflict.js403
-rw-r--r--contexts/data/lib/ace/keybinding-vim-uncompressed.js403
-rw-r--r--contexts/data/lib/ace/keybinding-vim.js1647
-rw-r--r--contexts/data/lib/ace/mode-abap.js259
-rw-r--r--contexts/data/lib/ace/mode-asciidoc.js372
-rw-r--r--contexts/data/lib/ace/mode-c9search.js187
-rw-r--r--contexts/data/lib/ace/mode-c_cpp-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-c_cpp-uncompressed-noconflict.js928
-rw-r--r--contexts/data/lib/ace/mode-c_cpp-uncompressed.js928
-rw-r--r--contexts/data/lib/ace/mode-c_cpp.js766
-rw-r--r--contexts/data/lib/ace/mode-clojure-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-clojure-uncompressed-noconflict.js432
-rw-r--r--contexts/data/lib/ace/mode-clojure-uncompressed.js432
-rw-r--r--contexts/data/lib/ace/mode-clojure.js326
-rw-r--r--contexts/data/lib/ace/mode-coffee-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-coffee-uncompressed-noconflict.js804
-rw-r--r--contexts/data/lib/ace/mode-coffee-uncompressed.js804
-rw-r--r--contexts/data/lib/ace/mode-coffee.js521
-rw-r--r--contexts/data/lib/ace/mode-coldfusion-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-coldfusion-uncompressed-noconflict.js2543
-rw-r--r--contexts/data/lib/ace/mode-coldfusion-uncompressed.js2543
-rw-r--r--contexts/data/lib/ace/mode-coldfusion.js1726
-rw-r--r--contexts/data/lib/ace/mode-csharp-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-csharp-uncompressed-noconflict.js778
-rw-r--r--contexts/data/lib/ace/mode-csharp-uncompressed.js778
-rw-r--r--contexts/data/lib/ace/mode-csharp.js606
-rw-r--r--contexts/data/lib/ace/mode-css-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-css-uncompressed-noconflict.js863
-rw-r--r--contexts/data/lib/ace/mode-css-uncompressed.js863
-rw-r--r--contexts/data/lib/ace/mode-css.js681
-rw-r--r--contexts/data/lib/ace/mode-dart.js279
-rw-r--r--contexts/data/lib/ace/mode-diff.js163
-rw-r--r--contexts/data/lib/ace/mode-dot.js348
-rw-r--r--contexts/data/lib/ace/mode-glsl.js838
-rw-r--r--contexts/data/lib/ace/mode-golang.js660
-rw-r--r--contexts/data/lib/ace/mode-groovy-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-groovy-uncompressed-noconflict.js1462
-rw-r--r--contexts/data/lib/ace/mode-groovy-uncompressed.js1462
-rw-r--r--contexts/data/lib/ace/mode-groovy.js1083
-rw-r--r--contexts/data/lib/ace/mode-haml.js440
-rw-r--r--contexts/data/lib/ace/mode-haxe-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-haxe-uncompressed-noconflict.js778
-rw-r--r--contexts/data/lib/ace/mode-haxe-uncompressed.js778
-rw-r--r--contexts/data/lib/ace/mode-haxe.js611
-rw-r--r--contexts/data/lib/ace/mode-html-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-html-uncompressed-noconflict.js2558
-rw-r--r--contexts/data/lib/ace/mode-html-uncompressed.js2558
-rw-r--r--contexts/data/lib/ace/mode-html.js1851
-rw-r--r--contexts/data/lib/ace/mode-jade.js2035
-rw-r--r--contexts/data/lib/ace/mode-java-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-java-uncompressed-noconflict.js1464
-rw-r--r--contexts/data/lib/ace/mode-java-uncompressed.js1464
-rw-r--r--contexts/data/lib/ace/mode-java.js1042
-rw-r--r--contexts/data/lib/ace/mode-javascript-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-javascript-uncompressed-noconflict.js1295
-rw-r--r--contexts/data/lib/ace/mode-javascript-uncompressed.js1295
-rw-r--r--contexts/data/lib/ace/mode-javascript.js922
-rw-r--r--contexts/data/lib/ace/mode-json-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-json-uncompressed-noconflict.js689
-rw-r--r--contexts/data/lib/ace/mode-json-uncompressed.js689
-rw-r--r--contexts/data/lib/ace/mode-json.js575
-rw-r--r--contexts/data/lib/ace/mode-jsp.js1371
-rw-r--r--contexts/data/lib/ace/mode-jsx.js635
-rw-r--r--contexts/data/lib/ace/mode-latex-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-latex-uncompressed-noconflict.js105
-rw-r--r--contexts/data/lib/ace/mode-latex-uncompressed.js105
-rw-r--r--contexts/data/lib/ace/mode-latex.js218
-rw-r--r--contexts/data/lib/ace/mode-less.js394
-rw-r--r--contexts/data/lib/ace/mode-liquid.js921
-rw-r--r--contexts/data/lib/ace/mode-lisp.js142
-rw-r--r--contexts/data/lib/ace/mode-lua-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-lua-uncompressed-noconflict.js533
-rw-r--r--contexts/data/lib/ace/mode-lua-uncompressed.js533
-rw-r--r--contexts/data/lib/ace/mode-lua.js610
-rw-r--r--contexts/data/lib/ace/mode-luapage.js2463
-rw-r--r--contexts/data/lib/ace/mode-lucene.js64
-rw-r--r--contexts/data/lib/ace/mode-makefile.js314
-rw-r--r--contexts/data/lib/ace/mode-markdown-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-markdown-uncompressed-noconflict.js3000
-rw-r--r--contexts/data/lib/ace/mode-markdown-uncompressed.js3000
-rw-r--r--contexts/data/lib/ace/mode-markdown.js2229
-rw-r--r--contexts/data/lib/ace/mode-objectivec.js655
-rw-r--r--contexts/data/lib/ace/mode-ocaml-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-ocaml-uncompressed-noconflict.js549
-rw-r--r--contexts/data/lib/ace/mode-ocaml-uncompressed.js549
-rw-r--r--contexts/data/lib/ace/mode-ocaml.js449
-rw-r--r--contexts/data/lib/ace/mode-perl-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-perl-uncompressed-noconflict.js583
-rw-r--r--contexts/data/lib/ace/mode-perl-uncompressed.js583
-rw-r--r--contexts/data/lib/ace/mode-perl.js320
-rw-r--r--contexts/data/lib/ace/mode-pgsql-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-pgsql-uncompressed-noconflict.js1117
-rw-r--r--contexts/data/lib/ace/mode-pgsql-uncompressed.js1117
-rw-r--r--contexts/data/lib/ace/mode-pgsql.js929
-rw-r--r--contexts/data/lib/ace/mode-php-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-php-uncompressed-noconflict.js1894
-rw-r--r--contexts/data/lib/ace/mode-php-uncompressed.js1894
-rw-r--r--contexts/data/lib/ace/mode-php.js2300
-rw-r--r--contexts/data/lib/ace/mode-powershell-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-powershell-uncompressed-noconflict.js716
-rw-r--r--contexts/data/lib/ace/mode-powershell-uncompressed.js716
-rw-r--r--contexts/data/lib/ace/mode-powershell.js612
-rw-r--r--contexts/data/lib/ace/mode-python-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-python-uncompressed-noconflict.js516
-rw-r--r--contexts/data/lib/ace/mode-python-uncompressed.js516
-rw-r--r--contexts/data/lib/ace/mode-python.js291
-rw-r--r--contexts/data/lib/ace/mode-r.js410
-rw-r--r--contexts/data/lib/ace/mode-rdoc.js189
-rw-r--r--contexts/data/lib/ace/mode-rhtml.js2138
-rw-r--r--contexts/data/lib/ace/mode-ruby-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-ruby-uncompressed-noconflict.js401
-rw-r--r--contexts/data/lib/ace/mode-ruby-uncompressed.js401
-rw-r--r--contexts/data/lib/ace/mode-ruby.js411
-rw-r--r--contexts/data/lib/ace/mode-scad-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-scad-uncompressed-noconflict.js916
-rw-r--r--contexts/data/lib/ace/mode-scad-uncompressed.js916
-rw-r--r--contexts/data/lib/ace/mode-scad.js699
-rw-r--r--contexts/data/lib/ace/mode-scala-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-scala-uncompressed-noconflict.js1464
-rw-r--r--contexts/data/lib/ace/mode-scala-uncompressed.js1464
-rw-r--r--contexts/data/lib/ace/mode-scala.js1071
-rw-r--r--contexts/data/lib/ace/mode-scss-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-scss-uncompressed-noconflict.js688
-rw-r--r--contexts/data/lib/ace/mode-scss-uncompressed.js688
-rw-r--r--contexts/data/lib/ace/mode-scss.js417
-rw-r--r--contexts/data/lib/ace/mode-sh.js232
-rw-r--r--contexts/data/lib/ace/mode-sql-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-sql-uncompressed-noconflict.js169
-rw-r--r--contexts/data/lib/ace/mode-sql-uncompressed.js169
-rw-r--r--contexts/data/lib/ace/mode-sql.js146
-rw-r--r--contexts/data/lib/ace/mode-stylus.js474
-rw-r--r--contexts/data/lib/ace/mode-svg-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-svg-uncompressed-noconflict.js2197
-rw-r--r--contexts/data/lib/ace/mode-svg-uncompressed.js2197
-rw-r--r--contexts/data/lib/ace/mode-svg.js1491
-rw-r--r--contexts/data/lib/ace/mode-tcl.js342
-rw-r--r--contexts/data/lib/ace/mode-tex.js171
-rw-r--r--contexts/data/lib/ace/mode-text.js0
-rw-r--r--contexts/data/lib/ace/mode-textile-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-textile-uncompressed-noconflict.js264
-rw-r--r--contexts/data/lib/ace/mode-textile-uncompressed.js264
-rw-r--r--contexts/data/lib/ace/mode-textile.js176
-rw-r--r--contexts/data/lib/ace/mode-typescript.js1011
-rw-r--r--contexts/data/lib/ace/mode-vbscript.js278
-rw-r--r--contexts/data/lib/ace/mode-xml-noconflict.js1
-rw-r--r--contexts/data/lib/ace/mode-xml-uncompressed-noconflict.js1011
-rw-r--r--contexts/data/lib/ace/mode-xml-uncompressed.js1011
-rw-r--r--contexts/data/lib/ace/mode-xml.js793
-rw-r--r--contexts/data/lib/ace/mode-xquery.js676
-rw-r--r--contexts/data/lib/ace/mode-yaml.js298
-rw-r--r--contexts/data/lib/ace/theme-ambiance.js202
-rw-r--r--contexts/data/lib/ace/theme-chaos.js167
-rw-r--r--contexts/data/lib/ace/theme-chrome-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-chrome-uncompressed-noconflict.js223
-rw-r--r--contexts/data/lib/ace/theme-chrome-uncompressed.js223
-rw-r--r--contexts/data/lib/ace/theme-chrome.js162
-rw-r--r--contexts/data/lib/ace/theme-clouds-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-clouds-uncompressed-noconflict.js162
-rw-r--r--contexts/data/lib/ace/theme-clouds-uncompressed.js162
-rw-r--r--contexts/data/lib/ace/theme-clouds.js136
-rw-r--r--contexts/data/lib/ace/theme-clouds_midnight-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-clouds_midnight-uncompressed-noconflict.js163
-rw-r--r--contexts/data/lib/ace/theme-clouds_midnight-uncompressed.js163
-rw-r--r--contexts/data/lib/ace/theme-clouds_midnight.js137
-rw-r--r--contexts/data/lib/ace/theme-cobalt-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-cobalt-uncompressed-noconflict.js176
-rw-r--r--contexts/data/lib/ace/theme-cobalt-uncompressed.js176
-rw-r--r--contexts/data/lib/ace/theme-cobalt.js151
-rw-r--r--contexts/data/lib/ace/theme-crimson_editor-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-crimson_editor-uncompressed-noconflict.js208
-rw-r--r--contexts/data/lib/ace/theme-crimson_editor-uncompressed.js208
-rw-r--r--contexts/data/lib/ace/theme-crimson_editor.js155
-rw-r--r--contexts/data/lib/ace/theme-dawn-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-dawn-uncompressed-noconflict.js179
-rw-r--r--contexts/data/lib/ace/theme-dawn-uncompressed.js179
-rw-r--r--contexts/data/lib/ace/theme-dawn.js147
-rw-r--r--contexts/data/lib/ace/theme-dreamweaver-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-dreamweaver-uncompressed-noconflict.js236
-rw-r--r--contexts/data/lib/ace/theme-dreamweaver-uncompressed.js236
-rw-r--r--contexts/data/lib/ace/theme-dreamweaver.js174
-rw-r--r--contexts/data/lib/ace/theme-eclipse-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-eclipse-uncompressed-noconflict.js155
-rw-r--r--contexts/data/lib/ace/theme-eclipse-uncompressed.js155
-rw-r--r--contexts/data/lib/ace/theme-eclipse.js123
-rw-r--r--contexts/data/lib/ace/theme-github.js136
-rw-r--r--contexts/data/lib/ace/theme-idle_fingers-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-idle_fingers-uncompressed-noconflict.js168
-rw-r--r--contexts/data/lib/ace/theme-idle_fingers-uncompressed.js168
-rw-r--r--contexts/data/lib/ace/theme-idle_fingers.js137
-rw-r--r--contexts/data/lib/ace/theme-kr.js143
-rw-r--r--contexts/data/lib/ace/theme-kr_theme-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-kr_theme-uncompressed-noconflict.js171
-rw-r--r--contexts/data/lib/ace/theme-kr_theme-uncompressed.js171
-rw-r--r--contexts/data/lib/ace/theme-kr_theme.js1
-rw-r--r--contexts/data/lib/ace/theme-merbivore-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-merbivore-uncompressed-noconflict.js171
-rw-r--r--contexts/data/lib/ace/theme-merbivore-uncompressed.js171
-rw-r--r--contexts/data/lib/ace/theme-merbivore.js136
-rw-r--r--contexts/data/lib/ace/theme-merbivore_soft-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-merbivore_soft-uncompressed-noconflict.js177
-rw-r--r--contexts/data/lib/ace/theme-merbivore_soft-uncompressed.js177
-rw-r--r--contexts/data/lib/ace/theme-merbivore_soft.js137
-rw-r--r--contexts/data/lib/ace/theme-mono_industrial-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-mono_industrial-uncompressed-noconflict.js171
-rw-r--r--contexts/data/lib/ace/theme-mono_industrial-uncompressed.js171
-rw-r--r--contexts/data/lib/ace/theme-mono_industrial.js149
-rw-r--r--contexts/data/lib/ace/theme-monokai-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-monokai-uncompressed-noconflict.js167
-rw-r--r--contexts/data/lib/ace/theme-monokai-uncompressed.js167
-rw-r--r--contexts/data/lib/ace/theme-monokai.js141
-rw-r--r--contexts/data/lib/ace/theme-pastel_on_dark-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-pastel_on_dark-uncompressed-noconflict.js189
-rw-r--r--contexts/data/lib/ace/theme-pastel_on_dark-uncompressed.js189
-rw-r--r--contexts/data/lib/ace/theme-pastel_on_dark.js149
-rw-r--r--contexts/data/lib/ace/theme-solarized_dark-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-solarized_dark-uncompressed-noconflict.js166
-rw-r--r--contexts/data/lib/ace/theme-solarized_dark-uncompressed.js166
-rw-r--r--contexts/data/lib/ace/theme-solarized_dark.js129
-rw-r--r--contexts/data/lib/ace/theme-solarized_light-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-solarized_light-uncompressed-noconflict.js165
-rw-r--r--contexts/data/lib/ace/theme-solarized_light-uncompressed.js165
-rw-r--r--contexts/data/lib/ace/theme-solarized_light.js132
-rw-r--r--contexts/data/lib/ace/theme-textmate-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-textmate-uncompressed-noconflict.js210
-rw-r--r--contexts/data/lib/ace/theme-textmate-uncompressed.js210
-rw-r--r--contexts/data/lib/ace/theme-textmate.js164
-rw-r--r--contexts/data/lib/ace/theme-tomorrow-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-tomorrow-uncompressed-noconflict.js187
-rw-r--r--contexts/data/lib/ace/theme-tomorrow-uncompressed.js187
-rw-r--r--contexts/data/lib/ace/theme-tomorrow.js148
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night-uncompressed-noconflict.js187
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night-uncompressed.js187
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night.js148
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_blue-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_blue-uncompressed-noconflict.js187
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_blue-uncompressed.js187
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_blue.js146
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_bright-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_bright-uncompressed-noconflict.js187
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_bright-uncompressed.js187
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_bright.js148
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_eighties-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_eighties-uncompressed-noconflict.js183
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_eighties-uncompressed.js183
-rw-r--r--contexts/data/lib/ace/theme-tomorrow_night_eighties.js145
-rw-r--r--contexts/data/lib/ace/theme-twilight-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-twilight-uncompressed-noconflict.js189
-rw-r--r--contexts/data/lib/ace/theme-twilight-uncompressed.js189
-rw-r--r--contexts/data/lib/ace/theme-twilight.js148
-rw-r--r--contexts/data/lib/ace/theme-vibrant_ink-noconflict.js1
-rw-r--r--contexts/data/lib/ace/theme-vibrant_ink-uncompressed-noconflict.js172
-rw-r--r--contexts/data/lib/ace/theme-vibrant_ink-uncompressed.js172
-rw-r--r--contexts/data/lib/ace/theme-vibrant_ink.js132
-rw-r--r--contexts/data/lib/ace/theme-xcode.js125
-rw-r--r--contexts/data/lib/ace/worker-coffee.js3817
-rw-r--r--contexts/data/lib/ace/worker-css.js6361
-rw-r--r--contexts/data/lib/ace/worker-javascript.js12615
-rw-r--r--contexts/data/lib/ace/worker-json.js2219
-rw-r--r--contexts/data/lib/ace/worker-xquery.js21739
l---------tools/addon-sdk2
277 files changed, 96573 insertions, 116008 deletions
diff --git a/contexts/data/lib/ace/LICENSE.txt b/contexts/data/lib/ace/LICENSE.txt
deleted file mode 100644
index 14e2f77..0000000
--- a/contexts/data/lib/ace/LICENSE.txt
+++ /dev/null
@@ -1,373 +0,0 @@
-Mozilla Public License Version 2.0
-==================================
-
-1. Definitions
---------------
-
-1.1. "Contributor"
- means each individual or legal entity that creates, contributes to
- the creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
- means the combination of the Contributions of others (if any) used
- by a Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
- means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
- means Source Code Form to which the initial Contributor has attached
- the notice in Exhibit A, the Executable Form of such Source Code
- Form, and Modifications of such Source Code Form, in each case
- including portions thereof.
-
-1.5. "Incompatible With Secondary Licenses"
- means
-
- (a) that the initial Contributor has attached the notice described
- in Exhibit B to the Covered Software; or
-
- (b) that the Covered Software was made available under the terms of
- version 1.1 or earlier of the License, but not also under the
- terms of a Secondary License.
-
-1.6. "Executable Form"
- means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
- means a work that combines Covered Software with other material, in
- a separate file or files, that is not Covered Software.
-
-1.8. "License"
- means this document.
-
-1.9. "Licensable"
- means having the right to grant, to the maximum extent possible,
- whether at the time of the initial grant or subsequently, any and
- all of the rights conveyed by this License.
-
-1.10. "Modifications"
- means any of the following:
-
- (a) any file in Source Code Form that results from an addition to,
- deletion from, or modification of the contents of Covered
- Software; or
-
- (b) any new file in Source Code Form that contains any Covered
- Software.
-
-1.11. "Patent Claims" of a Contributor
- means any patent claim(s), including without limitation, method,
- process, and apparatus claims, in any patent Licensable by such
- Contributor that would be infringed, but for the grant of the
- License, by the making, using, selling, offering for sale, having
- made, import, or transfer of either its Contributions or its
- Contributor Version.
-
-1.12. "Secondary License"
- means either the GNU General Public License, Version 2.0, the GNU
- Lesser General Public License, Version 2.1, the GNU Affero General
- Public License, Version 3.0, or any later versions of those
- licenses.
-
-1.13. "Source Code Form"
- means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
- means an individual or a legal entity exercising rights under this
- License. For legal entities, "You" includes any entity that
- controls, is controlled by, or is under common control with You. For
- purposes of this definition, "control" means (a) the power, direct
- or indirect, to cause the direction or management of such entity,
- whether by contract or otherwise, or (b) ownership of more than
- fifty percent (50%) of the outstanding shares or beneficial
- ownership of such entity.
-
-2. License Grants and Conditions
---------------------------------
-
-2.1. Grants
-
-Each Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark)
- Licensable by such Contributor to use, reproduce, make available,
- modify, display, perform, distribute, and otherwise exploit its
- Contributions, either on an unmodified basis, with Modifications, or
- as part of a Larger Work; and
-
-(b) under Patent Claims of such Contributor to make, use, sell, offer
- for sale, have made, import, and otherwise transfer either its
- Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-The licenses granted in Section 2.1 with respect to any Contribution
-become effective for each Contribution on the date the Contributor first
-distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-The licenses granted in this Section 2 are the only rights granted under
-this License. No additional rights or licenses will be implied from the
-distribution or licensing of Covered Software under this License.
-Notwithstanding Section 2.1(b) above, no patent license is granted by a
-Contributor:
-
-(a) for any code that a Contributor has removed from Covered Software;
- or
-
-(b) for infringements caused by: (i) Your and any other third party's
- modifications of Covered Software, or (ii) the combination of its
- Contributions with other software (except as part of its Contributor
- Version); or
-
-(c) under Patent Claims infringed by Covered Software in the absence of
- its Contributions.
-
-This License does not grant any rights in the trademarks, service marks,
-or logos of any Contributor (except as may be necessary to comply with
-the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-No Contributor makes additional grants as a result of Your choice to
-distribute the Covered Software under a subsequent version of this
-License (see Section 10.2) or under the terms of a Secondary License (if
-permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-Each Contributor represents that the Contributor believes its
-Contributions are its original creation(s) or it has sufficient rights
-to grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-This License is not intended to limit any rights You have under
-applicable copyright doctrines of fair use, fair dealing, or other
-equivalents.
-
-2.7. Conditions
-
-Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
-in Section 2.1.
-
-3. Responsibilities
--------------------
-
-3.1. Distribution of Source Form
-
-All distribution of Covered Software in Source Code Form, including any
-Modifications that You create or to which You contribute, must be under
-the terms of this License. You must inform recipients that the Source
-Code Form of the Covered Software is governed by the terms of this
-License, and how they can obtain a copy of this License. You may not
-attempt to alter or restrict the recipients' rights in the Source Code
-Form.
-
-3.2. Distribution of Executable Form
-
-If You distribute Covered Software in Executable Form then:
-
-(a) such Covered Software must also be made available in Source Code
- Form, as described in Section 3.1, and You must inform recipients of
- the Executable Form how they can obtain a copy of such Source Code
- Form by reasonable means in a timely manner, at a charge no more
- than the cost of distribution to the recipient; and
-
-(b) You may distribute such Executable Form under the terms of this
- License, or sublicense it under different terms, provided that the
- license for the Executable Form does not attempt to limit or alter
- the recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-You may create and distribute a Larger Work under terms of Your choice,
-provided that You also comply with the requirements of this License for
-the Covered Software. If the Larger Work is a combination of Covered
-Software with a work governed by one or more Secondary Licenses, and the
-Covered Software is not Incompatible With Secondary Licenses, this
-License permits You to additionally distribute such Covered Software
-under the terms of such Secondary License(s), so that the recipient of
-the Larger Work may, at their option, further distribute the Covered
-Software under the terms of either this License or such Secondary
-License(s).
-
-3.4. Notices
-
-You may not remove or alter the substance of any license notices
-(including copyright notices, patent notices, disclaimers of warranty,
-or limitations of liability) contained within the Source Code Form of
-the Covered Software, except that You may alter any license notices to
-the extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-You may choose to offer, and to charge a fee for, warranty, support,
-indemnity or liability obligations to one or more recipients of Covered
-Software. However, You may do so only on Your own behalf, and not on
-behalf of any Contributor. You must make it absolutely clear that any
-such warranty, support, indemnity, or liability obligation is offered by
-You alone, and You hereby agree to indemnify every Contributor for any
-liability incurred by such Contributor as a result of warranty, support,
-indemnity or liability terms You offer. You may include additional
-disclaimers of warranty and limitations of liability specific to any
-jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
----------------------------------------------------
-
-If it is impossible for You to comply with any of the terms of this
-License with respect to some or all of the Covered Software due to
-statute, judicial order, or regulation then You must: (a) comply with
-the terms of this License to the maximum extent possible; and (b)
-describe the limitations and the code they affect. Such description must
-be placed in a text file included with all distributions of the Covered
-Software under this License. Except to the extent prohibited by statute
-or regulation, such description must be sufficiently detailed for a
-recipient of ordinary skill to be able to understand it.
-
-5. Termination
---------------
-
-5.1. The rights granted under this License will terminate automatically
-if You fail to comply with any of its terms. However, if You become
-compliant, then the rights granted under this License from a particular
-Contributor are reinstated (a) provisionally, unless and until such
-Contributor explicitly and finally terminates Your grants, and (b) on an
-ongoing basis, if such Contributor fails to notify You of the
-non-compliance by some reasonable means prior to 60 days after You have
-come back into compliance. Moreover, Your grants from a particular
-Contributor are reinstated on an ongoing basis if such Contributor
-notifies You of the non-compliance by some reasonable means, this is the
-first time You have received notice of non-compliance with this License
-from such Contributor, and You become compliant prior to 30 days after
-Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-infringement claim (excluding declaratory judgment actions,
-counter-claims, and cross-claims) alleging that a Contributor Version
-directly or indirectly infringes any patent, then the rights granted to
-You by any and all Contributors for the Covered Software under Section
-2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all
-end user license agreements (excluding distributors and resellers) which
-have been validly granted by You or Your distributors under this License
-prior to termination shall survive termination.
-
-************************************************************************
-* *
-* 6. Disclaimer of Warranty *
-* ------------------------- *
-* *
-* Covered Software is provided under this License on an "as is" *
-* basis, without warranty of any kind, either expressed, implied, or *
-* statutory, including, without limitation, warranties that the *
-* Covered Software is free of defects, merchantable, fit for a *
-* particular purpose or non-infringing. The entire risk as to the *
-* quality and performance of the Covered Software is with You. *
-* Should any Covered Software prove defective in any respect, You *
-* (not any Contributor) assume the cost of any necessary servicing, *
-* repair, or correction. This disclaimer of warranty constitutes an *
-* essential part of this License. No use of any Covered Software is *
-* authorized under this License except under this disclaimer. *
-* *
-************************************************************************
-
-************************************************************************
-* *
-* 7. Limitation of Liability *
-* -------------------------- *
-* *
-* Under no circumstances and under no legal theory, whether tort *
-* (including negligence), contract, or otherwise, shall any *
-* Contributor, or anyone who distributes Covered Software as *
-* permitted above, be liable to You for any direct, indirect, *
-* special, incidental, or consequential damages of any character *
-* including, without limitation, damages for lost profits, loss of *
-* goodwill, work stoppage, computer failure or malfunction, or any *
-* and all other commercial damages or losses, even if such party *
-* shall have been informed of the possibility of such damages. This *
-* limitation of liability shall not apply to liability for death or *
-* personal injury resulting from such party's negligence to the *
-* extent applicable law prohibits such limitation. Some *
-* jurisdictions do not allow the exclusion or limitation of *
-* incidental or consequential damages, so this exclusion and *
-* limitation may not apply to You. *
-* *
-************************************************************************
-
-8. Litigation
--------------
-
-Any litigation relating to this License may be brought only in the
-courts of a jurisdiction where the defendant maintains its principal
-place of business and such litigation shall be governed by laws of that
-jurisdiction, without reference to its conflict-of-law provisions.
-Nothing in this Section shall prevent a party's ability to bring
-cross-claims or counter-claims.
-
-9. Miscellaneous
-----------------
-
-This License represents the complete agreement concerning the subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent
-necessary to make it enforceable. Any law or regulation which provides
-that the language of a contract shall be construed against the drafter
-shall not be used to construe this License against a Contributor.
-
-10. Versions of the License
----------------------------
-
-10.1. New Versions
-
-Mozilla Foundation is the license steward. Except as provided in Section
-10.3, no one other than the license steward has the right to modify or
-publish new versions of this License. Each version will be given a
-distinguishing version number.
-
-10.2. Effect of New Versions
-
-You may distribute the Covered Software under the terms of the version
-of the License under which You originally received the Covered Software,
-or under the terms of any subsequent version published by the license
-steward.
-
-10.3. Modified Versions
-
-If you create software not governed by this License, and you want to
-create a new license for such software, you may create and use a
-modified version of this License if you rename the license and remove
-any references to the name of the license steward (except to note that
-such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-Licenses
-
-If You choose to distribute Source Code Form that is Incompatible With
-Secondary Licenses under the terms of this version of the License, the
-notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
--------------------------------------------
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular
-file, then You may include the notice in a location (such as a LICENSE
-file in a relevant directory) where a recipient would be likely to look
-for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
----------------------------------------------------------
-
- This Source Code Form is "Incompatible With Secondary Licenses", as
- defined by the Mozilla Public License, v. 2.0.
diff --git a/contexts/data/lib/ace/ace-compat-noconflict.js b/contexts/data/lib/ace/ace-compat-noconflict.js
deleted file mode 100644
index 1532bb6..0000000
--- a/contexts/data/lib/ace/ace-compat-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("pilot/index",["require","exports","module","pilot/browser_focus","pilot/dom","pilot/event","pilot/event_emitter","pilot/fixoldbrowsers","pilot/keys","pilot/lang","pilot/oop","pilot/useragent","pilot/canon"],function(a,b,c){a("pilot/browser_focus"),a("pilot/dom"),a("pilot/event"),a("pilot/event_emitter"),a("pilot/fixoldbrowsers"),a("pilot/keys"),a("pilot/lang"),a("pilot/oop"),a("pilot/useragent"),a("pilot/canon")}),ace.define("pilot/browser_focus",["require","exports","module","ace/lib/browser_focus"],function(a,b,c){console.warn("DEPRECATED: 'pilot/browser_focus' is deprecated. Use 'ace/lib/browser_focus' instead"),c.exports=a("ace/lib/browser_focus")}),ace.define("pilot/dom",["require","exports","module","ace/lib/dom"],function(a,b,c){console.warn("DEPRECATED: 'pilot/dom' is deprecated. Use 'ace/lib/dom' instead"),c.exports=a("ace/lib/dom")}),ace.define("pilot/event",["require","exports","module","ace/lib/event"],function(a,b,c){console.warn("DEPRECATED: 'pilot/event' is deprecated. Use 'ace/lib/event' instead"),c.exports=a("ace/lib/event")}),ace.define("pilot/event_emitter",["require","exports","module","ace/lib/event_emitter"],function(a,b,c){console.warn("DEPRECATED: 'pilot/event_emitter' is deprecated. Use 'ace/lib/event_emitter' instead"),c.exports=a("ace/lib/event_emitter")}),ace.define("pilot/fixoldbrowsers",["require","exports","module","ace/lib/fixoldbrowsers"],function(a,b,c){console.warn("DEPRECATED: 'pilot/fixoldbrowsers' is deprecated. Use 'ace/lib/fixoldbrowsers' instead"),c.exports=a("ace/lib/fixoldbrowsers")}),ace.define("pilot/keys",["require","exports","module","ace/lib/keys"],function(a,b,c){console.warn("DEPRECATED: 'pilot/keys' is deprecated. Use 'ace/lib/keys' instead"),c.exports=a("ace/lib/keys")}),ace.define("pilot/lang",["require","exports","module","ace/lib/lang"],function(a,b,c){console.warn("DEPRECATED: 'pilot/lang' is deprecated. Use 'ace/lib/lang' instead"),c.exports=a("ace/lib/lang")}),ace.define("pilot/oop",["require","exports","module","ace/lib/oop"],function(a,b,c){console.warn("DEPRECATED: 'pilot/oop' is deprecated. Use 'ace/lib/oop' instead"),c.exports=a("ace/lib/oop")}),ace.define("pilot/useragent",["require","exports","module","ace/lib/useragent"],function(a,b,c){console.warn("DEPRECATED: 'pilot/useragent' is deprecated. Use 'ace/lib/useragent' instead"),c.exports=a("ace/lib/useragent")}),ace.define("pilot/canon",["require","exports","module"],function(a,b,c){console.warn("DEPRECATED: 'pilot/canon' is deprecated."),b.addCommand=function(){console.warn("DEPRECATED: 'canon.addCommand()' is deprecated. Use 'editor.commands.addCommand(command)' instead."),console.trace()},b.removeCommand=function(){console.warn("DEPRECATED: 'canon.removeCommand()' is deprecated. Use 'editor.commands.removeCommand(command)' instead."),console.trace()}}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/ace-compat-uncompressed-noconflict.js b/contexts/data/lib/ace/ace-compat-uncompressed-noconflict.js
deleted file mode 100644
index 1a8fff1..0000000
--- a/contexts/data/lib/ace/ace-compat-uncompressed-noconflict.js
+++ /dev/null
@@ -1,490 +0,0 @@
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/index', ['require', 'exports', 'module' , 'pilot/browser_focus', 'pilot/dom', 'pilot/event', 'pilot/event_emitter', 'pilot/fixoldbrowsers', 'pilot/keys', 'pilot/lang', 'pilot/oop', 'pilot/useragent', 'pilot/canon'], function(require, exports, module) {
- require("pilot/browser_focus");
- require("pilot/dom");
- require("pilot/event");
- require("pilot/event_emitter");
- require("pilot/fixoldbrowsers");
- require("pilot/keys");
- require("pilot/lang");
- require("pilot/oop");
- require("pilot/useragent");
- require("pilot/canon");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/browser_focus', ['require', 'exports', 'module' , 'ace/lib/browser_focus'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/browser_focus' is deprecated. Use 'ace/lib/browser_focus' instead");
- module.exports = require("ace/lib/browser_focus");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/dom', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/dom' is deprecated. Use 'ace/lib/dom' instead");
- module.exports = require("ace/lib/dom");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/event', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/event' is deprecated. Use 'ace/lib/event' instead");
- module.exports = require("ace/lib/event");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/event_emitter', ['require', 'exports', 'module' , 'ace/lib/event_emitter'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/event_emitter' is deprecated. Use 'ace/lib/event_emitter' instead");
- module.exports = require("ace/lib/event_emitter");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/fixoldbrowsers' is deprecated. Use 'ace/lib/fixoldbrowsers' instead");
- module.exports = require("ace/lib/fixoldbrowsers");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/keys', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/keys' is deprecated. Use 'ace/lib/keys' instead");
- module.exports = require("ace/lib/keys");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/lang', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/lang' is deprecated. Use 'ace/lib/lang' instead");
- module.exports = require("ace/lib/lang");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/oop', ['require', 'exports', 'module' , 'ace/lib/oop'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/oop' is deprecated. Use 'ace/lib/oop' instead");
- module.exports = require("ace/lib/oop");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/useragent', ['require', 'exports', 'module' , 'ace/lib/useragent'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/useragent' is deprecated. Use 'ace/lib/useragent' instead");
- module.exports = require("ace/lib/useragent");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('pilot/canon', ['require', 'exports', 'module' ], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/canon' is deprecated.");
- //return require("ace/lib/dom");
-
- exports.addCommand = function() {
- console.warn("DEPRECATED: 'canon.addCommand()' is deprecated. Use 'editor.commands.addCommand(command)' instead.");
- console.trace();
- }
-
- exports.removeCommand = function() {
- console.warn("DEPRECATED: 'canon.removeCommand()' is deprecated. Use 'editor.commands.removeCommand(command)' instead.");
- console.trace();
- }
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/ace-compat-uncompressed.js b/contexts/data/lib/ace/ace-compat-uncompressed.js
deleted file mode 100644
index 7fa232a..0000000
--- a/contexts/data/lib/ace/ace-compat-uncompressed.js
+++ /dev/null
@@ -1,490 +0,0 @@
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/index', ['require', 'exports', 'module' , 'pilot/browser_focus', 'pilot/dom', 'pilot/event', 'pilot/event_emitter', 'pilot/fixoldbrowsers', 'pilot/keys', 'pilot/lang', 'pilot/oop', 'pilot/useragent', 'pilot/canon'], function(require, exports, module) {
- require("pilot/browser_focus");
- require("pilot/dom");
- require("pilot/event");
- require("pilot/event_emitter");
- require("pilot/fixoldbrowsers");
- require("pilot/keys");
- require("pilot/lang");
- require("pilot/oop");
- require("pilot/useragent");
- require("pilot/canon");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/browser_focus', ['require', 'exports', 'module' , 'ace/lib/browser_focus'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/browser_focus' is deprecated. Use 'ace/lib/browser_focus' instead");
- module.exports = require("ace/lib/browser_focus");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/dom', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/dom' is deprecated. Use 'ace/lib/dom' instead");
- module.exports = require("ace/lib/dom");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/event', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/event' is deprecated. Use 'ace/lib/event' instead");
- module.exports = require("ace/lib/event");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/event_emitter', ['require', 'exports', 'module' , 'ace/lib/event_emitter'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/event_emitter' is deprecated. Use 'ace/lib/event_emitter' instead");
- module.exports = require("ace/lib/event_emitter");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/fixoldbrowsers' is deprecated. Use 'ace/lib/fixoldbrowsers' instead");
- module.exports = require("ace/lib/fixoldbrowsers");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/keys', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/keys' is deprecated. Use 'ace/lib/keys' instead");
- module.exports = require("ace/lib/keys");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/lang', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/lang' is deprecated. Use 'ace/lib/lang' instead");
- module.exports = require("ace/lib/lang");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/oop', ['require', 'exports', 'module' , 'ace/lib/oop'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/oop' is deprecated. Use 'ace/lib/oop' instead");
- module.exports = require("ace/lib/oop");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/useragent', ['require', 'exports', 'module' , 'ace/lib/useragent'], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/useragent' is deprecated. Use 'ace/lib/useragent' instead");
- module.exports = require("ace/lib/useragent");
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('pilot/canon', ['require', 'exports', 'module' ], function(require, exports, module) {
- console.warn("DEPRECATED: 'pilot/canon' is deprecated.");
- //return require("ace/lib/dom");
-
- exports.addCommand = function() {
- console.warn("DEPRECATED: 'canon.addCommand()' is deprecated. Use 'editor.commands.addCommand(command)' instead.");
- console.trace();
- }
-
- exports.removeCommand = function() {
- console.warn("DEPRECATED: 'canon.removeCommand()' is deprecated. Use 'editor.commands.removeCommand(command)' instead.");
- console.trace();
- }
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/ace-compat.js b/contexts/data/lib/ace/ace-compat.js
deleted file mode 100644
index 5dcbb1c..0000000
--- a/contexts/data/lib/ace/ace-compat.js
+++ /dev/null
@@ -1 +0,0 @@
-define("pilot/index",["require","exports","module","pilot/browser_focus","pilot/dom","pilot/event","pilot/event_emitter","pilot/fixoldbrowsers","pilot/keys","pilot/lang","pilot/oop","pilot/useragent","pilot/canon"],function(a,b,c){a("pilot/browser_focus"),a("pilot/dom"),a("pilot/event"),a("pilot/event_emitter"),a("pilot/fixoldbrowsers"),a("pilot/keys"),a("pilot/lang"),a("pilot/oop"),a("pilot/useragent"),a("pilot/canon")}),define("pilot/browser_focus",["require","exports","module","ace/lib/browser_focus"],function(a,b,c){console.warn("DEPRECATED: 'pilot/browser_focus' is deprecated. Use 'ace/lib/browser_focus' instead"),c.exports=a("ace/lib/browser_focus")}),define("pilot/dom",["require","exports","module","ace/lib/dom"],function(a,b,c){console.warn("DEPRECATED: 'pilot/dom' is deprecated. Use 'ace/lib/dom' instead"),c.exports=a("ace/lib/dom")}),define("pilot/event",["require","exports","module","ace/lib/event"],function(a,b,c){console.warn("DEPRECATED: 'pilot/event' is deprecated. Use 'ace/lib/event' instead"),c.exports=a("ace/lib/event")}),define("pilot/event_emitter",["require","exports","module","ace/lib/event_emitter"],function(a,b,c){console.warn("DEPRECATED: 'pilot/event_emitter' is deprecated. Use 'ace/lib/event_emitter' instead"),c.exports=a("ace/lib/event_emitter")}),define("pilot/fixoldbrowsers",["require","exports","module","ace/lib/fixoldbrowsers"],function(a,b,c){console.warn("DEPRECATED: 'pilot/fixoldbrowsers' is deprecated. Use 'ace/lib/fixoldbrowsers' instead"),c.exports=a("ace/lib/fixoldbrowsers")}),define("pilot/keys",["require","exports","module","ace/lib/keys"],function(a,b,c){console.warn("DEPRECATED: 'pilot/keys' is deprecated. Use 'ace/lib/keys' instead"),c.exports=a("ace/lib/keys")}),define("pilot/lang",["require","exports","module","ace/lib/lang"],function(a,b,c){console.warn("DEPRECATED: 'pilot/lang' is deprecated. Use 'ace/lib/lang' instead"),c.exports=a("ace/lib/lang")}),define("pilot/oop",["require","exports","module","ace/lib/oop"],function(a,b,c){console.warn("DEPRECATED: 'pilot/oop' is deprecated. Use 'ace/lib/oop' instead"),c.exports=a("ace/lib/oop")}),define("pilot/useragent",["require","exports","module","ace/lib/useragent"],function(a,b,c){console.warn("DEPRECATED: 'pilot/useragent' is deprecated. Use 'ace/lib/useragent' instead"),c.exports=a("ace/lib/useragent")}),define("pilot/canon",["require","exports","module"],function(a,b,c){console.warn("DEPRECATED: 'pilot/canon' is deprecated."),b.addCommand=function(){console.warn("DEPRECATED: 'canon.addCommand()' is deprecated. Use 'editor.commands.addCommand(command)' instead."),console.trace()},b.removeCommand=function(){console.warn("DEPRECATED: 'canon.removeCommand()' is deprecated. Use 'editor.commands.removeCommand(command)' instead."),console.trace()}}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/ace-noconflict.js b/contexts/data/lib/ace/ace-noconflict.js
deleted file mode 100644
index 37d9542..0000000
--- a/contexts/data/lib/ace/ace-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){function g(a){var e=function(a,b){return d("",a,b)};e.packaged=!0;var f=b;a&&(b[a]||(b[a]={}),f=b[a]),f.define&&(c.original=f.define),f.define=c,f.require&&(d.original=f.require),f.require=e}var a="ace",b=function(){return this}();if(typeof requirejs!="undefined")return;var c=function(a,b,d){if(typeof a!="string"){c.original?c.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(d=b),c.modules||(c.modules={}),c.modules[a]=d},d=function(a,b,c){if(Object.prototype.toString.call(b)==="[object Array]"){var e=[];for(var g=0,h=b.length;g<h;++g){var i=f(a,b[g]);if(!i&&d.original)return d.original.apply(window,arguments);e.push(i)}c&&c.apply(null,e)}else{if(typeof b=="string"){var j=f(a,b);return!j&&d.original?d.original.apply(window,arguments):(c&&c(),j)}if(d.original)return d.original.apply(window,arguments)}},e=function(a,b){if(b.indexOf("!")!==-1){var c=b.split("!");return e(a,c[0])+"!"+e(a,c[1])}if(b.charAt(0)=="."){var d=a.split("/").slice(0,-1).join("/");b=d+"/"+b;while(b.indexOf(".")!==-1&&f!=b){var f=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},f=function(a,b){b=e(a,b);var f=c.modules[b];if(!f)return null;if(typeof f=="function"){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return d(b,a,c)},j=f(i,g,h);return g=j||h.exports,c.modules[b]=g,g}return f};g(a)})(),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/theme/textmate"],function(a,b,c){"use strict",a("./lib/fixoldbrowsers");var d=a("./lib/dom"),e=a("./lib/event"),f=a("./editor").Editor,g=a("./edit_session").EditSession,h=a("./undomanager").UndoManager,i=a("./virtual_renderer").VirtualRenderer;b.edit=function(b){typeof b=="string"&&(b=document.getElementById(b));var c=new g(d.getInnerText(b));c.setUndoManager(new h),b.innerHTML="";var j=new f(new i(b,a("./theme/textmate")));j.setSession(c);var k={};return k.document=c,k.editor=j,j.resize(),e.addListener(window,"resize",function(){j.resize()}),b.env=k,j.env=k,j}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(a,b,c){"use strict",a("./regexp"),a("./es5-shim")}),ace.define("ace/lib/regexp",["require","exports","module"],function(a,b,c){function g(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function h(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d<a.length;d++)if(a[d]===b)return d;return-1}"use strict";var d={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},e=d.exec.call(/()??/,"")[1]===undefined,f=function(){var a=/^/g;return d.test.call(a,""),!a.lastIndex}();RegExp.prototype.exec=function(a){var b=d.exec.apply(this,arguments),c,i;if(b){!e&&b.length>1&&h(b,"")>-1&&(i=RegExp(this.source,d.replace.call(g(this),"g","")),d.replace.call(a.slice(b.index),i,function(){for(var a=1;a<arguments.length-2;a++)arguments[a]===undefined&&(b[a]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var j=1;j<b.length;j++)c=this._xregexp.captureNames[j-1],c&&(b[c]=b[j]);!f&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--}return b},f||(RegExp.prototype.test=function(a){var b=d.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b})}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(a,b,c){function p(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if(typeof b!="function")throw new TypeError;var c=g.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,h=b.apply(f,c.concat(g.call(arguments)));return h!==null&&Object(h)===h?h:f}return b.apply(a,c.concat(g.call(arguments)))};return d});var d=Function.prototype.call,e=Array.prototype,f=Object.prototype,g=e.slice,h=d.bind(f.toString),i=d.bind(f.hasOwnProperty),j,k,l,m,n;if(n=i(f,"__defineGetter__"))j=d.bind(f.__defineGetter__),k=d.bind(f.__defineSetter__),l=d.bind(f.__lookupGetter__),m=d.bind(f.__lookupSetter__);Array.isArray||(Array.isArray=function(a){return h(a)=="[object Array]"}),Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=G(this),c=arguments[1],d=0,e=b.length>>>0;if(h(a)!="[object Function]")throw new TypeError;while(d<e)d in b&&a.call(c,b[d],d,b),d++}),Array.prototype.map||(Array.prototype.map=function(a){var b=G(this),c=b.length>>>0,d=Array(c),e=arguments[1];if(h(a)!="[object Function]")throw new TypeError;for(var f=0;f<c;f++)f in b&&(d[f]=a.call(e,b[f],f,b));return d}),Array.prototype.filter||(Array.prototype.filter=function(a){var b=G(this),c=b.length>>>0,d=[],e=arguments[1];if(h(a)!="[object Function]")throw new TypeError;for(var f=0;f<c;f++)f in b&&a.call(e,b[f],f,b)&&d.push(b[f]);return d}),Array.prototype.every||(Array.prototype.every=function(a){var b=G(this),c=b.length>>>0,d=arguments[1];if(h(a)!="[object Function]")throw new TypeError;for(var e=0;e<c;e++)if(e in b&&!a.call(d,b[e],e,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=G(this),c=b.length>>>0,d=arguments[1];if(h(a)!="[object Function]")throw new TypeError;for(var e=0;e<c;e++)if(e in b&&a.call(d,b[e],e,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=G(this),c=b.length>>>0;if(h(a)!="[object Function]")throw new TypeError;if(!c&&arguments.length==1)throw new TypeError;var d=0,e;if(arguments.length>=2)e=arguments[1];else do{if(d in b){e=b[d++];break}if(++d>=c)throw new TypeError}while(!0);for(;d<c;d++)d in b&&(e=a.call(void 0,e,b[d],d,b));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=G(this),c=b.length>>>0;if(h(a)!="[object Function]")throw new TypeError;if(!c&&arguments.length==1)throw new TypeError;var d,e=c-1;if(arguments.length>=2)d=arguments[1];else do{if(e in b){d=b[e--];break}if(--e<0)throw new TypeError}while(!0);do e in this&&(d=a.call(void 0,d,b[e],e,b));while(e--);return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=G(this),c=b.length>>>0;if(!c)return-1;var d=0;arguments.length>1&&(d=E(arguments[1])),d=d>=0?d:Math.max(0,c+d);for(;d<c;d++)if(d in b&&b[d]===a)return d;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){var b=G(this),c=b.length>>>0;if(!c)return-1;var d=c-1;arguments.length>1&&(d=Math.min(d,E(arguments[1]))),d=d>=0?d:c-Math.abs(d);for(;d>=0;d--)if(d in b&&a===b[d])return d;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:f)});if(!Object.getOwnPropertyDescriptor){var o="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError(o+a);if(!i(a,b))return;var c,d,e;c={enumerable:!0,configurable:!0};if(n){var g=a.__proto__;a.__proto__=f;var d=l(a,b),e=m(a,b);a.__proto__=g;if(d||e)return d&&(c.get=d),e&&(c.set=e),c}return c.value=a[b],c}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),Object.create||(Object.create=function(a,b){var c;if(a===null)c={"__proto__":null};else{if(typeof a!="object")throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return b!==void 0&&Object.defineProperties(c,b),c});if(Object.defineProperty){var q=p({}),r=typeof document=="undefined"||p(document.createElement("div"));if(!q||!r)var s=Object.defineProperty}if(!Object.defineProperty||s){var t="Property description must be an object: ",u="Object.defineProperty called on non-object: ",v="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError(u+a);if(typeof c!="object"&&typeof c!="function"||c===null)throw new TypeError(t+c);if(s)try{return s.call(Object,a,b,c)}catch(d){}if(i(c,"value"))if(n&&(l(a,b)||m(a,b))){var e=a.__proto__;a.__proto__=f,delete a[b],a[b]=c.value,a.__proto__=e}else a[b]=c.value;else{if(!n)throw new TypeError(v);i(c,"get")&&j(a,b,c.get),i(c,"set")&&k(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)i(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(w){Object.freeze=function(a){return function b(b){return typeof b=="function"?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(a){return!1}),Object.isFrozen||(Object.isFrozen=function(a){return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)===a)throw new TypeError;var b="";while(i(a,b))b+="?";a[b]=!0;var c=i(a,b);return delete a[b],c});if(!Object.keys){var x=!0,y=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],z=y.length;for(var A in{toString:null})x=!1;Object.keys=function bd(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var bd=[];for(var b in a)i(a,b)&&bd.push(b);if(x)for(var c=0,d=z;c<d;c++){var e=y[c];i(a,e)&&bd.push(e)}return bd}}if(!Date.prototype.toISOString||(new Date(-621987552e5)).toISOString().indexOf("-000001")===-1)Date.prototype.toISOString=function(){var a,b,c,d;if(!isFinite(this))throw new RangeError;a=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],d=this.getUTCFullYear(),d=(d<0?"-":d>9999?"+":"")+("00000"+Math.abs(d)).slice(0<=d&&d<=9999?-4:-6),b=a.length;while(b--)c=a[b],c<10&&(a[b]="0"+c);return d+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};Date.now||(Date.now=function(){return(new Date).getTime()}),Date.prototype.toJSON||(Date.prototype.toJSON=function(a){if(typeof this.toISOString!="function")throw new TypeError;return this.toISOString()}),Date.parse("+275760-09-13T00:00:00.000Z")!==864e13&&(Date=function(a){var b=function e(b,c,d,f,g,h,i){var j=arguments.length;if(this instanceof a){var k=j==1&&String(b)===b?new a(e.parse(b)):j>=7?new a(b,c,d,f,g,h,i):j>=6?new a(b,c,d,f,g,h):j>=5?new a(b,c,d,f,g):j>=4?new a(b,c,d,f):j>=3?new a(b,c,d):j>=2?new a(b,c):j>=1?new a(b):new a;return k.constructor=e,k}return a.apply(this,arguments)},c=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$");for(var d in a)b[d]=a[d];return b.now=a.now,b.UTC=a.UTC,b.prototype=a.prototype,b.prototype.constructor=b,b.parse=function f(b){var d=c.exec(b);if(d){d.shift();for(var e=1;e<7;e++)d[e]=+(d[e]||(e<3?1:0)),e==1&&d[e]--;var f=+d.pop(),g=+d.pop(),h=d.pop(),i=0;if(h){if(g>23||f>59)return NaN;i=(g*60+f)*6e4*(h=="+"?-1:1)}var j=+d[0];return 0<=j&&j<=99?(d[0]=j+400,a.UTC.apply(this,d)+i-126227808e5):a.UTC.apply(this,d)+i}return a.parse.apply(this,arguments)},b}(Date));var B="\t\n \f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||B.trim()){B="["+B+"]";var C=new RegExp("^"+B+B+"*"),D=new RegExp(B+B+"*$");String.prototype.trim=function(){return String(this).replace(C,"").replace(D,"")}}var E=function(a){return a=+a,a!==a?a=0:a!==0&&a!==1/0&&a!==-Infinity&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a},F="a"[0]!="a",G=function(a){if(a==null)throw new TypeError;return F&&typeof a=="string"&&a?a.split(""):Object(a)}}),ace.define("ace/lib/dom",["require","exports","module"],function(a,b,c){"use strict";var d="http://www.w3.org/1999/xhtml";b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||d,a):document.createElement(a)},b.setText=function(a,b){a.innerText!==undefined&&(a.innerText=b),a.textContent!==undefined&&(a.textContent=b)},b.hasCssClass=function(a,b){var c=a.className.split(/\s+/g);return c.indexOf(b)!==-1},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){var c=a.className.split(/\s+/g);for(;;){var d=c.indexOf(b);if(d==-1)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){var c=a.className.split(/\s+/g),d=!0;for(;;){var e=c.indexOf(b);if(e==-1)break;d=!1,c.splice(e,1)}return d&&c.push(b),a.className=c.join(" "),d},b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.hasCssString=function(a,b){var c=0,d;b=b||document;if(b.createStyleSheet&&(d=b.styleSheets)){while(c<d.length)if(d[c++].title===a)return!0}else if(d=b.getElementsByTagName("style"))while(c<d.length)if(d[c++].id===a)return!0;return!1},b.importCssString=function e(a,c,e){e=e||document;if(c&&b.hasCssString(c,e))return null;var f;if(e.createStyleSheet)f=e.createStyleSheet(),f.cssText=a,c&&(f.title=c);else{f=e.createElementNS?e.createElementNS(d,"style"):e.createElement("style"),f.appendChild(e.createTextNode(a)),c&&(f.id=c);var g=e.getElementsByTagName("head")[0]||e.documentElement;g.appendChild(f)}},b.importCssStylsheet=function(a,c){if(c.createStyleSheet)c.createStyleSheet(a);else{var d=b.createElement("link");d.rel="stylesheet",d.href=a;var e=c.getElementsByTagName("head")[0]||c.documentElement;e.appendChild(d)}},b.getInnerWidth=function(a){return parseInt(b.computedStyle(a,"paddingLeft"),10)+parseInt(b.computedStyle(a,"paddingRight"),10)+a.clientWidth},b.getInnerHeight=function(a){return parseInt(b.computedStyle(a,"paddingTop"),10)+parseInt(b.computedStyle(a,"paddingBottom"),10)+a.clientHeight},window.pageYOffset!==undefined?(b.getPageScrollTop=function(){return window.pageYOffset},b.getPageScrollLeft=function(){return window.pageXOffset}):(b.getPageScrollTop=function(){return document.body.scrollTop},b.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?b.computedStyle=function(a,b){return b?(window.getComputedStyle(a,"")||{})[b]||"":window.getComputedStyle(a,"")||{}}:b.computedStyle=function(a,b){return b?a.currentStyle[b]:a.currentStyle},b.scrollbarWidth=function(a){var c=b.createElement("p");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px";var d=b.createElement("div"),e=d.style;e.position="absolute",e.left="-10000px",e.overflow="hidden",e.width="200px",e.minWidth="0px",e.height="150px",d.appendChild(c);var f=a.body||a.documentElement;f.appendChild(d);var g=c.offsetWidth;e.overflow="scroll";var h=c.offsetWidth;return g==h&&(h=d.clientWidth),f.removeChild(d),g-h},b.setInnerHtml=function(a,b){var c=a.cloneNode(!1);return c.innerHTML=b,a.parentNode.replaceChild(c,a),c},b.setInnerText=function(a,b){var c=a.ownerDocument;c.body&&"textContent"in c.body?a.textContent=b:a.innerText=b},b.getInnerText=function(a){var b=a.ownerDocument;return b.body&&"textContent"in b.body?a.textContent:a.innerText||a.textContent||""},b.getParentWindow=function(a){return a.defaultView||a.parentWindow}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent","ace/lib/dom"],function(a,b,c){function g(a,b,c){var f=0;e.isOpera&&e.isMac?f=0|(b.metaKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.ctrlKey?8:0):f=0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0);if(c in d.MODIFIER_KEYS){switch(d.MODIFIER_KEYS[c]){case"Alt":f=2;break;case"Shift":f=4;break;case"Ctrl":f=1;break;default:f=8}c=0}return f&8&&(c==91||c==93)&&(c=0),!!f||c in d.FUNCTION_KEYS||c in d.PRINTABLE_KEYS?a(b,f,c):!1}"use strict";var d=a("./keys"),e=a("./useragent"),f=a("./dom");b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c(window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){if(a.removeEventListener)return a.removeEventListener(b,c,!1);a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c)},b.stopEvent=function(a){return b.stopPropagation(a),b.preventDefault(a),!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getDocumentX=function(a){return a.clientX?a.clientX+f.getPageScrollLeft():a.pageX},b.getDocumentY=function(a){return a.clientY?a.clientY+f.getPageScrollTop():a.pageY},b.getButton=function(a){return a.type=="dblclick"?0:a.type=="contextmenu"?2:a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},document.documentElement.setCapture?b.capture=function(a,c,d){function e(a){return c(a),b.stopPropagation(a)}function g(e){c(e),f||(f=!0,d(e)),b.removeListener(a,"mousemove",c),b.removeListener(a,"mouseup",g),b.removeListener(a,"losecapture",g),a.releaseCapture()}var f=!1;b.addListener(a,"mousemove",c),b.addListener(a,"mouseup",g),b.addListener(a,"losecapture",g),a.setCapture()}:b.capture=function(a,b,c){function d(a){b(a),a.stopPropagation()}function e(a){b&&b(a),c&&c(a),document.removeEventListener("mousemove",d,!0),document.removeEventListener("mouseup",e,!0),a.stopPropagation()}document.addEventListener("mousemove",d,!0),document.addEventListener("mouseup",e,!0)},b.addMouseWheelListener=function(a,c){var d=0,e=function(a){if(a.wheelDelta!==undefined){Math.abs(a.wheelDeltaY)>d&&(d=Math.abs(a.wheelDeltaY));if(d>5e3)var b=400;else var b=8;a.wheelDeltaX!==undefined?(a.wheelX=-a.wheelDeltaX/b,a.wheelY=-a.wheelDeltaY/b):(a.wheelX=0,a.wheelY=-a.wheelDelta/b)}else a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=(a.detail||0)*5,a.wheelY=0):(a.wheelX=0,a.wheelY=(a.detail||0)*5);c(a)};b.addListener(a,"DOMMouseScroll",e),b.addListener(a,"mousewheel",e)},b.addMultiMouseDownListener=function(a,c,d,f,g){var h=0,i,j,k=function(a){h+=1,h==1&&(i=a.clientX,j=a.clientY,setTimeout(function(){h=0},f||600));var e=b.getButton(a)==c;if(!e||Math.abs(a.clientX-i)>5||Math.abs(a.clientY-j)>5)h=0;h==d&&(h=0,g(a));if(e)return b.preventDefault(a)};b.addListener(a,"mousedown",k),e.isOldIE&&b.addListener(a,"dblclick",k)},b.addCommandKeyListener=function(a,c){var d=b.addListener;if(e.isOldGecko||e.isOpera){var f=null;d(a,"keydown",function(a){f=a.keyCode}),d(a,"keypress",function(a){return g(c,a,f)})}else{var h=null;d(a,"keydown",function(a){return h=a.keyIdentifier||a.keyCode,g(c,a,a.keyCode)})}};if(window.postMessage){var h=1;b.nextTick=function(a,c){c=c||window;var d="zero-timeout-message-"+h;b.addListener(c,"message",function e(f){f.data==d&&(b.stopPropagation(f),b.removeListener(c,"message",e),a())}),c.postMessage(d,"*")}}else b.nextTick=function(a,b){b=b||window,window.setTimeout(a,0)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(a,b,c){"use strict";var d=a("./oop"),e=function(){var a={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:'"'}};for(var b in a.FUNCTION_KEYS){var c=a.FUNCTION_KEYS[b].toUpperCase();a[c]=parseInt(b,10)}return d.mixin(a,a.MODIFIER_KEYS),d.mixin(a,a.PRINTABLE_KEYS),d.mixin(a,a.FUNCTION_KEYS),a}();d.mixin(b,e),b.keyCodeToString=function(a){return(e[a]||String.fromCharCode(a)).toLowerCase()}}),ace.define("ace/lib/oop",["require","exports","module"],function(a,b,c){"use strict",b.inherits=function(){var a=function(){};return function(b,c){a.prototype=c.prototype,b.super_=c.prototype,b.prototype=new a,b.prototype.constructor=b}}(),b.mixin=function(a,b){for(var c in b)a[c]=b[c]},b.implement=function(a,c){b.mixin(a,c)}}),ace.define("ace/lib/useragent",["require","exports","module"],function(a,b,c){"use strict";var d=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),e=navigator.userAgent;b.isWin=d=="win",b.isMac=d=="mac",b.isLinux=d=="linux",b.isIE=navigator.appName=="Microsoft Internet Explorer"&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=window.controllers&&window.navigator.product==="Gecko",b.isOldGecko=b.isGecko&&parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10)<4,b.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",b.isWebKit=parseFloat(e.split("WebKit/")[1])||undefined,b.isChrome=parseFloat(e.split(" Chrome/")[1])||undefined,b.isAIR=e.indexOf("AdobeAIR")>=0,b.isIPad=e.indexOf("iPad")>=0,b.isTouchPad=e.indexOf("TouchPad")>=0,b.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},b.getOS=function(){return b.isMac?b.OS.MAC:b.isLinux?b.OS.LINUX:b.OS.WINDOWS}}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands"],function(a,b,c){"use strict",a("./lib/fixoldbrowsers");var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./lib/useragent"),g=a("./keyboard/textinput").TextInput,h=a("./mouse/mouse_handler").MouseHandler,i=a("./mouse/fold_handler").FoldHandler,j=a("./keyboard/keybinding").KeyBinding,k=a("./edit_session").EditSession,l=a("./search").Search,m=a("./range").Range,n=a("./lib/event_emitter").EventEmitter,o=a("./commands/command_manager").CommandManager,p=a("./commands/default_commands").commands,q=function(a,b){var c=a.getContainerElement();this.container=c,this.renderer=a,this.textInput=new g(a.getTextAreaContainer(),this),this.keyBinding=new j(this),f.isIPad||(this.$mouseHandler=new h(this),new i(this)),this.$blockScrolling=0,this.$search=(new l).set({wrap:!0}),this.commands=new o(f.isMac?"mac":"win",p),this.setSession(b||new k(""))};((function(){d.implement(this,n),this.setKeyboardHandler=function(a){this.keyBinding.setKeyboardHandler(a)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session==a)return;if(this.session){var b=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeLeftTop",this.$onScrollLeftChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=a,this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.updateText.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:a,oldSession:b})},this.getSession=function(){return this.session},this.getSelection=function(){return this.selection},this.resize=function(){this.renderer.onResize()},this.setTheme=function(a){this.renderer.setTheme(a)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.setFontSize=function(a){this.container.style.fontSize=a,this.renderer.updateFontSize()},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(this.$highlightPending)return;var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session.findMatchingBracket(a.getCursorPosition());if(b){var c=new m(b.row,b.column,b.row,b.column+1);a.session.$bracketHighlight=a.session.addMarker(c,"ace_bracket","text")}},10)},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus")},this.onBlur=function(){this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur")},this.onDocumentChange=function(a){var b=a.data,c=b.range,d;c.start.row==c.end.row&&b.action!="insertLines"&&b.action!="removeLines"?d=c.end.row:d=Infinity,this.renderer.updateLines(c.start.row,d),this._emit("change",a),this.onCursorChange()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.renderer.updateCursor(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.renderer.moveTextAreaToCursor(this.textInput.getElement()),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.$updateHighlightActiveLine=function(){var a=this.getSession();a.$highlightLineMarker&&a.removeMarker(a.$highlightLineMarker),a.$highlightLineMarker=null;if(this.getHighlightActiveLine()&&(this.getSelectionStyle()!="line"||!this.selection.isMultiLine())){var b=this.getCursorPosition(),c=this.session.getFoldLine(b.row),d;c?d=new m(c.start.row,0,c.end.row+1,0):d=new m(b.row,0,b.row+1,0),a.$highlightLineMarker=a.addMarker(d,"ace_active_line","background")}},this.onSelectionChange=function(a){var b=this.getSession();b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null;if(!this.selection.isEmpty()){var c=this.selection.getRange(),d=this.getSelectionStyle();b.$selectionMarker=b.addMarker(c,"ace_selection",d)}else this.$updateHighlightActiveLine();this.$highlightSelectedWord&&this.session.getMode().highlightSelection(this)},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.setBreakpoints(this.session.getBreakpoints())},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(){this.renderer.updateText()},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getCopyText=function(){var a="";return this.selection.isEmpty()||(a=this.session.getTextRange(this.getSelectionRange())),this._emit("copy",a),a},this.onCut=function(){if(this.$readOnly)return;var a=this.getSelectionRange();this._emit("cut",a),this.selection.isEmpty()||(this.session.remove(a),this.clearSelection())},this.insert=function(a){var b=this.session,c=b.getMode(),d=this.getCursorPosition();if(this.getBehavioursEnabled()){var e=c.transformAction(b.getState(d.row),"insertion",this,b,a);e&&(a=e.text)}a=a.replace("\t",this.session.getTabString());if(!this.selection.isEmpty())d=this.session.remove(this.getSelectionRange()),this.clearSelection();else if(this.session.getOverwrite()){var f=new m.fromPoints(d,d);f.end.column+=a.length,this.session.remove(f)}this.clearSelection();var g=d.column,h=b.getState(d.row),i=c.checkOutdent(h,b.getLine(d.row),a),j=b.getLine(d.row),k=c.getNextLineIndent(h,j.slice(0,d.column),b.getTabString()),l=b.insert(d,a);e&&e.selection&&(e.selection.length==2?this.selection.setSelectionRange(new m(d.row,g+e.selection[0],d.row,g+e.selection[1])):this.selection.setSelectionRange(new m(d.row+e.selection[0],e.selection[1],d.row+e.selection[2],e.selection[3])));var h=b.getState(d.row);if(b.getDocument().isNewLine(a)){this.moveCursorTo(d.row+1,0);var n=b.getTabSize(),o=Number.MAX_VALUE;for(var p=d.row+1;p<=l.row;++p){var q=0;j=b.getLine(p);for(var r=0;r<j.length;++r)if(j.charAt(r)=="\t")q+=n;else if(j.charAt(r)==" ")q+=1;else break;/[^\s]/.test(j)&&(o=Math.min(q,o))}for(var p=d.row+1;p<=l.row;++p){var s=o;j=b.getLine(p);for(var r=0;r<j.length&&s>0;++r)j.charAt(r)=="\t"?s-=n:j.charAt(r)==" "&&(s-=1);b.remove(new m(p,0,p,r))}b.indentRows(d.row+1,l.row,k)}i&&c.autoOutdent(h,b,d.row)},this.onTextInput=function(a,b){b&&this._emit("paste",a),this.keyBinding.onTextInput(a,b)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.$mouseHandler.setScrollSpeed(a)},this.getScrollSpeed=function(){return this.$mouseHandler.getScrollSpeed()},this.setDragDelay=function(a){this.$mouseHandler.setDragDelay(a)},this.getDragDelay=function(){return this.$mouseHandler.getDragDelay()},this.$selectionStyle="line",this.setSelectionStyle=function(a){if(this.$selectionStyle==a)return;this.$selectionStyle=a,this.onSelectionChange(),this._emit("changeSelectionStyle",{data:a})},this.getSelectionStyle=function(){return this.$selectionStyle},this.$highlightActiveLine=!0,this.setHighlightActiveLine=function(a){if(this.$highlightActiveLine==a)return;this.$highlightActiveLine=a,this.$updateHighlightActiveLine()},this.getHighlightActiveLine=function(){return this.$highlightActiveLine},this.$highlightSelectedWord=!0,this.setHighlightSelectedWord=function(a){if(this.$highlightSelectedWord==a)return;this.$highlightSelectedWord=a,a?this.session.getMode().highlightSelection(this):this.session.getMode().clearSelectionHighlight(this)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setShowInvisibles=function(a){if(this.getShowInvisibles()==a)return;this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.$readOnly=!1,this.setReadOnly=function(a){this.$readOnly=a},this.getReadOnly=function(){return this.$readOnly},this.$modeBehaviours=!0,this.setBehavioursEnabled=function(a){this.$modeBehaviours=a},this.getBehavioursEnabled=function(){return this.$modeBehaviours},this.setShowFoldWidgets=function(a){var b=this.renderer.$gutterLayer;if(b.getShowFoldWidgets()==a)return;this.renderer.$gutterLayer.setShowFoldWidgets(a),this.$showFoldWidgets=a,this.renderer.updateFull()},this.getShowFoldWidgets=function(){return this.renderer.$gutterLayer.getShowFoldWidgets()},this.remove=function(a){this.selection.isEmpty()&&(a=="left"?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var c=this.session,d=c.getState(b.start.row),e=c.getMode().transformAction(d,"deletion",this,c,b);e&&(b=e)}this.session.remove(b),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var a=this.getCursorPosition(),b=a.column;if(b===0)return;var c=this.session.getLine(a.row),d,e;b<c.length?(d=c.charAt(b)+c.charAt(b-1),e=new m(a.row,b-1,a.row,b+1)):(d=c.charAt(b-1)+c.charAt(b-2),e=new m(a.row,b-2,a.row,b)),this.session.replace(e,d)},this.toLowerCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toLowerCase()),this.selection.setSelectionRange(a)},this.toUpperCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toUpperCase()),this.selection.setSelectionRange(a)},this.indent=function(){var a=this.session,b=this.getSelectionRange();if(!(b.start.row<b.end.row||b.start.column<b.end.column)){var d;if(this.session.getUseSoftTabs()){var f=a.getTabSize(),g=this.getCursorPosition(),h=a.documentToScreenColumn(g.row,g.column),i=f-h%f;d=e.stringRepeat(" ",i)}else d="\t";return this.insert(d)}var c=this.$getSelectedRows();a.indentRows(c.first,c.last,"\t")},this.blockOutdent=function(){var a=this.session.getSelection();this.session.outdentRows(a.getRange())},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)},this.removeLines=function(){var a=this.$getSelectedRows(),b;a.first===0||a.last+1<this.session.getLength()?b=new m(a.first,0,a.last+1,0):b=new m(a.first-1,this.session.getLine(a.first-1).length,a.last,this.session.getLine(a.last).length),this.session.remove(b),this.clearSelection()},this.moveLinesDown=function(){this.$moveLines(function(a,b){return this.session.moveLinesDown(a,b)})},this.moveLinesUp=function(){this.$moveLines(function(a,b){return this.session.moveLinesUp(a,b)})},this.moveText=function(a,b){return this.$readOnly?null:this.session.moveText(a,b)},this.copyLinesUp=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b),0})},this.copyLinesDown=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b)})},this.$moveLines=function(a){var b=this.$getSelectedRows(),c=this.selection;if(!c.isMultiLine())var d=c.getRange(),e=c.isBackwards();var f=a.call(this,b.first,b.last);d?(d.start.row+=f,d.end.row+=f,c.setSelectionRange(d,e)):(c.setSelectionAnchor(b.last+f+1,0),c.$moveSelection(function(){c.moveCursorTo(b.first+f,0)}))},this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:a.start.row,last:a.end.row}},this.onCompositionStart=function(a){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$getPageDownRow=function(){return this.renderer.getScrollBottomRow()},this.$getPageUpRow=function(){var a=this.renderer.getScrollTopRow(),b=this.renderer.getScrollBottomRow();return a-(b-a)},this.selectPageDown=function(){var a=this.$getPageDownRow()+Math.floor(this.$getVisibleRowCount()/2);this.scrollPageDown();var b=this.getSelection(),c=this.session.documentToScreenPosition(b.getSelectionLead()),d=this.session.screenToDocumentPosition(a,c.column);b.selectTo(d.row,d.column)},this.selectPageUp=function(){var a=this.renderer.getScrollTopRow()-this.renderer.getScrollBottomRow(),b=this.$getPageUpRow()+Math.round(a/2);this.scrollPageUp();var c=this.getSelection(),d=this.session.documentToScreenPosition(c.getSelectionLead()),e=this.session.screenToDocumentPosition(b,d.column);c.selectTo(e.row,e.column)},this.gotoPageDown=function(){var a=this.$getPageDownRow(),b=this.getCursorPositionScreen().column;this.scrollToRow(a),this.getSelection().moveCursorToScreen(a,b)},this.gotoPageUp=function(){var a=this.$getPageUpRow(),b=this.getCursorPositionScreen().column;this.scrollToRow(a),this.getSelection().moveCursorToScreen(a,b)},this.scrollPageDown=function(){this.scrollToRow(this.$getPageDownRow())},this.scrollPageUp=function(){this.renderer.scrollToRow(this.$getPageUpRow())},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b){this.renderer.scrollToLine(a,b)},this.centerSelection=function(){var a=this.getSelectionRange(),b=Math.floor(a.start.row+(a.end.row-a.start.row)/2);this.renderer.scrollToLine(b,!0)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(){var a=this.getCursorPosition(),b=this.session.findMatchingBracket(a);b||(a.column+=1,b=this.session.findMatchingBracket(a)),b||(a.column-=2,b=this.session.findMatchingBracket(a)),b&&(this.clearSelection(),this.moveCursorTo(b.row,b.column))},this.gotoLine=function(a,b){this.selection.clearSelection(),this.session.unfold({row:a-1,column:b||0}),this.$blockScrolling+=1,this.moveCursorTo(a-1,b||0),this.$blockScrolling-=1,this.isRowFullyVisible(this.getCursorPosition().row)||this.scrollToLine(a,!0)},this.navigateTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.navigateUp=function(a){this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(-a,0)},this.navigateDown=function(a){this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(a,0)},this.navigateLeft=function(a){if(!this.selection.isEmpty()){var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}else{a=a||1;while(a--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(a){if(!this.selection.isEmpty()){var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}else{a=a||1;while(a--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(a,b){b&&this.$search.set(b);var c=this.$search.find(this.session);if(!c)return;this.$tryReplace(c,a),c!==null&&this.selection.setSelectionRange(c)},this.replaceAll=function(a,b){b&&this.$search.set(b);var c=this.$search.findAll(this.session);if(!c.length)return;var d=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0),this.$blockScrolling+=1;for(var e=c.length-1;e>=0;--e)this.$tryReplace(c[e],a);this.selection.setSelectionRange(d),this.$blockScrolling-=1},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a);return b=this.$search.replace(c,b),b!==null?(a.end=this.session.replace(a,b),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b){this.clearSelection(),b=b||{},b.needle=a,this.$search.set(b),this.$find()},this.findNext=function(a){a=a||{},typeof a.backwards=="undefined"&&(a.backwards=!1),this.$search.set(a),this.$find()},this.findPrevious=function(a){a=a||{},typeof a.backwards=="undefined"&&(a.backwards=!0),this.$search.set(a),this.$find()},this.$find=function(a){this.selection.isEmpty()||this.$search.set({needle:this.session.getTextRange(this.getSelectionRange())}),typeof a!="undefined"&&this.$search.set({backwards:a});var b=this.$search.find(this.session);b&&(this.session.unfold(b),this.selection.setSelectionRange(b))},this.undo=function(){this.session.getUndoManager().undo()},this.redo=function(){this.session.getUndoManager().redo()},this.destroy=function(){this.renderer.destroy()}})).call(q.prototype),b.Editor=q}),ace.define("ace/lib/lang",["require","exports","module"],function(a,b,c){"use strict",b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){return(new Array(b+1)).join(a)};var d=/^\s\s*/,e=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(d,"")},b.stringTrimRight=function(a){return a.replace(e,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){var b=[];for(var c=0,d=a.length;c<d;c++)a[c]&&typeof a[c]=="object"?b[c]=this.copyObject(a[c]):b[c]=a[c];return b},b.deepCopy=function(a){if(typeof a!="object")return a;var b=a.constructor();for(var c in a)typeof a[c]=="object"?b[c]=this.deepCopy(a[c]):b[c]=a[c];return b},b.arrayToMap=function(a){var b={};for(var c=0;c<a.length;c++)b[a[c]]=1;return b},b.arrayRemove=function(a,b){for(var c=0;c<=a.length;c++)b===a[c]&&a.splice(c,1)},b.escapeRegExp=function(a){return a.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},b.deferredCall=function(a){var b=null,c=function(){b=null,a()},d=function(a){return d.cancel(),b=setTimeout(c,a||0),d};return d.schedule=d,d.call=function(){return this.cancel(),a(),d},d.cancel=function(){return clearTimeout(b),b=null,d},d}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom"],function(a,b,c){"use strict";var d=a("../lib/event"),e=a("../lib/useragent"),f=a("../lib/dom"),g=function(a,b){function l(){try{c.select()}catch(a){}}function m(a){if(!i){var d=a||c.value;if(d){d.charCodeAt(d.length-1)==g.charCodeAt(0)?(d=d.slice(0,-1),d&&b.onTextInput(d,j)):b.onTextInput(d,j);if(!v())return!1}}i=!1,j=!1,c.value=g,l()}function v(){return document.activeElement===c}var c=f.createElement("textarea");e.isTouchPad&&c.setAttribute("x-palm-disable-auto-cap",!0),c.style.left="-10000px",c.style.position="fixed",a.insertBefore(c,a.firstChild);var g=String.fromCharCode(0);m();var h=!1,i=!1,j=!1,k="",n=function(a){setTimeout(function(){h||m(a.data)},0)},o=function(a){if(e.isOldIE&&c.value.charCodeAt(0)>128)return;setTimeout(function(){h||m()},0)},p=function(a){h=!0,b.onCompositionStart(),e.isGecko||setTimeout(q,0)},q=function(){if(!h)return;b.onCompositionUpdate(c.value)},r=function(a){h=!1,b.onCompositionEnd()},s=function(a){i=!0;var d=b.getCopyText();d?c.value=d:a.preventDefault(),l(),setTimeout(function(){m()},0)},t=function(a){i=!0;var d=b.getCopyText();d?(c.value=d,b.onCut()):a.preventDefault(),l(),setTimeout(function(){m()},0)};d.addCommandKeyListener(c,b.onCommandKey.bind(b));if(e.isOldIE){var u={13:1,27:1};d.addListener(c,"keyup",function(a){h&&(!c.value||u[a.keyCode])&&setTimeout(r,0);if((c.value.charCodeAt(0)|0)<129)return;h?q():p()})}"onpropertychange"in c&&!("oninput"in c)?d.addListener(c,"propertychange",o):d.addListener(c,"input",n),d.addListener(c,"paste",function(a){j=!0,a.clipboardData&&a.clipboardData.getData?(m(a.clipboardData.getData("text/plain")),a.preventDefault()):o()}),"onbeforecopy"in c&&typeof clipboardData!="undefined"?(d.addListener(c,"beforecopy",function(a){var c=b.getCopyText();c?clipboardData.setData("Text",c):a.preventDefault()}),d.addListener(a,"keydown",function(a){if(a.ctrlKey&&a.keyCode==88){var c=b.getCopyText();c&&(clipboardData.setData("Text",c),b.onCut()),d.preventDefault(a)}})):(d.addListener(c,"copy",s),d.addListener(c,"cut",t)),d.addListener(c,"compositionstart",p),e.isGecko&&d.addListener(c,"text",q),e.isWebKit&&d.addListener(c,"keyup",q),d.addListener(c,"compositionend",r),d.addListener(c,"blur",function(){b.onBlur()}),d.addListener(c,"focus",function(){b.onFocus(),l()}),this.focus=function(){b.onFocus(),l(),c.focus()},this.blur=function(){c.blur()},this.isFocused=v,this.getElement=function(){return c},this.onContextMenu=function(a,b){a&&(k||(k=c.style.cssText),c.style.cssText="position:fixed; z-index:1000;left:"+(a.x-2)+"px; top:"+(a.y-2)+"px;"),b&&(c.value="")},this.onContextMenuClose=function(){setTimeout(function(){k&&(c.style.cssText=k,k=""),m()},0)}};b.TextInput=g}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event"],function(a,b,c){"use strict";var d=a("../lib/event"),e=a("./default_handlers").DefaultHandlers,f=a("./default_gutter_handler").GutterHandler,g=a("./mouse_event").MouseEvent,h=function(a){this.editor=a,new e(a),new f(a),d.addListener(a.container,"mousedown",function(b){return a.focus(),d.preventDefault(b)}),d.addListener(a.container,"selectstart",function(a){return d.preventDefault(a)});var b=a.renderer.getMouseEventTarget();d.addListener(b,"mousedown",this.onMouseEvent.bind(this,"mousedown")),d.addListener(b,"click",this.onMouseEvent.bind(this,"click")),d.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove")),d.addMultiMouseDownListener(b,0,2,500,this.onMouseEvent.bind(this,"dblclick")),d.addMultiMouseDownListener(b,0,3,600,this.onMouseEvent.bind(this,"tripleclick")),d.addMultiMouseDownListener(b,0,4,600,this.onMouseEvent.bind(this,"quadclick")),d.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"));var c=a.renderer.$gutter;d.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),d.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),d.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),d.addListener(c,"mousemove",this.onMouseMove.bind(this,"gutter"))};((function(){this.$scrollSpeed=1,this.setScrollSpeed=function(a){this.$scrollSpeed=a},this.getScrollSpeed=function(){return this.$scrollSpeed},this.onMouseEvent=function(a,b){this.editor._emit(a,new g(b,this.editor))},this.$dragDelay=250,this.setDragDelay=function(a){this.$dragDelay=a},this.getDragDelay=function(){return this.$dragDelay},this.onMouseMove=function(a,b){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!c||!c.length)return;this.editor._emit(a,new g(b,this.editor))},this.onMouseWheel=function(a,b){var c=new g(b,this.editor);c.speed=this.$scrollSpeed*2,c.wheelX=b.wheelX,c.wheelY=b.wheelY,this.editor._emit(a,c)}})).call(h.prototype),b.MouseHandler=h}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/event","ace/lib/dom","ace/lib/browser_focus"],function(a,b,c){function k(a){this.editor=a,this.$clickSelection=null,this.browserFocus=new f,a.setDefaultHandler("mousedown",this.onMouseDown.bind(this)),a.setDefaultHandler("dblclick",this.onDoubleClick.bind(this)),a.setDefaultHandler("tripleclick",this.onTripleClick.bind(this)),a.setDefaultHandler("quadclick",this.onQuadClick.bind(this)),a.setDefaultHandler("mousewheel",this.onScroll.bind(this))}function l(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}"use strict";var d=a("../lib/event"),e=a("../lib/dom"),f=a("../lib/browser_focus").BrowserFocus,g=0,h=1,i=2,j=5;((function(){this.onMouseDown=function(a){function C(b){a.getShiftKey()?m.selection.selectToPosition(b):n.$clickSelection||(m.moveCursorToPosition(b),m.selection.clearSelection(b.row,b.column)),q=h}var b=a.inSelection(),c=a.pageX,f=a.pageY,k=a.getDocumentPosition(),m=this.editor,n=this,o=m.getSelectionRange(),p=o.isEmpty(),q=g;if(b&&(!this.browserFocus.isFocused()||(new Date).getTime()-this.browserFocus.lastFocus<20||!m.isFocused())){m.focus();return}var r=a.getButton();if(r!==0){p&&m.moveCursorToPosition(k),r==2&&(m.textInput.onContextMenu({x:a.clientX,y:a.clientY},p),d.capture(m.container,function(){},m.textInput.onContextMenuClose));return}b||C(k);var s=c,t=f,u=(new Date).getTime(),v,w,x,y=function(a){s=d.getDocumentX(a),t=d.getDocumentY(a)},z=function(a){clearInterval(F),q==g?C(k):q==i&&A(a),n.$clickSelection=null,q=g},A=function(a){e.removeCssClass(m.container,"ace_dragging"),m.session.removeMarker(x),m.$mouseHandler.$clickSelection||v||(m.moveCursorToPosition(k),m.selection.clearSelection(k.row,k.column));if(!v)return;if(w.contains(v.row,v.column)){v=null;return}m.clearSelection();if(a&&(a.ctrlKey||a.altKey))var b=m.session,c=b.insert(v,b.getTextRange(w));else var c=m.moveText(w,v);if(!c){v=null;return}m.selection.setSelectionRange(c)},B=function(){if(q==g){var a=l(c,f,s,t),b=(new Date).getTime();if(a>j){q=h;var d=m.renderer.screenToTextCoordinates(s,t);d.row=Math.max(0,Math.min(d.row,m.session.getLength()-1)),C(d)}else if(b-u>m.getDragDelay()){q=i,w=m.getSelectionRange();var k=m.getSelectionStyle();x=m.session.addMarker(w,"ace_selection",k),m.clearSelection(),e.addCssClass(m.container,"ace_dragging")}}q==i?E():q==h&&D()},D=function(){var a,b=m.renderer.screenToTextCoordinates(s,t);b.row=Math.max(0,Math.min(b.row,m.session.getLength()-1)),n.$clickSelection?n.$clickSelection.contains(b.row,b.column)?m.selection.setSelectionRange(n.$clickSelection):(n.$clickSelection.compare(b.row,b.column)==-1?a=n.$clickSelection.end:a=n.$clickSelection.start,m.selection.setSelectionAnchor(a.row,a.column),m.selection.selectToPosition(b)):m.selection.selectToPosition(b),m.renderer.scrollCursorIntoView()},E=function(){v=m.renderer.screenToTextCoordinates(s,t),v.row=Math.max(0,Math.min(v.row,m.session.getLength()-1)),m.moveCursorToPosition(v)};d.capture(m.container,y,z);var F=setInterval(B,20);return a.preventDefault()},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;c.moveCursorToPosition(b),c.selection.selectWord(),this.$clickSelection=c.getSelectionRange()},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;c.moveCursorToPosition(b),c.selection.selectLine(),this.$clickSelection=c.getSelectionRange()},this.onQuadClick=function(a){var b=this.editor;b.selectAll(),this.$clickSelection=b.getSelectionRange()},this.onScroll=function(a){var b=this.editor;b.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed);if(b.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed))return a.preventDefault()}})).call(k.prototype),b.DefaultHandlers=k}),ace.define("ace/lib/browser_focus",["require","exports","module","ace/lib/oop","ace/lib/event","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./oop"),e=a("./event"),f=a("./event_emitter").EventEmitter,g=function(a){a=a||window,this.lastFocus=(new Date).getTime(),this._isFocused=!0;var b=this;"onfocusin"in a.document?(e.addListener(a.document,"focusin",function(a){b._setFocused(!0)}),e.addListener(a.document,"focusout",function(a){b._setFocused(!!a.toElement)})):(e.addListener(a,"blur",function(a){b._setFocused(!1)}),e.addListener(a,"focus",function(a){b._setFocused(!0)}))};((function(){d.implement(this,f),this.isFocused=function(){return this._isFocused},this._setFocused=function(a){if(this._isFocused==a)return;a&&(this.lastFocus=(new Date).getTime()),this._isFocused=a,this._emit("changeFocus")}})).call(g.prototype),b.BrowserFocus=g}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(a,b,c){"use strict";var d={};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry=this._eventRegistry||{},this._defaultHandlers=this._defaultHandlers||{};var c=this._eventRegistry[a]||[],d=this._defaultHandlers[a];if(!c.length&&!d)return;b=b||{},b.type=a,b.stopPropagation||(b.stopPropagation=function(){this.propagationStopped=!0}),b.preventDefault||(b.preventDefault=function(){this.defaultPrevented=!0});for(var e=0;e<c.length;e++){c[e](b);if(b.propagationStopped)break}d&&!b.defaultPrevented&&d(b)},d.setDefaultHandler=function(a,b){this._defaultHandlers=this._defaultHandlers||{};if(this._defaultHandlers[a])throw new Error("The default handler for '"+a+"' is already set");this._defaultHandlers[a]=b},d.on=d.addEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!c)var c=this._eventRegistry[a]=[];c.indexOf(b)==-1&&c.push(b)},d.removeListener=d.removeEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!c)return;var d=c.indexOf(b);d!==-1&&c.splice(d,1)},d.removeAllListeners=function(a){this._eventRegistry&&(this._eventRegistry[a]=[])},b.EventEmitter=d}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module"],function(a,b,c){function d(a){a.setDefaultHandler("gutterclick",function(b){var c=b.getDocumentPosition().row,d=a.session.selection;d.moveCursorTo(c,0),d.selectLine()})}"use strict",b.GutterHandler=d}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event"],function(a,b,c){"use strict";var d=a("../lib/event"),e=b.MouseEvent=function(a,b){this.domEvent=a,this.editor=b,this.pageX=d.getDocumentX(a),this.pageY=d.getDocumentY(a),this.clientX=a.clientX,this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};((function(){this.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){if(this.$pos)return this.$pos;var a=d.getDocumentX(this.domEvent),b=d.getDocumentY(this.domEvent);return this.$pos=this.editor.renderer.screenToTextCoordinates(a,b),this.$pos.row=Math.max(0,Math.min(this.$pos.row,this.editor.session.getLength()-1)),this.$pos},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var a=this.editor;if(a.getReadOnly())this.$inSelection=!1;else{var b=a.getSelectionRange();if(b.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=b.contains(c.row,c.column)}}return this.$inSelection},this.getButton=function(){return d.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=function(){return this.domEvent.ctrlKey||this.domEvent.metaKey}})).call(e.prototype)}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(a,b,c){function d(a){a.on("click",function(b){var c=b.getDocumentPosition(),d=a.session,e=d.getFoldAt(c.row,c.column,1);e&&(b.getAccelKey()?d.removeFold(e):d.expandFold(e),b.stop())}),a.on("gutterclick",function(b){if(b.domEvent.target.className.indexOf("ace_fold-widget")!=-1){var c=b.getDocumentPosition().row;a.session.onFoldWidgetClick(c,b.domEvent),b.stop()}})}"use strict",b.FoldHandler=d}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event","ace/commands/default_commands"],function(a,b,c){"use strict";var d=a("../lib/keys"),e=a("../lib/event");a("../commands/default_commands");var f=function(a){this.$editor=a,this.$data={},this.$handlers=[this]};((function(){this.setKeyboardHandler=function(a){if(this.$handlers[this.$handlers.length-1]==a)return;this.$data={},this.$handlers=a?[this,a]:[this]},this.addKeyboardHandler=function(a){this.removeKeyboardHandler(a),this.$handlers.push(a)},this.removeKeyboardHandler=function(a){var b=this.$handlers.indexOf(a);return b==-1?!1:(this.$handlers.splice(b,1),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(a,b,c,d){var f;for(var g=this.$handlers.length;g--;){f=this.$handlers[g].handleKeyboard(this.$data,a,b,c,d);if(f&&f.command)break}if(!f||!f.command)return!1;var h=!1,i=this.$editor.commands;return f.command!="null"?h=i.exec(f.command,this.$editor,f.args):h=!0,h&&d&&e.stopEvent(d),h},this.handleKeyboard=function(a,b,c){return{command:this.$editor.commands.findKeyCommand(b,c)}},this.onCommandKey=function(a,b,c){var e=d.keyCodeToString(c);this.$callKeyboardHandlers(b,e,c,a)},this.onTextInput=function(a,b){var c=!1;!b&&a.length==1&&(c=this.$callKeyboardHandlers(0,a)),c||this.$editor.commands.exec("insertstring",this.$editor,a)}})).call(f.prototype),b.KeyBinding=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang"],function(a,b,c){function e(a,b){return{win:a,mac:b}}"use strict";var d=a("../lib/lang");b.commands=[{name:"selectall",bindKey:e("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:e(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:e("Ctrl-L","Command-L"),exec:function(a){var b=parseInt(prompt("Enter line number:"),10);isNaN(b)||a.gotoLine(b)},readOnly:!0},{name:"fold",bindKey:e("Alt-L","Alt-L"),exec:function(a){a.session.toggleFold(!1)},readOnly:!0},{name:"unfold",bindKey:e("Alt-Shift-L","Alt-Shift-L"),exec:function(a){a.session.toggleFold(!0)},readOnly:!0},{name:"foldall",bindKey:e("Alt-0","Alt-0"),exec:function(a){a.session.foldAll()},readOnly:!0},{name:"unfoldall",bindKey:e("Alt-Shift-0","Alt-Shift-0"),exec:function(a){a.session.unfold()},readOnly:!0},{name:"findnext",bindKey:e("Ctrl-K","Command-G"),exec:function(a){a.findNext()},readOnly:!0},{name:"findprevious",bindKey:e("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},readOnly:!0},{name:"find",bindKey:e("Ctrl-F","Command-F"),exec:function(a){var b=prompt("Find:",a.getCopyText());a.find(b)},readOnly:!0},{name:"overwrite",bindKey:e("Insert","Insert"),exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:e("Ctrl-Shift-Home|Alt-Shift-Up","Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},readOnly:!0},{name:"gotostart",bindKey:e("Ctrl-Home|Ctrl-Up","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},readOnly:!0},{name:"selectup",bindKey:e("Shift-Up","Shift-Up"),exec:function(a){a.getSelection().selectUp()},readOnly:!0},{name:"golineup",bindKey:e("Up","Up|Ctrl-P"),exec:function(a,b){a.navigateUp(b.times)},readOnly:!0},{name:"selecttoend",bindKey:e("Ctrl-Shift-End|Alt-Shift-Down","Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},readOnly:!0},{name:"gotoend",bindKey:e("Ctrl-End|Ctrl-Down","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},readOnly:!0},{name:"selectdown",bindKey:e("Shift-Down","Shift-Down"),exec:function(a){a.getSelection().selectDown()},readOnly:!0},{name:"golinedown",bindKey:e("Down","Down|Ctrl-N"),exec:function(a,b){a.navigateDown(b.times)},readOnly:!0},{name:"selectwordleft",bindKey:e("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},readOnly:!0},{name:"gotowordleft",bindKey:e("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},readOnly:!0},{name:"selecttolinestart",bindKey:e("Alt-Shift-Left","Command-Shift-Left"),exec:function(a){a.getSelection().selectLineStart()},readOnly:!0},{name:"gotolinestart",bindKey:e("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},readOnly:!0},{name:"selectleft",bindKey:e("Shift-Left","Shift-Left"),exec:function(a){a.getSelection().selectLeft()},readOnly:!0},{name:"gotoleft",bindKey:e("Left","Left|Ctrl-B"),exec:function(a,b){a.navigateLeft(b.times)},readOnly:!0},{name:"selectwordright",bindKey:e("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},readOnly:!0},{name:"gotowordright",bindKey:e("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},readOnly:!0},{name:"selecttolineend",bindKey:e("Alt-Shift-Right","Command-Shift-Right"),exec:function(a){a.getSelection().selectLineEnd()},readOnly:!0},{name:"gotolineend",bindKey:e("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},readOnly:!0},{name:"selectright",bindKey:e("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},readOnly:!0},{name:"gotoright",bindKey:e("Right","Right|Ctrl-F"),exec:function(a,b){a.navigateRight(b.times)},readOnly:!0},{name:"selectpagedown",bindKey:e("Shift-PageDown","Shift-PageDown"),exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:e(null,"PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:e("PageDown","Option-PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:e("Shift-PageUp","Shift-PageUp"),exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:e(null,"PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:e("PageUp","Option-PageUp"),exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"selectlinestart",bindKey:e("Shift-Home","Shift-Home"),exec:function(a){a.getSelection().selectLineStart()},readOnly:!0},{name:"selectlineend",bindKey:e("Shift-End","Shift-End"),exec:function(a){a.getSelection().selectLineEnd()},readOnly:!0},{name:"togglerecording",bindKey:e("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording()},readOnly:!0},{name:"replaymacro",bindKey:e("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:e("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching()},readOnly:!0},{name:"removeline",bindKey:e("Ctrl-D","Command-D"),exec:function(a){a.removeLines()}},{name:"togglecomment",bindKey:e("Ctrl-7","Command-7"),exec:function(a){a.toggleCommentLines()}},{name:"replace",bindKey:e("Ctrl-R","Command-Option-F"),exec:function(a){var b=prompt("Find:",a.getCopyText());if(!b)return;var c=prompt("Replacement:");if(!c)return;a.replace(c,{needle:b})}},{name:"replaceall",bindKey:e("Ctrl-Shift-R","Command-Shift-Option-F"),exec:function(a){var b=prompt("Find:");if(!b)return;var c=prompt("Replacement:");if(!c)return;a.replaceAll(c,{needle:b})}},{name:"undo",bindKey:e("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:e("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:e("Ctrl-Alt-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()}},{name:"movelinesup",bindKey:e("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()}},{name:"copylinesdown",bindKey:e("Ctrl-Alt-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()}},{name:"movelinesdown",bindKey:e("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()}},{name:"del",bindKey:e("Delete","Delete|Ctrl-D"),exec:function(a){a.remove("right")}},{name:"backspace",bindKey:e("Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace","Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")}},{name:"removetolinestart",bindKey:e("Alt-Backspace","Option-Backspace"),exec:function(a){a.removeToLineStart()}},{name:"removetolineend",bindKey:e("Alt-Delete","Ctrl-K"),exec:function(a){a.removeToLineEnd()}},{name:"removewordleft",bindKey:e("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()}},{name:"removewordright",bindKey:e("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()}},{name:"outdent",bindKey:e("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()}},{name:"indent",bindKey:e("Tab","Tab"),exec:function(a){a.indent()}},{name:"insertstring",exec:function(a,b){a.insert(b)}},{name:"inserttext",exec:function(a,b){a.insert(d.stringRepeat(b.text||"",b.times||1))}},{name:"splitline",bindKey:e(null,"Ctrl-O"),exec:function(a){a.splitLine()}},{name:"transposeletters",bindKey:e("Ctrl-T","Ctrl-T"),exec:function(a){a.transposeLetters()}},{name:"touppercase",bindKey:e("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()}},{name:"tolowercase",bindKey:e("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()}}]}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/edit_session/folding","ace/edit_session/bracket_match"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./lib/event_emitter").EventEmitter,g=a("./selection").Selection,h=a("./mode/text").Mode,i=a("./range").Range,j=a("./document").Document,k=a("./background_tokenizer").BackgroundTokenizer,l=function(a,b){this.$modified=!0,this.$breakpoints=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$rowCache=[],this.$wrapData=[],this.$foldData=[],this.$undoSelect=!0,this.$foldData.toString=function(){var a="";return this.forEach(function(b){a+="\n"+b.toString()}),a},a instanceof j?this.setDocument(a):this.setDocument(new j(a)),this.selection=new g(this),b?this.setMode(b):this.setMode(new h)};((function(){function o(a){return a<4352?!1:a>=4352&&a<=4447||a>=4515&&a<=4519||a>=4602&&a<=4607||a>=9001&&a<=9002||a>=11904&&a<=11929||a>=11931&&a<=12019||a>=12032&&a<=12245||a>=12272&&a<=12283||a>=12288&&a<=12350||a>=12353&&a<=12438||a>=12441&&a<=12543||a>=12549&&a<=12589||a>=12593&&a<=12686||a>=12688&&a<=12730||a>=12736&&a<=12771||a>=12784&&a<=12830||a>=12832&&a<=12871||a>=12880&&a<=13054||a>=13056&&a<=19903||a>=19968&&a<=42124||a>=42128&&a<=42182||a>=43360&&a<=43388||a>=44032&&a<=55203||a>=55216&&a<=55238||a>=55243&&a<=55291||a>=63744&&a<=64255||a>=65040&&a<=65049||a>=65072&&a<=65106||a>=65108&&a<=65126||a>=65128&&a<=65131||a>=65281&&a<=65376||a>=65504&&a<=65510}d.implement(this,f),this.setDocument=function(a){if(this.doc)throw new Error("Document is already set");this.doc=a,a.on("change",this.onChange.bind(this)),this.on("changeFold",this.onChangeFold.bind(this)),this.bgTokenizer&&(this.bgTokenizer.setDocument(this.getDocument()),this.bgTokenizer.start(0))},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(a==0){this.$rowCache=[];return}var b=this.$rowCache;for(var c=0;c<b.length;c++)if(b[c].docRow>=a){b.splice(c,b.length);return}},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);!this.$fromUndo&&this.$undoManager&&!b.ignore&&(this.$deltasDoc.push(b),c&&c.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer.start(b.range.start.row),this._emit("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a,b){return this.bgTokenizer.getTokens(a,b)},this.getTokenAt=function(a,b){var c=this.bgTokenizer.getTokens(a,a)[0].tokens,d,e=0;if(b==null)f=c.length-1,e=this.getLine(a).length;else for(var f=0;f<c.length;f++){e+=c[f].value.length;if(e>=b)break}return d=c[f],d?(d.index=f,d.start=e-d.value.length,d):null},this.setUndoManager=function(a){this.$undoManager=a,this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b]}),b.$deltas=[]},this.$informUndoManager=e.deferredCall(this.$syncInformUndoManager)}},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?e.stringRepeat(" ",this.getTabSize()):"\t"},this.$useSoftTabs=!0,this.setUseSoftTabs=function(a){if(this.$useSoftTabs===a)return;this.$useSoftTabs=a},this.getUseSoftTabs=function(){return this.$useSoftTabs},this.$tabSize=4,this.setTabSize=function(a){if(isNaN(a)||this.$tabSize===a)return;this.$modified=!0,this.$tabSize=a,this._emit("changeTabSize")},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&a.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(a){if(this.$overwrite==a)return;this.$overwrite=a,this._emit("changeOverwrite")},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b<a.length;b++)this.$breakpoints[a[b]]=!0;this._emit("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit("changeBreakpoint",{})},this.setBreakpoint=function(a){this.$breakpoints[a]=!0,this._emit("changeBreakpoint",{})},this.clearBreakpoint=function(a){delete this.$breakpoints[a],this._emit("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.addMarker=function(a,b,c,d){var e=this.$markerId++,f={range:a,type:c||"line",renderer:typeof c=="function"?c:null,clazz:b,inFront:!!d};return d?(this.$frontMarkers[e]=f,this._emit("changeFrontMarker")):(this.$backMarkers[e]=f,this._emit("changeBackMarker")),e},this.removeMarker=function(a){var b=this.$frontMarkers[a]||this.$backMarkers[a];if(!b)return;var c=b.inFront?this.$frontMarkers:this.$backMarkers;b&&(delete c[a],this._emit(b.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(a){return a?this.$frontMarkers:this.$backMarkers},this.setAnnotations=function(a){this.$annotations={};for(var b=0;b<a.length;b++){var c=a[b],d=c.row;this.$annotations[d]?this.$annotations[d].push(c):this.$annotations[d]=[c]}this._emit("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||{}},this.clearAnnotations=function(){this.$annotations={},this._emit("changeAnnotation",{})},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r?\n)/m);b?this.$autoNewLine=b[1]:this.$autoNewLine="\n"},this.getWordRange=function(a,b){var c=this.getLine(a),d=!1;b>0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe));var e=d?this.tokenRe:this.nonTokenRe,f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}var g=b;while(g<c.length&&c.charAt(g).match(e))g++;return new i(a,f,a,g)},this.getAWordRange=function(a,b){var c=this.getWordRange(a,b),d=this.getLine(c.end.row);while(d.charAt(c.end.column).match(/[ \t]/))c.end.column+=1;return c},this.setNewLineMode=function(a){this.doc.setNewLineMode(a)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.$useWorker=!0,this.setUseWorker=function(a){if(this.$useWorker==a)return;this.$useWorker=a,this.$stopWorker(),a&&this.$startWorker()},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(a){var b=a.data;this.bgTokenizer.start(b.first),this._emit("tokenizerUpdate",a)},this.$mode=null,this.setMode=function(a){if(this.$mode===a)return;this.$mode=a,this.$stopWorker(),this.$useWorker&&this.$startWorker();var b=a.getTokenizer();if(b.addEventListener!==undefined){var c=this.onReloadTokenizer.bind(this);b.addEventListener("update",c)}if(!this.bgTokenizer){this.bgTokenizer=new k(b);var d=this;this.bgTokenizer.addEventListener("update",function(a){d._emit("tokenizerUpdate",a)})}else this.bgTokenizer.setTokenizer(b);this.bgTokenizer.setDocument(this.getDocument()),this.bgTokenizer.start(0),this.tokenRe=a.tokenRe,this.nonTokenRe=a.nonTokenRe,this.$setFolding(a.foldingRules),this._emit("changeMode")},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if(typeof Worker!="undefined"&&!a.noWorker)try{this.$worker=this.$mode.createWorker(this)}catch(b){console.log("Could not load worker"),console.log(b),this.$worker=null}else this.$worker=null},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(a){a=Math.round(Math.max(0,a));if(this.$scrollTop===a)return;this.$scrollTop=a,this._emit("changeScrollTop",a)},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(a){a=Math.round(Math.max(0,a));if(this.$scrollLeft===a)return;this.$scrollLeft=a,this._emit("changeScrollLeft",a)},this.getScrollLeft=function(){return this.$scrollLeft},this.getWidth=function(){return this.$computeWidth(),this.width},this.getScreenWidth=function(){return this.$computeWidth(),this.screenWidth},this.$computeWidth=function(a){if(this.$modified||a){this.$modified=!1;var b=this.doc.getAllLines(),c=0,d=0;for(var e=0;e<b.length;e++){var f=this.getFoldLine(e),g,h;g=b[e];if(f){var i=f.range.end;g=this.getFoldDisplayLine(f),e=i.row}h=g.length,c=Math.max(c,h),this.$useWrapMode||(d=Math.max(d,this.$getStringScreenWidth(g)[0]))}this.width=c,this.$useWrapMode?this.screenWidth=this.$wrapLimit:this.screenWidth=d}},this.getLine=function(a){return this.doc.getLine(a)},this.getLines=function(a,b){return this.doc.getLines(a,b)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(a){return this.doc.getTextRange(a)},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(!a.length)return;this.$fromUndo=!0;var c=null;for(var d=a.length-1;d!=-1;d--){var e=a[d];e.group=="doc"?(this.doc.revertDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!0,c)):e.deltas.forEach(function(a){this.addFolds(a.folds)},this)}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c},this.redoChanges=function(a,b){if(!a.length)return;this.$fromUndo=!0;var c=null;for(var d=0;d<a.length;d++){var e=a[d];e.group=="doc"&&(this.doc.applyDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!1,c))}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c},this.setUndoSelect=function(a){this.$undoSelect=a},this.$getUndoSelection=function(a,b,c){function d(a){var c=a.action=="insertText"||a.action=="insertLines";return b?!c:c}var e=a[0],f,g,h=!1;d(e)?(f=e.range.clone(),h=!0):(f=i.fromPoints(e.range.start,e.range.start),h=!1);for(var j=1;j<a.length;j++)e=a[j],d(e)?(g=e.range.start,f.compare(g.row,g.column)==-1&&f.setStart(e.range.start),g=e.range.end,f.compare(g.row,g.column)==1&&f.setEnd(e.range.end),h=!0):(g=e.range.start,f.compare(g.row,g.column)==-1&&(f=i.fromPoints(e.range.start,e.range.start)),h=!1);if(c!=null){var k=c.compareRange(f);k==1?f.setStart(c.start):k==-1&&f.setEnd(c.end)}return f},this.replace=function(a,b){return this.doc.replace(a,b)},this.moveText=function(a,b){var c=this.getTextRange(a);this.remove(a);var d=b.row,e=b.column;!a.isMultiLine()&&a.start.row==d&&a.end.column<e&&(e-=c.length);if(a.isMultiLine()&&a.end.row<d){var f=this.doc.$split(c);d-=f.length-1}var g=d+a.end.row-a.start.row,h=a.isMultiLine()?a.end.column:e+a.end.column-a.start.column,j=new i(d,e,g,h);return this.insert(j.start,c),j},this.indentRows=function(a,b,c){c=c.replace(/\t/g,this.getTabString());for(var d=a;d<=b;d++)this.insert({row:d,column:0},c)},this.outdentRows=function(a){var b=a.collapseRows(),c=new i(0,0,0,0),d=this.getTabSize();for(var e=b.start.row;e<=b.end.row;++e){var f=this.getLine(e);c.start.row=e,c.end.row=e;for(var g=0;g<d;++g)if(f.charAt(g)!=" ")break;g<d&&f.charAt(g)=="\t"?(c.start.column=g,c.end.column=g+1):(c.start.column=0,c.end.column=g),this.remove(c)}},this.moveLinesUp=function(a,b){if(a<=0)return 0;var c=this.doc.removeLines(a,b);return this.doc.insertLines(a-1,c),-1},this.moveLinesDown=function(a,b){if(b>=this.doc.getLength()-1)return 0;var c=this.doc.removeLines(a,b);return this.doc.insertLines(a+1,c),1},this.duplicateLines=function(a,b){var a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b),c=this.getLines(a,b);this.doc.insertLines(a,c);var d=b-a+1;return d},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipColumnToRow=function(a,b){return b<0?0:Math.min(this.doc.getLine(a).length,b)},this.$clipPositionToDocument=function(a,b){b=Math.max(0,b);if(a<0)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);var b=this.doc.getLength()-1;return a.end.row>b?(a.end.row=b,a.end.column=this.doc.getLine(b).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0);if(a){var b=this.getLength();this.$wrapData=[];for(var c=0;c<b;c++)this.$wrapData.push([]);this.$updateWrapData(0,b-1)}this._emit("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(a,b){if(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)this.$wrapLimitRange.min=a,this.$wrapLimitRange.max=b,this.$modified=!0,this._emit("changeWrapMode")},this.adjustWrapLimit=function(a){var b=this.$constrainWrapLimit(a);return b!=this.$wrapLimit&&b>0?(this.$wrapLimit=b,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(a){var b=this.$wrapLimitRange.min;b&&(a=Math.max(b,a));var c=this.$wrapLimitRange.max;return c&&(a=Math.min(c,a)),Math.max(1,a)},this.getWrapLimit=function(){return this.$wrapLimit},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var b=this.$useWrapMode,c,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;d.indexOf("Lines")!=-1?(d=="insertLines"?f=e+a.data.lines.length:f=e,c=a.data.lines?a.data.lines.length:f-e):c=f-e;if(c!=0)if(d.indexOf("remove")!=-1){b&&this.$wrapData.splice(e,c);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-c);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=h.row&&k.shiftRow(-c)}f=e}else{var n;if(b){n=[e,0];for(var o=0;o<c;o++)n.push([]);this.$wrapData.splice.apply(this.$wrapData,n)}var j=this.$foldData,k=this.getFoldLine(e),l=0;if(k){var p=k.range.compareInside(g.row,g.column);p==0?(k=k.split(g.row,g.column),k.shiftRow(c),k.addRemoveChars(f,0,h.column-g.column)):p==-1&&(k.addRemoveChars(e,0,h.column-g.column),k.shiftRow(c)),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=e&&k.shiftRow(c)}}else{c=Math.abs(a.data.range.start.column-a.data.range.end.column),d.indexOf("remove")!=-1&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),c=-c);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,c)}return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),b&&this.$updateWrapData(e,f),i},this.$updateWrapData=function(a,b){var c=this.doc.getAllLines(),d=this.getTabSize(),f=this.$wrapData,i=this.$wrapLimit,j,k,m=a;b=Math.min(b,c.length-1);while(m<=b){k=this.getFoldLine(m,k);if(!k)j=this.$getDisplayTokens(e.stringTrimRight(c[m])),f[m]=this.$computeWrapSplits(j,i,d),m++;else{j=[],k.walk(function(a,b,d,e){var f;if(a){f=this.$getDisplayTokens(a,j.length),f[0]=g;for(var i=1;i<f.length;i++)f[i]=h}else f=this.$getDisplayTokens(c[b].substring(e,d),j.length);j=j.concat(f)}.bind(this),k.end.row,c[k.end.row].length+1);while(j.length!=0&&j[j.length-1]>=l)j.pop();f[k.start.row]=this.$computeWrapSplits(j,i,d),m=k.end.row+1}}};var b=1,c=2,g=3,h=4,j=9,l=10,m=11,n=12;this.$computeWrapSplits=function(a,b){function i(b){var d=a.slice(e,b),g=d.length;d.join("").replace(/12/g,function(){g-=1}).replace(/2/g,function(){g-=1}),f+=g,c.push(f),e=b}if(a.length==0)return[];var c=[],d=a.length,e=0,f=0;while(d-e>b){var k=e+b;if(a[k]>=l){while(a[k]>=l)k++;i(k);continue}if(a[k]==g||a[k]==h){for(k;k!=e-1;k--)if(a[k]==g)break;if(k>e){i(k);continue}k=e+b;for(k;k<a.length;k++)if(a[k]!=h)break;if(k==a.length)break;i(k);continue}var m=Math.max(k-10,e-1);while(k>m&&a[k]<g)k--;while(k>m&&a[k]==j)k--;if(k>m){i(++k);continue}k=e+b,i(k)}return c},this.$getDisplayTokens=function(a,d){var e=[],f;d=d||0;for(var g=0;g<a.length;g++){var h=a.charCodeAt(g);if(h==9){f=this.getScreenTabSize(e.length+d),e.push(m);for(var i=1;i<f;i++)e.push(n)}else h==32?e.push(l):h>39&&h<48||h>57&&h<64?e.push(j):h>=4352&&o(h)?e.push(b,c):e.push(b)}return e},this.$getStringScreenWidth=function(a,b,c){if(b==0)return[0,0];b==null&&(b=c+a.length*Math.max(this.getTabSize(),2)),c=c||0;var d,e;for(e=0;e<a.length;e++){d=a.charCodeAt(e),d==9?c+=this.getScreenTabSize(c):d>=4352&&o(d)?c+=2:c+=1;if(c>b)break}return[c,e]},this.getRowLength=function(a){return!this.$useWrapMode||!this.$wrapData[a]?1:this.$wrapData[a].length+1},this.getRowHeight=function(a,b){return this.getRowLength(b)*a.lineHeight},this.getScreenLastRowColumn=function(a){return this.documentToScreenColumn(a,this.doc.getLine(a).length)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:undefined},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(a<0)return{row:0,column:0};var c,d=0,e=0,f,g=0,h=0,i=this.$rowCache;for(var j=0;j<i.length;j++)if(i[j].screenRow<a)g=i[j].screenRow,d=i[j].docRow;else break;var k=!i.length||j==i.length,l=this.getLength()-1,m=this.getNextFoldLine(d),n=m?m.start.row:Infinity;while(g<=a){h=this.getRowLength(d);if(g+h-1>=a||d>=l)break;g+=h,d++,d>n&&(d=m.end.row+1,m=this.getNextFoldLine(d,m),n=m?m.start.row:Infinity),k&&i.push({docRow:d,screenRow:g})}if(m&&m.start.row<=d)c=this.getFoldDisplayLine(m),d=m.start.row;else{if(g+h<=a||d>l)return{row:l,column:this.getLine(l).length};c=this.getLine(d),m=null}if(this.$useWrapMode){var o=this.$wrapData[d];o&&(f=o[a-g],a>g&&o.length&&(e=o[a-g-1]||o[o.length-1],c=c.substring(e)))}return e+=this.$getStringScreenWidth(c,b)[1],this.$useWrapMode?e>=f&&(e=f-1):e=Math.min(e,c.length),m?m.idxToPosition(e):{row:d,column:e}},this.documentToScreenPosition=function(a,b){if(typeof b=="undefined")var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d;if(this.$useWrapMode){d=this.$wrapData;if(a>d.length-1)return{row:this.getScreenLength(),column:d.length==0?0:d[d.length-1].length-1}}var e=0,f=null,g=null;g=this.getFoldAt(a,b,1),g&&(a=g.start.row,b=g.start.column);var h,i=0,j=this.$rowCache;for(var k=0;k<j.length;k++)if(j[k].docRow<a)e=j[k].screenRow,i=j[k].docRow;else break;var l=!j.length||k==j.length,m=this.getNextFoldLine(i),n=m?m.start.row:Infinity;while(i<a){if(i>=n){h=m.end.row+1;if(h>a)break;m=this.getNextFoldLine(h,m),n=m?m.start.row:Infinity}else h=i+1;e+=this.getRowLength(i),i=h,l&&j.push({docRow:i,screenRow:e})}var o="";m&&i>=n?(o=this.getFoldDisplayLine(m,a,b),f=m.start.row):(o=this.getLine(a).substring(0,b),f=a);if(this.$useWrapMode){var p=d[f],q=0;while(o.length>=p[q])e++,q++;o=o.substring(p[q-1]||0,o.length)}return{row:e,column:this.$getStringScreenWidth(o)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null;if(!this.$useWrapMode){a=this.getLength();var c=this.$foldData;for(var d=0;d<c.length;d++)b=c[d],a-=b.end.row-b.start.row}else{var e=this.$wrapData.length,f=0,d=0,b=this.$foldData[d++],g=b?b.start.row:Infinity;while(f<e)a+=this.$wrapData[f].length+1,f++,f>g&&(f=b.end.row+1,b=this.$foldData[d++],g=b?b.start.row:Infinity)}return a}})).call(l.prototype),a("./edit_session/folding").Folding.call(l.prototype),a("./edit_session/bracket_match").BracketMatch.call(l.prototype),b.EditSession=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./lib/event_emitter").EventEmitter,g=a("./range").Range,h=function(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.selectionLead=this.doc.createAnchor(0,0),this.selectionAnchor=this.doc.createAnchor(0,0);var b=this;this.selectionLead.on("change",function(a){b._emit("changeCursor"),b.$isEmpty||b._emit("changeSelection"),!b.$preventUpdateDesiredColumnOnChange&&a.old.column!=a.value.column&&b.$updateDesiredColumn()}),this.selectionAnchor.on("change",function(){b.$isEmpty||b._emit("changeSelection")})};((function(){d.implement(this,f),this.isEmpty=function(){return this.$isEmpty||this.selectionAnchor.row==this.selectionLead.row&&this.selectionAnchor.column==this.selectionLead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.selectionLead.getPosition()},this.setSelectionAnchor=function(a,b){this.selectionAnchor.setPosition(a,b),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.selectionAnchor.getPosition()},this.getSelectionLead=function(){return this.selectionLead.getPosition()},this.shiftSelection=function(a){if(this.$isEmpty){this.moveCursorTo(this.selectionLead.row,this.selectionLead.column+a);return}var b=this.getSelectionAnchor(),c=this.getSelectionLead(),d=this.isBackwards();(!d||b.column!==0)&&this.setSelectionAnchor(b.row,b.column+a),(d||c.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(c.row,c.column+a)})},this.isBackwards=function(){var a=this.selectionAnchor,b=this.selectionLead;return a.row>b.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.selectionAnchor,b=this.selectionLead;return this.isEmpty()?g.fromPoints(b,b):this.isBackwards()?g.fromPoints(b,a):g.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(a,this.doc.getLine(a).length),this.moveCursorTo(0,0)},this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.$updateDesiredColumn()},this.$updateDesiredColumn=function(){var a=this.getCursor();this.$desiredColumn=this.session.documentToScreenColumn(a.row,a.column)},this.$moveSelection=function(a){var b=this.selectionLead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.selectWord=function(){var a=this.getCursor(),b=this.session.getWordRange(a.row,a.column);this.setSelectionRange(b)},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.selectLine=function(){var a=this.selectionLead.row,b,c=this.session.getFoldLine(a);c?(a=c.start.row,b=c.end.row):b=a,this.setSelectionAnchor(a,0),this.$moveSelection(function(){this.moveCursorTo(b+1,0)})},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var a=this.selectionLead.getPosition(),b;if(b=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(b.start.row,b.start.column);else if(a.column==0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column-c,a.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a=this.selectionLead.getPosition(),b;if(b=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(b.end.row,b.end.column);else if(this.selectionLead.column==this.doc.getLine(this.selectionLead.row).length)this.selectionLead.row<this.doc.getLength()-1&&this.moveCursorTo(this.selectionLead.row+1,0);else{var c=this.session.getTabSize(),a=this.selectionLead;this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column,a.column+c).split(" ").length-1==c?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var a=this.selectionLead.row,b=this.selectionLead.column,c=this.session.documentToScreenRow(a,b),d=this.session.screenToDocumentPosition(c,0),e=this.session.getDisplayLine(a,null,d.row,d.column),f=e.match(/^\s*/);f[0].length==b?this.moveCursorTo(d.row,d.column):this.moveCursorTo(d.row,d.column+f[0].length)},this.moveCursorLineEnd=function(){var a=this.selectionLead,b=this.session.getDocumentLastRowColumnPosition(a.row,a.column);this.moveCursorTo(b.row,b.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorWordRight=function(){var a=this.selectionLead.row,b=this.selectionLead.column,c=this.doc.getLine(a),d=c.substring(b),e;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(a,b,1);if(f){this.moveCursorTo(f.end.row,f.end.column);return}if(e=this.session.nonTokenRe.exec(d))b+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,d=c.substring(b);if(b>=c.length){this.moveCursorTo(a,c.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}if(e=this.session.tokenRe.exec(d))b+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(a,b)},this.moveCursorWordLeft=function(){var a=this.selectionLead.row,b=this.selectionLead.column,c;if(c=this.session.getFoldAt(a,b,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var d=this.session.getFoldStringAt(a,b,-1);d==null&&(d=this.doc.getLine(a).substring(0,b));var f=e.stringReverse(d),g;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;if(g=this.session.nonTokenRe.exec(f))b-=this.session.nonTokenRe.lastIndex,f=f.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0;if(b<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}if(g=this.session.tokenRe.exec(f))b-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(a,b)},this.moveCursorBy=function(a,b){var c=this.session.documentToScreenPosition(this.selectionLead.row,this.selectionLead.column),d=b===0&&this.$desiredColumn||c.column,e=this.session.screenToDocumentPosition(c.row+a,d);this.moveCursorTo(e.row,e.column+b,b===0)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,b,c){var d=this.session.getFoldAt(a,b,1);d&&(a=d.start.row,b=d.start.column),this.$preventUpdateDesiredColumnOnChange=!0,this.selectionLead.setPosition(a,b),this.$preventUpdateDesiredColumnOnChange=!1,c||this.$updateDesiredColumn(this.selectionLead.column)},this.moveCursorToScreen=function(a,b,c){var d=this.session.screenToDocumentPosition(a,b);a=d.row,b=d.column,this.moveCursorTo(a,b,c)}})).call(h.prototype),b.Selection=h}),ace.define("ace/range",["require","exports","module"],function(a,b,c){"use strict";var d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};((function(){this.isEequal=function(a){return this.start.row==a.start.row&&this.end.row==a.end.row&&this.start.column==a.start.column&&this.end.column==a.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return this.compare(a,b)==0},this.compareRange=function(a){var b,c=a.end,d=a.start;return b=this.compare(c.row,c.column),b==1?(b=this.compare(d.row,d.column),b==1?2:b==0?1:0):b==-1?-2:(b=this.compare(d.row,d.column),b==-1?-1:b==1?42:0)},this.comparePoint=function(a){return this.compare(a.row,a.column)},this.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){return this.compare(a,b)==0?this.isEnd(a,b)||this.isStart(a,b)?!1:!0:!1},this.insideStart=function(a,b){return this.compare(a,b)==0?this.isEnd(a,b)?!1:!0:!1},this.insideEnd=function(a,b){return this.compare(a,b)==0?this.isStart(a,b)?!1:!0:!1},this.compare=function(a,b){return!this.isMultiLine()&&a===this.start.row?b<this.start.column?-1:b>this.end.column?1:0:a<this.start.row?-1:a>this.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};if(this.start.row>b)var e={row:b+1,column:0};if(this.start.row<a)var e={row:a,column:0};if(this.end.row<a)var c={row:a,column:0};return d.fromPoints(e||this.start,c||this.end)},this.extend=function(a,b){var c=this.compare(a,b);if(c==0)return this;if(c==-1)var e={row:a,column:b};else var f={row:a,column:b};return d.fromPoints(e||this.start,f||this.end)},this.isEmpty=function(){return this.start.row==this.end.row&&this.start.column==this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return d.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},this.toScreenRange=function(a){var b=a.documentToScreenPosition(this.start),c=a.documentToScreenPosition(this.end);return new d(b.row,b.column,c.row,c.column)}})).call(d.prototype),d.fromPoints=function(a,b){return new d(a.row,a.column,b.row,b.column)},b.Range=d}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode"],function(a,b,c){"use strict";var d=a("../tokenizer").Tokenizer,e=a("./text_highlight_rules").TextHighlightRules,f=a("./behaviour").Behaviour,g=a("../unicode"),h=function(){this.$tokenizer=new d((new e).getRules()),this.$behaviour=new f};((function(){this.tokenRe=new RegExp("^["+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer},this.toggleCommentLines=function(a,b,c,d){},this.getNextLineIndent=function(a,b,c){return""},this.checkOutdent=function(a,b,c){return!1},this.autoOutdent=function(a,b,c){},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""},this.createWorker=function(a){return null},this.highlightSelection=function(a){var b=a.session;b.$selectionOccurrences||(b.$selectionOccurrences=[]),b.$selectionOccurrences.length&&this.clearSelectionHighlight(a);var c=a.getSelectionRange();if(c.isEmpty()||c.isMultiLine())return;var d=c.start.column-1,e=c.end.column+1,f=b.getLine(c.start.row),g=f.length,h=f.substring(Math.max(d,0),Math.min(e,g));if(d>=0&&/^[\w\d]/.test(h)||e<=g&&/[\w\d]$/.test(h))return;h=f.substring(c.start.column,c.end.column);if(!/^[\w\d]+$/.test(h))return;var i=a.getCursorPosition(),j={wrap:!0,wholeWord:!0,caseSensitive:!0,needle:h},k=a.$search.getOptions();a.$search.set(j);var l=a.$search.findAll(b);l.forEach(function(a){if(!a.contains(i.row,i.column)){var c=b.addMarker(a,"ace_selected_word","text");b.$selectionOccurrences.push(c)}}),a.$search.set(k)},this.clearSelectionHighlight=function(a){if(!a.session.$selectionOccurrences)return;a.session.$selectionOccurrences.forEach(function(b){a.session.removeMarker(b)}),a.session.$selectionOccurrences=[]},this.createModeDelegates=function(a){if(!this.$embeds)return;this.$modes={};for(var b=0;b<this.$embeds.length;b++)a[this.$embeds[b]]&&(this.$modes[this.$embeds[b]]=new a[this.$embeds[b]]);var c=["toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction"];for(var b=0;b<c.length;b++)(function(a){var d=c[b],e=a[d];a[c[b]]=function(){return this.$delegator(d,arguments,e)}})(this)},this.$delegator=function(a,b,c){var d=b[0];for(var e=0;e<this.$embeds.length;e++){if(!this.$modes[this.$embeds[e]])continue;var f=d.split(this.$embeds[e]);if(!f[0]&&f[1]){b[0]=f[1];var g=this.$modes[this.$embeds[e]];return g[a].apply(g,b)}}var h=c.apply(this,b);return c?h:undefined},this.transformAction=function(a,b,c,d,e){if(this.$behaviour){var f=this.$behaviour.getBehaviours();for(var g in f)if(f[g][b]){var h=f[g][b].apply(this,arguments);if(h)return h}}}})).call(h.prototype),b.Mode=h}),ace.define("ace/tokenizer",["require","exports","module"],function(a,b,c){"use strict";var d=function(a,b){b=b?"g"+b:"g",this.rules=a,this.regExps={},this.matchMappings={};for(var c in this.rules){var d=this.rules[c],e=d,f=[],g=0,h=this.matchMappings[c]={};for(var i=0;i<e.length;i++){var j=(new RegExp("(?:("+e[i].regex+")|(.))")).exec("a").length-2,k=e[i].regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+g+1)});h[g]={rule:i,len:j},g+=j,f.push(k)}this.regExps[c]=new RegExp("(?:("+f.join(")|(")+")|(.))",b)}};((function(){this.getLineTokens=function(a,b){var c=b,d=this.rules[c],e=this.matchMappings[c],f=this.regExps[c];f.lastIndex=0;var g,h=[],i=0,j={type:null,value:""};while(g=f.exec(a)){var k="text",l=null,m=[g[0]];for(var n=0;n<g.length-2;n++)if(g[n+1]!==undefined){l=d[e[n].rule],e[n].len>1&&(m=g.slice(n+2,n+1+e[n].len)),typeof l.token=="function"?k=l.token.apply(this,m):k=l.token;var o=l.next;o&&o!==c&&(c=o,d=this.rules[c],e=this.matchMappings[c],i=f.lastIndex,f=this.regExps[c],f.lastIndex=i);break}if(m[0]){typeof k=="string"&&(m=[m.join("")],k=[k]);for(var n=0;n<m.length;n++)(!l||l.merge||k[n]==="text")&&j.type===k[n]?j.value+=m[n]:(j.type&&h.push(j),j={type:k[n],value:m[n]})}if(i==a.length)break;i=f.lastIndex}return j.type&&h.push(j),{tokens:h,state:c}}})).call(d.prototype),b.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(a,b,c){"use strict";var d=a("../lib/lang"),e=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{token:"text",regex:".+"}]}};((function(){this.addRules=function(a,b){for(var c in a){var d=a[c];for(var e=0;e<d.length;e++){var f=d[e];f.next?f.next=b+f.next:f.next=b+c}this.$rules[b+c]=d}},this.getRules=function(){return this.$rules},this.embedRules=function(a,b,c,e){var f=(new a).getRules();if(e)for(var g=0;g<e.length;g++)e[g]=b+e[g];else{e=[];for(var h in f)e.push(b+h)}this.addRules(f,b);for(var g=0;g<e.length;g++)Array.prototype.unshift.apply(this.$rules[e[g]],d.deepCopy(c));this.$embeds||(this.$embeds=[]),this.$embeds.push(b)},this.getEmbeds=function(){return this.$embeds}})).call(e.prototype),b.TextHighlightRules=e}),ace.define("ace/mode/behaviour",["require","exports","module"],function(a,b,c){"use strict";var d=function(){this.$behaviours={}};((function(){this.add=function(a,b,c){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[a]:this.$behaviours[a]={}}this.$behaviours[a][b]=c},this.addBehaviours=function(a){for(var b in a)for(var c in a[b])this.add(b,c,a[b][c])},this.remove=function(a){this.$behaviours&&this.$behaviours[a]&&delete this.$behaviours[a]},this.inherit=function(a,b){if(typeof a=="function")var c=(new a).getBehaviours(b);else var c=a.getBehaviours(b);this.addBehaviours(c)},this.getBehaviours=function(a){if(!a)return this.$behaviours;var b={};for(var c=0;c<a.length;c++)this.$behaviours[a[c]]&&(b[a[c]]=this.$behaviours[a[c]]);return b}})).call(d.prototype),b.Behaviour=d}),ace.define("ace/unicode",["require","exports","module"],function(a,b,c){function d(a){var c=/\w{4}/g;for(var d in a)b.packages[d]=a[d].replace(c,"\\u$&")}"use strict",b.packages={},d({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=a("./range").Range,g=a("./anchor").Anchor,h=function(a){this.$lines=[],Array.isArray(a)?this.insertLines(0,a):a.length==0?this.$lines=[""]:this.insert({row:0,column:0},a)};((function(){d.implement(this,e),this.setValue=function(a){var b=this.getLength();this.remove(new f(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new g(this,a,b)},"aaa".split(/a/).length==0?this.$split=function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r\n|\r|\n)/m);b?this.$autoNewLine=b[1]:this.$autoNewLine="\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";case"auto":return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(a){if(this.$newLineMode===a)return;this.$newLineMode=a},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return a=="\r\n"||a=="\r"||a=="\n"},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.$lines[a.start.row].substring(a.start.column,a.end.column);var b=[];return b.push(this.$lines[a.start.row].substring(a.start.column)),b.push.apply(b,this.getLines(a.start.row+1,a.end.row-1)),b.push(this.$lines[a.end.row].substring(0,a.end.column)),b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();return a.row>=b&&(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length),a},this.insert=function(a,b){if(b.length==0)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=c.length==0?null:c.splice(c.length-1,1)[0];return a=this.insertInLine(a,d),e!==null&&(a=this.insertNewLine(a),a=this.insertLines(a.row,c),a=this.insertInLine(a,e||"")),a},this.insertLines=function(a,b){if(b.length==0)return{row:a,column:0};var c=[a,0];c.push.apply(c,b),this.$lines.splice.apply(this.$lines,c);var d=new f(a,0,a+b.length,0),e={action:"insertLines",range:d,lines:b};return this._emit("change",{data:e}),d.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};return this._emit("change",{data:d}),c},this.insertInLine=function(a,b){if(b.length==0)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};return this._emit("change",{data:e}),d},this.remove=function(a){a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end);if(a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=a.start.column==0?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this.removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b==c)return;var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};return this._emit("change",{data:i}),d.start},this.removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};return this._emit("change",{data:e}),d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._emit("change",{data:g})},this.replace=function(a,b){if(b.length==0&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;this.remove(a);if(b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.insertLines(d.start.row,c.lines):c.action=="insertText"?this.insert(d.start,c.text):c.action=="removeLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="removeText"&&this.remove(d)}},this.revertDeltas=function(a){for(var b=a.length-1;b>=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="insertText"?this.remove(d):c.action=="removeLines"?this.insertLines(d.start.row,c.lines):c.action=="removeText"&&this.insert(d.start,c.text)}}})).call(h.prototype),b.Document=h}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=b.Anchor=function(a,b,c){this.document=a,typeof c=="undefined"?this.setPosition(b.row,b.column):this.setPosition(b,c),this.$onChange=this.onChange.bind(this),a.on("change",this.$onChange)};((function(){d.implement(this,e),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(a){var b=a.data,c=b.range;if(c.start.row==c.end.row&&c.start.row!=this.row)return;if(c.start.row>this.row)return;if(c.start.row==this.row&&c.start.column>this.column)return;var d=this.row,e=this.column;b.action==="insertText"?c.start.row===d&&c.start.column<=e?c.start.row===c.end.row?e+=c.end.column-c.start.column:(e-=c.start.column,d+=c.end.row-c.start.row):c.start.row!==c.end.row&&c.start.row<d&&(d+=c.end.row-c.start.row):b.action==="insertLines"?c.start.row<=d&&(d+=c.end.row-c.start.row):b.action=="removeText"?c.start.row==d&&c.start.column<e?c.end.column>=e?e=c.start.column:e=Math.max(0,e-(c.end.column-c.start.column)):c.start.row!==c.end.row&&c.start.row<d?(c.end.row==d&&(e=Math.max(0,e-c.end.column)+c.start.column),d-=c.end.row-c.start.row):c.end.row==d&&(d-=c.end.row-c.start.row,e=Math.max(0,e-c.end.column)+c.start.column):b.action=="removeLines"&&c.start.row<=d&&(c.end.row<=d?d-=c.end.row-c.start.row:(d=c.start.row,e=0)),this.setPosition(d,e,!0)},this.setPosition=function(a,b,c){var d;c?d={row:a,column:b}:d=this.$clipPositionToDocument(a,b);if(this.row==d.row&&this.column==d.column)return;var e={row:this.row,column:this.column};this.row=d.row,this.column=d.column,this._emit("change",{old:e,value:d})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.$clipPositionToDocument=function(a,b){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),b<0&&(c.column=0),c}})).call(f.prototype)}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=function(a,b){this.running=!1,this.lines=[],this.currentLine=0,this.tokenizer=a;var c=this;this.$worker=function(){if(!c.running)return;var a=new Date,b=c.currentLine,d=c.doc,e=0,f=d.getLength();while(c.currentLine<f){c.lines[c.currentLine]=c.$tokenizeRows(c.currentLine,c.currentLine)[0],c.currentLine++,e+=1;if(e%5==0&&new Date-a>20){c.fireUpdateEvent(b,c.currentLine-1),c.running=setTimeout(c.$worker,20);return}}c.running=!1,c.fireUpdateEvent(b,f-1)}};((function(){d.implement(this,e),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._emit("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a,b){return this.$tokenizeRows(a,b)},this.getState=function(a){return this.$tokenizeRows(a,a)[0].state},this.$tokenizeRows=function(a,b){if(!this.doc||isNaN(a)||isNaN(b))return[{state:"start",tokens:[]}];var c=[],d="start",e=!1;a>0&&this.lines[a-1]?(d=this.lines[a-1].state,e=!0):a==0?(d="start",e=!0):this.lines.length>0&&(d=this.lines[this.lines.length-1].state);var f=this.doc.getLines(a,b);for(var g=a;g<=b;g++)if(!this.lines[g]){var h=this.tokenizer.getLineTokens(f[g-a]||"",d),d=h.state;c.push(h),e&&(this.lines[g]=h)}else{var h=this.lines[g];d=h.state,c.push(h)}return c}})).call(f.prototype),b.BackgroundTokenizer=f}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(a,b,c){function h(){this.getFoldAt=function(a,b,c){var d=this.getFoldLine(a);if(!d)return null;var e=d.folds;for(var f=0;f<e.length;f++){var g=e[f];if(g.range.contains(a,b)){if(c==1&&g.range.isEnd(a,b))continue;if(c==-1&&g.range.isStart(a,b))continue;return g}}},this.getFoldsInRange=function(a){a=a.clone();var b=a.start,c=a.end,d=this.$foldData,e=[];b.column+=1,c.column-=1;for(var f=0;f<d.length;f++){var g=d[f].range.compareRange(a);if(g==2)continue;if(g==-2)break;var h=d[f].folds;for(var i=0;i<h.length;i++){var j=h[i];g=j.range.compareRange(a);if(g==-2)break;if(g==2)continue;if(g==42)break;e.push(j)}}return e},this.getAllFolds=function(){function c(b){a.push(b);if(!b.subFolds)return;for(var d=0;d<b.subFolds.length;d++)c(b.subFolds[d])}var a=[],b=this.$foldData;for(var d=0;d<b.length;d++)for(var e=0;e<b[d].folds.length;e++)c(b[d].folds[e]);return a},this.getFoldStringAt=function(a,b,c,d){d=d||this.getFoldLine(a);if(!d)return null;var e={end:{column:0}},f,g;for(var h=0;h<d.folds.length;h++){g=d.folds[h];var i=g.range.compareEnd(a,b);if(i==-1){f=this.getLine(g.start.row).substring(e.end.column,g.start.column);break}if(i===0)return null;e=g}return f||(f=this.getLine(g.start.row).substring(e.end.column)),c==-1?f.substring(0,b-e.end.column):c==1?f.substring(b-e.end.column):f},this.getFoldLine=function(a,b){var c=this.$foldData,d=0;b&&(d=c.indexOf(b)),d==-1&&(d=0);for(d;d<c.length;d++){var e=c[d];if(e.start.row<=a&&e.end.row>=a)return e;if(e.end.row>a)return null}return null},this.getNextFoldLine=function(a,b){var c=this.$foldData,d=0;b&&(d=c.indexOf(b)),d==-1&&(d=0);for(d;d<c.length;d++){var e=c[d];if(e.end.row>=a)return e}return null},this.getFoldedRowCount=function(a,b){var c=this.$foldData,d=b-a+1;for(var e=0;e<c.length;e++){var f=c[e],g=f.end.row,h=f.start.row;if(g>=b){h<b&&(h>=a?d-=b-h:d=0);break}g>=a&&(h>=a?d-=g-h:d-=g-a+1)}return d},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),a},this.addFold=function(a,b){var c=this.$foldData,d=!1,g;a instanceof f?g=a:g=new f(b,a),this.$clipRangeToDocument(g.range);var h=g.start.row,i=g.start.column,j=g.end.row,k=g.end.column;if(g.placeholder.length<2)throw"Placeholder has to be at least 2 characters";if(h==j&&k-i<2)throw"The range has to be at least 2 characters width";var l=this.getFoldAt(h,i,1),m=this.getFoldAt(j,k,-1);if(l&&m==l)return l.addSubFold(g);if(l&&!l.range.isStart(h,i)||m&&!m.range.isEnd(j,k))throw"A fold can't intersect already existing fold"+g.range+l.range;var n=this.getFoldsInRange(g.range);n.length>0&&(this.removeFolds(n),g.subFolds=n);for(var o=0;o<c.length;o++){var p=c[o];if(j==p.start.row){p.addFold(g),d=!0;break}if(h==p.end.row){p.addFold(g),d=!0;if(!g.sameRow){var q=c[o+1];if(q&&q.start.row==j){p.merge(q);break}}break}if(j<=p.start.row)break}return d||(p=this.$addFoldLine(new e(this.$foldData,g))),this.$useWrapMode&&this.$updateWrapData(p.start.row,p.start.row),this.$modified=!0,this._emit("changeFold",{data:g}),g},this.addFolds=function(a){a.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(a){var b=a.foldLine,c=b.start.row,d=b.end.row,e=this.$foldData,f=b.folds;if(f.length==1)e.splice(e.indexOf(b),1);else if(b.range.isEnd(a.end.row,a.end.column))f.pop(),b.end.row=f[f.length-1].end.row,b.end.column=f[f.length-1].end.column;else if(b.range.isStart(a.start.row,a.start.column))f.shift(),b.start.row=f[0].start.row,b.start.column=f[0].start.column;else if(a.sameRow)f.splice(f.indexOf(a),1);else{var g=b.split(a.start.row,a.start.column);f=g.folds,f.shift(),g.start.row=f[0].start.row,g.start.column=f[0].start.column}this.$useWrapMode&&this.$updateWrapData(c,d),this.$modified=!0,this._emit("changeFold",{data:a})},this.removeFolds=function(a){var b=[];for(var c=0;c<a.length;c++)b.push(a[c]);b.forEach(function(a){this.removeFold(a)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(a){this.addFold(a)},this),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(a,b){var c,e;a==null?c=new d(0,0,this.getLength(),0):typeof a=="number"?c=new d(a,0,a,this.getLine(a).length):"row"in a?c=d.fromPoints(a,a):c=a,e=this.getFoldsInRange(c);if(b)this.removeFolds(e);else while(e.length)this.expandFolds(e),e=this.getFoldsInRange(c)},this.isRowFolded=function(a,b){return!!this.getFoldLine(a,b)},this.getRowFoldEnd=function(a,b){var c=this.getFoldLine(a,b);return c?c.end.row:a},this.getFoldDisplayLine=function(a,b,c,d,e){d==null&&(d=a.start.row,e=0),b==null&&(b=a.end.row,c=this.getLine(b).length);var f=this.doc,g="";return a.walk(function(a,b,c,h){if(b<d)return;if(b==d){if(c<e)return;h=Math.max(e,h)}a?g+=a:g+=f.getLine(b).substring(h,c)}.bind(this),b,c),g},this.getDisplayLine=function(a,b,c,d){var e=this.getFoldLine(a);if(!e){var f;return f=this.doc.getLine(a),f.substring(d||0,b||f.length)}return this.getFoldDisplayLine(e,a,b,c,d)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(b){var c=b.folds.map(function(a){return a.clone()});return new e(a,c)}),a},this.toggleFold=function(a){var b=this.selection,c=b.getRange(),d,e;if(c.isEmpty()){var f=c.start;d=this.getFoldAt(f.row,f.column);if(d){this.expandFold(d);return}(e=this.findMatchingBracket(f))?c.comparePoint(e)==1?c.end=e:(c.start=e,c.start.column++,c.end.column--):(e=this.findMatchingBracket({row:f.row,column:f.column+1}))?(c.comparePoint(e)==1?c.end=e:c.start=e,c.start.column++):c=this.getCommentFoldRange(f.row,f.column)||c}else{var g=this.getFoldsInRange(c);if(a&&g.length){this.expandFolds(g);return}g.length==1&&(d=g[0])}d||(d=this.getFoldAt(c.start.row,c.start.column));if(d&&d.range.toString()==c.toString()){this.expandFold(d);return}var h="...";if(!c.isMultiLine()){h=this.getTextRange(c);if(h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,c)},this.getCommentFoldRange=function(a,b){var c=new g(this,a,b),e=c.getCurrentToken();if(e&&/^comment|string/.test(e.type)){var f=new d,h=new RegExp(e.type.replace(/\..*/,"\\."));do e=c.stepBackward();while(e&&h.test(e.type));c.stepForward(),f.start.row=c.getCurrentTokenRow(),f.start.column=c.getCurrentTokenColumn()+2,c=new g(this,a,b);do e=c.stepForward();while(e&&h.test(e.type));return e=c.stepBackward(),f.end.row=c.getCurrentTokenRow(),f.end.column=c.getCurrentTokenColumn()+e.value.length,f}},this.foldAll=function(a,b){var c=this.foldWidgets;b=b||this.getLength();for(var d=a||0;d<b;d++){c[d]==null&&(c[d]=this.getFoldWidget(d));if(c[d]!="start")continue;var e=this.getFoldWidgetRange(d);if(e&&e.end.row<b)try{this.addFold("...",e)}catch(f){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle==a)return;this.$foldStyle=a,a=="manual"&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)},this.$setFolding=function(a){if(this.$foldMode==a)return;this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation");if(!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)},this.onFoldWidgetClick=function(a,b){var c=this.getFoldWidget(a),d=this.getLine(a),e=b.shiftKey,f=e||b.ctrlKey||b.altKey||b.metaKey,g;c=="end"?g=this.getFoldAt(a,0,-1):g=this.getFoldAt(a,d.length,1);if(g){f?this.removeFold(g):this.expandFold(g);return}var h=this.getFoldWidgetRange(a);if(h){if(!h.isMultiLine()){g=this.getFoldAt(h.start.row,h.start.column,1);if(g&&h.isEequal(g.range)){this.removeFold(g);return}}e||this.addFold("...",h),f&&this.foldAll(h.start.row+1,h.end.row)}else f&&this.foldAll(a+1,this.getLength()),b.target.className+=" invalid"},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(e===0)this.foldWidgets[d]=null;else if(b.action=="removeText"||b.action=="removeLines")this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}"use strict";var d=a("../range").Range,e=a("./fold_line").FoldLine,f=a("./fold").Fold,g=a("../token_iterator").TokenIterator;b.Folding=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(a,b,c){function e(a,b){this.foldData=a,Array.isArray(b)?this.folds=b:b=this.folds=[b];var c=b[b.length-1];this.range=new d(b[0].start.row,b[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}"use strict";var d=a("../range").Range;((function(){this.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(b){b.start.row+=a,b.end.row+=a})},this.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw"Can't add a fold to this FoldLine as it has no connection";this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw"Trying to add fold to FoldRow that doesn't have a matching row";a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var d=0,e=this.folds,f,g,h,i=!0;b==null&&(b=this.end.row,c=this.end.column);for(var j=0;j<e.length;j++){f=e[j],g=f.range.compareStart(b,c);if(g==-1){a(null,b,c,d,i);return}h=a(null,f.start.row,f.start.column,d,i),h=!h&&a(f.placeholder,f.start.row,f.start.column,d);if(h||g==0)return;i=!f.sameRow,d=f.end.column}a(null,b,c,d,i)},this.getNextFoldTo=function(a,b){var c,d;for(var e=0;e<this.folds.length;e++){c=this.folds[e],d=c.range.compareEnd(a,b);if(d==-1)return{fold:c,kind:"after"};if(d==0)return{fold:c,kind:"inside"}}return null},this.addRemoveChars=function(a,b,c){var d=this.getNextFoldTo(a,b),e,f;if(d){e=d.fold;if(d.kind=="inside"&&e.start.column!=b&&e.start.row!=a)throw"Moving characters inside of a fold should never be reached";if(e.start.row==a){f=this.folds;var g=f.indexOf(e);g==0&&(this.start.column+=c);for(g;g<f.length;g++){e=f[g],e.start.column+=c;if(!e.sameRow)return;e.end.column+=c}this.end.column+=c}}},this.split=function(a,b){var c=this.getNextFoldTo(a,b).fold,d=this.folds,f=this.foldData;if(!c)return null;var g=d.indexOf(c),h=d[g-1];this.end.row=h.end.row,this.end.column=h.end.column,d=d.splice(g,d.length-g);var i=new e(f,d);return f.splice(f.indexOf(this)+1,0,i),i},this.merge=function(a){var b=a.folds;for(var c=0;c<b.length;c++)this.addFold(b[c]);var d=this.foldData;d.splice(d.indexOf(a),1)},this.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(b){a.push(" "+b.toString())}),a.push("]"),a.join("\n")},this.idxToPosition=function(a){var b=0,c;for(var d=0;d<this.folds.length;d++){var c=this.folds[d];a-=c.start.column-b;if(a<0)return{row:c.start.row,column:c.start.column+a};a-=c.placeholder.length;if(a<0)return c.start;b=c.end.column}return{row:this.end.row,column:this.end.column+a}}})).call(e.prototype),b.FoldLine=e}),ace.define("ace/edit_session/fold",["require","exports","module"],function(a,b,c){"use strict";var d=b.Fold=function(a,b){this.foldLine=null,this.placeholder=b,this.range=a,this.start=a.start,this.end=a.end,this.sameRow=a.start.row==a.end.row,this.subFolds=[]};((function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(a){this.foldLine=a,this.subFolds.forEach(function(b){b.setFoldLine(a)})},this.clone=function(){var a=this.range.clone(),b=new d(a,this.placeholder);return this.subFolds.forEach(function(a){b.subFolds.push(a.clone())}),b},this.addSubFold=function(a){if(this.range.isEequal(a))return this;if(!this.range.containsRange(a))throw"A fold can't intersect already existing fold"+a.range+this.range;var b=a.range.start.row,c=a.range.start.column;for(var d=0,e=-1;d<this.subFolds.length;d++){e=this.subFolds[d].range.compare(b,c);if(e!=1)break}var f=this.subFolds[d];if(e==0)return f.addSubFold(a);var b=a.range.end.row,c=a.range.end.column;for(var g=d,e=-1;g<this.subFolds.length;g++){e=this.subFolds[g].range.compare(b,c);if(e!=1)break}var h=this.subFolds[g];if(e==0)throw"A fold can't intersect already existing fold"+a.range+this.range;var i=this.subFolds.splice(d,g-d,a);return a.setFoldLine(this.foldLine),a}})).call(d.prototype)}),ace.define("ace/token_iterator",["require","exports","module"],function(a,b,c){"use strict";var d=function(a,b,c){this.$session=a,this.$row=b,this.$rowTokens=a.getTokens(b,b)[0].tokens;var d=a.getTokenAt(b,c);this.$tokenIndex=d?d.index:-1};((function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){this.$row-=1;if(this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row,this.$row)[0].tokens,this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var a=this.$session.getLength();this.$tokenIndex+=1;while(this.$tokenIndex>=this.$rowTokens.length){this.$row+=1;if(this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row,this.$row)[0].tokens,this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(c!==undefined)return c;c=0;while(b>0)b-=1,c+=a[b].value.length;return c}})).call(d.prototype),b.TokenIterator=d}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator"],function(a,b,c){function e(){this.findMatchingBracket=function(a){if(a.column==0)return null;var b=this.getLine(a.row).charAt(a.column-1);if(b=="")return null;var c=b.match(/([\(\[\{])|([\)\]\}])/);return c?c[1]?this.$findClosingBracket(c[1],a):this.$findOpeningBracket(c[2],a):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(a,b){var c=this.$brackets[a],e=1,f=new d(this,b.row,b.column),g=f.getCurrentToken();if(!g)return null;var h=new RegExp("(\\.?"+g.type.replace(".","|").replace("rparen","lparen|rparen")+")+"),i=b.column-f.getCurrentTokenColumn()-2,j=g.value;for(;;){while(i>=0){var k=j.charAt(i);if(k==c){e-=1;if(e==0)return{row:f.getCurrentTokenRow(),column:i+f.getCurrentTokenColumn()}}else k==a&&(e+=1);i-=1}do g=f.stepBackward();while(g&&!h.test(g.type));if(g==null)break;j=g.value,i=j.length-1}return null},this.$findClosingBracket=function(a,b){var c=this.$brackets[a],e=1,f=new d(this,b.row,b.column),g=f.getCurrentToken();if(!g)return null;var h=new RegExp("(\\.?"+g.type.replace(".","|").replace("lparen","lparen|rparen")+")+"),i=b.column-f.getCurrentTokenColumn();for(;;){var j=g.value,k=j.length;while(i<k){var l=j.charAt(i);if(l==c){e-=1;if(e==0)return{row:f.getCurrentTokenRow(),column:i+f.getCurrentTokenColumn()}}else l==a&&(e+=1);i+=1}do g=f.stepForward();while(g&&!h.test(g.type));if(g==null)break;i=0}return null}}"use strict";var d=a("../token_iterator").TokenIterator;b.BracketMatch=e}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b,c){"use strict";var d=a("./lib/lang"),e=a("./lib/oop"),f=a("./range").Range,g=function(){this.$options={needle:"",backwards:!1,wrap:!1,caseSensitive:!1,wholeWord:!1,scope:g.ALL,regExp:!1}};g.ALL=1,g.SELECTION=2,function(){this.set=function(a){return e.mixin(this.$options,a),this},this.getOptions=function(){return d.copyObject(this.$options)},this.find=function(a){if(!this.$options.needle)return null;if(this.$options.backwards)var b=this.$backwardMatchIterator(a);else b=this.$forwardMatchIterator(a);var c=null;return b.forEach(function(a){return c=a,!0}),c},this.findAll=function(a){var b=this.$options;if(!b.needle)return[];if(b.backwards)var c=this.$backwardMatchIterator(a);else c=this.$forwardMatchIterator(a);var d=!b.start&&b.wrap&&b.scope==g.ALL;d&&(b.start={row:0,column:0});var e=[];return c.forEach(function(a){e.push(a)}),d&&(b.start=null),e},this.replace=function(a,b){var c=this.$assembleRegExp(),d=c.exec(a);return d&&d[0].length==a.length?this.$options.regExp?a.replace(c,b):b:null},this.$forwardMatchIterator=function(a){var b=this.$assembleRegExp(),c=this;return{forEach:function(d){c.$forwardLineIterator(a).forEach(function(a,e,f){e&&(a=a.substring(e));var g=[];a.replace(b,function(a){var b=arguments[arguments.length-2];return g.push({str:a,offset:e+b}),a});for(var h=0;h<g.length;h++){var i=g[h],j=c.$rangeFromMatch(f,i.offset,i.str.length);if(d(j))return!0}})}}},this.$backwardMatchIterator=function(a){var b=this.$assembleRegExp(),c=this;return{forEach:function(d){c.$backwardLineIterator(a).forEach(function(a,e,f){e&&(a=a.substring(e));var g=[];a.replace(b,function(a,b){return g.push({str:a,offset:e+b}),a});for(var h=g.length-1;h>=0;h--){var i=g[h],j=c.$rangeFromMatch(f,i.offset,i.str.length);if(d(j))return!0}})}}},this.$rangeFromMatch=function(a,b,c){return new f(a,b,a,b+c)},this.$assembleRegExp=function(){if(this.$options.regExp)var a=this.$options.needle;else a=d.escapeRegExp(this.$options.needle);this.$options.wholeWord&&(a="\\b"+a+"\\b");var b="g";this.$options.caseSensitive||(b+="i");var c=new RegExp(a,b);return c},this.$forwardLineIterator=function(a){function k(e){var f=a.getLine(e);return b&&e==c.end.row&&(f=f.substring(0,c.end.column)),j&&e==d.row&&(f=f.substring(0,d.column)),f}var b=this.$options.scope==g.SELECTION,c=this.$options.range||a.getSelection().getRange(),d=this.$options.start||c[b?"start":"end"],e=b?c.start.row:0,f=b?c.start.column:0,h=b?c.end.row:a.getLength()-1,i=this.$options.wrap,j=!1;return{forEach:function(a){var b=d.row,c=k(b),g=d.column,l=!1;j=!1;while(!a(c,g,b)){if(l)return;b++,g=0;if(b>h)if(i)b=e,g=f,j=!0;else return;b==d.row&&(l=!0),c=k(b)}}}},this.$backwardLineIterator=function(a){var b=this.$options.scope==g.SELECTION,c=this.$options.range||a.getSelection().getRange(),d=this.$options.start||c[b?"end":"start"],e=b?c.start.row:0,f=b?c.start.column:0,h=b?c.end.row:a.getLength()-1,i=this.$options.wrap;return{forEach:function(g){var j=d.row,k=a.getLine(j).substring(0,d.column),l=0,m=!1,n=!1;while(!g(k,l,j)){if(m)return;j--,l=0;if(j<e)if(i)j=h,n=!0;else return;j==d.row&&(m=!0),k=a.getLine(j),b&&(j==e?l=f:j==h&&(k=k.substring(0,c.end.column))),n&&j==d.row&&(l=d.column)}}}}}.call(g.prototype),b.Search=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/keys"],function(a,b,c){"use strict";var d=a("../lib/keys"),e=function(a,b){if(typeof a!="string")throw new TypeError("'platform' argument must be either 'mac' or 'win'");this.platform=a,this.commands={},this.commmandKeyBinding={},b&&b.forEach(this.addCommand,this)};((function(){function a(a,c,e){var f,g=0,h=b(a);for(var i=0,j=h.length;i<j;i++)d.KEY_MODS[h[i]]?g|=d.KEY_MODS[h[i]]:f=h[i]||"-";return{key:f,hashId:g}}function b(a,b){return a.toLowerCase().trim().split(new RegExp("[\\s ]*\\-[\\s ]*","g"),999)}this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a){var b=typeof a=="string"?a:a.name;a=this.commands[b],delete this.commands[b];var c=this.commmandKeyBinding;for(var d in c)for(var e in c[d])c[d][e]==a&&delete c[d][e]},this.addCommands=function(a){Object.keys(a).forEach(function(b){var c=a[b];if(typeof c=="string")return this.bindKey(c,b);typeof c=="function"&&(c={exec:c}),c.name||(c.name=b),this.addCommand(c)},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(b){this.removeCommand(a[b])},this)},this.bindKey=function(b,c){if(!b)return;var d=this.commmandKeyBinding;b.split("|").forEach(function(b){var e=a(b,c),f=e.hashId;(d[f]||(d[f]={}))[e.key]=c})},this.bindKeys=function(a){Object.keys(a).forEach(function(b){this.bindKey(b,a[b])},this)},this._buildKeyHash=function(a){var b=a.bindKey;if(!b)return;var c=typeof b=="string"?b:b[this.platform];this.bindKey(c,a)},this.findKeyCommand=function c(a,b){typeof b=="number"&&(b=d.keyCodeToString(b));var c=this.commmandKeyBinding;return c[a]&&c[a][b.toLowerCase()]},this.exec=function(a,b,c){return typeof a=="string"&&(a=this.commands[a]),a?b&&b.$readOnly&&!a.readOnly?!1:(a.exec(b,c||{}),!0):!1},this.toggleRecording=function(){if(this.$inReplay)return;return this.recording?(this.macro.pop(),this.exec=this.normal_exec,this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.oldMacro=this.macro,this.macro=[],this.normal_exec=this.exec,this.exec=function(a,b,c){return this.macro.push([a,c]),this.normal_exec(a,b,c)},this.recording=!0)},this.replay=function(a){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording();try{this.$inReplay=!0,this.macro.forEach(function(b){typeof b=="string"?this.exec(b,a):this.exec(b[0],a,b[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(a){return a.map(function(a){return typeof a[0]!="string"&&(a[0]=a[0].name),a[1]||(a=a[0]),a})}})).call(e.prototype),b.CommandManager=e}),ace.define("ace/undomanager",["require","exports","module"],function(a,b,c){"use strict";var d=function(){this.reset()};((function(){this.execute=function(a){var b=a.args[0];this.$doc=a.args[1],this.$undoStack.push(b),this.$redoStack=[]},this.undo=function(a){var b=this.$undoStack.pop(),c=null;return b&&(c=this.$doc.undoChanges(b,a),this.$redoStack.push(b)),c},this.redo=function(a){var b=this.$redoStack.pop(),c=null;return b&&(c=this.$doc.redoChanges(b,a),this.$undoStack.push(b)),c},this.reset=function(){this.$undoStack=[],this.$redoStack=[]},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0}})).call(d.prototype),b.UndoManager=d}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/lib/event_emitter","text!ace/css/editor.css"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./lib/event"),g=a("./lib/useragent"),h=a("./layer/gutter").Gutter,i=a("./layer/marker").Marker,j=a("./layer/text").Text,k=a("./layer/cursor").Cursor,l=a("./scrollbar").ScrollBar,m=a("./renderloop").RenderLoop,n=a("./lib/event_emitter").EventEmitter,o=a("text!./css/editor.css");e.importCssString(o,"ace_editor");var p=function(a,b){var c=this;this.container=a,e.addCssClass(a,"ace_editor"),this.setTheme(b),this.$gutter=e.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=e.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=e.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onResize.bind(this,!0)),this.$markerBack=new i(this.content);var d=this.$textLayer=new j(this.content);this.canvas=d.element,this.$markerFront=new i(this.content),this.characterWidth=d.getCharacterWidth(),this.lineHeight=d.getLineHeight(),this.$cursorLayer=new k(this.content),this.$cursorPadding=8,this.$horizScroll=!0,this.$horizScrollAlwaysVisible=!0,this.scrollBar=new l(a),this.scrollBar.addEventListener("scroll",function(a){c.session.setScrollTop(a.data)}),this.scrollTop=0,this.scrollLeft=0,f.addListener(this.scroller,"scroll",function(){c.session.setScrollLeft(c.scroller.scrollLeft)}),this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){c.characterWidth=d.getCharacterWidth(),c.lineHeight=d.getLineHeight(),c.$updatePrintMargin(),c.onResize(!0),c.$loop.schedule(c.CHANGE_FULL)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:1,characterWidth:1,minHeight:1,maxHeight:1,offset:0,height:1},this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.setPadding(4),this.$updatePrintMargin()};((function(){this.showGutter=!0,this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,d.implement(this,n),this.setSession=function(a){this.session=a,this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(a,b){b===undefined&&(b=Infinity),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:a,lastRow:b},this.$loop.schedule(this.CHANGE_LINES)},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(){this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.onResize=function(a){var b=this.CHANGE_SIZE,c=this.$size,d=e.getInnerHeight(this.container);if(a||c.height!=d)c.height=d,this.scroller.style.height=d+"px",c.scrollerHeight=this.scroller.clientHeight,this.scrollBar.setHeight(c.scrollerHeight),this.session&&(this.session.setScrollTop(this.getScrollTop()),b|=this.CHANGE_FULL);var f=e.getInnerWidth(this.container);if(a||c.width!=f){c.width=f;var g=this.showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=g+"px",c.scrollerWidth=Math.max(0,f-g-this.scrollBar.getWidth()),this.scroller.style.width=c.scrollerWidth+"px";if(this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)b|=this.CHANGE_FULL}this.$loop.schedule(b)},this.adjustWrapLimit=function(){var a=this.$size.scrollerWidth-this.$padding*2,b=Math.floor(a/this.characterWidth);return this.session.adjustWrapLimit(b)},this.setShowInvisibles=function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)},this.getShowInvisibles=function(){return this.$textLayer.showInvisibles},this.$showPrintMargin=!0,this.setShowPrintMargin=function(a){this.$showPrintMargin=a,this.$updatePrintMargin()},this.getShowPrintMargin=function(){return this.$showPrintMargin},this.$printMarginColumn=80,this.setPrintMarginColumn=function(a){this.$printMarginColumn=a,this.$updatePrintMargin()},this.getPrintMarginColumn=function(){return this.$printMarginColumn},this.getShowGutter=function(){return this.showGutter},this.setShowGutter=function(a){if(this.showGutter===a)return;this.$gutter.style.display=a?"block":"none",this.showGutter=a,this.onResize(!0)},this.$updatePrintMargin=function(){var a;if(!this.$showPrintMargin&&!this.$printMarginEl)return;this.$printMarginEl||(a=e.createElement("div"),a.className="ace_print_margin_layer",this.$printMarginEl=e.createElement("div"),this.$printMarginEl.className="ace_print_margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.$textLayer.element));var b=this.$printMarginEl.style;b.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",b.visibility=this.$showPrintMargin?"visible":"hidden"},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.moveTextAreaToCursor=function(a){if(g.isIE)return;if(this.layerConfig.lastRow===0)return;var b=this.$cursorLayer.getPixelPosition();if(!b)return;var c=this.content.getBoundingClientRect(),d=this.layerConfig.offset;a.style.left=c.left+b.left+"px",a.style.top=c.top+b.top-this.scrollTop+d+"px"},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var a=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+a},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(a){this.$padding=a,this.$textLayer.setPadding(a),this.$cursorLayer.setPadding(a),this.$markerFront.setPadding(a),this.$markerBack.setPadding(a),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.getHScrollBarAlwaysVisible=function(){return this.$horizScrollAlwaysVisible},this.setHScrollBarAlwaysVisible=function(a){this.$horizScrollAlwaysVisible!=a&&(this.$horizScrollAlwaysVisible=a,(!this.$horizScrollAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL))},this.$updateScrollBar=function(){this.scrollBar.setInnerHeight(this.layerConfig.maxHeight),this.scrollBar.setScrollTop(this.scrollTop)},this.$renderChanges=function(a){if(!a||!this.session)return;(a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL)&&this.$computeLayerConfig();if(a&this.CHANGE_FULL){this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$updateScrollBar();return}if(a&this.CHANGE_SCROLL){a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$updateScrollBar();return}a&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_LINES?(this.$updateLines(),this.$updateScrollBar(),this.showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_GUTTER&&this.showGutter&&this.$gutterLayer.update(this.layerConfig),a&this.CHANGE_CURSOR&&this.$cursorLayer.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),a&this.CHANGE_SIZE&&this.$updateScrollBar(),a&this.CHANGE_H_SCROLL&&(this.scroller.scrollLeft=this.scrollLeft)},this.$computeLayerConfig=function(){var a=this.session,b=this.scrollTop%this.lineHeight,c=this.$size.scrollerHeight+this.lineHeight,d=this.$getLongestLine(),e=this.$horizScrollAlwaysVisible||this.$size.scrollerWidth-d<0,f=this.$horizScroll!==e;this.$horizScroll=e,f&&(this.scroller.style.overflowX=e?"scroll":"hidden");var g=this.session.getScreenLength()*this.lineHeight;this.session.setScrollTop(Math.max(0,Math.min(this.scrollTop,g-this.$size.scrollerHeight)));var h=Math.ceil(c/this.lineHeight)-1,i=Math.max(0,Math.round((this.scrollTop-b)/this.lineHeight)),j=i+h,k,l,m={lineHeight:this.lineHeight};i=a.screenToDocumentRow(i,0);var n=a.getFoldLine(i);n&&(i=n.start.row),k=a.documentToScreenRow(i,0),l=a.getRowHeight(m,i),j=Math.min(a.screenToDocumentRow(j,0),a.getLength()-1),c=this.$size.scrollerHeight+a.getRowHeight(m,j)+l,b=this.scrollTop-k*this.lineHeight,this.layerConfig={width:d,padding:this.$padding,firstRow:i,firstRowScreen:k,lastRow:j,lineHeight:this.lineHeight,characterWidth:this.characterWidth,minHeight:c,maxHeight:g,offset:b,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-b+"px",this.content.style.marginTop=-b+"px",this.content.style.width=d+2*this.$padding+"px",this.content.style.height=c+"px",f&&this.onResize(!0)},this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;if(c.width!=this.$getLongestLine())return this.$textLayer.update(c);if(a>c.lastRow+1)return;if(b<c.firstRow)return;if(b===Infinity){this.showGutter&&this.$gutterLayer.update(c),this.$textLayer.update(c);return}this.$textLayer.updateLines(c,a,b)},this.$getLongestLine=function(){var a=this.session.getScreenWidth();return this.$textLayer.showInvisibles&&(a+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(a*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(a,b){this.$gutterLayer.addGutterDecoration(a,b),this.$loop.schedule(this.CHANGE_GUTTER)},this.removeGutterDecoration=function(a,b){this.$gutterLayer.removeGutterDecoration(a,b),this.$loop.schedule(this.CHANGE_GUTTER)},this.setBreakpoints=function(a){this.$gutterLayer.setBreakpoints(a),this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(a){this.$gutterLayer.setAnnotations(a),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollCursorIntoView=function(){if(this.$size.scrollerHeight===0)return;var a=this.$cursorLayer.getPixelPosition(),b=a.left,c=a.top;this.scrollTop>c&&this.session.setScrollTop(c),this.scrollTop+this.$size.scrollerHeight<c+this.lineHeight&&this.session.setScrollTop(c+this.lineHeight-this.$size.scrollerHeight);var d=this.scrollLeft;d>b&&(b<this.$padding+2*this.layerConfig.characterWidth&&(b=0),this.session.setScrollLeft(b)),d+this.$size.scrollerWidth<b+this.characterWidth&&this.session.setScrollLeft(Math.round(b+this.characterWidth-this.$size.scrollerWidth))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollTop()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(a){this.session.setScrollTop(a*this.lineHeight)},this.scrollToLine=function(a,b){var c=this.$cursorLayer.getPixelPosition({row:a,column:0}),d=c.top;b&&(d-=this.$size.scrollerHeight/2),this.session.setScrollTop(d)},this.scrollToY=function(a){this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)},this.scrollToX=function(a){a<=this.$padding&&(a=0),this.scrollLeft!==a&&(this.$loop.schedule(this.CHANGE_H_SCROLL),this.scrollLeft=a)},this.scrollBy=function(a,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),a&&this.session.setScrollLeft(this.session.getScrollLeft()+a)},this.isScrollableBy=function(a,b){if(b<0&&this.session.getScrollTop()>0)return!0;if(b>0&&this.session.getScrollTop()+this.$size.scrollerHeight<this.layerConfig.maxHeight)return!0},this.screenToTextCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=Math.round((a+this.scrollLeft-c.left-this.$padding-e.getPageScrollLeft())/this.characterWidth),f=Math.floor((b+this.scrollTop-c.top-e.getPageScrollTop())/this.lineHeight);return this.session.screenToDocumentPosition(f,Math.max(d,0))},this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),e=this.$padding+Math.round(d.column*this.characterWidth),f=d.row*this.lineHeight;return{pageX:c.left+e-this.scrollLeft,pageY:c.top+f-this.scrollTop}},this.visualizeFocus=function(){e.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){e.removeCssClass(this.container,"ace_focus")},this.showComposition=function(a){this.$composition||(this.$composition=e.createElement("div"),this.$composition.className="ace_composition",this.content.appendChild(this.$composition)),this.$composition.innerHTML="&#160;";var b=this.$cursorLayer.getPixelPosition(),c=this.$composition.style;c.top=b.top+"px",c.left=b.left+this.$padding+"px",c.height=this.lineHeight+"px",this.hideCursor()},this.setCompositionText=function(a){e.setInnerText(this.$composition,a)},this.hideComposition=function(){this.showCursor();if(!this.$composition)return;var a=this.$composition.style;a.top="-10000px",a.left="-10000px"},this.setTheme=function(b){function d(a){e.importCssString(a.cssText,a.cssClass,c.container.ownerDocument),c.$theme&&e.removeCssClass(c.container,c.$theme),c.$theme=a?a.cssClass:null,c.$theme&&e.addCssClass(c.container,c.$theme),a&&a.isDark?e.addCssClass(c.container,"ace_dark"):e.removeCssClass(c.container,"ace_dark"),c.$size&&(c.$size.width=0,c.onResize())}var c=this;this.$themeValue=b,!b||typeof b=="string"?(b=b||"ace/theme/textmate",a([b],function(a){d(a)})):d(b)},this.getTheme=function(){return this.$themeValue},this.setStyle=function(a){e.addCssClass(this.container,a)},this.unsetStyle=function(a){e.removeCssClass(this.container,a)},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}})).call(p.prototype),b.VirtualRenderer=p}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/dom"),e=a("../lib/oop"),f=a("../lib/event_emitter").EventEmitter,g=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$breakpoints=[],this.$annotations=[],this.$decorations=[]};((function(){e.implement(this,f),this.setSession=function(a){this.session=a},this.addGutterDecoration=function(a,b){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" ace_"+b},this.removeGutterDecoration=function(a,b){this.$decorations[a]=this.$decorations[a].replace(" ace_"+b,"")},this.setBreakpoints=function(a){this.$breakpoints=a.concat()},this.setAnnotations=function(a){this.$annotations=[];for(var b in a)if(a.hasOwnProperty(b)){var c=a[b];if(!c)continue;var d=this.$annotations[b]={text:[]};for(var e=0;e<c.length;e++){var f=c[e],g=f.text.replace(/"/g,"&quot;").replace(/'/g,"&#8217;").replace(/</,"&lt;");d.text.indexOf(g)===-1&&d.text.push(g);var h=f.type;h=="error"?d.className="ace_error":h=="warning"&&d.className!="ace_error"?d.className="ace_warning":h=="info"&&!d.className&&(d.className="ace_info")}}},this.update=function(a){this.$config=a;var b={className:"",text:[]},c=[],e=a.firstRow,f=a.lastRow,g=this.session.getNextFoldLine(e),h=g?g.start.row:Infinity,i=this.$showFoldWidgets&&this.session.foldWidgets;for(;;){e>h&&(e=g.end.row+1,g=this.session.getNextFoldLine(e,g),h=g?g.start.row:Infinity);if(e>f)break;var j=this.$annotations[e]||b;c.push("<div class='ace_gutter-cell",this.$decorations[e]||"",this.$breakpoints[e]?" ace_breakpoint ":" ",j.className,"' title='",j.text.join("\n"),"' style='height:",a.lineHeight,"px;'>",e+1);if(i){var k=i[e];k==null&&(k=i[e]=this.session.getFoldWidget(e)),k&&c.push("<span class='ace_fold-widget ",k,k=="start"&&e==h&&e<g.end.row?" closed":" open","'></span>")}var l=this.session.getRowLength(e)-1;while(l--)c.push("</div><div class='ace_gutter-cell' style='height:",a.lineHeight,"px'>¦");c.push("</div>"),e++}this.element=d.setInnerHtml(this.element,c.join("")),this.element.style.height=a.minHeight+"px";var m=this.element.offsetWidth;m!==this.gutterWidth&&(this.gutterWidth=m,this._emit("changeGutterWidth",m))},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(a){a?d.addCssClass(this.element,"ace_folding-enabled"):d.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=a},this.getShowFoldWidgets=function(){return this.$showFoldWidgets}})).call(g.prototype),b.Gutter=g}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b,c){"use strict";var d=a("../range").Range,e=a("../lib/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};((function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(!a)return;this.config=a;var b=[];for(var c in this.markers){var d=this.markers[c],f=d.range.clipRows(a.firstRow,a.lastRow);if(f.isEmpty())continue;f=f.toScreenRange(this.session);if(d.renderer){var g=this.$getTop(f.start.row,a),h=Math.round(this.$padding+f.start.column*a.characterWidth);d.renderer(b,f,h,g,a)}else f.isMultiLine()?d.type=="text"?this.drawTextMarker(b,f,d.clazz,a):this.drawMultiLineMarker(b,f,d.clazz,a,d.type):this.drawSingleLineMarker(b,f,d.clazz,a,null,d.type)}this.element=e.setInnerHtml(this.element,b.join(""))},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,c,e){var f=b.start.row,g=new d(f,b.start.column,f,this.session.getScreenLastRowColumn(f));this.drawSingleLineMarker(a,g,c,e,1,"text"),f=b.end.row,g=new d(f,0,f,b.end.column),this.drawSingleLineMarker(a,g,c,e,0,"text");for(f=b.start.row+1;f<b.end.row;f++)g.start.row=f,g.end.row=f,g.end.column=this.session.getScreenLastRowColumn(f),this.drawSingleLineMarker(a,g,c,e,1,"text")},this.drawMultiLineMarker=function(a,b,c,d,e){var f=e==="background"?0:this.$padding,g=d.width+2*this.$padding-f,h=d.lineHeight,i=Math.round(g-b.start.column*d.characterWidth),j=this.$getTop(b.start.row,d),k=Math.round(f+b.start.column*d.characterWidth);a.push("<div class='",c,"' style='","height:",h,"px;","width:",i,"px;","top:",j,"px;","left:",k,"px;'></div>"),j=this.$getTop(b.end.row,d),i=Math.round(b.end.column*d.characterWidth),a.push("<div class='",c,"' style='","height:",h,"px;","width:",i,"px;","top:",j,"px;","left:",f,"px;'></div>"),h=(b.end.row-b.start.row-1)*d.lineHeight;if(h<0)return;j=this.$getTop(b.start.row+1,d),a.push("<div class='",c,"' style='","height:",h,"px;","width:",g,"px;","top:",j,"px;","left:",f,"px;'></div>")},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=f==="background"?0:this.$padding,h=d.lineHeight;if(f==="background")var i=d.width;else i=Math.round((b.end.column+(e||0)-b.start.column)*d.characterWidth);var j=this.$getTop(b.start.row,d),k=Math.round(g+b.start.column*d.characterWidth);a.push("<div class='",c,"' style='","height:",h,"px;","width:",i,"px;","top:",j,"px;","left:",k,"px;'></div>")}})).call(f.prototype),b.Marker=f}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang"),g=a("../lib/useragent"),h=a("../lib/event_emitter").EventEmitter,i=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$characterSize=this.$measureSizes()||{width:0,height:0},this.$pollSizeChanges()};((function(){d.implement(this,h),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$characterSize.height||1},this.getCharacterWidth=function(){return this.$characterSize.width||1},this.checkForSizeChanges=function(){var a=this.$measureSizes();a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)&&(this.$characterSize=a,this._emit("changeCharacterSize",{data:a}))},this.$pollSizeChanges=function(){var a=this;this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=function(){var a=1e3;if(!this.$measureNode){var b=this.$measureNode=e.createElement("div"),c=b.style;c.width=c.height="auto",c.left=c.top=-a*40+"px",c.visibility="hidden",c.position="absolute",c.overflow="visible",c.whiteSpace="nowrap",b.innerHTML=f.stringRepeat("Xy",a);if(this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(b);else{var d=this.element.parentNode;while(!e.hasCssClass(d,"ace_editor"))d=d.parentNode;d.appendChild(b)}}var c=this.$measureNode.style,g=e.computedStyle(this.element);for(var h in this.$fontStyles)c[h]=g[h];var i={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(a*2)};return i.width==0&&i.height==0?null:i},this.setSession=function(a){this.session=a},this.showInvisibles=!1,this.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,!0)},this.$tabStrings=[],this.$computeTabString=function(){var a=this.session.getTabSize(),b=this.$tabStrings=[0];for(var c=1;c<a+1;c++)this.showInvisibles?b.push("<span class='ace_invisible'>"+this.TAB_CHAR+(new Array(c)).join("&#160;")+"</span>"):b.push((new Array(c+1)).join("&#160;"))},this.updateLines=function(a,b,c){this.$computeTabString(),(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;var d=Math.max(b,a.firstRow),f=Math.min(c,a.lastRow),g=this.element.childNodes,h=0;for(var i=a.firstRow;i<d;i++){var j=this.session.getFoldLine(i);if(j){if(j.containsRow(d)){d=j.start.row;break}i=j.end.row}h++}for(var k=d;k<=f;k++){var l=g[h++];if(!l)continue;var m=[],n=this.session.getTokens(k,k);this.$renderLine(m,k,n[0].tokens,!this.$useLineGroups()),l=e.setInnerHtml(l,m.join("")),k=this.session.getRowFoldEnd(k)}},this.scrollLines=function(a){this.$computeTabString();var b=this.config;this.config=a;if(!b||b.lastRow<a.firstRow)return this.update(a);if(a.lastRow<b.firstRow)return this.update(a);var c=this.element;if(b.firstRow<a.firstRow)for(var d=this.session.getFoldedRowCount(b.firstRow,a.firstRow-1);d>0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRow<b.firstRow){var e=this.$renderLinesFragment(a,a.firstRow,b.firstRow-1);c.firstChild?c.insertBefore(e,c.firstChild):c.appendChild(e)}if(a.lastRow>b.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){var d=this.element.ownerDocument.createDocumentFragment(),f=b,g=this.session.getNextFoldLine(f),h=g?g.start.row:Infinity;for(;;){f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:Infinity);if(f>c)break;var i=e.createElement("div"),j=[],k=this.session.getTokens(f,f);k.length==1&&this.$renderLine(j,f,k[0].tokens,!1),i.innerHTML=j.join("");if(this.$useLineGroups())i.className="ace_line_group",d.appendChild(i);else{var l=i.childNodes;while(l.length)d.appendChild(l[0])}f++}return d},this.update=function(a){this.$computeTabString(),this.config=a;var b=[],c=a.firstRow,d=a.lastRow,f=c,g=this.session.getNextFoldLine(f),h=g?g.start.row:Infinity;for(;;){f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:Infinity);if(f>d)break;this.$useLineGroups()&&b.push("<div class='ace_line_group'>");var i=this.session.getTokens(f,f);i.length==1&&this.$renderLine(b,f,i[0].tokens,!1),this.$useLineGroups()&&b.push("</div>"),f++}this.element=e.setInnerHtml(this.element,b.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var e=this,f=/\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,h=function(a,c,d,f,h){if(a.charCodeAt(0)==32)return(new Array(a.length+1)).join("&#160;");if(a=="\t"){var i=e.session.getScreenTabSize(b+f);return b+=i-1,e.$tabStrings[i]}if(a=="&")return g.isOldGecko?"&":"&amp;";if(a=="<")return"&lt;";if(a==" "){var j=e.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",k=e.showInvisibles?e.SPACE_CHAR:"";return b+=1,"<span class='"+j+"' style='width:"+e.config.characterWidth*2+"px'>"+k+"</span>"}if(a.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)){if(e.showInvisibles){var k=(new Array(a.length+1)).join(e.SPACE_CHAR);return"<span class='ace_invisible'>"+k+"</span>"}return"&#160;"}return b+=1,"<span class='ace_cjk' style='width:"+e.config.characterWidth*2+"px'>"+a+"</span>"},i=d.replace(f,h);if(!this.$textToken[c.type]){var j="ace_"+c.type.replace(/\./g," ace_"),k="";c.type=="fold"&&(k=" style='width:"+c.value.length*this.config.characterWidth+"px;' "),a.push("<span class='",j,"'",k,">",i,"</span>")}else a.push(i);return b+d.length},this.$renderLineCore=function(a,b,c,d,e){var f=0,g=0,h,i=0,j=this;!d||d.length==0?h=Number.MAX_VALUE:h=d[0],e||a.push("<div class='ace_line' style='height:",this.config.lineHeight,"px","'>");for(var k=0;k<c.length;k++){var l=c[k],m=l.value;if(f+m.length<h)i=j.$renderToken(a,i,l,m),f+=m.length;else{while(f+m.length>=h)i=j.$renderToken(a,i,l,m.substring(0,h-f)),m=m.substring(h-f),f=h,e||a.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px","'>"),g++,i=0,h=d[g]||Number.MAX_VALUE;m.length!=0&&(f+=m.length,i=j.$renderToken(a,i,l,m))}}this.showInvisibles&&(b!==this.session.getLength()-1?a.push("<span class='ace_invisible'>"+this.EOL_CHAR+"</span>"):a.push("<span class='ace_invisible'>"+this.EOF_CHAR+"</span>")),e||a.push("</div>")},this.$renderLine=function(a,b,c,d){if(!this.session.isRowFolded(b)){var e=this.session.getRowSplitData(b);this.$renderLineCore(a,b,c,e,d)}else this.$renderFoldLine(a,b,c,d)},this.$renderFoldLine=function(a,b,c,d){function h(a,b,c){var d=0,e=0;while(e+a[d].value.length<b){e+=a[d].value.length,d++;if(d==a.length)return}if(e!=b){var f=a[d].value.substring(b-e);f.length>c-b&&(f=f.substring(0,c-b)),g.push({type:a[d].type,value:f}),e=b+f.length,d+=1}while(e<c){var f=a[d].value;f.length+e>c&&(f=f.substring(0,c-e)),g.push({type:a[d].type,value:f}),e+=f.length,d+=1}}var e=this.session,f=e.getFoldLine(b),g=[];f.walk(function(a,b,d,e,f){a?g.push({type:"fold",value:a}):(f&&(c=this.session.getTokens(b,b)[0].tokens),c.length!=0&&h(c,e,d))}.bind(this),f.end.row,this.session.getLine(f.end.row).length);var i=this.session.$useWrapMode?this.session.$wrapData[b]:null;this.$renderLineCore(a,b,g,i,d)},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}})).call(i.prototype),b.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict";var d=a("../lib/dom"),e=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.cursor=d.createElement("div"),this.cursor.className="ace_cursor ace_hidden",this.element.appendChild(this.cursor),this.isVisible=!1};((function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.cursor,"ace_hidden"),clearInterval(this.blinkId)},this.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.cursor,"ace_hidden"),this.cursor.style.visibility="visible",this.restartTimer()},this.restartTimer=function(){clearInterval(this.blinkId);if(!this.isVisible)return;var a=this.cursor;this.blinkId=setInterval(function(){a.style.visibility="hidden",setTimeout(function(){a.style.visibility="visible"},400)},1e3)},this.getPixelPosition=function(a,b){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=Math.round(this.$padding+c.column*this.config.characterWidth),e=(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a,this.pixelPos=this.getPixelPosition(null,!0),this.cursor.style.left=this.pixelPos.left+"px",this.cursor.style.top=this.pixelPos.top+"px",this.cursor.style.width=a.characterWidth+"px",this.cursor.style.height=a.lineHeight+"px";var b=this.session.getOverwrite();b!=this.overwrite&&(this.overwrite=b,b?d.addCssClass(this.cursor,"ace_overwrite"):d.removeCssClass(this.cursor,"ace_overwrite")),this.restartTimer()},this.destroy=function(){clearInterval(this.blinkId)}})).call(e.prototype),b.Cursor=e}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./lib/event"),g=a("./lib/event_emitter").EventEmitter,h=function(a){this.element=e.createElement("div"),this.element.className="ace_sb",this.inner=e.createElement("div"),this.element.appendChild(this.inner),a.appendChild(this.element),this.width=e.scrollbarWidth(a.ownerDocument),this.element.style.width=(this.width||15)+5+"px",f.addListener(this.element,"scroll",this.onScroll.bind(this))};((function(){d.implement(this,g),this.onScroll=function(){this._emit("scroll",{data:this.element.scrollTop})},this.getWidth=function(){return this.width},this.setHeight=function(a){this.element.style.height=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setScrollTop=function(a){this.element.scrollTop=a}})).call(h.prototype),b.ScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(a,b,c){"use strict";var d=a("./lib/event"),e=function(a,b){this.onRender=a,this.pending=!1,this.changes=0,this.window=b||window};((function(){this.schedule=function(a){this.changes=this.changes|a;if(!this.pending){this.pending=!0;var b=this;d.nextTick(function(){b.pending=!1;var a;while(a=b.changes)b.changes=0,b.onRender(a)},this.window)}}})).call(e.prototype),b.RenderLoop=e}),ace.define("text!ace/css/editor.css",[],"@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);\n\n\n.ace_editor {\n position: absolute;\n overflow: hidden;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Droid Sans Mono', 'Consolas', monospace;\n font-size: 12px;\n}\n\n.ace_scroller {\n position: absolute;\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n cursor: text;\n}\n\n/* setting pointer-events: auto; on node under the mouse, which changes during scroll,\n will break mouse wheel scrolling in Safari */\n.ace_content * {\n pointer-events: none;\n}\n\n.ace_composition {\n position: absolute;\n background: #555;\n color: #DDD;\n z-index: 4;\n}\n\n.ace_gutter .ace_layer {\n position: relative;\n min-width: 54px;\n text-align: right;\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n height: 100%;\n width: auto;\n cursor: default;\n}\n\n.ace_gutter-cell {\n padding-left: 19px;\n padding-right: 6px;\n}\n\n.ace_gutter-cell.ace_error {\n background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B\");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning {\n background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B\");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info {\n background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_editor .ace_sb {\n position: absolute;\n overflow-x: hidden;\n overflow-y: scroll;\n right: 0;\n}\n\n.ace_editor .ace_sb div {\n position: absolute;\n width: 1px;\n left: 0;\n}\n\n.ace_editor .ace_print_margin_layer {\n z-index: 0;\n position: absolute;\n overflow: hidden;\n margin: 0;\n left: 0;\n height: 100%;\n width: 100%;\n}\n\n.ace_editor .ace_print_margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_editor textarea {\n position: fixed;\n z-index: 0;\n width: 10px;\n height: 30px;\n opacity: 0;\n background: transparent;\n appearance: none;\n -moz-appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n white-space: nowrap;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n}\n\n.ace_text-layer {\n color: black;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n}\n\n.ace_cursor.ace_hidden {\n opacity: 0.2;\n}\n\n.ace_line {\n white-space: nowrap;\n}\n\n.ace_marker-layer .ace_step {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 4;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_active_line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected_word {\n position: absolute;\n z-index: 6;\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n \n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image: \n url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\n url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n -moz-border-radius: 2px;\n -webkit-border-radius: 2px;\n border-radius: 2px;\n \n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image: \n url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\n url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n}\n\n.ace_dragging .ace_content {\n cursor: move;\n}\n\n.ace_folding-enabled .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n\n margin: 0 -12px 1px 1px;\n display: inline-block;\n height: 14px;\n width: 11px;\n vertical-align: text-bottom;\n \n background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");\n background-repeat: no-repeat;\n background-position: center 5px;\n\n border-radius: 3px;\n}\n\n.ace_fold-widget.end {\n background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");\n}\n\n.ace_fold-widget.closed {\n background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n -moz-box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n -webkit-box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n background-position: center 4px;\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n -moz-box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n -webkit-box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n\n.ace_fold-widget.invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n"),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict",b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #0000A2;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/ace-uncompressed-noconflict.js b/contexts/data/lib/ace/ace-uncompressed-noconflict.js
deleted file mode 100644
index 47873d9..0000000
--- a/contexts/data/lib/ace/ace-uncompressed-noconflict.js
+++ /dev/null
@@ -1,14194 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/**
- * Define a module along with a payload
- * @param module a name for the payload
- * @param payload a function to call with (require, exports, module) params
- */
-
-(function() {
-
-var ACE_NAMESPACE = "ace";
-
-var global = (function() {
- return this;
-})();
-
-if (typeof requirejs !== "undefined")
- return;
-
-var _define = function(module, deps, payload) {
- if (typeof module !== 'string') {
- if (_define.original)
- _define.original.apply(window, arguments);
- else {
- console.error('dropping module because define wasn\'t a string.');
- console.trace();
- }
- return;
- }
-
- if (arguments.length == 2)
- payload = deps;
-
- if (!_define.modules)
- _define.modules = {};
-
- _define.modules[module] = payload;
-};
-
-/**
- * Get at functionality ace.define()ed using the function above
- */
-var _require = function(parentId, module, callback) {
- if (Object.prototype.toString.call(module) === "[object Array]") {
- var params = [];
- for (var i = 0, l = module.length; i < l; ++i) {
- var dep = lookup(parentId, module[i]);
- if (!dep && _require.original)
- return _require.original.apply(window, arguments);
- params.push(dep);
- }
- if (callback) {
- callback.apply(null, params);
- }
- }
- else if (typeof module === 'string') {
- var payload = lookup(parentId, module);
- if (!payload && _require.original)
- return _require.original.apply(window, arguments);
-
- if (callback) {
- callback();
- }
-
- return payload;
- }
- else {
- if (_require.original)
- return _require.original.apply(window, arguments);
- }
-};
-
-var normalizeModule = function(parentId, moduleName) {
- // normalize plugin requires
- if (moduleName.indexOf("!") !== -1) {
- var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
- }
- // normalize relative requires
- if (moduleName.charAt(0) == ".") {
- var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
-
- while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
- var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
- }
- }
-
- return moduleName;
-};
-
-/**
- * Internal function to lookup moduleNames and resolve them by calling the
- * definition function if needed.
- */
-var lookup = function(parentId, moduleName) {
-
- moduleName = normalizeModule(parentId, moduleName);
-
- var module = _define.modules[moduleName];
- if (!module) {
- return null;
- }
-
- if (typeof module === 'function') {
- var exports = {};
- var mod = {
- id: moduleName,
- uri: '',
- exports: exports,
- packaged: true
- };
-
- var req = function(module, callback) {
- return _require(moduleName, module, callback);
- };
-
- var returnValue = module(req, exports, mod);
- exports = returnValue || mod.exports;
-
- // cache the resulting module object for next time
- _define.modules[moduleName] = exports;
- return exports;
- }
-
- return module;
-};
-
-function exportAce(ns) {
- var require = function(module, callback) {
- return _require("", module, callback);
- };
- require.packaged = true;
-
- var root = global;
- if (ns) {
- if (!global[ns])
- global[ns] = {};
- root = global[ns];
- }
-
- if (root.define)
- _define.original = root.define;
-
- root.define = _define;
-
- if (root.require)
- _require.original = root.require;
-
- root.require = require;
-}
-
-exportAce(ACE_NAMESPACE);
-
-})();/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Kevin Dangoor (kdangoor@mozilla.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ace', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/lib/dom', 'ace/lib/event', 'ace/editor', 'ace/edit_session', 'ace/undomanager', 'ace/virtual_renderer', 'ace/theme/textmate'], function(require, exports, module) {
-"use strict";
-
-require("./lib/fixoldbrowsers");
-
-var Dom = require("./lib/dom");
-var Event = require("./lib/event");
-
-var Editor = require("./editor").Editor;
-var EditSession = require("./edit_session").EditSession;
-var UndoManager = require("./undomanager").UndoManager;
-var Renderer = require("./virtual_renderer").VirtualRenderer;
-
-exports.edit = function(el) {
- if (typeof(el) == "string") {
- el = document.getElementById(el);
- }
-
- var doc = new EditSession(Dom.getInnerText(el));
- doc.setUndoManager(new UndoManager());
- el.innerHTML = '';
-
- var editor = new Editor(new Renderer(el, require("./theme/textmate")));
- editor.setSession(doc);
-
- var env = {};
- env.document = doc;
- env.editor = editor;
- editor.resize();
- Event.addListener(window, "resize", function() {
- editor.resize();
- });
- el.env = env;
- // Store env on editor such that it can be accessed later on from
- // the returned object.
- editor.env = env;
- return editor;
-};
-
-});// vim:set ts=4 sts=4 sw=4 st:
-// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Irakli Gozalishvili Copyright (C) 2010 MIT License
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
-
-ace.define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
-"use strict";
-
-require("./regexp");
-require("./es5-shim");
-
-});/**
- * Based on code from:
- *
- * XRegExp 1.5.0
- * (c) 2007-2010 Steven Levithan
- * MIT License
- * <http://xregexp.com>
- * Provides an augmented, extensible, cross-browser implementation of regular expressions,
- * including support for additional syntax, flags, and methods
- */
-
-ace.define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
- //---------------------------------
- // Private variables
- //---------------------------------
-
- var real = {
- exec: RegExp.prototype.exec,
- test: RegExp.prototype.test,
- match: String.prototype.match,
- replace: String.prototype.replace,
- split: String.prototype.split
- },
- compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
- compliantLastIndexIncrement = function () {
- var x = /^/g;
- real.test.call(x, "");
- return !x.lastIndex;
- }();
-
- //---------------------------------
- // Overriden native methods
- //---------------------------------
-
- // Adds named capture support (with backreferences returned as `result.name`), and fixes two
- // cross-browser issues per ES3:
- // - Captured values for nonparticipating capturing groups should be returned as `undefined`,
- // rather than the empty string.
- // - `lastIndex` should not be incremented after zero-length matches.
- RegExp.prototype.exec = function (str) {
- var match = real.exec.apply(this, arguments),
- name, r2;
- if (match) {
- // Fix browsers whose `exec` methods don't consistently return `undefined` for
- // nonparticipating capturing groups
- if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
- r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
- // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
- // matching due to characters outside the match
- real.replace.call(str.slice(match.index), r2, function () {
- for (var i = 1; i < arguments.length - 2; i++) {
- if (arguments[i] === undefined)
- match[i] = undefined;
- }
- });
- }
- // Attach named capture properties
- if (this._xregexp && this._xregexp.captureNames) {
- for (var i = 1; i < match.length; i++) {
- name = this._xregexp.captureNames[i - 1];
- if (name)
- match[name] = match[i];
- }
- }
- // Fix browsers that increment `lastIndex` after zero-length matches
- if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
- this.lastIndex--;
- }
- return match;
- };
-
- // Don't override `test` if it won't change anything
- if (!compliantLastIndexIncrement) {
- // Fix browser bug in native method
- RegExp.prototype.test = function (str) {
- // Use the native `exec` to skip some processing overhead, even though the overriden
- // `exec` would take care of the `lastIndex` fix
- var match = real.exec.call(this, str);
- // Fix browsers that increment `lastIndex` after zero-length matches
- if (match && this.global && !match[0].length && (this.lastIndex > match.index))
- this.lastIndex--;
- return !!match;
- };
- }
-
- //---------------------------------
- // Private helper functions
- //---------------------------------
-
- function getNativeFlags (regex) {
- return (regex.global ? "g" : "") +
- (regex.ignoreCase ? "i" : "") +
- (regex.multiline ? "m" : "") +
- (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
- (regex.sticky ? "y" : "");
- };
-
- function indexOf (array, item, from) {
- if (Array.prototype.indexOf) // Use the native array method if available
- return array.indexOf(item, from);
- for (var i = from || 0; i < array.length; i++) {
- if (array[i] === item)
- return i;
- }
- return -1;
- };
-
-});// vim: ts=4 sts=4 sw=4 expandtab
-// -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
-// -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
-// -- kossnocorp Sasha Koss XXX TODO License or CLA
-// -- bryanforbes Bryan Forbes XXX TODO License or CLA
-// -- killdream Quildreen Motta Copyright (C) 2011 MIT Licence
-// -- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD License
-// -- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
-// -- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
-// -- iwyg XXX TODO License or CLA
-// -- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
-// -- xavierm02 Montillet Xavier XXX TODO License or CLA
-// -- Raynos Raynos XXX TODO License or CLA
-// -- samsonjs Sami Samhuri Copyright (C) 2010 MIT License
-// -- rwldrn Rick Waldron Copyright (C) 2011 MIT License
-// -- lexer Alexey Zakharov XXX TODO License or CLA
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
-
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-/**
- * Brings an environment as close to ECMAScript 5 compliance
- * as is possible with the facilities of erstwhile engines.
- *
- * Annotated ES5: http://es5.github.com/ (specific links below)
- * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
- *
- * @module
- */
-
-/*whatsupdoc*/
-
-//
-// Function
-// ========
-//
-
-// ES-5 15.3.4.5
-// http://es5.github.com/#x15.3.4.5
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- // 1. Let Target be the this value.
- var target = this;
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
- if (typeof target != "function")
- throw new TypeError(); // TODO message
- // 3. Let A be a new (possibly empty) internal list of all of the
- // argument values provided after thisArg (arg1, arg2 etc), in order.
- // XXX slicedArgs will stand in for "A" if used
- var args = slice.call(arguments, 1); // for normal call
- // 4. Let F be a new native ECMAScript object.
- // 11. Set the [[Prototype]] internal property of F to the standard
- // built-in Function prototype object as specified in 15.3.3.1.
- // 12. Set the [[Call]] internal property of F as described in
- // 15.3.4.5.1.
- // 13. Set the [[Construct]] internal property of F as described in
- // 15.3.4.5.2.
- // 14. Set the [[HasInstance]] internal property of F as described in
- // 15.3.4.5.3.
- var bound = function () {
-
- if (this instanceof bound) {
- // 15.3.4.5.2 [[Construct]]
- // When the [[Construct]] internal method of a function object,
- // F that was created using the bind function is called with a
- // list of arguments ExtraArgs, the following steps are taken:
- // 1. Let target be the value of F's [[TargetFunction]]
- // internal property.
- // 2. If target has no [[Construct]] internal method, a
- // TypeError exception is thrown.
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Construct]] internal
- // method of target providing args as the arguments.
-
- var F = function(){};
- F.prototype = target.prototype;
- var self = new F;
-
- var result = target.apply(
- self,
- args.concat(slice.call(arguments))
- );
- if (result !== null && Object(result) === result)
- return result;
- return self;
-
- } else {
- // 15.3.4.5.1 [[Call]]
- // When the [[Call]] internal method of a function object, F,
- // which was created using the bind function is called with a
- // this value and a list of arguments ExtraArgs, the following
- // steps are taken:
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
- // property.
- // 3. Let target be the value of F's [[TargetFunction]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Call]] internal method
- // of target providing boundThis as the this value and
- // providing args as the arguments.
-
- // equiv: target.call(this, ...boundArgs, ...args)
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- // XXX bound.length is never writable, so don't even try
- //
- // 15. If the [[Class]] internal property of Target is "Function", then
- // a. Let L be the length property of Target minus the length of A.
- // b. Set the length own property of F to either 0 or L, whichever is
- // larger.
- // 16. Else set the length own property of F to 0.
- // 17. Set the attributes of the length own property of F to the values
- // specified in 15.3.5.1.
-
- // TODO
- // 18. Set the [[Extensible]] internal property of F to true.
-
- // TODO
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
- // 20. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
- // false.
- // 21. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
- // and false.
-
- // TODO
- // NOTE Function objects created using Function.prototype.bind do not
- // have a prototype property or the [[Code]], [[FormalParameters]], and
- // [[Scope]] internal properties.
- // XXX can't delete prototype in pure-js.
-
- // 22. Return F.
- return bound;
- };
-}
-
-// Shortcut to an often accessed properties, in order to avoid multiple
-// dereference that costs universally.
-// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
-// us it in defining shortcuts.
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-
-// If JS engine supports accessors creating shortcuts.
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-
-//
-// Array
-// =====
-//
-
-// ES5 15.4.3.2
-// http://es5.github.com/#x15.4.3.2
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return toString(obj) == "[object Array]";
- };
-}
-
-// The IsCallable() check in the Array functions
-// has been replaced with a strict check on the
-// internal class of the object to trap cases where
-// the provided function was actually a regular
-// expression literal, which in V8 and
-// JavaScriptCore is a typeof "function". Only in
-// V8 are regular expression literals permitted as
-// reduce parameters, so it is desirable in the
-// general case for the shim to match the more
-// strict and common behavior of rejecting regular
-// expressions.
-
-// ES5 15.4.4.18
-// http://es5.github.com/#x15.4.4.18
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var self = toObject(this),
- thisp = arguments[1],
- i = 0,
- length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (i < length) {
- if (i in self) {
- // Invoke the callback function with call, passing arguments:
- // context, property value, property key, thisArg object context
- fun.call(thisp, self[i], i, self);
- }
- i++;
- }
- };
-}
-
-// ES5 15.4.4.19
-// http://es5.github.com/#x15.4.4.19
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var self = toObject(this),
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, self);
- }
- return result;
- };
-}
-
-// ES5 15.4.4.20
-// http://es5.github.com/#x15.4.4.20
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var self = toObject(this),
- length = self.length >>> 0,
- result = [],
- thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, self))
- result.push(self[i]);
- }
- return result;
- };
-}
-
-// ES5 15.4.4.16
-// http://es5.github.com/#x15.4.4.16
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var self = toObject(this),
- length = self.length >>> 0,
- thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, self))
- return false;
- }
- return true;
- };
-}
-
-// ES5 15.4.4.17
-// http://es5.github.com/#x15.4.4.17
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var self = toObject(this),
- length = self.length >>> 0,
- thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, self))
- return true;
- }
- return false;
- };
-}
-
-// ES5 15.4.4.21
-// http://es5.github.com/#x15.4.4.21
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var self = toObject(this),
- length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- // no value to return if no initial value and an empty array
- if (!length && arguments.length == 1)
- throw new TypeError(); // TODO message
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
-
- // if array contains no values, no initial value to return
- if (++i >= length)
- throw new TypeError(); // TODO message
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self)
- result = fun.call(void 0, result, self[i], i, self);
- }
-
- return result;
- };
-}
-
-// ES5 15.4.4.22
-// http://es5.github.com/#x15.4.4.22
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var self = toObject(this),
- length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- // no value to return if no initial value, empty array
- if (!length && arguments.length == 1)
- throw new TypeError(); // TODO message
-
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
-
- // if array contains no values, no initial value to return
- if (--i < 0)
- throw new TypeError(); // TODO message
- } while (true);
- }
-
- do {
- if (i in this)
- result = fun.call(void 0, result, self[i], i, self);
- } while (i--);
-
- return result;
- };
-}
-
-// ES5 15.4.4.14
-// http://es5.github.com/#x15.4.4.14
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
-if (!Array.prototype.indexOf) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = toObject(this),
- length = self.length >>> 0;
-
- if (!length)
- return -1;
-
- var i = 0;
- if (arguments.length > 1)
- i = toInteger(arguments[1]);
-
- // handle negative indices
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
- };
-}
-
-// ES5 15.4.4.15
-// http://es5.github.com/#x15.4.4.15
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
-if (!Array.prototype.lastIndexOf) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = toObject(this),
- length = self.length >>> 0;
-
- if (!length)
- return -1;
- var i = length - 1;
- if (arguments.length > 1)
- i = Math.min(i, toInteger(arguments[1]));
- // handle negative indices
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i])
- return i;
- }
- return -1;
- };
-}
-
-//
-// Object
-// ======
-//
-
-// ES5 15.2.3.2
-// http://es5.github.com/#x15.2.3.2
-if (!Object.getPrototypeOf) {
- // https://github.com/kriskowal/es5-shim/issues#issue/2
- // http://ejohn.org/blog/objectgetprototypeof/
- // recommended by fschaefer on github
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-
-// ES5 15.2.3.3
-// http://es5.github.com/#x15.2.3.3
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- // If object does not owns property return undefined immediately.
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
-
- // If object has a property then it's for sure both `enumerable` and
- // `configurable`.
- descriptor = { enumerable: true, configurable: true };
-
- // If JS engine supports accessor properties then property may be a
- // getter or setter.
- if (supportsAccessors) {
- // Unfortunately `__lookupGetter__` will return a getter even
- // if object has own non getter property along with a same named
- // inherited getter. To avoid misbehavior we temporary remove
- // `__proto__` so that `__lookupGetter__` will return getter only
- // if it's owned by an object.
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
-
- // Once we have getter and setter we can put values back.
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
-
- // If it was accessor property we're done and return here
- // in order to avoid adding `value` to the descriptor.
- return descriptor;
- }
- }
-
- // If we got this far we know that object has an own property that is
- // not an accessor so we set it as a value and return descriptor.
- descriptor.value = object[property];
- return descriptor;
- };
-}
-
-// ES5 15.2.3.4
-// http://es5.github.com/#x15.2.3.4
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
-}
-
-// ES5 15.2.3.5
-// http://es5.github.com/#x15.2.3.5
-if (!Object.create) {
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = { "__proto__": null };
- } else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- // IE has no built-in implementation of `Object.getPrototypeOf`
- // neither `__proto__`, but this manually setting `__proto__` will
- // guarantee that `Object.getPrototypeOf` will work as expected with
- // objects created using `Object.create`
- object.__proto__ = prototype;
- }
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
- };
-}
-
-// ES5 15.2.3.6
-// http://es5.github.com/#x15.2.3.6
-
-// Patch for WebKit and IE8 standard mode
-// Designed by hax <hax.github.com>
-// related issue: https://github.com/kriskowal/es5-shim/issues#issue/5
-// IE8 Reference:
-// http://msdn.microsoft.com/en-us/library/dd282900.aspx
-// http://msdn.microsoft.com/en-us/library/dd229916.aspx
-// WebKit Bugs:
-// https://bugs.webkit.org/show_bug.cgi?id=36423
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- // returns falsy
- }
-}
-
-// check whether defineProperty works if it's given. Otherwise,
-// shim partially.
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
-
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
-
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
-
- // make a valiant attempt to use the real defineProperty
- // for I8's DOM elements.
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- // try the shim if the real one doesn't work
- }
- }
-
- // If it's a data property.
- if (owns(descriptor, "value")) {
- // fail silently if "writable", "enumerable", or "configurable"
- // are requested but not supported
- /*
- // alternate approach:
- if ( // can't implement these features; allow false but not true
- !(owns(descriptor, "writable") ? descriptor.writable : true) ||
- !(owns(descriptor, "enumerable") ? descriptor.enumerable : true) ||
- !(owns(descriptor, "configurable") ? descriptor.configurable : true)
- )
- throw new RangeError(
- "This implementation of Object.defineProperty does not " +
- "support configurable, enumerable, or writable."
- );
- */
-
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- // As accessors are supported only on engines implementing
- // `__proto__` we can safely override `__proto__` while defining
- // a property to make sure that we don't hit an inherited
- // accessor.
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- // Deleting a property anyway since getter / setter may be
- // defined on object itself.
- delete object[property];
- object[property] = descriptor.value;
- // Setting original `__proto__` back now.
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- // If we got that far then getters and setters can be defined !!
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
-
- return object;
- };
-}
-
-// ES5 15.2.3.7
-// http://es5.github.com/#x15.2.3.7
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
-}
-
-// ES5 15.2.3.8
-// http://es5.github.com/#x15.2.3.8
-if (!Object.seal) {
- Object.seal = function seal(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
- return object;
- };
-}
-
-// ES5 15.2.3.9
-// http://es5.github.com/#x15.2.3.9
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
- return object;
- };
-}
-
-// detect a Rhino bug and patch it
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-
-// ES5 15.2.3.10
-// http://es5.github.com/#x15.2.3.10
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
- return object;
- };
-}
-
-// ES5 15.2.3.11
-// http://es5.github.com/#x15.2.3.11
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
- };
-}
-
-// ES5 15.2.3.12
-// http://es5.github.com/#x15.2.3.12
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
- };
-}
-
-// ES5 15.2.3.13
-// http://es5.github.com/#x15.2.3.13
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- // 1. If Type(O) is not Object throw a TypeError exception.
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- // 2. Return the Boolean value of the [[Extensible]] internal property of O.
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
- };
-}
-
-// ES5 15.2.3.14
-// http://es5.github.com/#x15.2.3.14
-if (!Object.keys) {
- // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
-
- for (var key in {"toString": null})
- hasDontEnumBug = false;
-
- Object.keys = function keys(object) {
-
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError("Object.keys called on a non-object");
-
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
-
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
-
- return keys;
- };
-
-}
-
-//
-// Date
-// ====
-//
-
-// ES5 15.9.5.43
-// http://es5.github.com/#x15.9.5.43
-// This function returns a String value represent the instance in time
-// represented by this Date object. The format of the String is the Date Time
-// string format defined in 15.9.1.15. All fields are present in the String.
-// The time zone is always UTC, denoted by the suffix Z. If the time value of
-// this object is not a finite Number a RangeError exception is thrown.
-if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
- Date.prototype.toISOString = function toISOString() {
- var result, length, value, year;
- if (!isFinite(this))
- throw new RangeError;
-
- // the date time string format is specified in 15.9.1.15.
- result = [this.getUTCMonth() + 1, this.getUTCDate(),
- this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
- year = this.getUTCFullYear();
- year = (year < 0 ? '-' : (year > 9999 ? '+' : '')) + ('00000' + Math.abs(year)).slice(0 <= year && year <= 9999 ? -4 : -6);
-
- length = result.length;
- while (length--) {
- value = result[length];
- // pad months, days, hours, minutes, and seconds to have two digits.
- if (value < 10)
- result[length] = "0" + value;
- }
- // pad milliseconds to have three digits.
- return year + "-" + result.slice(0, 2).join("-") + "T" + result.slice(2).join(":") + "." +
- ("000" + this.getUTCMilliseconds()).slice(-3) + "Z";
- }
-}
-
-// ES5 15.9.4.4
-// http://es5.github.com/#x15.9.4.4
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-
-// ES5 15.9.5.44
-// http://es5.github.com/#x15.9.5.44
-// This function provides a String representation of a Date object for use by
-// JSON.stringify (15.12.3).
-if (!Date.prototype.toJSON) {
- Date.prototype.toJSON = function toJSON(key) {
- // When the toJSON method is called with argument key, the following
- // steps are taken:
-
- // 1. Let O be the result of calling ToObject, giving it the this
- // value as its argument.
- // 2. Let tv be ToPrimitive(O, hint Number).
- // 3. If tv is a Number and is not finite, return null.
- // XXX
- // 4. Let toISO be the result of calling the [[Get]] internal method of
- // O with argument "toISOString".
- // 5. If IsCallable(toISO) is false, throw a TypeError exception.
- if (typeof this.toISOString != "function")
- throw new TypeError(); // TODO message
- // 6. Return the result of calling the [[Call]] internal method of
- // toISO with O as the this value and an empty argument list.
- return this.toISOString();
-
- // NOTE 1 The argument is ignored.
-
- // NOTE 2 The toJSON function is intentionally generic; it does not
- // require that its this value be a Date object. Therefore, it can be
- // transferred to other kinds of objects for use as a method. However,
- // it does require that any such object have a toISOString method. An
- // object is free to use the argument key to filter its
- // stringification.
- };
-}
-
-// ES5 15.9.4.2
-// http://es5.github.com/#x15.9.4.2
-// based on work shared by Daniel Friesen (dantman)
-// http://gist.github.com/303249
-if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
- // XXX global assignment won't work in embeddings that use
- // an alternate object for the context.
- Date = (function(NativeDate) {
-
- // Date.length === 7
- var Date = function Date(Y, M, D, h, m, s, ms) {
- var length = arguments.length;
- if (this instanceof NativeDate) {
- var date = length == 1 && String(Y) === Y ? // isString(Y)
- // We explicitly pass it through parse:
- new NativeDate(Date.parse(Y)) :
- // We have to manually make calls depending on argument
- // length here
- length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
- length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
- length >= 5 ? new NativeDate(Y, M, D, h, m) :
- length >= 4 ? new NativeDate(Y, M, D, h) :
- length >= 3 ? new NativeDate(Y, M, D) :
- length >= 2 ? new NativeDate(Y, M) :
- length >= 1 ? new NativeDate(Y) :
- new NativeDate();
- // Prevent mixups with unfixed Date object
- date.constructor = Date;
- return date;
- }
- return NativeDate.apply(this, arguments);
- };
-
- // 15.9.1.15 Date Time String Format.
- var isoDateExpression = new RegExp("^" +
- "(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + 6-digit extended year
- "(?:-(\\d{2})" + // optional month capture
- "(?:-(\\d{2})" + // optional day capture
- "(?:" + // capture hours:minutes:seconds.milliseconds
- "T(\\d{2})" + // hours capture
- ":(\\d{2})" + // minutes capture
- "(?:" + // optional :seconds.milliseconds
- ":(\\d{2})" + // seconds capture
- "(?:\\.(\\d{3}))?" + // milliseconds capture
- ")?" +
- "(?:" + // capture UTC offset component
- "Z|" + // UTC capture
- "(?:" + // offset specifier +/-hours:minutes
- "([-+])" + // sign capture
- "(\\d{2})" + // hours offset capture
- ":(\\d{2})" + // minutes offset capture
- ")" +
- ")?)?)?)?" +
- "$");
-
- // Copy any custom methods a 3rd party library may have added
- for (var key in NativeDate)
- Date[key] = NativeDate[key];
-
- // Copy "native" methods explicitly; they may be non-enumerable
- Date.now = NativeDate.now;
- Date.UTC = NativeDate.UTC;
- Date.prototype = NativeDate.prototype;
- Date.prototype.constructor = Date;
-
- // Upgrade Date.parse to handle simplified ISO 8601 strings
- Date.parse = function parse(string) {
- var match = isoDateExpression.exec(string);
- if (match) {
- match.shift(); // kill match[0], the full match
- // parse months, days, hours, minutes, seconds, and milliseconds
- for (var i = 1; i < 7; i++) {
- // provide default values if necessary
- match[i] = +(match[i] || (i < 3 ? 1 : 0));
- // match[1] is the month. Months are 0-11 in JavaScript
- // `Date` objects, but 1-12 in ISO notation, so we
- // decrement.
- if (i == 1)
- match[i]--;
- }
-
- // parse the UTC offset component
- var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
-
- // compute the explicit time zone offset if specified
- var offset = 0;
- if (sign) {
- // detect invalid offsets and return early
- if (hourOffset > 23 || minuteOffset > 59)
- return NaN;
-
- // express the provided time zone offset in minutes. The offset is
- // negative for time zones west of UTC; positive otherwise.
- offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == "+" ? -1 : 1);
- }
-
- // Date.UTC for years between 0 and 99 converts year to 1900 + year
- // The Gregorian calendar has a 400-year cycle, so
- // to Date.UTC(year + 400, .... ) - 12622780800000 == Date.UTC(year, ...),
- // where 12622780800000 - number of milliseconds in Gregorian calendar 400 years
- var year = +match[0];
- if (0 <= year && year <= 99) {
- match[0] = year + 400;
- return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
- }
-
- // compute a new UTC date value, accounting for the optional offset
- return NativeDate.UTC.apply(this, match) + offset;
- }
- return NativeDate.parse.apply(this, arguments);
- };
-
- return Date;
- })(Date);
-}
-
-//
-// String
-// ======
-//
-
-// ES5 15.5.4.20
-// http://es5.github.com/#x15.5.4.20
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript
- // http://perfectionkills.com/whitespace-deviations/
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
-}
-
-//
-// Util
-// ======
-//
-
-// ES5 9.4
-// http://es5.github.com/#x9.4
-// http://jsperf.com/to-integer
-var toInteger = function (n) {
- n = +n;
- if (n !== n) // isNaN
- n = 0;
- else if (n !== 0 && n !== (1/0) && n !== -(1/0))
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- return n;
-};
-
-var prepareString = "a"[0] != "a",
- // ES5 9.9
- // http://es5.github.com/#x9.9
- toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError(); // TODO message
- }
- // If the implementation doesn't support by-index access of
- // string characters (ex. IE < 7), split the string
- if (prepareString && typeof o == "string" && o) {
- return o.split("");
- }
- return Object(o);
- };
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai AT sucan AT gmail ODT com>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/lib/dom', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var XHTML_NS = "http://www.w3.org/1999/xhtml";
-
-exports.createElement = function(tag, ns) {
- return document.createElementNS ?
- document.createElementNS(ns || XHTML_NS, tag) :
- document.createElement(tag);
-};
-
-exports.setText = function(elem, text) {
- if (elem.innerText !== undefined) {
- elem.innerText = text;
- }
- if (elem.textContent !== undefined) {
- elem.textContent = text;
- }
-};
-
-exports.hasCssClass = function(el, name) {
- var classes = el.className.split(/\s+/g);
- return classes.indexOf(name) !== -1;
-};
-
-/**
-* Add a CSS class to the list of classes on the given node
-*/
-exports.addCssClass = function(el, name) {
- if (!exports.hasCssClass(el, name)) {
- el.className += " " + name;
- }
-};
-
-/**
-* Remove a CSS class from the list of classes on the given node
-*/
-exports.removeCssClass = function(el, name) {
- var classes = el.className.split(/\s+/g);
- while (true) {
- var index = classes.indexOf(name);
- if (index == -1) {
- break;
- }
- classes.splice(index, 1);
- }
- el.className = classes.join(" ");
-};
-
-exports.toggleCssClass = function(el, name) {
- var classes = el.className.split(/\s+/g), add = true;
- while (true) {
- var index = classes.indexOf(name);
- if (index == -1) {
- break;
- }
- add = false;
- classes.splice(index, 1);
- }
- if(add)
- classes.push(name);
-
- el.className = classes.join(" ");
- return add;
-};
-
-/**
- * Add or remove a CSS class from the list of classes on the given node
- * depending on the value of <tt>include</tt>
- */
-exports.setCssClass = function(node, className, include) {
- if (include) {
- exports.addCssClass(node, className);
- } else {
- exports.removeCssClass(node, className);
- }
-};
-
-exports.hasCssString = function(id, doc) {
- var index = 0, sheets;
- doc = doc || document;
-
- if (doc.createStyleSheet && (sheets = doc.styleSheets)) {
- while (index < sheets.length)
- if (sheets[index++].title === id) return true;
- } else if ((sheets = doc.getElementsByTagName("style"))) {
- while (index < sheets.length)
- if (sheets[index++].id === id) return true;
- }
-
- return false;
-};
-
-exports.importCssString = function importCssString(cssText, id, doc) {
- doc = doc || document;
- // If style is already imported return immediately.
- if (id && exports.hasCssString(id, doc))
- return null;
-
- var style;
-
- if (doc.createStyleSheet) {
- style = doc.createStyleSheet();
- style.cssText = cssText;
- if (id)
- style.title = id;
- } else {
- style = doc.createElementNS
- ? doc.createElementNS(XHTML_NS, "style")
- : doc.createElement("style");
-
- style.appendChild(doc.createTextNode(cssText));
- if (id)
- style.id = id;
-
- var head = doc.getElementsByTagName("head")[0] || doc.documentElement;
- head.appendChild(style);
- }
-};
-
-exports.importCssStylsheet = function(uri, doc) {
- if (doc.createStyleSheet) {
- doc.createStyleSheet(uri);
- } else {
- var link = exports.createElement('link');
- link.rel = 'stylesheet';
- link.href = uri;
-
- var head = doc.getElementsByTagName("head")[0] || doc.documentElement;
- head.appendChild(link);
- }
-};
-
-exports.getInnerWidth = function(element) {
- return (
- parseInt(exports.computedStyle(element, "paddingLeft"), 10) +
- parseInt(exports.computedStyle(element, "paddingRight"), 10) +
- element.clientWidth
- );
-};
-
-exports.getInnerHeight = function(element) {
- return (
- parseInt(exports.computedStyle(element, "paddingTop"), 10) +
- parseInt(exports.computedStyle(element, "paddingBottom"), 10) +
- element.clientHeight
- );
-};
-
-if (window.pageYOffset !== undefined) {
- exports.getPageScrollTop = function() {
- return window.pageYOffset;
- };
-
- exports.getPageScrollLeft = function() {
- return window.pageXOffset;
- };
-}
-else {
- exports.getPageScrollTop = function() {
- return document.body.scrollTop;
- };
-
- exports.getPageScrollLeft = function() {
- return document.body.scrollLeft;
- };
-}
-
-if (window.getComputedStyle)
- exports.computedStyle = function(element, style) {
- if (style)
- return (window.getComputedStyle(element, "") || {})[style] || "";
- return window.getComputedStyle(element, "") || {};
- };
-else
- exports.computedStyle = function(element, style) {
- if (style)
- return element.currentStyle[style];
- return element.currentStyle;
- };
-
-exports.scrollbarWidth = function(document) {
-
- var inner = exports.createElement("p");
- inner.style.width = "100%";
- inner.style.minWidth = "0px";
- inner.style.height = "200px";
-
- var outer = exports.createElement("div");
- var style = outer.style;
-
- style.position = "absolute";
- style.left = "-10000px";
- style.overflow = "hidden";
- style.width = "200px";
- style.minWidth = "0px";
- style.height = "150px";
-
- outer.appendChild(inner);
-
- var body = document.body || document.documentElement;
- body.appendChild(outer);
-
- var noScrollbar = inner.offsetWidth;
-
- style.overflow = "scroll";
- var withScrollbar = inner.offsetWidth;
-
- if (noScrollbar == withScrollbar) {
- withScrollbar = outer.clientWidth;
- }
-
- body.removeChild(outer);
-
- return noScrollbar-withScrollbar;
-};
-
-/**
- * Optimized set innerHTML. This is faster than plain innerHTML if the element
- * already contains a lot of child elements.
- *
- * See http://blog.stevenlevithan.com/archives/faster-than-innerhtml for details
- */
-exports.setInnerHtml = function(el, innerHtml) {
- var element = el.cloneNode(false);//document.createElement("div");
- element.innerHTML = innerHtml;
- el.parentNode.replaceChild(element, el);
- return element;
-};
-
-exports.setInnerText = function(el, innerText) {
- var document = el.ownerDocument;
- if (document.body && "textContent" in document.body)
- el.textContent = innerText;
- else
- el.innerText = innerText;
-
-};
-
-exports.getInnerText = function(el) {
- var document = el.ownerDocument;
- if (document.body && "textContent" in document.body)
- return el.textContent;
- else
- return el.innerText || el.textContent || "";
-};
-
-exports.getParentWindow = function(document) {
- return document.defaultView || document.parentWindow;
-};
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/lib/event', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/useragent', 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-var keys = require("./keys");
-var useragent = require("./useragent");
-var dom = require("./dom");
-
-exports.addListener = function(elem, type, callback) {
- if (elem.addEventListener) {
- return elem.addEventListener(type, callback, false);
- }
- if (elem.attachEvent) {
- var wrapper = function() {
- callback(window.event);
- };
- callback._wrapper = wrapper;
- elem.attachEvent("on" + type, wrapper);
- }
-};
-
-exports.removeListener = function(elem, type, callback) {
- if (elem.removeEventListener) {
- return elem.removeEventListener(type, callback, false);
- }
- if (elem.detachEvent) {
- elem.detachEvent("on" + type, callback._wrapper || callback);
- }
-};
-
-/**
-* Prevents propagation and clobbers the default action of the passed event
-*/
-exports.stopEvent = function(e) {
- exports.stopPropagation(e);
- exports.preventDefault(e);
- return false;
-};
-
-exports.stopPropagation = function(e) {
- if (e.stopPropagation)
- e.stopPropagation();
- else
- e.cancelBubble = true;
-};
-
-exports.preventDefault = function(e) {
- if (e.preventDefault)
- e.preventDefault();
- else
- e.returnValue = false;
-};
-
-exports.getDocumentX = function(e) {
- if (e.clientX) {
- return e.clientX + dom.getPageScrollLeft();
- } else {
- return e.pageX;
- }
-};
-
-exports.getDocumentY = function(e) {
- if (e.clientY) {
- return e.clientY + dom.getPageScrollTop();
- } else {
- return e.pageY;
- }
-};
-
-/**
- * @return {Number} 0 for left button, 1 for middle button, 2 for right button
- */
-exports.getButton = function(e) {
- if (e.type == "dblclick")
- return 0;
- else if (e.type == "contextmenu")
- return 2;
-
- // DOM Event
- if (e.preventDefault) {
- return e.button;
- }
- // old IE
- else {
- return {1:0, 2:2, 4:1}[e.button];
- }
-};
-
-if (document.documentElement.setCapture) {
- exports.capture = function(el, eventHandler, releaseCaptureHandler) {
- function onMouseMove(e) {
- eventHandler(e);
- return exports.stopPropagation(e);
- }
-
- var called = false;
- function onReleaseCapture(e) {
- eventHandler(e);
-
- if (!called) {
- called = true;
- releaseCaptureHandler(e);
- }
-
- exports.removeListener(el, "mousemove", eventHandler);
- exports.removeListener(el, "mouseup", onReleaseCapture);
- exports.removeListener(el, "losecapture", onReleaseCapture);
-
- el.releaseCapture();
- }
-
- exports.addListener(el, "mousemove", eventHandler);
- exports.addListener(el, "mouseup", onReleaseCapture);
- exports.addListener(el, "losecapture", onReleaseCapture);
- el.setCapture();
- };
-}
-else {
- exports.capture = function(el, eventHandler, releaseCaptureHandler) {
- function onMouseMove(e) {
- eventHandler(e);
- e.stopPropagation();
- }
-
- function onMouseUp(e) {
- eventHandler && eventHandler(e);
- releaseCaptureHandler && releaseCaptureHandler(e);
-
- document.removeEventListener("mousemove", onMouseMove, true);
- document.removeEventListener("mouseup", onMouseUp, true);
-
- e.stopPropagation();
- }
-
- document.addEventListener("mousemove", onMouseMove, true);
- document.addEventListener("mouseup", onMouseUp, true);
- };
-}
-
-exports.addMouseWheelListener = function(el, callback) {
- var max = 0;
- var listener = function(e) {
- if (e.wheelDelta !== undefined) {
-
- // some versions of Safari (e.g. 5.0.5) report insanely high
- // scroll values. These browsers require a higher factor
- if (Math.abs(e.wheelDeltaY) > max)
- max = Math.abs(e.wheelDeltaY);
-
- if (max > 5000)
- var factor = 400;
- else
- var factor = 8;
-
- if (e.wheelDeltaX !== undefined) {
- e.wheelX = -e.wheelDeltaX / factor;
- e.wheelY = -e.wheelDeltaY / factor;
- } else {
- e.wheelX = 0;
- e.wheelY = -e.wheelDelta / factor;
- }
- }
- else {
- if (e.axis && e.axis == e.HORIZONTAL_AXIS) {
- e.wheelX = (e.detail || 0) * 5;
- e.wheelY = 0;
- } else {
- e.wheelX = 0;
- e.wheelY = (e.detail || 0) * 5;
- }
- }
- callback(e);
- };
- exports.addListener(el, "DOMMouseScroll", listener);
- exports.addListener(el, "mousewheel", listener);
-};
-
-exports.addMultiMouseDownListener = function(el, button, count, timeout, callback) {
- var clicks = 0;
- var startX, startY;
-
- var listener = function(e) {
- clicks += 1;
- if (clicks == 1) {
- startX = e.clientX;
- startY = e.clientY;
-
- setTimeout(function() {
- clicks = 0;
- }, timeout || 600);
- }
-
- var isButton = exports.getButton(e) == button;
- if (!isButton || Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5)
- clicks = 0;
-
- if (clicks == count) {
- clicks = 0;
- callback(e);
- }
-
- if (isButton)
- return exports.preventDefault(e);
- };
-
- exports.addListener(el, "mousedown", listener);
- useragent.isOldIE && exports.addListener(el, "dblclick", listener);
-};
-
-function normalizeCommandKeys(callback, e, keyCode) {
- var hashId = 0;
- if (useragent.isOpera && useragent.isMac) {
- hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0)
- | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
- } else {
- hashId = 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0)
- | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
- }
-
- if (keyCode in keys.MODIFIER_KEYS) {
- switch (keys.MODIFIER_KEYS[keyCode]) {
- case "Alt":
- hashId = 2;
- break;
- case "Shift":
- hashId = 4;
- break;
- case "Ctrl":
- hashId = 1;
- break;
- default:
- hashId = 8;
- break;
- }
- keyCode = 0;
- }
-
- if (hashId & 8 && (keyCode == 91 || keyCode == 93)) {
- keyCode = 0;
- }
-
- // If there is no hashID and the keyCode is not a function key, then
- // we don't call the callback as we don't handle a command key here
- // (it's a normal key/character input).
- if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {
- return false;
- }
- return callback(e, hashId, keyCode);
-}
-
-exports.addCommandKeyListener = function(el, callback) {
- var addListener = exports.addListener;
- if (useragent.isOldGecko || useragent.isOpera) {
- // Old versions of Gecko aka. Firefox < 4.0 didn't repeat the keydown
- // event if the user pressed the key for a longer time. Instead, the
- // keydown event was fired once and later on only the keypress event.
- // To emulate the 'right' keydown behavior, the keyCode of the initial
- // keyDown event is stored and in the following keypress events the
- // stores keyCode is used to emulate a keyDown event.
- var lastKeyDownKeyCode = null;
- addListener(el, "keydown", function(e) {
- lastKeyDownKeyCode = e.keyCode;
- });
- addListener(el, "keypress", function(e) {
- return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);
- });
- } else {
- var lastDown = null;
-
- addListener(el, "keydown", function(e) {
- lastDown = e.keyIdentifier || e.keyCode;
- return normalizeCommandKeys(callback, e, e.keyCode);
- });
- }
-};
-
-if (window.postMessage) {
- var postMessageId = 1;
- exports.nextTick = function(callback, win) {
- win = win || window;
- var messageName = "zero-timeout-message-" + postMessageId;
- exports.addListener(win, "message", function listener(e) {
- if (e.data == messageName) {
- exports.stopPropagation(e);
- exports.removeListener(win, "message", listener);
- callback();
- }
- });
- win.postMessage(messageName, "*");
- };
-}
-else {
- exports.nextTick = function(callback, win) {
- win = win || window;
- window.setTimeout(callback, 0);
- };
-}
-
-});
-/*! @license
-==========================================================================
-SproutCore -- JavaScript Application Framework
-copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
-
-For more information about SproutCore, visit http://www.sproutcore.com
-
-
-==========================================================================
-@license */
-
-// Most of the following code is taken from SproutCore with a few changes.
-
-ace.define('ace/lib/keys', ['require', 'exports', 'module' , 'ace/lib/oop'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./oop");
-
-/**
- * Helper functions and hashes for key handling.
- */
-var Keys = (function() {
- var ret = {
- MODIFIER_KEYS: {
- 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'
- },
-
- KEY_MODS: {
- "ctrl": 1, "alt": 2, "option" : 2,
- "shift": 4, "meta": 8, "command": 8
- },
-
- FUNCTION_KEYS : {
- 8 : "Backspace",
- 9 : "Tab",
- 13 : "Return",
- 19 : "Pause",
- 27 : "Esc",
- 32 : "Space",
- 33 : "PageUp",
- 34 : "PageDown",
- 35 : "End",
- 36 : "Home",
- 37 : "Left",
- 38 : "Up",
- 39 : "Right",
- 40 : "Down",
- 44 : "Print",
- 45 : "Insert",
- 46 : "Delete",
- 96 : "Numpad0",
- 97 : "Numpad1",
- 98 : "Numpad2",
- 99 : "Numpad3",
- 100: "Numpad4",
- 101: "Numpad5",
- 102: "Numpad6",
- 103: "Numpad7",
- 104: "Numpad8",
- 105: "Numpad9",
- 112: "F1",
- 113: "F2",
- 114: "F3",
- 115: "F4",
- 116: "F5",
- 117: "F6",
- 118: "F7",
- 119: "F8",
- 120: "F9",
- 121: "F10",
- 122: "F11",
- 123: "F12",
- 144: "Numlock",
- 145: "Scrolllock"
- },
-
- PRINTABLE_KEYS: {
- 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',
- 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',
- 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',
- 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
- 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
- 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
- 188: ',', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',
- 221: ']', 222: '\"'
- }
- };
-
- // A reverse map of FUNCTION_KEYS
- for (var i in ret.FUNCTION_KEYS) {
- var name = ret.FUNCTION_KEYS[i].toUpperCase();
- ret[name] = parseInt(i, 10);
- }
-
- // Add the MODIFIER_KEYS, FUNCTION_KEYS and PRINTABLE_KEYS to the KEY
- // variables as well.
- oop.mixin(ret, ret.MODIFIER_KEYS);
- oop.mixin(ret, ret.PRINTABLE_KEYS);
- oop.mixin(ret, ret.FUNCTION_KEYS);
-
- return ret;
-})();
-oop.mixin(exports, Keys);
-
-exports.keyCodeToString = function(keyCode) {
- return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase();
-}
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
-};
-
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
-};
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/lib/useragent', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
-var ua = navigator.userAgent;
-
-/** Is the user using a browser that identifies itself as Windows */
-exports.isWin = (os == "win");
-
-/** Is the user using a browser that identifies itself as Mac OS */
-exports.isMac = (os == "mac");
-
-/** Is the user using a browser that identifies itself as Linux */
-exports.isLinux = (os == "linux");
-
-exports.isIE =
- navigator.appName == "Microsoft Internet Explorer"
- && parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
-
-exports.isOldIE = exports.isIE && exports.isIE < 9;
-
-/** Is this Firefox or related? */
-exports.isGecko = exports.isMozilla = window.controllers && window.navigator.product === "Gecko";
-
-/** oldGecko == rev < 2.0 **/
-exports.isOldGecko = exports.isGecko && parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1], 10) < 4;
-
-/** Is this Opera */
-exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
-
-/** Is the user using a browser that identifies itself as WebKit */
-exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
-
-exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
-
-exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
-
-exports.isIPad = ua.indexOf("iPad") >= 0;
-
-exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
-
-/**
- * I hate doing this, but we need some way to determine if the user is on a Mac
- * The reason is that users have different expectations of their key combinations.
- *
- * Take copy as an example, Mac people expect to use CMD or APPLE + C
- * Windows folks expect to use CTRL + C
- */
-exports.OS = {
- LINUX: "LINUX",
- MAC: "MAC",
- WINDOWS: "WINDOWS"
-};
-
-/**
- * Return an exports.OS constant
- */
-exports.getOS = function() {
- if (exports.isMac) {
- return exports.OS.MAC;
- } else if (exports.isLinux) {
- return exports.OS.LINUX;
- } else {
- return exports.OS.WINDOWS;
- }
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/editor', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/useragent', 'ace/keyboard/textinput', 'ace/mouse/mouse_handler', 'ace/mouse/fold_handler', 'ace/keyboard/keybinding', 'ace/edit_session', 'ace/search', 'ace/range', 'ace/lib/event_emitter', 'ace/commands/command_manager', 'ace/commands/default_commands'], function(require, exports, module) {
-"use strict";
-
-require("./lib/fixoldbrowsers");
-
-var oop = require("./lib/oop");
-var lang = require("./lib/lang");
-var useragent = require("./lib/useragent");
-var TextInput = require("./keyboard/textinput").TextInput;
-var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
-var FoldHandler = require("./mouse/fold_handler").FoldHandler;
-//var TouchHandler = require("./touch_handler").TouchHandler;
-var KeyBinding = require("./keyboard/keybinding").KeyBinding;
-var EditSession = require("./edit_session").EditSession;
-var Search = require("./search").Search;
-var Range = require("./range").Range;
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var CommandManager = require("./commands/command_manager").CommandManager;
-var defaultCommands = require("./commands/default_commands").commands;
-
-var Editor = function(renderer, session) {
- var container = renderer.getContainerElement();
- this.container = container;
- this.renderer = renderer;
-
- this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
- this.keyBinding = new KeyBinding(this);
-
- // TODO detect touch event support
- if (useragent.isIPad) {
- //this.$mouseHandler = new TouchHandler(this);
- } else {
- this.$mouseHandler = new MouseHandler(this);
- new FoldHandler(this);
- }
-
- this.$blockScrolling = 0;
- this.$search = new Search().set({
- wrap: true
- });
-
- this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
- this.setSession(session || new EditSession(""));
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.setKeyboardHandler = function(keyboardHandler) {
- this.keyBinding.setKeyboardHandler(keyboardHandler);
- };
-
- this.getKeyboardHandler = function() {
- return this.keyBinding.getKeyboardHandler();
- };
-
- this.setSession = function(session) {
- if (this.session == session)
- return;
-
- if (this.session) {
- var oldSession = this.session;
- this.session.removeEventListener("change", this.$onDocumentChange);
- this.session.removeEventListener("changeMode", this.$onChangeMode);
- this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
- this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
- this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
- this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
- this.session.removeEventListener("onChangeFold", this.$onChangeFold);
- this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
- this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
- this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
- this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
- this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
- this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
- this.session.removeEventListener("changeLeftTop", this.$onScrollLeftChange);
-
- var selection = this.session.getSelection();
- selection.removeEventListener("changeCursor", this.$onCursorChange);
- selection.removeEventListener("changeSelection", this.$onSelectionChange);
- }
-
- this.session = session;
-
- this.$onDocumentChange = this.onDocumentChange.bind(this);
- session.addEventListener("change", this.$onDocumentChange);
- this.renderer.setSession(session);
-
- this.$onChangeMode = this.onChangeMode.bind(this);
- session.addEventListener("changeMode", this.$onChangeMode);
-
- this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
- session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
-
- this.$onChangeTabSize = this.renderer.updateText.bind(this.renderer);
- session.addEventListener("changeTabSize", this.$onChangeTabSize);
-
- this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
- session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
-
- this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
- session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
-
- this.$onChangeFold = this.onChangeFold.bind(this);
- session.addEventListener("changeFold", this.$onChangeFold);
-
- this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
- this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
-
- this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
- this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
-
- this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
- this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
-
- this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
- this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
-
- this.$onCursorChange = this.onCursorChange.bind(this);
- this.session.addEventListener("changeOverwrite", this.$onCursorChange);
-
- this.$onScrollTopChange = this.onScrollTopChange.bind(this);
- this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
-
- this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
- this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
-
- this.selection = session.getSelection();
- this.selection.addEventListener("changeCursor", this.$onCursorChange);
-
- this.$onSelectionChange = this.onSelectionChange.bind(this);
- this.selection.addEventListener("changeSelection", this.$onSelectionChange);
-
- this.onChangeMode();
-
- this.$blockScrolling += 1;
- this.onCursorChange();
- this.$blockScrolling -= 1;
-
- this.onScrollTopChange();
- this.onScrollLeftChange();
- this.onSelectionChange();
- this.onChangeFrontMarker();
- this.onChangeBackMarker();
- this.onChangeBreakpoint();
- this.onChangeAnnotation();
- this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
- this.renderer.updateFull();
-
- this._emit("changeSession", {
- session: session,
- oldSession: oldSession
- });
- };
-
- this.getSession = function() {
- return this.session;
- };
-
- this.getSelection = function() {
- return this.selection;
- };
-
- this.resize = function() {
- this.renderer.onResize();
- };
-
- this.setTheme = function(theme) {
- this.renderer.setTheme(theme);
- };
-
- this.getTheme = function() {
- return this.renderer.getTheme();
- };
-
- this.setStyle = function(style) {
- this.renderer.setStyle(style);
- };
-
- this.unsetStyle = function(style) {
- this.renderer.unsetStyle(style);
- };
-
- this.setFontSize = function(size) {
- this.container.style.fontSize = size;
- this.renderer.updateFontSize();
- };
-
- this.$highlightBrackets = function() {
- if (this.session.$bracketHighlight) {
- this.session.removeMarker(this.session.$bracketHighlight);
- this.session.$bracketHighlight = null;
- }
-
- if (this.$highlightPending) {
- return;
- }
-
- // perform highlight async to not block the browser during navigation
- var self = this;
- this.$highlightPending = true;
- setTimeout(function() {
- self.$highlightPending = false;
-
- var pos = self.session.findMatchingBracket(self.getCursorPosition());
- if (pos) {
- var range = new Range(pos.row, pos.column, pos.row, pos.column+1);
- self.session.$bracketHighlight = self.session.addMarker(range, "ace_bracket", "text");
- }
- }, 10);
- };
-
- this.focus = function() {
- // Safari needs the timeout
- // iOS and Firefox need it called immediately
- // to be on the save side we do both
- var _self = this;
- setTimeout(function() {
- _self.textInput.focus();
- });
- this.textInput.focus();
- };
-
- this.isFocused = function() {
- return this.textInput.isFocused();
- };
-
- this.blur = function() {
- this.textInput.blur();
- };
-
- this.onFocus = function() {
- this.renderer.showCursor();
- this.renderer.visualizeFocus();
- this._emit("focus");
- };
-
- this.onBlur = function() {
- this.renderer.hideCursor();
- this.renderer.visualizeBlur();
- this._emit("blur");
- };
-
- this.onDocumentChange = function(e) {
- var delta = e.data;
- var range = delta.range;
- var lastRow;
-
- if (range.start.row == range.end.row && delta.action != "insertLines" && delta.action != "removeLines")
- lastRow = range.end.row;
- else
- lastRow = Infinity;
- this.renderer.updateLines(range.start.row, lastRow);
-
- this._emit("change", e);
-
- // update cursor because tab characters can influence the cursor position
- this.onCursorChange();
- };
-
- this.onTokenizerUpdate = function(e) {
- var rows = e.data;
- this.renderer.updateLines(rows.first, rows.last);
- };
-
- this.onScrollTopChange = function() {
- this.renderer.scrollToY(this.session.getScrollTop());
- };
-
- this.onScrollLeftChange = function() {
- this.renderer.scrollToX(this.session.getScrollLeft());
- };
-
- this.onCursorChange = function() {
- this.renderer.updateCursor();
-
- if (!this.$blockScrolling) {
- this.renderer.scrollCursorIntoView();
- }
-
- // move text input over the cursor
- // this is required for iOS and IME
- this.renderer.moveTextAreaToCursor(this.textInput.getElement());
-
- this.$highlightBrackets();
- this.$updateHighlightActiveLine();
- };
-
- this.$updateHighlightActiveLine = function() {
- var session = this.getSession();
-
- if (session.$highlightLineMarker) {
- session.removeMarker(session.$highlightLineMarker);
- }
- session.$highlightLineMarker = null;
-
- if (this.getHighlightActiveLine() && (this.getSelectionStyle() != "line" || !this.selection.isMultiLine())) {
- var cursor = this.getCursorPosition(),
- foldLine = this.session.getFoldLine(cursor.row);
- var range;
- if (foldLine) {
- range = new Range(foldLine.start.row, 0, foldLine.end.row + 1, 0);
- } else {
- range = new Range(cursor.row, 0, cursor.row+1, 0);
- }
- session.$highlightLineMarker = session.addMarker(range, "ace_active_line", "background");
- }
- };
-
- this.onSelectionChange = function(e) {
- var session = this.getSession();
-
- if (session.$selectionMarker) {
- session.removeMarker(session.$selectionMarker);
- }
- session.$selectionMarker = null;
-
- if (!this.selection.isEmpty()) {
- var range = this.selection.getRange();
- var style = this.getSelectionStyle();
- session.$selectionMarker = session.addMarker(range, "ace_selection", style);
- } else {
- this.$updateHighlightActiveLine();
- }
-
- if (this.$highlightSelectedWord)
- this.session.getMode().highlightSelection(this);
- };
-
- this.onChangeFrontMarker = function() {
- this.renderer.updateFrontMarkers();
- };
-
- this.onChangeBackMarker = function() {
- this.renderer.updateBackMarkers();
- };
-
- this.onChangeBreakpoint = function() {
- this.renderer.setBreakpoints(this.session.getBreakpoints());
- };
-
- this.onChangeAnnotation = function() {
- this.renderer.setAnnotations(this.session.getAnnotations());
- };
-
- this.onChangeMode = function() {
- this.renderer.updateText();
- };
-
- this.onChangeWrapLimit = function() {
- this.renderer.updateFull();
- };
-
- this.onChangeWrapMode = function() {
- this.renderer.onResize(true);
- };
-
- this.onChangeFold = function() {
- // Update the active line marker as due to folding changes the current
- // line range on the screen might have changed.
- this.$updateHighlightActiveLine();
- // TODO: This might be too much updating. Okay for now.
- this.renderer.updateFull();
- };
-
- this.getCopyText = function() {
- var text = "";
- if (!this.selection.isEmpty())
- text = this.session.getTextRange(this.getSelectionRange());
-
- this._emit("copy", text);
- return text;
- };
-
- this.onCut = function() {
- if (this.$readOnly)
- return;
-
- var range = this.getSelectionRange();
- this._emit("cut", range);
-
- if (!this.selection.isEmpty()) {
- this.session.remove(range);
- this.clearSelection();
- }
- };
-
- this.insert = function(text) {
- var session = this.session;
- var mode = session.getMode();
-
- var cursor = this.getCursorPosition();
-
- if (this.getBehavioursEnabled()) {
- // Get a transform if the current mode wants one.
- var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
- if (transform)
- text = transform.text;
- }
-
- text = text.replace("\t", this.session.getTabString());
-
- // remove selected text
- if (!this.selection.isEmpty()) {
- cursor = this.session.remove(this.getSelectionRange());
- this.clearSelection();
- }
- else if (this.session.getOverwrite()) {
- var range = new Range.fromPoints(cursor, cursor);
- range.end.column += text.length;
- this.session.remove(range);
- }
-
- this.clearSelection();
-
- var start = cursor.column;
- var lineState = session.getState(cursor.row);
- var shouldOutdent = mode.checkOutdent(lineState, session.getLine(cursor.row), text);
- var line = session.getLine(cursor.row);
- var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());
- var end = session.insert(cursor, text);
-
- if (transform && transform.selection) {
- if (transform.selection.length == 2) { // Transform relative to the current column
- this.selection.setSelectionRange(
- new Range(cursor.row, start + transform.selection[0],
- cursor.row, start + transform.selection[1]));
- } else { // Transform relative to the current row.
- this.selection.setSelectionRange(
- new Range(cursor.row + transform.selection[0],
- transform.selection[1],
- cursor.row + transform.selection[2],
- transform.selection[3]));
- }
- }
-
- var lineState = session.getState(cursor.row);
-
- // TODO disabled multiline auto indent
- // possibly doing the indent before inserting the text
- // if (cursor.row !== end.row) {
- if (session.getDocument().isNewLine(text)) {
- this.moveCursorTo(cursor.row+1, 0);
-
- var size = session.getTabSize();
- var minIndent = Number.MAX_VALUE;
-
- for (var row = cursor.row + 1; row <= end.row; ++row) {
- var indent = 0;
-
- line = session.getLine(row);
- for (var i = 0; i < line.length; ++i)
- if (line.charAt(i) == '\t')
- indent += size;
- else if (line.charAt(i) == ' ')
- indent += 1;
- else
- break;
- if (/[^\s]/.test(line))
- minIndent = Math.min(indent, minIndent);
- }
-
- for (var row = cursor.row + 1; row <= end.row; ++row) {
- var outdent = minIndent;
-
- line = session.getLine(row);
- for (var i = 0; i < line.length && outdent > 0; ++i)
- if (line.charAt(i) == '\t')
- outdent -= size;
- else if (line.charAt(i) == ' ')
- outdent -= 1;
- session.remove(new Range(row, 0, row, i));
- }
- session.indentRows(cursor.row + 1, end.row, lineIndent);
- }
- if (shouldOutdent)
- mode.autoOutdent(lineState, session, cursor.row);
- };
-
- this.onTextInput = function(text, pasted) {
- if (pasted)
- this._emit("paste", text);
-
- this.keyBinding.onTextInput(text, pasted);
- };
-
- this.onCommandKey = function(e, hashId, keyCode) {
- this.keyBinding.onCommandKey(e, hashId, keyCode);
- };
-
- this.setOverwrite = function(overwrite) {
- this.session.setOverwrite(overwrite);
- };
-
- this.getOverwrite = function() {
- return this.session.getOverwrite();
- };
-
- this.toggleOverwrite = function() {
- this.session.toggleOverwrite();
- };
-
- this.setScrollSpeed = function(speed) {
- this.$mouseHandler.setScrollSpeed(speed);
- };
-
- this.getScrollSpeed = function() {
- return this.$mouseHandler.getScrollSpeed();
- };
-
- this.setDragDelay = function(dragDelay) {
- this.$mouseHandler.setDragDelay(dragDelay);
- };
-
- this.getDragDelay = function() {
- return this.$mouseHandler.getDragDelay();
- };
-
- this.$selectionStyle = "line";
- this.setSelectionStyle = function(style) {
- if (this.$selectionStyle == style) return;
-
- this.$selectionStyle = style;
- this.onSelectionChange();
- this._emit("changeSelectionStyle", {data: style});
- };
-
- this.getSelectionStyle = function() {
- return this.$selectionStyle;
- };
-
- this.$highlightActiveLine = true;
- this.setHighlightActiveLine = function(shouldHighlight) {
- if (this.$highlightActiveLine == shouldHighlight) return;
-
- this.$highlightActiveLine = shouldHighlight;
- this.$updateHighlightActiveLine();
- };
-
- this.getHighlightActiveLine = function() {
- return this.$highlightActiveLine;
- };
-
- this.$highlightSelectedWord = true;
- this.setHighlightSelectedWord = function(shouldHighlight) {
- if (this.$highlightSelectedWord == shouldHighlight)
- return;
-
- this.$highlightSelectedWord = shouldHighlight;
- if (shouldHighlight)
- this.session.getMode().highlightSelection(this);
- else
- this.session.getMode().clearSelectionHighlight(this);
- };
-
- this.getHighlightSelectedWord = function() {
- return this.$highlightSelectedWord;
- };
-
- this.setShowInvisibles = function(showInvisibles) {
- if (this.getShowInvisibles() == showInvisibles)
- return;
-
- this.renderer.setShowInvisibles(showInvisibles);
- };
-
- this.getShowInvisibles = function() {
- return this.renderer.getShowInvisibles();
- };
-
- this.setShowPrintMargin = function(showPrintMargin) {
- this.renderer.setShowPrintMargin(showPrintMargin);
- };
-
- this.getShowPrintMargin = function() {
- return this.renderer.getShowPrintMargin();
- };
-
- this.setPrintMarginColumn = function(showPrintMargin) {
- this.renderer.setPrintMarginColumn(showPrintMargin);
- };
-
- this.getPrintMarginColumn = function() {
- return this.renderer.getPrintMarginColumn();
- };
-
- this.$readOnly = false;
- this.setReadOnly = function(readOnly) {
- this.$readOnly = readOnly;
- };
-
- this.getReadOnly = function() {
- return this.$readOnly;
- };
-
- this.$modeBehaviours = true;
- this.setBehavioursEnabled = function (enabled) {
- this.$modeBehaviours = enabled;
- };
-
- this.getBehavioursEnabled = function () {
- return this.$modeBehaviours;
- };
-
- this.setShowFoldWidgets = function(show) {
- var gutter = this.renderer.$gutterLayer;
- if (gutter.getShowFoldWidgets() == show)
- return;
-
- this.renderer.$gutterLayer.setShowFoldWidgets(show);
- this.$showFoldWidgets = show;
- this.renderer.updateFull();
- };
-
- this.getShowFoldWidgets = function() {
- return this.renderer.$gutterLayer.getShowFoldWidgets();
- };
-
- this.remove = function(dir) {
- if (this.selection.isEmpty()){
- if(dir == "left")
- this.selection.selectLeft();
- else
- this.selection.selectRight();
- }
-
- var range = this.getSelectionRange();
- if (this.getBehavioursEnabled()) {
- var session = this.session;
- var state = session.getState(range.start.row);
- var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
- if (new_range)
- range = new_range;
- }
-
- this.session.remove(range);
- this.clearSelection();
- };
-
- this.removeWordRight = function() {
- if (this.selection.isEmpty())
- this.selection.selectWordRight();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
-
- this.removeWordLeft = function() {
- if (this.selection.isEmpty())
- this.selection.selectWordLeft();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
-
- this.removeToLineStart = function() {
- if (this.selection.isEmpty())
- this.selection.selectLineStart();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
-
- this.removeToLineEnd = function() {
- if (this.selection.isEmpty())
- this.selection.selectLineEnd();
-
- var range = this.getSelectionRange();
- if (range.start.column == range.end.column && range.start.row == range.end.row) {
- range.end.column = 0;
- range.end.row++;
- }
-
- this.session.remove(range);
- this.clearSelection();
- };
-
- this.splitLine = function() {
- if (!this.selection.isEmpty()) {
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- }
-
- var cursor = this.getCursorPosition();
- this.insert("\n");
- this.moveCursorToPosition(cursor);
- };
-
- this.transposeLetters = function() {
- if (!this.selection.isEmpty()) {
- return;
- }
-
- var cursor = this.getCursorPosition();
- var column = cursor.column;
- if (column === 0)
- return;
-
- var line = this.session.getLine(cursor.row);
- var swap, range;
- if (column < line.length) {
- swap = line.charAt(column) + line.charAt(column-1);
- range = new Range(cursor.row, column-1, cursor.row, column+1);
- }
- else {
- swap = line.charAt(column-1) + line.charAt(column-2);
- range = new Range(cursor.row, column-2, cursor.row, column);
- }
- this.session.replace(range, swap);
- };
-
- this.toLowerCase = function() {
- var originalRange = this.getSelectionRange();
- if (this.selection.isEmpty()) {
- this.selection.selectWord();
- }
-
- var range = this.getSelectionRange();
- var text = this.session.getTextRange(range);
- this.session.replace(range, text.toLowerCase());
- this.selection.setSelectionRange(originalRange);
- };
-
- this.toUpperCase = function() {
- var originalRange = this.getSelectionRange();
- if (this.selection.isEmpty()) {
- this.selection.selectWord();
- }
-
- var range = this.getSelectionRange();
- var text = this.session.getTextRange(range);
- this.session.replace(range, text.toUpperCase());
- this.selection.setSelectionRange(originalRange);
- };
-
- this.indent = function() {
- var session = this.session;
- var range = this.getSelectionRange();
-
- if (range.start.row < range.end.row || range.start.column < range.end.column) {
- var rows = this.$getSelectedRows();
- session.indentRows(rows.first, rows.last, "\t");
- } else {
- var indentString;
-
- if (this.session.getUseSoftTabs()) {
- var size = session.getTabSize(),
- position = this.getCursorPosition(),
- column = session.documentToScreenColumn(position.row, position.column),
- count = (size - column % size);
-
- indentString = lang.stringRepeat(" ", count);
- } else
- indentString = "\t";
- return this.insert(indentString);
- }
- };
-
- this.blockOutdent = function() {
- var selection = this.session.getSelection();
- this.session.outdentRows(selection.getRange());
- };
-
- this.toggleCommentLines = function() {
- var state = this.session.getState(this.getCursorPosition().row);
- var rows = this.$getSelectedRows();
- this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
- };
-
- this.removeLines = function() {
- var rows = this.$getSelectedRows();
- var range;
- if (rows.first === 0 || rows.last+1 < this.session.getLength())
- range = new Range(rows.first, 0, rows.last+1, 0);
- else
- range = new Range(
- rows.first-1, this.session.getLine(rows.first-1).length,
- rows.last, this.session.getLine(rows.last).length
- );
- this.session.remove(range);
- this.clearSelection();
- };
-
- this.moveLinesDown = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.moveLinesDown(firstRow, lastRow);
- });
- };
-
- this.moveLinesUp = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.moveLinesUp(firstRow, lastRow);
- });
- };
-
- this.moveText = function(range, toPosition) {
- if (this.$readOnly)
- return null;
-
- return this.session.moveText(range, toPosition);
- };
-
- this.copyLinesUp = function() {
- this.$moveLines(function(firstRow, lastRow) {
- this.session.duplicateLines(firstRow, lastRow);
- return 0;
- });
- };
-
- this.copyLinesDown = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.duplicateLines(firstRow, lastRow);
- });
- };
-
-
- this.$moveLines = function(mover) {
- var rows = this.$getSelectedRows();
- var selection = this.selection;
- if (!selection.isMultiLine()) {
- var range = selection.getRange();
- var reverse = selection.isBackwards();
- }
-
- var linesMoved = mover.call(this, rows.first, rows.last);
-
- if (range) {
- range.start.row += linesMoved;
- range.end.row += linesMoved;
- selection.setSelectionRange(range, reverse);
- }
- else {
- selection.setSelectionAnchor(rows.last+linesMoved+1, 0);
- selection.$moveSelection(function() {
- selection.moveCursorTo(rows.first+linesMoved, 0);
- });
- }
- };
-
- this.$getSelectedRows = function() {
- var range = this.getSelectionRange().collapseRows();
-
- return {
- first: range.start.row,
- last: range.end.row
- };
- };
-
- this.onCompositionStart = function(text) {
- this.renderer.showComposition(this.getCursorPosition());
- };
-
- this.onCompositionUpdate = function(text) {
- this.renderer.setCompositionText(text);
- };
-
- this.onCompositionEnd = function() {
- this.renderer.hideComposition();
- };
-
- this.getFirstVisibleRow = function() {
- return this.renderer.getFirstVisibleRow();
- };
-
- this.getLastVisibleRow = function() {
- return this.renderer.getLastVisibleRow();
- };
-
- this.isRowVisible = function(row) {
- return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());
- };
-
- this.isRowFullyVisible = function(row) {
- return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());
- };
-
- this.$getVisibleRowCount = function() {
- return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;
- };
-
- this.$getPageDownRow = function() {
- return this.renderer.getScrollBottomRow();
- };
-
- this.$getPageUpRow = function() {
- var firstRow = this.renderer.getScrollTopRow();
- var lastRow = this.renderer.getScrollBottomRow();
-
- return firstRow - (lastRow - firstRow);
- };
-
- this.selectPageDown = function() {
- var row = this.$getPageDownRow() + Math.floor(this.$getVisibleRowCount() / 2);
-
- this.scrollPageDown();
-
- var selection = this.getSelection();
- var leadScreenPos = this.session.documentToScreenPosition(selection.getSelectionLead());
- var dest = this.session.screenToDocumentPosition(row, leadScreenPos.column);
- selection.selectTo(dest.row, dest.column);
- };
-
- this.selectPageUp = function() {
- var visibleRows = this.renderer.getScrollTopRow() - this.renderer.getScrollBottomRow();
- var row = this.$getPageUpRow() + Math.round(visibleRows / 2);
-
- this.scrollPageUp();
-
- var selection = this.getSelection();
- var leadScreenPos = this.session.documentToScreenPosition(selection.getSelectionLead());
- var dest = this.session.screenToDocumentPosition(row, leadScreenPos.column);
- selection.selectTo(dest.row, dest.column);
- };
-
- this.gotoPageDown = function() {
- var row = this.$getPageDownRow();
- var column = this.getCursorPositionScreen().column;
-
- this.scrollToRow(row);
- this.getSelection().moveCursorToScreen(row, column);
- };
-
- this.gotoPageUp = function() {
- var row = this.$getPageUpRow();
- var column = this.getCursorPositionScreen().column;
-
- this.scrollToRow(row);
- this.getSelection().moveCursorToScreen(row, column);
- };
-
- this.scrollPageDown = function() {
- this.scrollToRow(this.$getPageDownRow());
- };
-
- this.scrollPageUp = function() {
- this.renderer.scrollToRow(this.$getPageUpRow());
- };
-
- this.scrollToRow = function(row) {
- this.renderer.scrollToRow(row);
- };
-
- this.scrollToLine = function(line, center) {
- this.renderer.scrollToLine(line, center);
- };
-
- this.centerSelection = function() {
- var range = this.getSelectionRange();
- var line = Math.floor(range.start.row + (range.end.row - range.start.row) / 2);
- this.renderer.scrollToLine(line, true);
- };
-
- this.getCursorPosition = function() {
- return this.selection.getCursor();
- };
-
- this.getCursorPositionScreen = function() {
- return this.session.documentToScreenPosition(this.getCursorPosition());
- };
-
- this.getSelectionRange = function() {
- return this.selection.getRange();
- };
-
-
- this.selectAll = function() {
- this.$blockScrolling += 1;
- this.selection.selectAll();
- this.$blockScrolling -= 1;
- };
-
- this.clearSelection = function() {
- this.selection.clearSelection();
- };
-
- this.moveCursorTo = function(row, column) {
- this.selection.moveCursorTo(row, column);
- };
-
- this.moveCursorToPosition = function(pos) {
- this.selection.moveCursorToPosition(pos);
- };
-
- this.jumpToMatching = function() {
- var cursor = this.getCursorPosition();
- var pos = this.session.findMatchingBracket(cursor);
- if (!pos) {
- cursor.column += 1;
- pos = this.session.findMatchingBracket(cursor);
- }
- if (!pos) {
- cursor.column -= 2;
- pos = this.session.findMatchingBracket(cursor);
- }
-
- if (pos) {
- this.clearSelection();
- this.moveCursorTo(pos.row, pos.column);
- }
- };
-
- this.gotoLine = function(lineNumber, column) {
- this.selection.clearSelection();
- this.session.unfold({row: lineNumber - 1, column: column || 0});
-
- this.$blockScrolling += 1;
- this.moveCursorTo(lineNumber-1, column || 0);
- this.$blockScrolling -= 1;
- if (!this.isRowFullyVisible(this.getCursorPosition().row))
- this.scrollToLine(lineNumber, true);
- };
-
- this.navigateTo = function(row, column) {
- this.clearSelection();
- this.moveCursorTo(row, column);
- };
-
- this.navigateUp = function(times) {
- this.selection.clearSelection();
- times = times || 1;
- this.selection.moveCursorBy(-times, 0);
- };
-
- this.navigateDown = function(times) {
- this.selection.clearSelection();
- times = times || 1;
- this.selection.moveCursorBy(times, 0);
- };
-
- this.navigateLeft = function(times) {
- if (!this.selection.isEmpty()) {
- var selectionStart = this.getSelectionRange().start;
- this.moveCursorToPosition(selectionStart);
- }
- else {
- times = times || 1;
- while (times--) {
- this.selection.moveCursorLeft();
- }
- }
- this.clearSelection();
- };
-
- this.navigateRight = function(times) {
- if (!this.selection.isEmpty()) {
- var selectionEnd = this.getSelectionRange().end;
- this.moveCursorToPosition(selectionEnd);
- }
- else {
- times = times || 1;
- while (times--) {
- this.selection.moveCursorRight();
- }
- }
- this.clearSelection();
- };
-
- this.navigateLineStart = function() {
- this.selection.moveCursorLineStart();
- this.clearSelection();
- };
-
- this.navigateLineEnd = function() {
- this.selection.moveCursorLineEnd();
- this.clearSelection();
- };
-
- this.navigateFileEnd = function() {
- this.selection.moveCursorFileEnd();
- this.clearSelection();
- };
-
- this.navigateFileStart = function() {
- this.selection.moveCursorFileStart();
- this.clearSelection();
- };
-
- this.navigateWordRight = function() {
- this.selection.moveCursorWordRight();
- this.clearSelection();
- };
-
- this.navigateWordLeft = function() {
- this.selection.moveCursorWordLeft();
- this.clearSelection();
- };
-
- this.replace = function(replacement, options) {
- if (options)
- this.$search.set(options);
-
- var range = this.$search.find(this.session);
- if (!range)
- return;
-
- this.$tryReplace(range, replacement);
- if (range !== null)
- this.selection.setSelectionRange(range);
- };
-
- this.replaceAll = function(replacement, options) {
- if (options) {
- this.$search.set(options);
- }
-
- var ranges = this.$search.findAll(this.session);
- if (!ranges.length)
- return;
-
- var selection = this.getSelectionRange();
- this.clearSelection();
- this.selection.moveCursorTo(0, 0);
-
- this.$blockScrolling += 1;
- for (var i = ranges.length - 1; i >= 0; --i)
- this.$tryReplace(ranges[i], replacement);
-
- this.selection.setSelectionRange(selection);
- this.$blockScrolling -= 1;
- };
-
- this.$tryReplace = function(range, replacement) {
- var input = this.session.getTextRange(range);
- replacement = this.$search.replace(input, replacement);
- if (replacement !== null) {
- range.end = this.session.replace(range, replacement);
- return range;
- } else {
- return null;
- }
- };
-
- this.getLastSearchOptions = function() {
- return this.$search.getOptions();
- };
-
- this.find = function(needle, options) {
- this.clearSelection();
- options = options || {};
- options.needle = needle;
- this.$search.set(options);
- this.$find();
- };
-
- this.findNext = function(options) {
- options = options || {};
- if (typeof options.backwards == "undefined")
- options.backwards = false;
- this.$search.set(options);
- this.$find();
- };
-
- this.findPrevious = function(options) {
- options = options || {};
- if (typeof options.backwards == "undefined")
- options.backwards = true;
- this.$search.set(options);
- this.$find();
- };
-
- this.$find = function(backwards) {
- if (!this.selection.isEmpty())
- this.$search.set({needle: this.session.getTextRange(this.getSelectionRange())});
-
- if (typeof backwards != "undefined")
- this.$search.set({backwards: backwards});
-
- var range = this.$search.find(this.session);
- if (range) {
- this.session.unfold(range);
- this.selection.setSelectionRange(range); // this scrolls selection into view
- }
- };
-
- this.undo = function() {
- this.session.getUndoManager().undo();
- };
-
- this.redo = function() {
- this.session.getUndoManager().redo();
- };
-
- this.destroy = function() {
- this.renderer.destroy();
- };
-
-}).call(Editor.prototype);
-
-
-exports.Editor = Editor;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.stringReverse = function(string) {
- return string.split("").reverse().join("");
-};
-
-exports.stringRepeat = function (string, count) {
- return new Array(count + 1).join(string);
-};
-
-var trimBeginRegexp = /^\s\s*/;
-var trimEndRegexp = /\s\s*$/;
-
-exports.stringTrimLeft = function (string) {
- return string.replace(trimBeginRegexp, '');
-};
-
-exports.stringTrimRight = function (string) {
- return string.replace(trimEndRegexp, '');
-};
-
-exports.copyObject = function(obj) {
- var copy = {};
- for (var key in obj) {
- copy[key] = obj[key];
- }
- return copy;
-};
-
-exports.copyArray = function(array){
- var copy = [];
- for (var i=0, l=array.length; i<l; i++) {
- if (array[i] && typeof array[i] == "object")
- copy[i] = this.copyObject( array[i] );
- else
- copy[i] = array[i];
- }
- return copy;
-};
-
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
- return obj;
- }
-
- var copy = obj.constructor();
- for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
- }
- return copy;
-};
-
-exports.arrayToMap = function(arr) {
- var map = {};
- for (var i=0; i<arr.length; i++) {
- map[arr[i]] = 1;
- }
- return map;
-
-};
-
-/**
- * splice out of 'array' anything that === 'value'
- */
-exports.arrayRemove = function(array, value) {
- for (var i = 0; i <= array.length; i++) {
- if (value === array[i]) {
- array.splice(i, 1);
- }
- }
-};
-
-exports.escapeRegExp = function(str) {
- return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
-};
-
-exports.deferredCall = function(fcn) {
-
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var deferred = function(timeout) {
- deferred.cancel();
- timer = setTimeout(callback, timeout || 0);
- return deferred;
- };
-
- deferred.schedule = deferred;
-
- deferred.call = function() {
- this.cancel();
- fcn();
- return deferred;
- };
-
- deferred.cancel = function() {
- clearTimeout(timer);
- timer = null;
- return deferred;
- };
-
- return deferred;
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/keyboard/textinput', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-var event = require("../lib/event");
-var useragent = require("../lib/useragent");
-var dom = require("../lib/dom");
-
-var TextInput = function(parentNode, host) {
-
- var text = dom.createElement("textarea");
- if (useragent.isTouchPad)
- text.setAttribute("x-palm-disable-auto-cap", true);
-
- text.style.left = "-10000px";
- text.style.position = "fixed";
- parentNode.insertBefore(text, parentNode.firstChild);
-
- var PLACEHOLDER = String.fromCharCode(0);
- sendText();
-
- var inCompostion = false;
- var copied = false;
- var pasted = false;
- var tempStyle = '';
-
- function select() {
- try {
- text.select();
- } catch (e) {}
- }
-
- function sendText(valueToSend) {
- if (!copied) {
- var value = valueToSend || text.value;
- if (value) {
- if (value.charCodeAt(value.length-1) == PLACEHOLDER.charCodeAt(0)) {
- value = value.slice(0, -1);
- if (value)
- host.onTextInput(value, pasted);
- }
- else {
- host.onTextInput(value, pasted);
- }
-
- // If editor is no longer focused we quit immediately, since
- // it means that something else is in charge now.
- if (!isFocused())
- return false;
- }
- }
-
- copied = false;
- pasted = false;
-
- // Safari doesn't fire copy events if no text is selected
- text.value = PLACEHOLDER;
- select();
- }
-
- var onTextInput = function(e) {
- setTimeout(function () {
- if (!inCompostion)
- sendText(e.data);
- }, 0);
- };
-
- var onPropertyChange = function(e) {
- if (useragent.isOldIE && text.value.charCodeAt(0) > 128) return;
- setTimeout(function() {
- if (!inCompostion)
- sendText();
- }, 0);
- };
-
- var onCompositionStart = function(e) {
- inCompostion = true;
- host.onCompositionStart();
- if (!useragent.isGecko) setTimeout(onCompositionUpdate, 0);
- };
-
- var onCompositionUpdate = function() {
- if (!inCompostion) return;
- host.onCompositionUpdate(text.value);
- };
-
- var onCompositionEnd = function(e) {
- inCompostion = false;
- host.onCompositionEnd();
- };
-
- var onCopy = function(e) {
- copied = true;
- var copyText = host.getCopyText();
- if(copyText)
- text.value = copyText;
- else
- e.preventDefault();
- select();
- setTimeout(function () {
- sendText();
- }, 0);
- };
-
- var onCut = function(e) {
- copied = true;
- var copyText = host.getCopyText();
- if(copyText) {
- text.value = copyText;
- host.onCut();
- } else
- e.preventDefault();
- select();
- setTimeout(function () {
- sendText();
- }, 0);
- };
-
- event.addCommandKeyListener(text, host.onCommandKey.bind(host));
- if (useragent.isOldIE) {
- var keytable = { 13:1, 27:1 };
- event.addListener(text, "keyup", function (e) {
- if (inCompostion && (!text.value || keytable[e.keyCode]))
- setTimeout(onCompositionEnd, 0);
- if ((text.value.charCodeAt(0)|0) < 129) {
- return;
- }
- inCompostion ? onCompositionUpdate() : onCompositionStart();
- });
- }
-
- if ("onpropertychange" in text && !("oninput" in text))
- event.addListener(text, "propertychange", onPropertyChange);
- else
- event.addListener(text, "input", onTextInput);
-
- event.addListener(text, "paste", function(e) {
- // Mark that the next input text comes from past.
- pasted = true;
- // Some browsers support the event.clipboardData API. Use this to get
- // the pasted content which increases speed if pasting a lot of lines.
- if (e.clipboardData && e.clipboardData.getData) {
- sendText(e.clipboardData.getData("text/plain"));
- e.preventDefault();
- }
- else {
- // If a browser doesn't support any of the things above, use the regular
- // method to detect the pasted input.
- onPropertyChange();
- }
- });
-
- if ("onbeforecopy" in text && typeof clipboardData !== "undefined") {
- event.addListener(text, "beforecopy", function(e) {
- var copyText = host.getCopyText();
- if (copyText)
- clipboardData.setData("Text", copyText);
- else
- e.preventDefault();
- });
- event.addListener(parentNode, "keydown", function(e) {
- if (e.ctrlKey && e.keyCode == 88) {
- var copyText = host.getCopyText();
- if (copyText) {
- clipboardData.setData("Text", copyText);
- host.onCut();
- }
- event.preventDefault(e);
- }
- });
- }
- else {
- event.addListener(text, "copy", onCopy);
- event.addListener(text, "cut", onCut);
- }
-
- event.addListener(text, "compositionstart", onCompositionStart);
- if (useragent.isGecko) {
- event.addListener(text, "text", onCompositionUpdate);
- }
- if (useragent.isWebKit) {
- event.addListener(text, "keyup", onCompositionUpdate);
- }
- event.addListener(text, "compositionend", onCompositionEnd);
-
- event.addListener(text, "blur", function() {
- host.onBlur();
- });
-
- event.addListener(text, "focus", function() {
- host.onFocus();
- select();
- });
-
- this.focus = function() {
- host.onFocus();
- select();
- text.focus();
- };
-
- this.blur = function() {
- text.blur();
- };
-
- function isFocused() {
- return document.activeElement === text;
- }
- this.isFocused = isFocused;
-
- this.getElement = function() {
- return text;
- };
-
- this.onContextMenu = function(mousePos, isEmpty){
- if (mousePos) {
- if (!tempStyle)
- tempStyle = text.style.cssText;
-
- text.style.cssText =
- 'position:fixed; z-index:1000;' +
- 'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;';
-
- }
- if (isEmpty)
- text.value='';
- };
-
- this.onContextMenuClose = function(){
- setTimeout(function () {
- if (tempStyle) {
- text.style.cssText = tempStyle;
- tempStyle = '';
- }
- sendText();
- }, 0);
- };
-};
-
-exports.TextInput = TextInput;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mouse/mouse_handler', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/mouse/default_handlers', 'ace/mouse/default_gutter_handler', 'ace/mouse/mouse_event'], function(require, exports, module) {
-"use strict";
-
-var event = require("../lib/event");
-var DefaultHandlers = require("./default_handlers").DefaultHandlers;
-var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler;
-var MouseEvent = require("./mouse_event").MouseEvent;
-
-var MouseHandler = function(editor) {
- this.editor = editor;
-
- new DefaultHandlers(editor);
- new DefaultGutterHandler(editor);
-
- event.addListener(editor.container, "mousedown", function(e) {
- editor.focus();
- return event.preventDefault(e);
- });
- event.addListener(editor.container, "selectstart", function(e) {
- return event.preventDefault(e);
- });
-
- var mouseTarget = editor.renderer.getMouseEventTarget();
- event.addListener(mouseTarget, "mousedown", this.onMouseEvent.bind(this, "mousedown"));
- event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
- event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
- event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, this.onMouseEvent.bind(this, "dblclick"));
- event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, this.onMouseEvent.bind(this, "tripleclick"));
- event.addMultiMouseDownListener(mouseTarget, 0, 4, 600, this.onMouseEvent.bind(this, "quadclick"));
- event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
-
- var gutterEl = editor.renderer.$gutter;
- event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"));
- event.addListener(gutterEl, "click", this.onMouseEvent.bind(this, "gutterclick"));
- event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"));
- event.addListener(gutterEl, "mousemove", this.onMouseMove.bind(this, "gutter"));
-};
-
-(function() {
-
- this.$scrollSpeed = 1;
- this.setScrollSpeed = function(speed) {
- this.$scrollSpeed = speed;
- };
-
- this.getScrollSpeed = function() {
- return this.$scrollSpeed;
- };
-
- this.onMouseEvent = function(name, e) {
- this.editor._emit(name, new MouseEvent(e, this.editor));
- };
-
- this.$dragDelay = 250;
- this.setDragDelay = function(dragDelay) {
- this.$dragDelay = dragDelay;
- };
-
- this.getDragDelay = function() {
- return this.$dragDelay;
- };
-
- this.onMouseMove = function(name, e) {
- // optimization, because mousemove doesn't have a default handler.
- var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
- if (!listeners || !listeners.length)
- return;
-
- this.editor._emit(name, new MouseEvent(e, this.editor));
- };
-
- this.onMouseWheel = function(name, e) {
- var mouseEvent = new MouseEvent(e, this.editor);
- mouseEvent.speed = this.$scrollSpeed * 2;
- mouseEvent.wheelX = e.wheelX;
- mouseEvent.wheelY = e.wheelY;
-
- this.editor._emit(name, mouseEvent);
- };
-
-}).call(MouseHandler.prototype);
-
-exports.MouseHandler = MouseHandler;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mike de Boer <mike AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mouse/default_handlers', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/dom', 'ace/lib/browser_focus'], function(require, exports, module) {
-"use strict";
-
-var event = require("../lib/event");
-var dom = require("../lib/dom");
-var BrowserFocus = require("../lib/browser_focus").BrowserFocus;
-
-var STATE_UNKNOWN = 0;
-var STATE_SELECT = 1;
-var STATE_DRAG = 2;
-
-var DRAG_OFFSET = 5; // pixels
-
-function DefaultHandlers(editor) {
- this.editor = editor;
- this.$clickSelection = null;
- this.browserFocus = new BrowserFocus();
-
- editor.setDefaultHandler("mousedown", this.onMouseDown.bind(this));
- editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(this));
- editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(this));
- editor.setDefaultHandler("quadclick", this.onQuadClick.bind(this));
- editor.setDefaultHandler("mousewheel", this.onScroll.bind(this));
-}
-
-(function() {
-
- this.onMouseDown = function(ev) {
- var inSelection = ev.inSelection();
- var pageX = ev.pageX;
- var pageY = ev.pageY;
- var pos = ev.getDocumentPosition();
- var editor = this.editor;
- var _self = this;
-
- var selectionRange = editor.getSelectionRange();
- var selectionEmpty = selectionRange.isEmpty();
- var state = STATE_UNKNOWN;
-
- // if this click caused the editor to be focused should not clear the
- // selection
- if (
- inSelection && (
- !this.browserFocus.isFocused()
- || new Date().getTime() - this.browserFocus.lastFocus < 20
- || !editor.isFocused()
- )
- ) {
- editor.focus();
- return;
- }
-
- var button = ev.getButton();
- if (button !== 0) {
- if (selectionEmpty) {
- editor.moveCursorToPosition(pos);
- }
- if (button == 2) {
- editor.textInput.onContextMenu({x: ev.clientX, y: ev.clientY}, selectionEmpty);
- event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose);
- }
- return;
- }
-
- if (!inSelection) {
- // Directly pick STATE_SELECT, since the user is not clicking inside
- // a selection.
- onStartSelect(pos);
- }
-
- var mousePageX = pageX, mousePageY = pageY;
- var mousedownTime = (new Date()).getTime();
- var dragCursor, dragRange, dragSelectionMarker;
-
- var onMouseSelection = function(e) {
- mousePageX = event.getDocumentX(e);
- mousePageY = event.getDocumentY(e);
- };
-
- var onMouseSelectionEnd = function(e) {
- clearInterval(timerId);
- if (state == STATE_UNKNOWN)
- onStartSelect(pos);
- else if (state == STATE_DRAG)
- onMouseDragSelectionEnd(e);
-
- _self.$clickSelection = null;
- state = STATE_UNKNOWN;
- };
-
- var onMouseDragSelectionEnd = function(e) {
- dom.removeCssClass(editor.container, "ace_dragging");
- editor.session.removeMarker(dragSelectionMarker);
-
- if (!editor.$mouseHandler.$clickSelection) {
- if (!dragCursor) {
- editor.moveCursorToPosition(pos);
- editor.selection.clearSelection(pos.row, pos.column);
- }
- }
-
- if (!dragCursor)
- return;
-
- if (dragRange.contains(dragCursor.row, dragCursor.column)) {
- dragCursor = null;
- return;
- }
-
- editor.clearSelection();
- if (e && (e.ctrlKey || e.altKey)) {
- var session = editor.session;
- var newRange = session.insert(dragCursor, session.getTextRange(dragRange));
- } else {
- var newRange = editor.moveText(dragRange, dragCursor);
- }
- if (!newRange) {
- dragCursor = null;
- return;
- }
-
- editor.selection.setSelectionRange(newRange);
- };
-
- var onSelectionInterval = function() {
- if (state == STATE_UNKNOWN) {
- var distance = calcDistance(pageX, pageY, mousePageX, mousePageY);
- var time = (new Date()).getTime();
-
- if (distance > DRAG_OFFSET) {
- state = STATE_SELECT;
- var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
- cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1));
- onStartSelect(cursor);
- }
- else if ((time - mousedownTime) > editor.getDragDelay()) {
- state = STATE_DRAG;
- dragRange = editor.getSelectionRange();
- var style = editor.getSelectionStyle();
- dragSelectionMarker = editor.session.addMarker(dragRange, "ace_selection", style);
- editor.clearSelection();
- dom.addCssClass(editor.container, "ace_dragging");
- }
-
- }
-
- if (state == STATE_DRAG)
- onDragSelectionInterval();
- else if (state == STATE_SELECT)
- onUpdateSelectionInterval();
- };
-
- function onStartSelect(pos) {
- if (ev.getShiftKey()) {
- editor.selection.selectToPosition(pos);
- }
- else {
- if (!_self.$clickSelection) {
- editor.moveCursorToPosition(pos);
- editor.selection.clearSelection(pos.row, pos.column);
- }
- }
- state = STATE_SELECT;
- }
-
- var onUpdateSelectionInterval = function() {
- var anchor;
- var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
- cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1));
-
- if (_self.$clickSelection) {
- if (_self.$clickSelection.contains(cursor.row, cursor.column)) {
- editor.selection.setSelectionRange(_self.$clickSelection);
- }
- else {
- if (_self.$clickSelection.compare(cursor.row, cursor.column) == -1) {
- anchor = _self.$clickSelection.end;
- }
- else {
- anchor = _self.$clickSelection.start;
- }
- editor.selection.setSelectionAnchor(anchor.row, anchor.column);
- editor.selection.selectToPosition(cursor);
- }
- }
- else {
- editor.selection.selectToPosition(cursor);
- }
-
- editor.renderer.scrollCursorIntoView();
- };
-
- var onDragSelectionInterval = function() {
- dragCursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
- dragCursor.row = Math.max(0, Math.min(dragCursor.row, editor.session.getLength() - 1));
-
- editor.moveCursorToPosition(dragCursor);
- };
-
- event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
- var timerId = setInterval(onSelectionInterval, 20);
-
- return ev.preventDefault();
- };
-
- this.onDoubleClick = function(ev) {
- var pos = ev.getDocumentPosition();
- var editor = this.editor;
-
- editor.moveCursorToPosition(pos);
- editor.selection.selectWord();
- this.$clickSelection = editor.getSelectionRange();
- };
-
- this.onTripleClick = function(ev) {
- var pos = ev.getDocumentPosition();
- var editor = this.editor;
-
- editor.moveCursorToPosition(pos);
- editor.selection.selectLine();
- this.$clickSelection = editor.getSelectionRange();
- };
-
- this.onQuadClick = function(ev) {
- var editor = this.editor;
-
- editor.selectAll();
- this.$clickSelection = editor.getSelectionRange();
- };
-
- this.onScroll = function(ev) {
- var editor = this.editor;
-
- editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
- if (editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed))
- return ev.preventDefault();
- };
-
-}).call(DefaultHandlers.prototype);
-
-exports.DefaultHandlers = DefaultHandlers;
-
-function calcDistance(ax, ay, bx, by) {
- return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
-}
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/lib/browser_focus', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./oop");
-var event = require("./event");
-var EventEmitter = require("./event_emitter").EventEmitter;
-
-/**
- * This class keeps track of the focus state of the given window.
- * Focus changes for example when the user switches a browser tab,
- * goes to the location bar or switches to another application.
- */
-var BrowserFocus = function(win) {
- win = win || window;
-
- this.lastFocus = new Date().getTime();
- this._isFocused = true;
-
- var _self = this;
-
- // IE < 9 supports focusin and focusout events
- if ("onfocusin" in win.document) {
- event.addListener(win.document, "focusin", function(e) {
- _self._setFocused(true);
- });
-
- event.addListener(win.document, "focusout", function(e) {
- _self._setFocused(!!e.toElement);
- });
- }
- else {
- event.addListener(win, "blur", function(e) {
- _self._setFocused(false);
- });
-
- event.addListener(win, "focus", function(e) {
- _self._setFocused(true);
- });
- }
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.isFocused = function() {
- return this._isFocused;
- };
-
- this._setFocused = function(isFocused) {
- if (this._isFocused == isFocused)
- return;
-
- if (isFocused)
- this.lastFocus = new Date().getTime();
-
- this._isFocused = isFocused;
- this._emit("changeFocus");
- };
-
-}).call(BrowserFocus.prototype);
-
-
-exports.BrowserFocus = BrowserFocus;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Mike de Boer <mike AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var EventEmitter = {};
-
-EventEmitter._emit =
-EventEmitter._dispatchEvent = function(eventName, e) {
- this._eventRegistry = this._eventRegistry || {};
- this._defaultHandlers = this._defaultHandlers || {};
-
- var listeners = this._eventRegistry[eventName] || [];
- var defaultHandler = this._defaultHandlers[eventName];
- if (!listeners.length && !defaultHandler)
- return;
-
- e = e || {};
- e.type = eventName;
-
- if (!e.stopPropagation) {
- e.stopPropagation = function() {
- this.propagationStopped = true;
- };
- }
-
- if (!e.preventDefault) {
- e.preventDefault = function() {
- this.defaultPrevented = true;
- };
- }
-
- for (var i=0; i<listeners.length; i++) {
- listeners[i](e);
- if (e.propagationStopped)
- break;
- }
-
- if (defaultHandler && !e.defaultPrevented)
- defaultHandler(e);
-};
-
-EventEmitter.setDefaultHandler = function(eventName, callback) {
- this._defaultHandlers = this._defaultHandlers || {};
-
- if (this._defaultHandlers[eventName])
- throw new Error("The default handler for '" + eventName + "' is already set");
-
- this._defaultHandlers[eventName] = callback;
-};
-
-EventEmitter.on =
-EventEmitter.addEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- var listeners = this._eventRegistry[eventName] = [];
-
- if (listeners.indexOf(callback) == -1)
- listeners.push(callback);
-};
-
-EventEmitter.removeListener =
-EventEmitter.removeEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- return;
-
- var index = listeners.indexOf(callback);
- if (index !== -1)
- listeners.splice(index, 1);
-};
-
-EventEmitter.removeAllListeners = function(eventName) {
- if (this._eventRegistry) this._eventRegistry[eventName] = [];
-};
-
-exports.EventEmitter = EventEmitter;
-
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mouse/default_gutter_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-function GutterHandler(editor) {
- editor.setDefaultHandler("gutterclick", function(e) {
- var row = e.getDocumentPosition().row;
- var selection = editor.session.selection;
-
- selection.moveCursorTo(row, 0);
- selection.selectLine();
- });
-}
-
-exports.GutterHandler = GutterHandler;
-
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mouse/mouse_event', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
-"use strict";
-
-var event = require("../lib/event");
-
-/**
- * Custom Ace mouse event
- */
-var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
- this.domEvent = domEvent;
- this.editor = editor;
-
- this.pageX = event.getDocumentX(domEvent);
- this.pageY = event.getDocumentY(domEvent);
-
- this.clientX = domEvent.clientX;
- this.clientY = domEvent.clientY;
-
- this.$pos = null;
- this.$inSelection = null;
-
- this.propagationStopped = false;
- this.defaultPrevented = false;
-};
-
-(function() {
-
- this.stopPropagation = function() {
- event.stopPropagation(this.domEvent);
- this.propagationStopped = true;
- };
-
- this.preventDefault = function() {
- event.preventDefault(this.domEvent);
- this.defaultPrevented = true;
- };
-
- this.stop = function() {
- this.stopPropagation();
- this.preventDefault();
- };
-
- /**
- * Get the document position below the mouse cursor
- *
- * @return {Object} 'row' and 'column' of the document position
- */
- this.getDocumentPosition = function() {
- if (this.$pos)
- return this.$pos;
-
- var pageX = event.getDocumentX(this.domEvent);
- var pageY = event.getDocumentY(this.domEvent);
- this.$pos = this.editor.renderer.screenToTextCoordinates(pageX, pageY);
- this.$pos.row = Math.max(0, Math.min(this.$pos.row, this.editor.session.getLength()-1));
- return this.$pos;
- };
-
- /**
- * Check if the mouse cursor is inside of the text selection
- *
- * @return {Boolean} whether the mouse cursor is inside of the selection
- */
- this.inSelection = function() {
- if (this.$inSelection !== null)
- return this.$inSelection;
-
- var editor = this.editor;
-
- if (editor.getReadOnly()) {
- this.$inSelection = false;
- }
- else {
- var selectionRange = editor.getSelectionRange();
- if (selectionRange.isEmpty())
- this.$inSelection = false;
- else {
- var pos = this.getDocumentPosition();
- this.$inSelection = selectionRange.contains(pos.row, pos.column);
- }
- }
- return this.$inSelection;
- };
-
- /**
- * Get the clicked mouse button
- *
- * @return {Number} 0 for left button, 1 for middle button, 2 for right button
- */
- this.getButton = function() {
- return event.getButton(this.domEvent);
- };
-
- /**
- * @return {Boolean} whether the shift key was pressed when the event was emitted
- */
- this.getShiftKey = function() {
- return this.domEvent.shiftKey;
- };
-
- this.getAccelKey = function() {
- return this.domEvent.ctrlKey || this.domEvent.metaKey ;
- };
-
-}).call(MouseEvent.prototype);
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mouse/fold_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-function FoldHandler(editor) {
-
- editor.on("click", function(e) {
- var position = e.getDocumentPosition();
- var session = editor.session;
-
- // If the user dclicked on a fold, then expand it.
- var fold = session.getFoldAt(position.row, position.column, 1);
- if (fold) {
- if (e.getAccelKey())
- session.removeFold(fold);
- else
- session.expandFold(fold);
-
- e.stop();
- }
- });
-
- editor.on("gutterclick", function(e) {
- if (e.domEvent.target.className.indexOf("ace_fold-widget") != -1) {
- var row = e.getDocumentPosition().row;
- editor.session.onFoldWidgetClick(row, e.domEvent);
- e.stop();
- }
- });
-}
-
-exports.FoldHandler = FoldHandler;
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- * Harutyun Amirjanyan <amirjanyan@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/event', 'ace/commands/default_commands'], function(require, exports, module) {
-"use strict";
-
-var keyUtil = require("../lib/keys");
-var event = require("../lib/event");
-require("../commands/default_commands");
-
-var KeyBinding = function(editor) {
- this.$editor = editor;
- this.$data = { };
- this.$handlers = [this];
-};
-
-(function() {
- this.setKeyboardHandler = function(keyboardHandler) {
- if (this.$handlers[this.$handlers.length - 1] == keyboardHandler)
- return;
- this.$data = { };
- this.$handlers = keyboardHandler ? [this, keyboardHandler] : [this];
- };
-
- this.addKeyboardHandler = function(keyboardHandler) {
- this.removeKeyboardHandler(keyboardHandler);
- this.$handlers.push(keyboardHandler);
- };
-
- this.removeKeyboardHandler = function(keyboardHandler) {
- var i = this.$handlers.indexOf(keyboardHandler);
- if (i == -1)
- return false;
- this.$handlers.splice(i, 1);
- return true;
- };
-
- this.getKeyboardHandler = function() {
- return this.$handlers[this.$handlers.length - 1];
- };
-
- this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
- var toExecute;
- for (var i = this.$handlers.length; i--;) {
- toExecute = this.$handlers[i].handleKeyboard(
- this.$data, hashId, keyString, keyCode, e
- );
- if (toExecute && toExecute.command)
- break;
- }
-
- if (!toExecute || !toExecute.command)
- return false;
-
- var success = false;
- var commands = this.$editor.commands;
-
- // allow keyboardHandler to consume keys
- if (toExecute.command != "null")
- success = commands.exec(toExecute.command, this.$editor, toExecute.args);
- else
- success = true;
-
- if (success && e)
- event.stopEvent(e);
-
- return success;
- };
-
- this.handleKeyboard = function(data, hashId, keyString) {
- return {
- command: this.$editor.commands.findKeyCommand(hashId, keyString)
- };
- };
-
- this.onCommandKey = function(e, hashId, keyCode) {
- var keyString = keyUtil.keyCodeToString(keyCode);
- this.$callKeyboardHandlers(hashId, keyString, keyCode, e);
- };
-
- this.onTextInput = function(text, pasted) {
- var success = false;
- if (!pasted && text.length == 1)
- success = this.$callKeyboardHandlers(0, text);
- if (!success)
- this.$editor.commands.exec("insertstring", this.$editor, text);
- };
-
-}).call(KeyBinding.prototype);
-
-exports.KeyBinding = KeyBinding;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- * Mihai Sucan <mihai.sucan@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/commands/default_commands', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-function bindKey(win, mac) {
- return {
- win: win,
- mac: mac
- };
-}
-
-exports.commands = [{
- name: "selectall",
- bindKey: bindKey("Ctrl-A", "Command-A"),
- exec: function(editor) { editor.selectAll(); },
- readOnly: true
-}, {
- name: "centerselection",
- bindKey: bindKey(null, "Ctrl-L"),
- exec: function(editor) { editor.centerSelection(); },
- readOnly: true
-}, {
- name: "gotoline",
- bindKey: bindKey("Ctrl-L", "Command-L"),
- exec: function(editor) {
- var line = parseInt(prompt("Enter line number:"), 10);
- if (!isNaN(line)) {
- editor.gotoLine(line);
- }
- },
- readOnly: true
-}, {
- name: "fold",
- bindKey: bindKey("Alt-L", "Alt-L"),
- exec: function(editor) { editor.session.toggleFold(false); },
- readOnly: true
-}, {
- name: "unfold",
- bindKey: bindKey("Alt-Shift-L", "Alt-Shift-L"),
- exec: function(editor) { editor.session.toggleFold(true); },
- readOnly: true
-}, {
- name: "foldall",
- bindKey: bindKey("Alt-0", "Alt-0"),
- exec: function(editor) { editor.session.foldAll(); },
- readOnly: true
-}, {
- name: "unfoldall",
- bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
- exec: function(editor) { editor.session.unfold(); },
- readOnly: true
-}, {
- name: "findnext",
- bindKey: bindKey("Ctrl-K", "Command-G"),
- exec: function(editor) { editor.findNext(); },
- readOnly: true
-}, {
- name: "findprevious",
- bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
- exec: function(editor) { editor.findPrevious(); },
- readOnly: true
-}, {
- name: "find",
- bindKey: bindKey("Ctrl-F", "Command-F"),
- exec: function(editor) {
- var needle = prompt("Find:", editor.getCopyText());
- editor.find(needle);
- },
- readOnly: true
-}, {
- name: "overwrite",
- bindKey: bindKey("Insert", "Insert"),
- exec: function(editor) { editor.toggleOverwrite(); },
- readOnly: true
-}, {
- name: "selecttostart",
- bindKey: bindKey("Ctrl-Shift-Home|Alt-Shift-Up", "Command-Shift-Up"),
- exec: function(editor) { editor.getSelection().selectFileStart(); },
- readOnly: true
-}, {
- name: "gotostart",
- bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"),
- exec: function(editor) { editor.navigateFileStart(); },
- readOnly: true
-}, {
- name: "selectup",
- bindKey: bindKey("Shift-Up", "Shift-Up"),
- exec: function(editor) { editor.getSelection().selectUp(); },
- readOnly: true
-}, {
- name: "golineup",
- bindKey: bindKey("Up", "Up|Ctrl-P"),
- exec: function(editor, args) { editor.navigateUp(args.times); },
- readOnly: true
-}, {
- name: "selecttoend",
- bindKey: bindKey("Ctrl-Shift-End|Alt-Shift-Down", "Command-Shift-Down"),
- exec: function(editor) { editor.getSelection().selectFileEnd(); },
- readOnly: true
-}, {
- name: "gotoend",
- bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"),
- exec: function(editor) { editor.navigateFileEnd(); },
- readOnly: true
-}, {
- name: "selectdown",
- bindKey: bindKey("Shift-Down", "Shift-Down"),
- exec: function(editor) { editor.getSelection().selectDown(); },
- readOnly: true
-}, {
- name: "golinedown",
- bindKey: bindKey("Down", "Down|Ctrl-N"),
- exec: function(editor, args) { editor.navigateDown(args.times); },
- readOnly: true
-}, {
- name: "selectwordleft",
- bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
- exec: function(editor) { editor.getSelection().selectWordLeft(); },
- readOnly: true
-}, {
- name: "gotowordleft",
- bindKey: bindKey("Ctrl-Left", "Option-Left"),
- exec: function(editor) { editor.navigateWordLeft(); },
- readOnly: true
-}, {
- name: "selecttolinestart",
- bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
- exec: function(editor) { editor.getSelection().selectLineStart(); },
- readOnly: true
-}, {
- name: "gotolinestart",
- bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
- exec: function(editor) { editor.navigateLineStart(); },
- readOnly: true
-}, {
- name: "selectleft",
- bindKey: bindKey("Shift-Left", "Shift-Left"),
- exec: function(editor) { editor.getSelection().selectLeft(); },
- readOnly: true
-}, {
- name: "gotoleft",
- bindKey: bindKey("Left", "Left|Ctrl-B"),
- exec: function(editor, args) { editor.navigateLeft(args.times); },
- readOnly: true
-}, {
- name: "selectwordright",
- bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
- exec: function(editor) { editor.getSelection().selectWordRight(); },
- readOnly: true
-}, {
- name: "gotowordright",
- bindKey: bindKey("Ctrl-Right", "Option-Right"),
- exec: function(editor) { editor.navigateWordRight(); },
- readOnly: true
-}, {
- name: "selecttolineend",
- bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
- exec: function(editor) { editor.getSelection().selectLineEnd(); },
- readOnly: true
-}, {
- name: "gotolineend",
- bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
- exec: function(editor) { editor.navigateLineEnd(); },
- readOnly: true
-}, {
- name: "selectright",
- bindKey: bindKey("Shift-Right", "Shift-Right"),
- exec: function(editor) { editor.getSelection().selectRight(); },
- readOnly: true
-}, {
- name: "gotoright",
- bindKey: bindKey("Right", "Right|Ctrl-F"),
- exec: function(editor, args) { editor.navigateRight(args.times); },
- readOnly: true
-}, {
- name: "selectpagedown",
- bindKey: bindKey("Shift-PageDown", "Shift-PageDown"),
- exec: function(editor) { editor.selectPageDown(); },
- readOnly: true
-}, {
- name: "pagedown",
- bindKey: bindKey(null, "PageDown"),
- exec: function(editor) { editor.scrollPageDown(); },
- readOnly: true
-}, {
- name: "gotopagedown",
- bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"),
- exec: function(editor) { editor.gotoPageDown(); },
- readOnly: true
-}, {
- name: "selectpageup",
- bindKey: bindKey("Shift-PageUp", "Shift-PageUp"),
- exec: function(editor) { editor.selectPageUp(); },
- readOnly: true
-}, {
- name: "pageup",
- bindKey: bindKey(null, "PageUp"),
- exec: function(editor) { editor.scrollPageUp(); },
- readOnly: true
-}, {
- name: "gotopageup",
- bindKey: bindKey("PageUp", "Option-PageUp"),
- exec: function(editor) { editor.gotoPageUp(); },
- readOnly: true
-}, {
- name: "selectlinestart",
- bindKey: bindKey("Shift-Home", "Shift-Home"),
- exec: function(editor) { editor.getSelection().selectLineStart(); },
- readOnly: true
-}, {
- name: "selectlineend",
- bindKey: bindKey("Shift-End", "Shift-End"),
- exec: function(editor) { editor.getSelection().selectLineEnd(); },
- readOnly: true
-}, {
- name: "togglerecording",
- bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
- exec: function(editor) { editor.commands.toggleRecording(); },
- readOnly: true
-}, {
- name: "replaymacro",
- bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
- exec: function(editor) { editor.commands.replay(editor); },
- readOnly: true
-}, {
- name: "jumptomatching",
- bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"),
- exec: function(editor) { editor.jumpToMatching(); },
- readOnly: true
-},
-
-// commands disabled in readOnly mode
-{
- name: "removeline",
- bindKey: bindKey("Ctrl-D", "Command-D"),
- exec: function(editor) { editor.removeLines(); }
-}, {
- name: "togglecomment",
- bindKey: bindKey("Ctrl-7", "Command-7"),
- exec: function(editor) { editor.toggleCommentLines(); }
-}, {
- name: "replace",
- bindKey: bindKey("Ctrl-R", "Command-Option-F"),
- exec: function(editor) {
- var needle = prompt("Find:", editor.getCopyText());
- if (!needle)
- return;
- var replacement = prompt("Replacement:");
- if (!replacement)
- return;
- editor.replace(replacement, {needle: needle});
- }
-}, {
- name: "replaceall",
- bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"),
- exec: function(editor) {
- var needle = prompt("Find:");
- if (!needle)
- return;
- var replacement = prompt("Replacement:");
- if (!replacement)
- return;
- editor.replaceAll(replacement, {needle: needle});
- }
-}, {
- name: "undo",
- bindKey: bindKey("Ctrl-Z", "Command-Z"),
- exec: function(editor) { editor.undo(); }
-}, {
- name: "redo",
- bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
- exec: function(editor) { editor.redo(); }
-}, {
- name: "copylinesup",
- bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"),
- exec: function(editor) { editor.copyLinesUp(); }
-}, {
- name: "movelinesup",
- bindKey: bindKey("Alt-Up", "Option-Up"),
- exec: function(editor) { editor.moveLinesUp(); }
-}, {
- name: "copylinesdown",
- bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"),
- exec: function(editor) { editor.copyLinesDown(); }
-}, {
- name: "movelinesdown",
- bindKey: bindKey("Alt-Down", "Option-Down"),
- exec: function(editor) { editor.moveLinesDown(); }
-}, {
- name: "del",
- bindKey: bindKey("Delete", "Delete|Ctrl-D"),
- exec: function(editor) { editor.remove("right"); }
-}, {
- name: "backspace",
- bindKey: bindKey(
- "Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace",
- "Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"
- ),
- exec: function(editor) { editor.remove("left"); }
-}, {
- name: "removetolinestart",
- bindKey: bindKey("Alt-Backspace", "Option-Backspace"),
- exec: function(editor) { editor.removeToLineStart(); }
-}, {
- name: "removetolineend",
- bindKey: bindKey("Alt-Delete", "Ctrl-K"),
- exec: function(editor) { editor.removeToLineEnd(); }
-}, {
- name: "removewordleft",
- bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
- exec: function(editor) { editor.removeWordLeft(); }
-}, {
- name: "removewordright",
- bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
- exec: function(editor) { editor.removeWordRight(); }
-}, {
- name: "outdent",
- bindKey: bindKey("Shift-Tab", "Shift-Tab"),
- exec: function(editor) { editor.blockOutdent(); }
-}, {
- name: "indent",
- bindKey: bindKey("Tab", "Tab"),
- exec: function(editor) { editor.indent(); }
-}, {
- name: "insertstring",
- exec: function(editor, str) { editor.insert(str); }
-}, {
- name: "inserttext",
- exec: function(editor, args) {
- editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
- }
-}, {
- name: "splitline",
- bindKey: bindKey(null, "Ctrl-O"),
- exec: function(editor) { editor.splitLine(); }
-}, {
- name: "transposeletters",
- bindKey: bindKey("Ctrl-T", "Ctrl-T"),
- exec: function(editor) { editor.transposeLetters(); }
-}, {
- name: "touppercase",
- bindKey: bindKey("Ctrl-U", "Ctrl-U"),
- exec: function(editor) { editor.toUpperCase(); }
-}, {
- name: "tolowercase",
- bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"),
- exec: function(editor) { editor.toLowerCase(); }
-}];
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/edit_session', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/selection', 'ace/mode/text', 'ace/range', 'ace/document', 'ace/background_tokenizer', 'ace/edit_session/folding', 'ace/edit_session/bracket_match'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var lang = require("./lib/lang");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Selection = require("./selection").Selection;
-var TextMode = require("./mode/text").Mode;
-var Range = require("./range").Range;
-var Document = require("./document").Document;
-var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
-
-var EditSession = function(text, mode) {
- this.$modified = true;
- this.$breakpoints = [];
- this.$frontMarkers = {};
- this.$backMarkers = {};
- this.$markerId = 1;
- this.$rowCache = [];
- this.$wrapData = [];
- this.$foldData = [];
- this.$undoSelect = true;
- this.$foldData.toString = function() {
- var str = "";
- this.forEach(function(foldLine) {
- str += "\n" + foldLine.toString();
- });
- return str;
- }
-
- if (text instanceof Document) {
- this.setDocument(text);
- } else {
- this.setDocument(new Document(text));
- }
-
- this.selection = new Selection(this);
- if (mode)
- this.setMode(mode);
- else
- this.setMode(new TextMode());
-};
-
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.setDocument = function(doc) {
- if (this.doc)
- throw new Error("Document is already set");
-
- this.doc = doc;
- doc.on("change", this.onChange.bind(this));
- this.on("changeFold", this.onChangeFold.bind(this));
-
- if (this.bgTokenizer) {
- this.bgTokenizer.setDocument(this.getDocument());
- this.bgTokenizer.start(0);
- }
- };
-
- this.getDocument = function() {
- return this.doc;
- };
-
- this.$resetRowCache = function(row) {
- if (row == 0) {
- this.$rowCache = [];
- return;
- }
- var rowCache = this.$rowCache;
- for (var i = 0; i < rowCache.length; i++) {
- if (rowCache[i].docRow >= row) {
- rowCache.splice(i, rowCache.length);
- return;
- }
- }
- };
-
- this.onChangeFold = function(e) {
- var fold = e.data;
- this.$resetRowCache(fold.start.row);
- };
-
- this.onChange = function(e) {
- var delta = e.data;
- this.$modified = true;
-
- this.$resetRowCache(delta.range.start.row);
-
- var removedFolds = this.$updateInternalDataOnChange(e);
- if (!this.$fromUndo && this.$undoManager && !delta.ignore) {
- this.$deltasDoc.push(delta);
- if (removedFolds && removedFolds.length != 0) {
- this.$deltasFold.push({
- action: "removeFolds",
- folds: removedFolds
- });
- }
-
- this.$informUndoManager.schedule();
- }
-
- this.bgTokenizer.start(delta.range.start.row);
- this._emit("change", e);
- };
-
- this.setValue = function(text) {
- this.doc.setValue(text);
- this.selection.moveCursorTo(0, 0);
- this.selection.clearSelection();
-
- this.$resetRowCache(0);
- this.$deltas = [];
- this.$deltasDoc = [];
- this.$deltasFold = [];
- this.getUndoManager().reset();
- };
-
- this.getValue =
- this.toString = function() {
- return this.doc.getValue();
- };
-
- this.getSelection = function() {
- return this.selection;
- };
-
- this.getState = function(row) {
- return this.bgTokenizer.getState(row);
- };
-
- this.getTokens = function(firstRow, lastRow) {
- return this.bgTokenizer.getTokens(firstRow, lastRow);
- };
-
- this.getTokenAt = function(row, column) {
- var tokens = this.bgTokenizer.getTokens(row, row)[0].tokens;
- var token, c = 0;
- if (column == null) {
- i = tokens.length - 1;
- c = this.getLine(row).length;
- } else {
- for (var i = 0; i < tokens.length; i++) {
- c += tokens[i].value.length;
- if (c >= column)
- break;
- }
- }
- token = tokens[i];
- if (!token)
- return null;
- token.index = i;
- token.start = c - token.value.length;
- return token;
- };
-
- this.setUndoManager = function(undoManager) {
- this.$undoManager = undoManager;
- this.$resetRowCache(0);
- this.$deltas = [];
- this.$deltasDoc = [];
- this.$deltasFold = [];
-
- if (this.$informUndoManager)
- this.$informUndoManager.cancel();
-
- if (undoManager) {
- var self = this;
- this.$syncInformUndoManager = function() {
- self.$informUndoManager.cancel();
-
- if (self.$deltasFold.length) {
- self.$deltas.push({
- group: "fold",
- deltas: self.$deltasFold
- });
- self.$deltasFold = [];
- }
-
- if (self.$deltasDoc.length) {
- self.$deltas.push({
- group: "doc",
- deltas: self.$deltasDoc
- });
- self.$deltasDoc = [];
- }
-
- if (self.$deltas.length > 0) {
- undoManager.execute({
- action: "aceupdate",
- args: [self.$deltas, self]
- });
- }
-
- self.$deltas = [];
- }
- this.$informUndoManager =
- lang.deferredCall(this.$syncInformUndoManager);
- }
- };
-
- this.$defaultUndoManager = {
- undo: function() {},
- redo: function() {},
- reset: function() {}
- };
-
- this.getUndoManager = function() {
- return this.$undoManager || this.$defaultUndoManager;
- },
-
- this.getTabString = function() {
- if (this.getUseSoftTabs()) {
- return lang.stringRepeat(" ", this.getTabSize());
- } else {
- return "\t";
- }
- };
-
- this.$useSoftTabs = true;
- this.setUseSoftTabs = function(useSoftTabs) {
- if (this.$useSoftTabs === useSoftTabs) return;
-
- this.$useSoftTabs = useSoftTabs;
- };
-
- this.getUseSoftTabs = function() {
- return this.$useSoftTabs;
- };
-
- this.$tabSize = 4;
- this.setTabSize = function(tabSize) {
- if (isNaN(tabSize) || this.$tabSize === tabSize) return;
-
- this.$modified = true;
- this.$tabSize = tabSize;
- this._emit("changeTabSize");
- };
-
- this.getTabSize = function() {
- return this.$tabSize;
- };
-
- this.isTabStop = function(position) {
- return this.$useSoftTabs && (position.column % this.$tabSize == 0);
- };
-
- this.$overwrite = false;
- this.setOverwrite = function(overwrite) {
- if (this.$overwrite == overwrite) return;
-
- this.$overwrite = overwrite;
- this._emit("changeOverwrite");
- };
-
- this.getOverwrite = function() {
- return this.$overwrite;
- };
-
- this.toggleOverwrite = function() {
- this.setOverwrite(!this.$overwrite);
- };
-
- this.getBreakpoints = function() {
- return this.$breakpoints;
- };
-
- this.setBreakpoints = function(rows) {
- this.$breakpoints = [];
- for (var i=0; i<rows.length; i++) {
- this.$breakpoints[rows[i]] = true;
- }
- this._emit("changeBreakpoint", {});
- };
-
- this.clearBreakpoints = function() {
- this.$breakpoints = [];
- this._emit("changeBreakpoint", {});
- };
-
- this.setBreakpoint = function(row) {
- this.$breakpoints[row] = true;
- this._emit("changeBreakpoint", {});
- };
-
- this.clearBreakpoint = function(row) {
- delete this.$breakpoints[row];
- this._emit("changeBreakpoint", {});
- };
-
- this.getBreakpoints = function() {
- return this.$breakpoints;
- };
-
- this.addMarker = function(range, clazz, type, inFront) {
- var id = this.$markerId++;
-
- var marker = {
- range : range,
- type : type || "line",
- renderer: typeof type == "function" ? type : null,
- clazz : clazz,
- inFront: !!inFront
- }
-
- if (inFront) {
- this.$frontMarkers[id] = marker;
- this._emit("changeFrontMarker")
- } else {
- this.$backMarkers[id] = marker;
- this._emit("changeBackMarker")
- }
-
- return id;
- };
-
- this.removeMarker = function(markerId) {
- var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];
- if (!marker)
- return;
-
- var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;
- if (marker) {
- delete (markers[markerId]);
- this._emit(marker.inFront ? "changeFrontMarker" : "changeBackMarker");
- }
- };
-
- this.getMarkers = function(inFront) {
- return inFront ? this.$frontMarkers : this.$backMarkers;
- };
-
- /**
- * Error:
- * {
- * row: 12,
- * column: 2, //can be undefined
- * text: "Missing argument",
- * type: "error" // or "warning" or "info"
- * }
- */
- this.setAnnotations = function(annotations) {
- this.$annotations = {};
- for (var i=0; i<annotations.length; i++) {
- var annotation = annotations[i];
- var row = annotation.row;
- if (this.$annotations[row])
- this.$annotations[row].push(annotation);
- else
- this.$annotations[row] = [annotation];
- }
- this._emit("changeAnnotation", {});
- };
-
- this.getAnnotations = function() {
- return this.$annotations || {};
- };
-
- this.clearAnnotations = function() {
- this.$annotations = {};
- this._emit("changeAnnotation", {});
- };
-
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r?\n)/m);
- if (match) {
- this.$autoNewLine = match[1];
- } else {
- this.$autoNewLine = "\n";
- }
- };
-
- this.getWordRange = function(row, column) {
- var line = this.getLine(row);
-
- var inToken = false;
- if (column > 0) {
- inToken = !!line.charAt(column - 1).match(this.tokenRe);
- }
-
- if (!inToken) {
- inToken = !!line.charAt(column).match(this.tokenRe);
- }
-
- var re = inToken ? this.tokenRe : this.nonTokenRe;
-
- var start = column;
- if (start > 0) {
- do {
- start--;
- }
- while (start >= 0 && line.charAt(start).match(re));
- start++;
- }
-
- var end = column;
- while (end < line.length && line.charAt(end).match(re)) {
- end++;
- }
-
- return new Range(row, start, row, end);
- };
-
- // Gets the range of a word including its right whitespace
- this.getAWordRange = function(row, column) {
- var wordRange = this.getWordRange(row, column);
- var line = this.getLine(wordRange.end.row);
-
- while (line.charAt(wordRange.end.column).match(/[ \t]/)) {
- wordRange.end.column += 1;
- }
- return wordRange;
- };
-
- this.setNewLineMode = function(newLineMode) {
- this.doc.setNewLineMode(newLineMode);
- };
-
- this.getNewLineMode = function() {
- return this.doc.getNewLineMode();
- };
-
- this.$useWorker = true;
- this.setUseWorker = function(useWorker) {
- if (this.$useWorker == useWorker)
- return;
-
- this.$useWorker = useWorker;
-
- this.$stopWorker();
- if (useWorker)
- this.$startWorker();
- };
-
- this.getUseWorker = function() {
- return this.$useWorker;
- };
-
- this.onReloadTokenizer = function(e) {
- var rows = e.data;
- this.bgTokenizer.start(rows.first);
- this._emit("tokenizerUpdate", e);
- };
-
- this.$mode = null;
- this.setMode = function(mode) {
- if (this.$mode === mode) return;
- this.$mode = mode;
-
- this.$stopWorker();
-
- if (this.$useWorker)
- this.$startWorker();
-
- var tokenizer = mode.getTokenizer();
-
- if(tokenizer.addEventListener !== undefined) {
- var onReloadTokenizer = this.onReloadTokenizer.bind(this);
- tokenizer.addEventListener("update", onReloadTokenizer);
- }
-
- if (!this.bgTokenizer) {
- this.bgTokenizer = new BackgroundTokenizer(tokenizer);
- var _self = this;
- this.bgTokenizer.addEventListener("update", function(e) {
- _self._emit("tokenizerUpdate", e);
- });
- } else {
- this.bgTokenizer.setTokenizer(tokenizer);
- }
-
- this.bgTokenizer.setDocument(this.getDocument());
- this.bgTokenizer.start(0);
-
- this.tokenRe = mode.tokenRe;
- this.nonTokenRe = mode.nonTokenRe;
-
- this.$setFolding(mode.foldingRules);
-
- this._emit("changeMode");
- };
-
- this.$stopWorker = function() {
- if (this.$worker)
- this.$worker.terminate();
-
- this.$worker = null;
- };
-
- this.$startWorker = function() {
- if (typeof Worker !== "undefined" && !require.noWorker) {
- try {
- this.$worker = this.$mode.createWorker(this);
- } catch (e) {
- console.log("Could not load worker");
- console.log(e);
- this.$worker = null;
- }
- }
- else
- this.$worker = null;
- };
-
- this.getMode = function() {
- return this.$mode;
- };
-
- this.$scrollTop = 0;
- this.setScrollTop = function(scrollTop) {
- scrollTop = Math.round(Math.max(0, scrollTop));
- if (this.$scrollTop === scrollTop)
- return;
-
- this.$scrollTop = scrollTop;
- this._emit("changeScrollTop", scrollTop);
- };
-
- this.getScrollTop = function() {
- return this.$scrollTop;
- };
-
- this.$scrollLeft = 0;
- this.setScrollLeft = function(scrollLeft) {
- scrollLeft = Math.round(Math.max(0, scrollLeft));
- if (this.$scrollLeft === scrollLeft)
- return;
-
- this.$scrollLeft = scrollLeft;
- this._emit("changeScrollLeft", scrollLeft);
- };
-
- this.getScrollLeft = function() {
- return this.$scrollLeft;
- };
-
- this.getWidth = function() {
- this.$computeWidth();
- return this.width;
- };
-
- this.getScreenWidth = function() {
- this.$computeWidth();
- return this.screenWidth;
- };
-
- this.$computeWidth = function(force) {
- if (this.$modified || force) {
- this.$modified = false;
-
- var lines = this.doc.getAllLines();
- var longestLine = 0;
- var longestScreenLine = 0;
-
- for ( var i = 0; i < lines.length; i++) {
- var foldLine = this.getFoldLine(i),
- line, len;
-
- line = lines[i];
- if (foldLine) {
- var end = foldLine.range.end;
- line = this.getFoldDisplayLine(foldLine);
- // Continue after the foldLine.end.row. All the lines in
- // between are folded.
- i = end.row;
- }
- len = line.length;
- longestLine = Math.max(longestLine, len);
- if (!this.$useWrapMode) {
- longestScreenLine = Math.max(
- longestScreenLine,
- this.$getStringScreenWidth(line)[0]
- );
- }
- }
- this.width = longestLine;
-
- if (this.$useWrapMode) {
- this.screenWidth = this.$wrapLimit;
- } else {
- this.screenWidth = longestScreenLine;
- }
- }
- };
-
- /**
- * Get a verbatim copy of the given line as it is in the document
- */
- this.getLine = function(row) {
- return this.doc.getLine(row);
- };
-
- this.getLines = function(firstRow, lastRow) {
- return this.doc.getLines(firstRow, lastRow);
- };
-
- this.getLength = function() {
- return this.doc.getLength();
- };
-
- this.getTextRange = function(range) {
- return this.doc.getTextRange(range);
- };
-
- this.insert = function(position, text) {
- return this.doc.insert(position, text);
- };
-
- this.remove = function(range) {
- return this.doc.remove(range);
- };
-
- this.undoChanges = function(deltas, dontSelect) {
- if (!deltas.length)
- return;
-
- this.$fromUndo = true;
- var lastUndoRange = null;
- for (var i = deltas.length - 1; i != -1; i--) {
- var delta = deltas[i];
- if (delta.group == "doc") {
- this.doc.revertDeltas(delta.deltas);
- lastUndoRange =
- this.$getUndoSelection(delta.deltas, true, lastUndoRange);
- } else {
- delta.deltas.forEach(function(foldDelta) {
- this.addFolds(foldDelta.folds);
- }, this);
- }
- }
- this.$fromUndo = false;
- lastUndoRange &&
- this.$undoSelect &&
- !dontSelect &&
- this.selection.setSelectionRange(lastUndoRange);
- return lastUndoRange;
- };
-
- this.redoChanges = function(deltas, dontSelect) {
- if (!deltas.length)
- return;
-
- this.$fromUndo = true;
- var lastUndoRange = null;
- for (var i = 0; i < deltas.length; i++) {
- var delta = deltas[i];
- if (delta.group == "doc") {
- this.doc.applyDeltas(delta.deltas);
- lastUndoRange =
- this.$getUndoSelection(delta.deltas, false, lastUndoRange);
- }
- }
- this.$fromUndo = false;
- lastUndoRange &&
- this.$undoSelect &&
- !dontSelect &&
- this.selection.setSelectionRange(lastUndoRange);
- return lastUndoRange;
- };
-
- this.setUndoSelect = function(enable) {
- this.$undoSelect = enable;
- };
-
- this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {
- function isInsert(delta) {
- var insert =
- delta.action == "insertText" || delta.action == "insertLines";
- return isUndo ? !insert : insert;
- }
-
- var delta = deltas[0];
- var range, point;
- var lastDeltaIsInsert = false;
- if (isInsert(delta)) {
- range = delta.range.clone();
- lastDeltaIsInsert = true;
- } else {
- range = Range.fromPoints(delta.range.start, delta.range.start);
- lastDeltaIsInsert = false;
- }
-
- for (var i = 1; i < deltas.length; i++) {
- delta = deltas[i];
- if (isInsert(delta)) {
- point = delta.range.start;
- if (range.compare(point.row, point.column) == -1) {
- range.setStart(delta.range.start);
- }
- point = delta.range.end;
- if (range.compare(point.row, point.column) == 1) {
- range.setEnd(delta.range.end);
- }
- lastDeltaIsInsert = true;
- } else {
- point = delta.range.start;
- if (range.compare(point.row, point.column) == -1) {
- range =
- Range.fromPoints(delta.range.start, delta.range.start);
- }
- lastDeltaIsInsert = false;
- }
- }
-
- // Check if this range and the last undo range has something in common.
- // If true, merge the ranges.
- if (lastUndoRange != null) {
- var cmp = lastUndoRange.compareRange(range);
- if (cmp == 1) {
- range.setStart(lastUndoRange.start);
- } else if (cmp == -1) {
- range.setEnd(lastUndoRange.end);
- }
- }
-
- return range;
- },
-
- this.replace = function(range, text) {
- return this.doc.replace(range, text);
- };
-
- /**
- * Move a range of text from the given range to the given position.
- *
- * @param fromRange {Range} The range of text you want moved within the
- * document.
- * @param toPosition {Object} The location (row and column) where you want
- * to move the text to.
- * @return {Range} The new range where the text was moved to.
- */
- this.moveText = function(fromRange, toPosition) {
- var text = this.getTextRange(fromRange);
- this.remove(fromRange);
-
- var toRow = toPosition.row;
- var toColumn = toPosition.column;
-
- // Make sure to update the insert location, when text is removed in
- // front of the chosen point of insertion.
- if (!fromRange.isMultiLine() && fromRange.start.row == toRow &&
- fromRange.end.column < toColumn)
- toColumn -= text.length;
-
- if (fromRange.isMultiLine() && fromRange.end.row < toRow) {
- var lines = this.doc.$split(text);
- toRow -= lines.length - 1;
- }
-
- var endRow = toRow + fromRange.end.row - fromRange.start.row;
- var endColumn = fromRange.isMultiLine() ?
- fromRange.end.column :
- toColumn + fromRange.end.column - fromRange.start.column;
-
- var toRange = new Range(toRow, toColumn, endRow, endColumn);
-
- this.insert(toRange.start, text);
-
- return toRange;
- };
-
- this.indentRows = function(startRow, endRow, indentString) {
- indentString = indentString.replace(/\t/g, this.getTabString());
- for (var row=startRow; row<=endRow; row++)
- this.insert({row: row, column:0}, indentString);
- };
-
- this.outdentRows = function (range) {
- var rowRange = range.collapseRows();
- var deleteRange = new Range(0, 0, 0, 0);
- var size = this.getTabSize();
-
- for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {
- var line = this.getLine(i);
-
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- for (var j = 0; j < size; ++j)
- if (line.charAt(j) != ' ')
- break;
- if (j < size && line.charAt(j) == '\t') {
- deleteRange.start.column = j;
- deleteRange.end.column = j + 1;
- } else {
- deleteRange.start.column = 0;
- deleteRange.end.column = j;
- }
- this.remove(deleteRange);
- }
- };
-
- this.moveLinesUp = function(firstRow, lastRow) {
- if (firstRow <= 0) return 0;
-
- var removed = this.doc.removeLines(firstRow, lastRow);
- this.doc.insertLines(firstRow - 1, removed);
- return -1;
- };
-
- this.moveLinesDown = function(firstRow, lastRow) {
- if (lastRow >= this.doc.getLength()-1) return 0;
-
- var removed = this.doc.removeLines(firstRow, lastRow);
- this.doc.insertLines(firstRow+1, removed);
- return 1;
- };
-
- this.duplicateLines = function(firstRow, lastRow) {
- var firstRow = this.$clipRowToDocument(firstRow);
- var lastRow = this.$clipRowToDocument(lastRow);
-
- var lines = this.getLines(firstRow, lastRow);
- this.doc.insertLines(firstRow, lines);
-
- var addedRows = lastRow - firstRow + 1;
- return addedRows;
- };
-
- this.$clipRowToDocument = function(row) {
- return Math.max(0, Math.min(row, this.doc.getLength()-1));
- };
-
- this.$clipColumnToRow = function(row, column) {
- if (column < 0)
- return 0;
- return Math.min(this.doc.getLine(row).length, column);
- };
-
- this.$clipPositionToDocument = function(row, column) {
- column = Math.max(0, column);
-
- if (row < 0) {
- row = 0;
- column = 0;
- } else {
- var len = this.doc.getLength();
- if (row >= len) {
- row = len - 1;
- column = this.doc.getLine(len-1).length;
- } else {
- column = Math.min(this.doc.getLine(row).length, column);
- }
- }
-
- return {
- row: row,
- column: column
- };
- };
-
- this.$clipRangeToDocument = function(range) {
- if (range.start.row < 0) {
- range.start.row = 0;
- range.start.column = 0
- } else {
- range.start.column = this.$clipColumnToRow(
- range.start.row,
- range.start.column
- );
- }
-
- var len = this.doc.getLength() - 1;
- if (range.end.row > len) {
- range.end.row = len;
- range.end.column = this.doc.getLine(len).length;
- } else {
- range.end.column = this.$clipColumnToRow(
- range.end.row,
- range.end.column
- );
- }
- return range;
- };
-
- // WRAPMODE
- this.$wrapLimit = 80;
- this.$useWrapMode = false;
- this.$wrapLimitRange = {
- min : null,
- max : null
- };
-
- this.setUseWrapMode = function(useWrapMode) {
- if (useWrapMode != this.$useWrapMode) {
- this.$useWrapMode = useWrapMode;
- this.$modified = true;
- this.$resetRowCache(0);
-
- // If wrapMode is activaed, the wrapData array has to be initialized.
- if (useWrapMode) {
- var len = this.getLength();
- this.$wrapData = [];
- for (var i = 0; i < len; i++) {
- this.$wrapData.push([]);
- }
- this.$updateWrapData(0, len - 1);
- }
-
- this._emit("changeWrapMode");
- }
- };
-
- this.getUseWrapMode = function() {
- return this.$useWrapMode;
- };
-
- // Allow the wrap limit to move freely between min and max. Either
- // parameter can be null to allow the wrap limit to be unconstrained
- // in that direction. Or set both parameters to the same number to pin
- // the limit to that value.
- this.setWrapLimitRange = function(min, max) {
- if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
- this.$wrapLimitRange.min = min;
- this.$wrapLimitRange.max = max;
- this.$modified = true;
- // This will force a recalculation of the wrap limit
- this._emit("changeWrapMode");
- }
- };
-
- // This should generally only be called by the renderer when a resize
- // is detected.
- this.adjustWrapLimit = function(desiredLimit) {
- var wrapLimit = this.$constrainWrapLimit(desiredLimit);
- if (wrapLimit != this.$wrapLimit && wrapLimit > 0) {
- this.$wrapLimit = wrapLimit;
- this.$modified = true;
- if (this.$useWrapMode) {
- this.$updateWrapData(0, this.getLength() - 1);
- this.$resetRowCache(0)
- this._emit("changeWrapLimit");
- }
- return true;
- }
- return false;
- };
-
- this.$constrainWrapLimit = function(wrapLimit) {
- var min = this.$wrapLimitRange.min;
- if (min)
- wrapLimit = Math.max(min, wrapLimit);
-
- var max = this.$wrapLimitRange.max;
- if (max)
- wrapLimit = Math.min(max, wrapLimit);
-
- // What would a limit of 0 even mean?
- return Math.max(1, wrapLimit);
- };
-
- this.getWrapLimit = function() {
- return this.$wrapLimit;
- };
-
- this.getWrapLimitRange = function() {
- // Avoid unexpected mutation by returning a copy
- return {
- min : this.$wrapLimitRange.min,
- max : this.$wrapLimitRange.max
- };
- };
-
- this.$updateInternalDataOnChange = function(e) {
- var useWrapMode = this.$useWrapMode;
- var len;
- var action = e.data.action;
- var firstRow = e.data.range.start.row;
- var lastRow = e.data.range.end.row;
- var start = e.data.range.start;
- var end = e.data.range.end;
- var removedFolds = null;
-
- if (action.indexOf("Lines") != -1) {
- if (action == "insertLines") {
- lastRow = firstRow + (e.data.lines.length);
- } else {
- lastRow = firstRow;
- }
- len = e.data.lines ? e.data.lines.length : lastRow - firstRow;
- } else {
- len = lastRow - firstRow;
- }
-
- if (len != 0) {
- if (action.indexOf("remove") != -1) {
- useWrapMode && this.$wrapData.splice(firstRow, len);
-
- var foldLines = this.$foldData;
- removedFolds = this.getFoldsInRange(e.data.range);
- this.removeFolds(removedFolds);
-
- var foldLine = this.getFoldLine(end.row);
- var idx = 0;
- if (foldLine) {
- foldLine.addRemoveChars(end.row, end.column, start.column - end.column);
- foldLine.shiftRow(-len);
-
- var foldLineBefore = this.getFoldLine(firstRow);
- if (foldLineBefore && foldLineBefore !== foldLine) {
- foldLineBefore.merge(foldLine);
- foldLine = foldLineBefore;
- }
- idx = foldLines.indexOf(foldLine) + 1;
- }
-
- for (idx; idx < foldLines.length; idx++) {
- var foldLine = foldLines[idx];
- if (foldLine.start.row >= end.row) {
- foldLine.shiftRow(-len);
- }
- }
-
- lastRow = firstRow;
- } else {
- var args;
- if (useWrapMode) {
- args = [firstRow, 0];
- for (var i = 0; i < len; i++) args.push([]);
- this.$wrapData.splice.apply(this.$wrapData, args);
- }
-
- // If some new line is added inside of a foldLine, then split
- // the fold line up.
- var foldLines = this.$foldData;
- var foldLine = this.getFoldLine(firstRow);
- var idx = 0;
- if (foldLine) {
- var cmp = foldLine.range.compareInside(start.row, start.column)
- // Inside of the foldLine range. Need to split stuff up.
- if (cmp == 0) {
- foldLine = foldLine.split(start.row, start.column);
- foldLine.shiftRow(len);
- foldLine.addRemoveChars(
- lastRow, 0, end.column - start.column);
- } else
- // Infront of the foldLine but same row. Need to shift column.
- if (cmp == -1) {
- foldLine.addRemoveChars(firstRow, 0, end.column - start.column);
- foldLine.shiftRow(len);
- }
- // Nothing to do if the insert is after the foldLine.
- idx = foldLines.indexOf(foldLine) + 1;
- }
-
- for (idx; idx < foldLines.length; idx++) {
- var foldLine = foldLines[idx];
- if (foldLine.start.row >= firstRow) {
- foldLine.shiftRow(len);
- }
- }
- }
- } else {
- // Realign folds. E.g. if you add some new chars before a fold, the
- // fold should "move" to the right.
- len = Math.abs(e.data.range.start.column - e.data.range.end.column);
- if (action.indexOf("remove") != -1) {
- // Get all the folds in the change range and remove them.
- removedFolds = this.getFoldsInRange(e.data.range);
- this.removeFolds(removedFolds);
-
- len = -len;
- }
- var foldLine = this.getFoldLine(firstRow);
- if (foldLine) {
- foldLine.addRemoveChars(firstRow, start.column, len);
- }
- }
-
- if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {
- console.error("doc.getLength() and $wrapData.length have to be the same!");
- }
-
- useWrapMode && this.$updateWrapData(firstRow, lastRow);
-
- return removedFolds;
- };
-
- this.$updateWrapData = function(firstRow, lastRow) {
- var lines = this.doc.getAllLines();
- var tabSize = this.getTabSize();
- var wrapData = this.$wrapData;
- var wrapLimit = this.$wrapLimit;
- var tokens;
- var foldLine;
-
- var row = firstRow;
- lastRow = Math.min(lastRow, lines.length - 1);
- while (row <= lastRow) {
- foldLine = this.getFoldLine(row, foldLine);
- if (!foldLine) {
- tokens = this.$getDisplayTokens(lang.stringTrimRight(lines[row]));
- wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
- row ++;
- } else {
- tokens = [];
- foldLine.walk(
- function(placeholder, row, column, lastColumn) {
- var walkTokens;
- if (placeholder) {
- walkTokens = this.$getDisplayTokens(
- placeholder, tokens.length);
- walkTokens[0] = PLACEHOLDER_START;
- for (var i = 1; i < walkTokens.length; i++) {
- walkTokens[i] = PLACEHOLDER_BODY;
- }
- } else {
- walkTokens = this.$getDisplayTokens(
- lines[row].substring(lastColumn, column),
- tokens.length);
- }
- tokens = tokens.concat(walkTokens);
- }.bind(this),
- foldLine.end.row,
- lines[foldLine.end.row].length + 1
- );
- // Remove spaces/tabs from the back of the token array.
- while (tokens.length != 0 && tokens[tokens.length - 1] >= SPACE)
- tokens.pop();
-
- wrapData[foldLine.start.row]
- = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
- row = foldLine.end.row + 1;
- }
- }
- };
-
- // "Tokens"
- var CHAR = 1,
- CHAR_EXT = 2,
- PLACEHOLDER_START = 3,
- PLACEHOLDER_BODY = 4,
- PUNCTUATION = 9,
- SPACE = 10,
- TAB = 11,
- TAB_SPACE = 12;
-
- this.$computeWrapSplits = function(tokens, wrapLimit) {
- if (tokens.length == 0) {
- return [];
- }
-
- var splits = [];
- var displayLength = tokens.length;
- var lastSplit = 0, lastDocSplit = 0;
-
- function addSplit(screenPos) {
- var displayed = tokens.slice(lastSplit, screenPos);
-
- // The document size is the current size - the extra width for tabs
- // and multipleWidth characters.
- var len = displayed.length;
- displayed.join("").
- // Get all the TAB_SPACEs.
- replace(/12/g, function() {
- len -= 1;
- }).
- // Get all the CHAR_EXT/multipleWidth characters.
- replace(/2/g, function() {
- len -= 1;
- });
-
- lastDocSplit += len;
- splits.push(lastDocSplit);
- lastSplit = screenPos;
- }
-
- while (displayLength - lastSplit > wrapLimit) {
- // This is, where the split should be.
- var split = lastSplit + wrapLimit;
-
- // If there is a space or tab at this split position, then making
- // a split is simple.
- if (tokens[split] >= SPACE) {
- // Include all following spaces + tabs in this split as well.
- while (tokens[split] >= SPACE) {
- split ++;
- }
- addSplit(split);
- continue;
- }
-
- // === ELSE ===
- // Check if split is inside of a placeholder. Placeholder are
- // not splitable. Therefore, seek the beginning of the placeholder
- // and try to place the split beofre the placeholder's start.
- if (tokens[split] == PLACEHOLDER_START
- || tokens[split] == PLACEHOLDER_BODY)
- {
- // Seek the start of the placeholder and do the split
- // before the placeholder. By definition there always
- // a PLACEHOLDER_START between split and lastSplit.
- for (split; split != lastSplit - 1; split--) {
- if (tokens[split] == PLACEHOLDER_START) {
- // split++; << No incremental here as we want to
- // have the position before the Placeholder.
- break;
- }
- }
-
- // If the PLACEHOLDER_START is not the index of the
- // last split, then we can do the split
- if (split > lastSplit) {
- addSplit(split);
- continue;
- }
-
- // If the PLACEHOLDER_START IS the index of the last
- // split, then we have to place the split after the
- // placeholder. So, let's seek for the end of the placeholder.
- split = lastSplit + wrapLimit;
- for (split; split < tokens.length; split++) {
- if (tokens[split] != PLACEHOLDER_BODY)
- {
- break;
- }
- }
-
- // If spilt == tokens.length, then the placeholder is the last
- // thing in the line and adding a new split doesn't make sense.
- if (split == tokens.length) {
- break; // Breaks the while-loop.
- }
-
- // Finally, add the split...
- addSplit(split);
- continue;
- }
-
- // === ELSE ===
- // Search for the first non space/tab/placeholder/punctuation token backwards.
- var minSplit = Math.max(split - 10, lastSplit - 1);
- while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
- split --;
- }
- while (split > minSplit && tokens[split] == PUNCTUATION) {
- split --;
- }
- // If we found one, then add the split.
- if (split > minSplit) {
- addSplit(++split);
- continue;
- }
-
- // === ELSE ===
- split = lastSplit + wrapLimit;
- // The split is inside of a CHAR or CHAR_EXT token and no space
- // around -> force a split.
- addSplit(split);
- }
- return splits;
- }
-
- /**
- * @param
- * offset: The offset in screenColumn at which position str starts.
- * Important for calculating the realTabSize.
- */
- this.$getDisplayTokens = function(str, offset) {
- var arr = [];
- var tabSize;
- offset = offset || 0;
-
- for (var i = 0; i < str.length; i++) {
- var c = str.charCodeAt(i);
- // Tab
- if (c == 9) {
- tabSize = this.getScreenTabSize(arr.length + offset);
- arr.push(TAB);
- for (var n = 1; n < tabSize; n++) {
- arr.push(TAB_SPACE);
- }
- }
- // Space
- else if (c == 32) {
- arr.push(SPACE);
- } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {
- arr.push(PUNCTUATION);
- }
- // full width characters
- else if (c >= 0x1100 && isFullWidth(c)) {
- arr.push(CHAR, CHAR_EXT);
- } else {
- arr.push(CHAR);
- }
- }
- return arr;
- }
-
- /**
- * Calculates the width of the a string on the screen while assuming that
- * the string starts at the first column on the screen.
- *
- * @param string str String to calculate the screen width of
- * @return array
- * [0]: number of columns for str on screen.
- * [1]: docColumn position that was read until (useful with screenColumn)
- */
- this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
- if (maxScreenColumn == 0) {
- return [0, 0];
- }
- if (maxScreenColumn == null) {
- maxScreenColumn = screenColumn +
- str.length * Math.max(this.getTabSize(), 2);
- }
- screenColumn = screenColumn || 0;
-
- var c, column;
- for (column = 0; column < str.length; column++) {
- c = str.charCodeAt(column);
- // tab
- if (c == 9) {
- screenColumn += this.getScreenTabSize(screenColumn);
- }
- // full width characters
- else if (c >= 0x1100 && isFullWidth(c)) {
- screenColumn += 2;
- } else {
- screenColumn += 1;
- }
- if (screenColumn > maxScreenColumn) {
- break
- }
- }
-
- return [screenColumn, column];
- }
-
- /**
- * Returns the number of rows required to render this row on the screen
- */
- this.getRowLength = function(row) {
- if (!this.$useWrapMode || !this.$wrapData[row]) {
- return 1;
- } else {
- return this.$wrapData[row].length + 1;
- }
- }
-
- /**
- * Returns the height in pixels required to render this row on the screen
- **/
- this.getRowHeight = function(config, row) {
- return this.getRowLength(row) * config.lineHeight;
- }
-
- this.getScreenLastRowColumn = function(screenRow) {
- //return this.screenToDocumentColumn(screenRow, Number.MAX_VALUE / 10)
- return this.documentToScreenColumn(screenRow, this.doc.getLine(screenRow).length);
- };
-
- this.getDocumentLastRowColumn = function(docRow, docColumn) {
- var screenRow = this.documentToScreenRow(docRow, docColumn);
- return this.getScreenLastRowColumn(screenRow);
- };
-
- this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {
- var screenRow = this.documentToScreenRow(docRow, docColumn);
- return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);
- };
-
- this.getRowSplitData = function(row) {
- if (!this.$useWrapMode) {
- return undefined;
- } else {
- return this.$wrapData[row];
- }
- };
-
- /**
- * Returns the width of a tab character at screenColumn.
- */
- this.getScreenTabSize = function(screenColumn) {
- return this.$tabSize - screenColumn % this.$tabSize;
- };
-
- this.screenToDocumentRow = function(screenRow, screenColumn) {
- return this.screenToDocumentPosition(screenRow, screenColumn).row;
- };
-
- this.screenToDocumentColumn = function(screenRow, screenColumn) {
- return this.screenToDocumentPosition(screenRow, screenColumn).column;
- };
-
- this.screenToDocumentPosition = function(screenRow, screenColumn) {
- if (screenRow < 0) {
- return {
- row: 0,
- column: 0
- }
- }
-
- var line;
- var docRow = 0;
- var docColumn = 0;
- var column;
- var row = 0;
- var rowLength = 0;
-
- var rowCache = this.$rowCache;
- for (var i = 0; i < rowCache.length; i++) {
- if (rowCache[i].screenRow < screenRow) {
- row = rowCache[i].screenRow;
- docRow = rowCache[i].docRow;
- }
- else {
- break;
- }
- }
- var doCache = !rowCache.length || i == rowCache.length;
-
- var maxRow = this.getLength() - 1;
- var foldLine = this.getNextFoldLine(docRow);
- var foldStart = foldLine ? foldLine.start.row : Infinity;
-
- while (row <= screenRow) {
- rowLength = this.getRowLength(docRow);
- if (row + rowLength - 1 >= screenRow || docRow >= maxRow) {
- break;
- } else {
- row += rowLength;
- docRow++;
- if (docRow > foldStart) {
- docRow = foldLine.end.row+1;
- foldLine = this.getNextFoldLine(docRow, foldLine);
- foldStart = foldLine ? foldLine.start.row : Infinity;
- }
- }
- if (doCache) {
- rowCache.push({
- docRow: docRow,
- screenRow: row
- });
- }
- }
-
- if (foldLine && foldLine.start.row <= docRow) {
- line = this.getFoldDisplayLine(foldLine);
- docRow = foldLine.start.row;
- } else if (row + rowLength <= screenRow || docRow > maxRow) {
- // clip at the end of the document
- return {
- row: maxRow,
- column: this.getLine(maxRow).length
- }
- } else {
- line = this.getLine(docRow);
- foldLine = null;
- }
-
- if (this.$useWrapMode) {
- var splits = this.$wrapData[docRow];
- if (splits) {
- column = splits[screenRow - row];
- if(screenRow > row && splits.length) {
- docColumn = splits[screenRow - row - 1] || splits[splits.length - 1];
- line = line.substring(docColumn);
- }
- }
- }
-
- docColumn += this.$getStringScreenWidth(line, screenColumn)[1];
-
- // Need to do some clamping action here.
- if (this.$useWrapMode) {
- if (docColumn >= column) {
- // We remove one character at the end such that the docColumn
- // position returned is not associated to the next row on the
- // screen.
- docColumn = column - 1;
- }
- } else {
- docColumn = Math.min(docColumn, line.length);
- }
-
- if (foldLine) {
- return foldLine.idxToPosition(docColumn);
- }
-
- return {
- row: docRow,
- column: docColumn
- }
- };
-
- this.documentToScreenPosition = function(docRow, docColumn) {
- // Normalize the passed in arguments.
- if (typeof docColumn === "undefined")
- var pos = this.$clipPositionToDocument(docRow.row, docRow.column);
- else
- pos = this.$clipPositionToDocument(docRow, docColumn);
-
- docRow = pos.row;
- docColumn = pos.column;
-
- var wrapData;
- // Special case in wrapMode if the doc is at the end of the document.
- if (this.$useWrapMode) {
- wrapData = this.$wrapData;
- if (docRow > wrapData.length - 1) {
- return {
- row: this.getScreenLength(),
- column: wrapData.length == 0
- ? 0
- : (wrapData[wrapData.length - 1].length - 1)
- };
- }
- }
-
- var screenRow = 0;
- var foldStartRow = null;
- var fold = null;
-
- // Clamp the docRow position in case it's inside of a folded block.
- fold = this.getFoldAt(docRow, docColumn, 1);
- if (fold) {
- docRow = fold.start.row;
- docColumn = fold.start.column;
- }
-
- var rowEnd, row = 0;
- var rowCache = this.$rowCache;
-
- for (var i = 0; i < rowCache.length; i++) {
- if (rowCache[i].docRow < docRow) {
- screenRow = rowCache[i].screenRow;
- row = rowCache[i].docRow;
- } else {
- break;
- }
- }
- var doCache = !rowCache.length || i == rowCache.length;
-
- var foldLine = this.getNextFoldLine(row);
- var foldStart = foldLine ?foldLine.start.row :Infinity;
-
- while (row < docRow) {
- if (row >= foldStart) {
- rowEnd = foldLine.end.row + 1;
- if (rowEnd > docRow)
- break;
- foldLine = this.getNextFoldLine(rowEnd, foldLine);
- foldStart = foldLine ?foldLine.start.row :Infinity;
- }
- else {
- rowEnd = row + 1;
- }
-
- screenRow += this.getRowLength(row);
- row = rowEnd;
-
- if (doCache) {
- rowCache.push({
- docRow: row,
- screenRow: screenRow
- });
- }
- }
-
- // Calculate the text line that is displayed in docRow on the screen.
- var textLine = "";
- // Check if the final row we want to reach is inside of a fold.
- if (foldLine && row >= foldStart) {
- textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);
- foldStartRow = foldLine.start.row;
- } else {
- textLine = this.getLine(docRow).substring(0, docColumn);
- foldStartRow = docRow;
- }
- // Clamp textLine if in wrapMode.
- if (this.$useWrapMode) {
- var wrapRow = wrapData[foldStartRow];
- var screenRowOffset = 0;
- while (textLine.length >= wrapRow[screenRowOffset]) {
- screenRow ++;
- screenRowOffset++;
- }
- textLine = textLine.substring(
- wrapRow[screenRowOffset - 1] || 0, textLine.length
- );
- }
-
- return {
- row: screenRow,
- column: this.$getStringScreenWidth(textLine)[0]
- };
- };
-
- this.documentToScreenColumn = function(row, docColumn) {
- return this.documentToScreenPosition(row, docColumn).column;
- };
-
- this.documentToScreenRow = function(docRow, docColumn) {
- return this.documentToScreenPosition(docRow, docColumn).row;
- };
-
- this.getScreenLength = function() {
- var screenRows = 0;
- var fold = null;
- if (!this.$useWrapMode) {
- screenRows = this.getLength();
-
- // Remove the folded lines again.
- var foldData = this.$foldData;
- for (var i = 0; i < foldData.length; i++) {
- fold = foldData[i];
- screenRows -= fold.end.row - fold.start.row;
- }
- } else {
- var lastRow = this.$wrapData.length;
- var row = 0, i = 0;
- var fold = this.$foldData[i++];
- var foldStart = fold ? fold.start.row :Infinity;
-
- while (row < lastRow) {
- screenRows += this.$wrapData[row].length + 1;
- row ++;
- if (row > foldStart) {
- row = fold.end.row+1;
- fold = this.$foldData[i++];
- foldStart = fold ?fold.start.row :Infinity;
- }
- }
- }
-
- return screenRows;
- }
-
- // For every keystroke this gets called once per char in the whole doc!!
- // Wouldn't hurt to make it a bit faster for c >= 0x1100
- function isFullWidth(c) {
- if (c < 0x1100)
- return false;
- return c >= 0x1100 && c <= 0x115F ||
- c >= 0x11A3 && c <= 0x11A7 ||
- c >= 0x11FA && c <= 0x11FF ||
- c >= 0x2329 && c <= 0x232A ||
- c >= 0x2E80 && c <= 0x2E99 ||
- c >= 0x2E9B && c <= 0x2EF3 ||
- c >= 0x2F00 && c <= 0x2FD5 ||
- c >= 0x2FF0 && c <= 0x2FFB ||
- c >= 0x3000 && c <= 0x303E ||
- c >= 0x3041 && c <= 0x3096 ||
- c >= 0x3099 && c <= 0x30FF ||
- c >= 0x3105 && c <= 0x312D ||
- c >= 0x3131 && c <= 0x318E ||
- c >= 0x3190 && c <= 0x31BA ||
- c >= 0x31C0 && c <= 0x31E3 ||
- c >= 0x31F0 && c <= 0x321E ||
- c >= 0x3220 && c <= 0x3247 ||
- c >= 0x3250 && c <= 0x32FE ||
- c >= 0x3300 && c <= 0x4DBF ||
- c >= 0x4E00 && c <= 0xA48C ||
- c >= 0xA490 && c <= 0xA4C6 ||
- c >= 0xA960 && c <= 0xA97C ||
- c >= 0xAC00 && c <= 0xD7A3 ||
- c >= 0xD7B0 && c <= 0xD7C6 ||
- c >= 0xD7CB && c <= 0xD7FB ||
- c >= 0xF900 && c <= 0xFAFF ||
- c >= 0xFE10 && c <= 0xFE19 ||
- c >= 0xFE30 && c <= 0xFE52 ||
- c >= 0xFE54 && c <= 0xFE66 ||
- c >= 0xFE68 && c <= 0xFE6B ||
- c >= 0xFF01 && c <= 0xFF60 ||
- c >= 0xFFE0 && c <= 0xFFE6;
- };
-
-}).call(EditSession.prototype);
-
-require("./edit_session/folding").Folding.call(EditSession.prototype);
-require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype);
-
-exports.EditSession = EditSession;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/selection', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var lang = require("./lib/lang");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Range = require("./range").Range;
-
-/**
- * Keeps cursor position and the text selection of an edit session.
- *
- * The row/columns used in the selection are in document coordinates
- * representing ths coordinates as thez appear in the document
- * before applying soft wrap and folding.
- */
-var Selection = function(session) {
- this.session = session;
- this.doc = session.getDocument();
-
- this.clearSelection();
- this.selectionLead = this.doc.createAnchor(0, 0);
- this.selectionAnchor = this.doc.createAnchor(0, 0);
-
- var _self = this;
- this.selectionLead.on("change", function(e) {
- _self._emit("changeCursor");
- if (!_self.$isEmpty)
- _self._emit("changeSelection");
- if (!_self.$preventUpdateDesiredColumnOnChange && e.old.column != e.value.column)
- _self.$updateDesiredColumn();
- });
-
- this.selectionAnchor.on("change", function() {
- if (!_self.$isEmpty)
- _self._emit("changeSelection");
- });
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.isEmpty = function() {
- return (this.$isEmpty || (
- this.selectionAnchor.row == this.selectionLead.row &&
- this.selectionAnchor.column == this.selectionLead.column
- ));
- };
-
- this.isMultiLine = function() {
- if (this.isEmpty()) {
- return false;
- }
-
- return this.getRange().isMultiLine();
- };
-
- this.getCursor = function() {
- return this.selectionLead.getPosition();
- };
-
- this.setSelectionAnchor = function(row, column) {
- this.selectionAnchor.setPosition(row, column);
-
- if (this.$isEmpty) {
- this.$isEmpty = false;
- this._emit("changeSelection");
- }
- };
-
- this.getSelectionAnchor = function() {
- if (this.$isEmpty)
- return this.getSelectionLead()
- else
- return this.selectionAnchor.getPosition();
- };
-
- this.getSelectionLead = function() {
- return this.selectionLead.getPosition();
- };
-
- this.shiftSelection = function(columns) {
- if (this.$isEmpty) {
- this.moveCursorTo(this.selectionLead.row, this.selectionLead.column + columns);
- return;
- };
-
- var anchor = this.getSelectionAnchor();
- var lead = this.getSelectionLead();
-
- var isBackwards = this.isBackwards();
-
- if (!isBackwards || anchor.column !== 0)
- this.setSelectionAnchor(anchor.row, anchor.column + columns);
-
- if (isBackwards || lead.column !== 0) {
- this.$moveSelection(function() {
- this.moveCursorTo(lead.row, lead.column + columns);
- });
- }
- };
-
- this.isBackwards = function() {
- var anchor = this.selectionAnchor;
- var lead = this.selectionLead;
- return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));
- };
-
- this.getRange = function() {
- var anchor = this.selectionAnchor;
- var lead = this.selectionLead;
-
- if (this.isEmpty())
- return Range.fromPoints(lead, lead);
-
- if (this.isBackwards()) {
- return Range.fromPoints(lead, anchor);
- }
- else {
- return Range.fromPoints(anchor, lead);
- }
- };
-
- this.clearSelection = function() {
- if (!this.$isEmpty) {
- this.$isEmpty = true;
- this._emit("changeSelection");
- }
- };
-
- this.selectAll = function() {
- var lastRow = this.doc.getLength() - 1;
- this.setSelectionAnchor(lastRow, this.doc.getLine(lastRow).length);
- this.moveCursorTo(0, 0);
- };
-
- this.setSelectionRange = function(range, reverse) {
- if (reverse) {
- this.setSelectionAnchor(range.end.row, range.end.column);
- this.selectTo(range.start.row, range.start.column);
- } else {
- this.setSelectionAnchor(range.start.row, range.start.column);
- this.selectTo(range.end.row, range.end.column);
- }
- this.$updateDesiredColumn();
- };
-
- this.$updateDesiredColumn = function() {
- var cursor = this.getCursor();
- this.$desiredColumn = this.session.documentToScreenColumn(cursor.row, cursor.column);
- };
-
- this.$moveSelection = function(mover) {
- var lead = this.selectionLead;
- if (this.$isEmpty)
- this.setSelectionAnchor(lead.row, lead.column);
-
- mover.call(this);
- };
-
- this.selectTo = function(row, column) {
- this.$moveSelection(function() {
- this.moveCursorTo(row, column);
- });
- };
-
- this.selectToPosition = function(pos) {
- this.$moveSelection(function() {
- this.moveCursorToPosition(pos);
- });
- };
-
- this.selectUp = function() {
- this.$moveSelection(this.moveCursorUp);
- };
-
- this.selectDown = function() {
- this.$moveSelection(this.moveCursorDown);
- };
-
- this.selectRight = function() {
- this.$moveSelection(this.moveCursorRight);
- };
-
- this.selectLeft = function() {
- this.$moveSelection(this.moveCursorLeft);
- };
-
- this.selectLineStart = function() {
- this.$moveSelection(this.moveCursorLineStart);
- };
-
- this.selectLineEnd = function() {
- this.$moveSelection(this.moveCursorLineEnd);
- };
-
- this.selectFileEnd = function() {
- this.$moveSelection(this.moveCursorFileEnd);
- };
-
- this.selectFileStart = function() {
- this.$moveSelection(this.moveCursorFileStart);
- };
-
- this.selectWordRight = function() {
- this.$moveSelection(this.moveCursorWordRight);
- };
-
- this.selectWordLeft = function() {
- this.$moveSelection(this.moveCursorWordLeft);
- };
-
- this.selectWord = function() {
- var cursor = this.getCursor();
- var range = this.session.getWordRange(cursor.row, cursor.column);
- this.setSelectionRange(range);
- };
-
- // Selects a word including its right whitespace
- this.selectAWord = function() {
- var cursor = this.getCursor();
- var range = this.session.getAWordRange(cursor.row, cursor.column);
- this.setSelectionRange(range);
- };
-
- this.selectLine = function() {
- var rowStart = this.selectionLead.row;
- var rowEnd;
-
- var foldLine = this.session.getFoldLine(rowStart);
- if (foldLine) {
- rowStart = foldLine.start.row;
- rowEnd = foldLine.end.row;
- } else {
- rowEnd = rowStart;
- }
- this.setSelectionAnchor(rowStart, 0);
- this.$moveSelection(function() {
- this.moveCursorTo(rowEnd + 1, 0);
- });
- };
-
- this.moveCursorUp = function() {
- this.moveCursorBy(-1, 0);
- };
-
- this.moveCursorDown = function() {
- this.moveCursorBy(1, 0);
- };
-
- this.moveCursorLeft = function() {
- var cursor = this.selectionLead.getPosition(),
- fold;
-
- if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {
- this.moveCursorTo(fold.start.row, fold.start.column);
- } else if (cursor.column == 0) {
- // cursor is a line (start
- if (cursor.row > 0) {
- this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);
- }
- }
- else {
- var tabSize = this.session.getTabSize();
- if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize)
- this.moveCursorBy(0, -tabSize);
- else
- this.moveCursorBy(0, -1);
- }
- };
-
- this.moveCursorRight = function() {
- var cursor = this.selectionLead.getPosition(),
- fold;
- if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {
- this.moveCursorTo(fold.end.row, fold.end.column);
- }
- else if (this.selectionLead.column == this.doc.getLine(this.selectionLead.row).length) {
- if (this.selectionLead.row < this.doc.getLength() - 1) {
- this.moveCursorTo(this.selectionLead.row + 1, 0);
- }
- }
- else {
- var tabSize = this.session.getTabSize();
- var cursor = this.selectionLead;
- if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize)
- this.moveCursorBy(0, tabSize);
- else
- this.moveCursorBy(0, 1);
- }
- };
-
- this.moveCursorLineStart = function() {
- var row = this.selectionLead.row;
- var column = this.selectionLead.column;
- var screenRow = this.session.documentToScreenRow(row, column);
-
- // Determ the doc-position of the first character at the screen line.
- var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);
-
- // Determ the line
- var beforeCursor = this.session.getDisplayLine(
- row, null,
- firstColumnPosition.row, firstColumnPosition.column
- );
-
- var leadingSpace = beforeCursor.match(/^\s*/);
- if (leadingSpace[0].length == column) {
- this.moveCursorTo(
- firstColumnPosition.row, firstColumnPosition.column
- );
- }
- else {
- this.moveCursorTo(
- firstColumnPosition.row,
- firstColumnPosition.column + leadingSpace[0].length
- );
- }
- };
-
- this.moveCursorLineEnd = function() {
- var lead = this.selectionLead;
- var lastRowColumnPosition =
- this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);
- this.moveCursorTo(
- lastRowColumnPosition.row,
- lastRowColumnPosition.column
- );
- };
-
- this.moveCursorFileEnd = function() {
- var row = this.doc.getLength() - 1;
- var column = this.doc.getLine(row).length;
- this.moveCursorTo(row, column);
- };
-
- this.moveCursorFileStart = function() {
- this.moveCursorTo(0, 0);
- };
-
- this.moveCursorWordRight = function() {
- var row = this.selectionLead.row;
- var column = this.selectionLead.column;
- var line = this.doc.getLine(row);
- var rightOfCursor = line.substring(column);
-
- var match;
- this.session.nonTokenRe.lastIndex = 0;
- this.session.tokenRe.lastIndex = 0;
-
- // skip folds
- var fold = this.session.getFoldAt(row, column, 1);
- if (fold) {
- this.moveCursorTo(fold.end.row, fold.end.column);
- return;
- }
-
- // first skip space
- if (match = this.session.nonTokenRe.exec(rightOfCursor)) {
- column += this.session.nonTokenRe.lastIndex;
- this.session.nonTokenRe.lastIndex = 0;
- rightOfCursor = line.substring(column);
- }
-
- // if at line end proceed with next line
- if (column >= line.length) {
- this.moveCursorTo(row, line.length);
- this.moveCursorRight();
- if (row < this.doc.getLength() - 1)
- this.moveCursorWordRight();
- return;
- }
-
- // advance to the end of the next token
- if (match = this.session.tokenRe.exec(rightOfCursor)) {
- column += this.session.tokenRe.lastIndex;
- this.session.tokenRe.lastIndex = 0;
- }
-
- this.moveCursorTo(row, column);
- };
-
- this.moveCursorWordLeft = function() {
- var row = this.selectionLead.row;
- var column = this.selectionLead.column;
-
- // skip folds
- var fold;
- if (fold = this.session.getFoldAt(row, column, -1)) {
- this.moveCursorTo(fold.start.row, fold.start.column);
- return;
- }
-
- var str = this.session.getFoldStringAt(row, column, -1);
- if (str == null) {
- str = this.doc.getLine(row).substring(0, column)
- }
-
- var leftOfCursor = lang.stringReverse(str);
- var match;
- this.session.nonTokenRe.lastIndex = 0;
- this.session.tokenRe.lastIndex = 0;
-
- // skip whitespace
- if (match = this.session.nonTokenRe.exec(leftOfCursor)) {
- column -= this.session.nonTokenRe.lastIndex;
- leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);
- this.session.nonTokenRe.lastIndex = 0;
- }
-
- // if at begin of the line proceed in line above
- if (column <= 0) {
- this.moveCursorTo(row, 0);
- this.moveCursorLeft();
- if (row > 0)
- this.moveCursorWordLeft();
- return;
- }
-
- // move to the begin of the word
- if (match = this.session.tokenRe.exec(leftOfCursor)) {
- column -= this.session.tokenRe.lastIndex;
- this.session.tokenRe.lastIndex = 0;
- }
-
- this.moveCursorTo(row, column);
- };
-
- this.moveCursorBy = function(rows, chars) {
- var screenPos = this.session.documentToScreenPosition(
- this.selectionLead.row,
- this.selectionLead.column
- );
-
- var screenCol = (chars === 0 && this.$desiredColumn) || screenPos.column;
- var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenCol);
-
- // move the cursor and update the desired column
- this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);
- };
-
- this.moveCursorToPosition = function(position) {
- this.moveCursorTo(position.row, position.column);
- };
-
- this.moveCursorTo = function(row, column, preventUpdateDesiredColumn) {
- // Ensure the row/column is not inside of a fold.
- var fold = this.session.getFoldAt(row, column, 1);
- if (fold) {
- row = fold.start.row;
- column = fold.start.column;
- }
-
- this.$preventUpdateDesiredColumnOnChange = true;
- this.selectionLead.setPosition(row, column);
- this.$preventUpdateDesiredColumnOnChange = false;
-
- if (!preventUpdateDesiredColumn)
- this.$updateDesiredColumn(this.selectionLead.column);
- };
-
- this.moveCursorToScreen = function(row, column, preventUpdateDesiredColumn) {
- var pos = this.session.screenToDocumentPosition(row, column);
- row = pos.row;
- column = pos.column;
- this.moveCursorTo(row, column, preventUpdateDesiredColumn);
- };
-
-}).call(Selection.prototype);
-
-exports.Selection = Selection;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEequal = function(range) {
- return this.start.row == range.start.row &&
- this.end.row == range.end.row &&
- this.start.column == range.start.column &&
- this.end.column == range.end.column
- };
-
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
-
- /**
- * Compares this range (A) with another range (B), where B is the passed in
- * range.
- *
- * Return values:
- * -2: (B) is infront of (A) and doesn't intersect with (A)
- * -1: (B) begins before (A) but ends inside of (A)
- * 0: (B) is completly inside of (A) OR (A) is complety inside of (B)
- * +1: (B) begins inside of (A) but ends outside of (A)
- * +2: (B) is after (A) and doesn't intersect with (A)
- *
- * 42: FTW state: (B) ends in (A) but starts outside of (A)
- */
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- }
-
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- }
-
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- }
-
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- }
-
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- }
-
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- }
-
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- }
-
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- }
-
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- }
-
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- }
-
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
-
- /**
- * Like .compare(), but if isStart is true, return -1;
- */
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- }
-
- /**
- * Like .compare(), but if isEnd is true, return 1;
- */
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- }
-
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- }
-
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow) {
- var end = {
- row: lastRow+1,
- column: 0
- };
- }
-
- if (this.start.row > lastRow) {
- var start = {
- row: lastRow+1,
- column: 0
- };
- }
-
- if (this.start.row < firstRow) {
- var start = {
- row: firstRow,
- column: 0
- };
- }
-
- if (this.end.row < firstRow) {
- var end = {
- row: firstRow,
- column: 0
- };
- }
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row == this.end.row && this.start.column == this.end.column);
- };
-
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
-
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
-
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
-
- this.toScreenRange = function(session) {
- var screenPosStart =
- session.documentToScreenPosition(this.start);
- var screenPosEnd =
- session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
-
-}).call(Range.prototype);
-
-
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-
-exports.Range = Range;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/text', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/behaviour', 'ace/unicode'], function(require, exports, module) {
-"use strict";
-
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Behaviour = require("./behaviour").Behaviour;
-var unicode = require("../unicode");
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
- this.$behaviour = new Behaviour();
-};
-
-(function() {
-
- this.tokenRe = new RegExp("^["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]+", "g"
- );
-
- this.nonTokenRe = new RegExp("^(?:[^"
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]|\s])+", "g"
- );
-
- this.getTokenizer = function() {
- return this.$tokenizer;
- };
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- return "";
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
- this.autoOutdent = function(state, doc, row) {
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
- this.createWorker = function(session) {
- return null;
- };
-
- this.highlightSelection = function(editor) {
- var session = editor.session;
- if (!session.$selectionOccurrences)
- session.$selectionOccurrences = [];
-
- if (session.$selectionOccurrences.length)
- this.clearSelectionHighlight(editor);
-
- var selection = editor.getSelectionRange();
- if (selection.isEmpty() || selection.isMultiLine())
- return;
-
- var startOuter = selection.start.column - 1;
- var endOuter = selection.end.column + 1;
- var line = session.getLine(selection.start.row);
- var lineCols = line.length;
- var needle = line.substring(Math.max(startOuter, 0),
- Math.min(endOuter, lineCols));
-
- // Make sure the outer characters are not part of the word.
- if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
- (endOuter <= lineCols && /[\w\d]$/.test(needle)))
- return;
-
- needle = line.substring(selection.start.column, selection.end.column);
- if (!/^[\w\d]+$/.test(needle))
- return;
-
- var cursor = editor.getCursorPosition();
-
- var newOptions = {
- wrap: true,
- wholeWord: true,
- caseSensitive: true,
- needle: needle
- };
-
- var currentOptions = editor.$search.getOptions();
- editor.$search.set(newOptions);
-
- var ranges = editor.$search.findAll(session);
- ranges.forEach(function(range) {
- if (!range.contains(cursor.row, cursor.column)) {
- var marker = session.addMarker(range, "ace_selected_word", "text");
- session.$selectionOccurrences.push(marker);
- }
- });
-
- editor.$search.set(currentOptions);
- };
-
- this.clearSelectionHighlight = function(editor) {
- if (!editor.session.$selectionOccurrences)
- return;
-
- editor.session.$selectionOccurrences.forEach(function(marker) {
- editor.session.removeMarker(marker);
- });
-
- editor.session.$selectionOccurrences = [];
- };
-
- this.createModeDelegates = function (mapping) {
- if (!this.$embeds) {
- return;
- }
- this.$modes = {};
- for (var i = 0; i < this.$embeds.length; i++) {
- if (mapping[this.$embeds[i]]) {
- this.$modes[this.$embeds[i]] = new mapping[this.$embeds[i]]();
- }
- }
-
- var delegations = ['toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction'];
-
- for (var i = 0; i < delegations.length; i++) {
- (function(scope) {
- var functionName = delegations[i];
- var defaultHandler = scope[functionName];
- scope[delegations[i]] = function() {
- return this.$delegator(functionName, arguments, defaultHandler);
- }
- } (this));
- }
- }
-
- this.$delegator = function(method, args, defaultHandler) {
- var state = args[0];
-
- for (var i = 0; i < this.$embeds.length; i++) {
- if (!this.$modes[this.$embeds[i]]) continue;
-
- var split = state.split(this.$embeds[i]);
- if (!split[0] && split[1]) {
- args[0] = split[1];
- var mode = this.$modes[this.$embeds[i]];
- return mode[method].apply(mode, args);
- }
- }
- var ret = defaultHandler.apply(this, args);
- return defaultHandler ? ret : undefined;
- };
-
- this.transformAction = function(state, action, editor, session, param) {
- if (this.$behaviour) {
- var behaviours = this.$behaviour.getBehaviours();
- for (var key in behaviours) {
- if (behaviours[key][action]) {
- var ret = behaviours[key][action].apply(this, arguments);
- if (ret) {
- return ret;
- }
- }
- }
- }
- }
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/tokenizer', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var Tokenizer = function(rules, flag) {
- flag = flag ? "g" + flag : "g";
- this.rules = rules;
-
- this.regExps = {};
- this.matchMappings = {};
- for ( var key in this.rules) {
- var rule = this.rules[key];
- var state = rule;
- var ruleRegExps = [];
- var matchTotal = 0;
- var mapping = this.matchMappings[key] = {};
-
- for ( var i = 0; i < state.length; i++) {
- // Count number of matching groups. 2 extra groups from the full match
- // And the catch-all on the end (used to force a match);
- var matchcount = new RegExp("(?:(" + state[i].regex + ")|(.))").exec("a").length - 2;
-
- // Replace any backreferences and offset appropriately.
- var adjustedregex = state[i].regex.replace(/\\([0-9]+)/g, function (match, digit) {
- return "\\" + (parseInt(digit, 10) + matchTotal + 1);
- });
-
- mapping[matchTotal] = {
- rule: i,
- len: matchcount
- };
- matchTotal += matchcount;
-
- ruleRegExps.push(adjustedregex);
- }
-
- this.regExps[key] = new RegExp("(?:(" + ruleRegExps.join(")|(") + ")|(.))", flag);
- }
-};
-
-(function() {
-
- this.getLineTokens = function(line, startState) {
- var currentState = startState;
- var state = this.rules[currentState];
- var mapping = this.matchMappings[currentState];
- var re = this.regExps[currentState];
- re.lastIndex = 0;
-
- var match, tokens = [];
-
- var lastIndex = 0;
-
- var token = {
- type: null,
- value: ""
- };
-
- while (match = re.exec(line)) {
- var type = "text";
- var rule = null;
- var value = [match[0]];
-
- for (var i = 0; i < match.length-2; i++) {
- if (match[i + 1] !== undefined) {
- rule = state[mapping[i].rule];
-
- if (mapping[i].len > 1) {
- value = match.slice(i+2, i+1+mapping[i].len);
- }
-
- // compute token type
- if (typeof rule.token == "function")
- type = rule.token.apply(this, value);
- else
- type = rule.token;
-
- var next = rule.next;
- if (next && next !== currentState) {
- currentState = next;
- state = this.rules[currentState];
- mapping = this.matchMappings[currentState];
- lastIndex = re.lastIndex;
-
- re = this.regExps[currentState];
- re.lastIndex = lastIndex;
- }
- break;
- }
- }
-
- if (value[0]) {
- if (typeof type == "string") {
- value = [value.join("")];
- type = [type];
- }
- for (var i = 0; i < value.length; i++) {
- if ((!rule || rule.merge || type[i] === "text") && token.type === type[i]) {
- token.value += value[i];
- } else {
- if (token.type) {
- tokens.push(token);
- }
-
- token = {
- type: type[i],
- value: value[i]
- };
- }
- }
- }
-
- if (lastIndex == line.length)
- break;
-
- lastIndex = re.lastIndex;
- }
-
- if (token.type)
- tokens.push(token);
-
- return {
- tokens : tokens,
- state : currentState
- };
- };
-
-}).call(Tokenizer.prototype);
-
-exports.Tokenizer = Tokenizer;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/text_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var TextHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [{
- token : "empty_line",
- regex : '^$'
- }, {
- token : "text",
- regex : ".+"
- }]
- };
-};
-
-(function() {
-
- this.addRules = function(rules, prefix) {
- for (var key in rules) {
- var state = rules[key];
- for (var i=0; i<state.length; i++) {
- var rule = state[i];
- if (rule.next) {
- rule.next = prefix + rule.next;
- } else {
- rule.next = prefix + key;
- }
- }
- this.$rules[prefix + key] = state;
- }
- };
-
- this.getRules = function() {
- return this.$rules;
- };
-
- this.embedRules = function (HighlightRules, prefix, escapeRules, states) {
- var embedRules = new HighlightRules().getRules();
- if (states) {
- for (var i = 0; i < states.length; i++) {
- states[i] = prefix + states[i];
- }
- } else {
- states = [];
- for (var key in embedRules) {
- states.push(prefix + key);
- }
- }
- this.addRules(embedRules, prefix);
-
- for (var i = 0; i < states.length; i++) {
- Array.prototype.unshift.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));
- }
-
- if (!this.$embeds) {
- this.$embeds = [];
- }
- this.$embeds.push(prefix);
- }
-
- this.getEmbeds = function() {
- return this.$embeds;
- }
-
-}).call(TextHighlightRules.prototype);
-
-exports.TextHighlightRules = TextHighlightRules;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var Behaviour = function() {
- this.$behaviours = {};
-};
-
-(function () {
-
- this.add = function (name, action, callback) {
- switch (undefined) {
- case this.$behaviours:
- this.$behaviours = {};
- case this.$behaviours[name]:
- this.$behaviours[name] = {};
- }
- this.$behaviours[name][action] = callback;
- }
-
- this.addBehaviours = function (behaviours) {
- for (var key in behaviours) {
- for (var action in behaviours[key]) {
- this.add(key, action, behaviours[key][action]);
- }
- }
- }
-
- this.remove = function (name) {
- if (this.$behaviours && this.$behaviours[name]) {
- delete this.$behaviours[name];
- }
- }
-
- this.inherit = function (mode, filter) {
- if (typeof mode === "function") {
- var behaviours = new mode().getBehaviours(filter);
- } else {
- var behaviours = mode.getBehaviours(filter);
- }
- this.addBehaviours(behaviours);
- }
-
- this.getBehaviours = function (filter) {
- if (!filter) {
- return this.$behaviours;
- } else {
- var ret = {}
- for (var i = 0; i < filter.length; i++) {
- if (this.$behaviours[filter[i]]) {
- ret[filter[i]] = this.$behaviours[filter[i]];
- }
- }
- return ret;
- }
- }
-
-}).call(Behaviour.prototype);
-
-exports.Behaviour = Behaviour;
-});ace.define('ace/unicode', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-/*
-XRegExp Unicode plugin pack: Categories 1.0
-(c) 2010 Steven Levithan
-MIT License
-<http://xregexp.com>
-Uses the Unicode 5.2 character database
-
-This package for the XRegExp Unicode plugin enables the following Unicode categories (aka properties):
-
-L - Letter (the top-level Letter category is included in the Unicode plugin base script)
- Ll - Lowercase letter
- Lu - Uppercase letter
- Lt - Titlecase letter
- Lm - Modifier letter
- Lo - Letter without case
-M - Mark
- Mn - Non-spacing mark
- Mc - Spacing combining mark
- Me - Enclosing mark
-N - Number
- Nd - Decimal digit
- Nl - Letter number
- No - Other number
-P - Punctuation
- Pd - Dash punctuation
- Ps - Open punctuation
- Pe - Close punctuation
- Pi - Initial punctuation
- Pf - Final punctuation
- Pc - Connector punctuation
- Po - Other punctuation
-S - Symbol
- Sm - Math symbol
- Sc - Currency symbol
- Sk - Modifier symbol
- So - Other symbol
-Z - Separator
- Zs - Space separator
- Zl - Line separator
- Zp - Paragraph separator
-C - Other
- Cc - Control
- Cf - Format
- Co - Private use
- Cs - Surrogate
- Cn - Unassigned
-
-Example usage:
-
- \p{N}
- \p{Cn}
-*/
-
-
-// will be populated by addUnicodePackage
-exports.packages = {};
-
-addUnicodePackage({
- L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
- Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",
- Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",
- Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",
- Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",
- Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
- M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",
- Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",
- Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",
- Me: "0488048906DE20DD-20E020E2-20E4A670-A672",
- N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
- Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
- Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",
- No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",
- P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",
- Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",
- Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",
- Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",
- Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",
- Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21",
- Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F",
- Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",
- S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",
- Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",
- Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",
- Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",
- So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",
- Z: "002000A01680180E2000-200A20282029202F205F3000",
- Zs: "002000A01680180E2000-200A202F205F3000",
- Zl: "2028",
- Zp: "2029",
- C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
- Cc: "0000-001F007F-009F",
- Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",
- Co: "E000-F8FF",
- Cs: "D800-DFFF",
- Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"
-});
-
-function addUnicodePackage (pack) {
- var codePoint = /\w{4}/g;
- for (var name in pack)
- exports.packages[name] = pack[name].replace(codePoint, "\\u$&");
-};
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Range = require("./range").Range;
-var Anchor = require("./anchor").Anchor;
-
-var Document = function(text) {
- this.$lines = [];
-
- if (Array.isArray(text)) {
- this.insertLines(0, text);
- }
- // There has to be one line at least in the document. If you pass an empty
- // string to the insert function, nothing will happen. Workaround.
- else if (text.length == 0) {
- this.$lines = [""];
- } else {
- this.insert({row: 0, column:0}, text);
- }
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.setValue = function(text) {
- var len = this.getLength();
- this.remove(new Range(0, 0, len, this.getLine(len-1).length));
- this.insert({row: 0, column:0}, text);
- };
-
- this.getValue = function() {
- return this.getAllLines().join(this.getNewLineCharacter());
- };
-
- this.createAnchor = function(row, column) {
- return new Anchor(this, row, column);
- };
-
- // check for IE split bug
- if ("aaa".split(/a/).length == 0)
- this.$split = function(text) {
- return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
- else
- this.$split = function(text) {
- return text.split(/\r\n|\r|\n/);
- };
-
-
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r\n|\r|\n)/m);
- if (match) {
- this.$autoNewLine = match[1];
- } else {
- this.$autoNewLine = "\n";
- }
- };
-
- this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
- case "windows":
- return "\r\n";
-
- case "unix":
- return "\n";
-
- case "auto":
- return this.$autoNewLine;
- }
- };
-
- this.$autoNewLine = "\n";
- this.$newLineMode = "auto";
- this.setNewLineMode = function(newLineMode) {
- if (this.$newLineMode === newLineMode)
- return;
-
- this.$newLineMode = newLineMode;
- };
-
- this.getNewLineMode = function() {
- return this.$newLineMode;
- };
-
- this.isNewLine = function(text) {
- return (text == "\r\n" || text == "\r" || text == "\n");
- };
-
- /**
- * Get a verbatim copy of the given line as it is in the document
- */
- this.getLine = function(row) {
- return this.$lines[row] || "";
- };
-
- this.getLines = function(firstRow, lastRow) {
- return this.$lines.slice(firstRow, lastRow + 1);
- };
-
- /**
- * Returns all lines in the document as string array. Warning: The caller
- * should not modify this array!
- */
- this.getAllLines = function() {
- return this.getLines(0, this.getLength());
- };
-
- this.getLength = function() {
- return this.$lines.length;
- };
-
- this.getTextRange = function(range) {
- if (range.start.row == range.end.row) {
- return this.$lines[range.start.row].substring(range.start.column,
- range.end.column);
- }
- else {
- var lines = [];
- lines.push(this.$lines[range.start.row].substring(range.start.column));
- lines.push.apply(lines, this.getLines(range.start.row+1, range.end.row-1));
- lines.push(this.$lines[range.end.row].substring(0, range.end.column));
- return lines.join(this.getNewLineCharacter());
- }
- };
-
- this.$clipPosition = function(position) {
- var length = this.getLength();
- if (position.row >= length) {
- position.row = Math.max(0, length - 1);
- position.column = this.getLine(length-1).length;
- }
- return position;
- };
-
- this.insert = function(position, text) {
- if (text.length == 0)
- return position;
-
- position = this.$clipPosition(position);
-
- if (this.getLength() <= 1)
- this.$detectNewLine(text);
-
- var lines = this.$split(text);
- var firstLine = lines.splice(0, 1)[0];
- var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
-
- position = this.insertInLine(position, firstLine);
- if (lastLine !== null) {
- position = this.insertNewLine(position); // terminate first line
- position = this.insertLines(position.row, lines);
- position = this.insertInLine(position, lastLine || "");
- }
- return position;
- };
-
- this.insertLines = function(row, lines) {
- if (lines.length == 0)
- return {row: row, column: 0};
-
- var args = [row, 0];
- args.push.apply(args, lines);
- this.$lines.splice.apply(this.$lines, args);
-
- var range = new Range(row, 0, row + lines.length, 0);
- var delta = {
- action: "insertLines",
- range: range,
- lines: lines
- };
- this._emit("change", { data: delta });
- return range.end;
- };
-
- this.insertNewLine = function(position) {
- position = this.$clipPosition(position);
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column);
- this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
-
- var end = {
- row : position.row + 1,
- column : 0
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
-
- return end;
- };
-
- this.insertInLine = function(position, text) {
- if (text.length == 0)
- return position;
-
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column) + text
- + line.substring(position.column);
-
- var end = {
- row : position.row,
- column : position.column + text.length
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: text
- };
- this._emit("change", { data: delta });
-
- return end;
- };
-
- this.remove = function(range) {
- // clip to document
- range.start = this.$clipPosition(range.start);
- range.end = this.$clipPosition(range.end);
-
- if (range.isEmpty())
- return range.start;
-
- var firstRow = range.start.row;
- var lastRow = range.end.row;
-
- if (range.isMultiLine()) {
- var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
- var lastFullRow = lastRow - 1;
-
- if (range.end.column > 0)
- this.removeInLine(lastRow, 0, range.end.column);
-
- if (lastFullRow >= firstFullRow)
- this.removeLines(firstFullRow, lastFullRow);
-
- if (firstFullRow != firstRow) {
- this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
- this.removeNewLine(range.start.row);
- }
- }
- else {
- this.removeInLine(firstRow, range.start.column, range.end.column);
- }
- return range.start;
- };
-
- this.removeInLine = function(row, startColumn, endColumn) {
- if (startColumn == endColumn)
- return;
-
- var range = new Range(row, startColumn, row, endColumn);
- var line = this.getLine(row);
- var removed = line.substring(startColumn, endColumn);
- var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
- this.$lines.splice(row, 1, newLine);
-
- var delta = {
- action: "removeText",
- range: range,
- text: removed
- };
- this._emit("change", { data: delta });
- return range.start;
- };
-
- /**
- * Removes a range of full lines
- *
- * @param firstRow {Integer} The first row to be removed
- * @param lastRow {Integer} The last row to be removed
- * @return {String[]} The removed lines
- */
- this.removeLines = function(firstRow, lastRow) {
- var range = new Range(firstRow, 0, lastRow + 1, 0);
- var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
-
- var delta = {
- action: "removeLines",
- range: range,
- nl: this.getNewLineCharacter(),
- lines: removed
- };
- this._emit("change", { data: delta });
- return removed;
- };
-
- this.removeNewLine = function(row) {
- var firstLine = this.getLine(row);
- var secondLine = this.getLine(row+1);
-
- var range = new Range(row, firstLine.length, row+1, 0);
- var line = firstLine + secondLine;
-
- this.$lines.splice(row, 2, line);
-
- var delta = {
- action: "removeText",
- range: range,
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
- };
-
- this.replace = function(range, text) {
- if (text.length == 0 && range.isEmpty())
- return range.start;
-
- // Shortcut: If the text we want to insert is the same as it is already
- // in the document, we don't have to replace anything.
- if (text == this.getTextRange(range))
- return range.end;
-
- this.remove(range);
- if (text) {
- var end = this.insert(range.start, text);
- }
- else {
- end = range.start;
- }
-
- return end;
- };
-
- this.applyDeltas = function(deltas) {
- for (var i=0; i<deltas.length; i++) {
- var delta = deltas[i];
- var range = Range.fromPoints(delta.range.start, delta.range.end);
-
- if (delta.action == "insertLines")
- this.insertLines(range.start.row, delta.lines);
- else if (delta.action == "insertText")
- this.insert(range.start, delta.text);
- else if (delta.action == "removeLines")
- this.removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "removeText")
- this.remove(range);
- }
- };
-
- this.revertDeltas = function(deltas) {
- for (var i=deltas.length-1; i>=0; i--) {
- var delta = deltas[i];
-
- var range = Range.fromPoints(delta.range.start, delta.range.end);
-
- if (delta.action == "insertLines")
- this.removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "insertText")
- this.remove(range);
- else if (delta.action == "removeLines")
- this.insertLines(range.start.row, delta.lines);
- else if (delta.action == "removeText")
- this.insert(range.start, delta.text);
- }
- };
-
-}).call(Document.prototype);
-
-exports.Document = Document;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-/**
- * An Anchor is a floating pointer in the document. Whenever text is inserted or
- * deleted before the cursor, the position of the cursor is updated
- */
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.document = doc;
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
-
- this.$onChange = this.onChange.bind(this);
- doc.on("change", this.$onChange);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
-
- this.getDocument = function() {
- return this.document;
- };
-
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
-
- if (delta.action === "insertText") {
- if (range.start.row === row && range.start.column <= column) {
- if (range.start.row === range.end.row) {
- column += range.end.column - range.start.column;
- }
- else {
- column -= range.start.column;
- row += range.end.row - range.start.row;
- }
- }
- else if (range.start.row !== range.end.row && range.start.row < row) {
- row += range.end.row - range.start.row;
- }
- } else if (delta.action === "insertLines") {
- if (range.start.row <= row) {
- row += range.end.row - range.start.row;
- }
- }
- else if (delta.action == "removeText") {
- if (range.start.row == row && range.start.column < column) {
- if (range.end.column >= column)
- column = range.start.column;
- else
- column = Math.max(0, column - (range.end.column - range.start.column));
-
- } else if (range.start.row !== range.end.row && range.start.row < row) {
- if (range.end.row == row) {
- column = Math.max(0, column - range.end.column) + range.start.column;
- }
- row -= (range.end.row - range.start.row);
- }
- else if (range.end.row == row) {
- row -= range.end.row - range.start.row;
- column = Math.max(0, column - range.end.column) + range.start.column;
- }
- } else if (delta.action == "removeLines") {
- if (range.start.row <= row) {
- if (range.end.row <= row)
- row -= range.end.row - range.start.row;
- else {
- row = range.start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
-
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- }
- else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
-
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
-
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/background_tokenizer', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var BackgroundTokenizer = function(tokenizer, editor) {
- this.running = false;
- this.lines = [];
- this.currentLine = 0;
- this.tokenizer = tokenizer;
-
- var self = this;
-
- this.$worker = function() {
- if (!self.running) { return; }
-
- var workerStart = new Date();
- var startLine = self.currentLine;
- var doc = self.doc;
-
- var processedLines = 0;
-
- var len = doc.getLength();
- while (self.currentLine < len) {
- self.lines[self.currentLine] = self.$tokenizeRows(self.currentLine, self.currentLine)[0];
- self.currentLine++;
-
- // only check every 5 lines
- processedLines += 1;
- if ((processedLines % 5 == 0) && (new Date() - workerStart) > 20) {
- self.fireUpdateEvent(startLine, self.currentLine-1);
- self.running = setTimeout(self.$worker, 20);
- return;
- }
- }
-
- self.running = false;
-
- self.fireUpdateEvent(startLine, len - 1);
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.setTokenizer = function(tokenizer) {
- this.tokenizer = tokenizer;
- this.lines = [];
-
- this.start(0);
- };
-
- this.setDocument = function(doc) {
- this.doc = doc;
- this.lines = [];
-
- this.stop();
- };
-
- this.fireUpdateEvent = function(firstRow, lastRow) {
- var data = {
- first: firstRow,
- last: lastRow
- };
- this._emit("update", {data: data});
- };
-
- this.start = function(startRow) {
- this.currentLine = Math.min(startRow || 0, this.currentLine,
- this.doc.getLength());
-
- // remove all cached items below this line
- this.lines.splice(this.currentLine, this.lines.length);
-
- this.stop();
- // pretty long delay to prevent the tokenizer from interfering with the user
- this.running = setTimeout(this.$worker, 700);
- };
-
- this.stop = function() {
- if (this.running)
- clearTimeout(this.running);
- this.running = false;
- };
-
- this.getTokens = function(firstRow, lastRow) {
- return this.$tokenizeRows(firstRow, lastRow);
- };
-
- this.getState = function(row) {
- return this.$tokenizeRows(row, row)[0].state;
- };
-
- this.$tokenizeRows = function(firstRow, lastRow) {
- if (!this.doc || isNaN(firstRow) || isNaN(lastRow))
- return [{'state':'start','tokens':[]}];
-
- var rows = [];
-
- // determine start state
- var state = "start";
- var doCache = false;
- if (firstRow > 0 && this.lines[firstRow - 1]) {
- state = this.lines[firstRow - 1].state;
- doCache = true;
- } else if (firstRow == 0) {
- state = "start";
- doCache = true;
- } else if (this.lines.length > 0) {
- // Guess that we haven't changed state.
- state = this.lines[this.lines.length-1].state;
- }
-
- var lines = this.doc.getLines(firstRow, lastRow);
- for (var row=firstRow; row<=lastRow; row++) {
- if (!this.lines[row]) {
- var tokens = this.tokenizer.getLineTokens(lines[row-firstRow] || "", state);
- var state = tokens.state;
- rows.push(tokens);
-
- if (doCache) {
- this.lines[row] = tokens;
- }
- }
- else {
- var tokens = this.lines[row];
- state = tokens.state;
- rows.push(tokens);
- }
- }
- return rows;
- };
-
-}).call(BackgroundTokenizer.prototype);
-
-exports.BackgroundTokenizer = BackgroundTokenizer;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/edit_session/folding', ['require', 'exports', 'module' , 'ace/range', 'ace/edit_session/fold_line', 'ace/edit_session/fold', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-var FoldLine = require("./fold_line").FoldLine;
-var Fold = require("./fold").Fold;
-var TokenIterator = require("../token_iterator").TokenIterator;
-
-function Folding() {
- /**
- * Looks up a fold at a given row/column. Possible values for side:
- * -1: ignore a fold if fold.start = row/column
- * +1: ignore a fold if fold.end = row/column
- */
- this.getFoldAt = function(row, column, side) {
- var foldLine = this.getFoldLine(row);
- if (!foldLine)
- return null;
-
- var folds = foldLine.folds;
- for (var i = 0; i < folds.length; i++) {
- var fold = folds[i];
- if (fold.range.contains(row, column)) {
- if (side == 1 && fold.range.isEnd(row, column)) {
- continue;
- } else if (side == -1 && fold.range.isStart(row, column)) {
- continue;
- }
- return fold;
- }
- }
- };
-
- /**
- * Returns all folds in the given range. Note, that this will return folds
- *
- */
- this.getFoldsInRange = function(range) {
- range = range.clone();
- var start = range.start;
- var end = range.end;
- var foldLines = this.$foldData;
- var foundFolds = [];
-
- start.column += 1;
- end.column -= 1;
-
- for (var i = 0; i < foldLines.length; i++) {
- var cmp = foldLines[i].range.compareRange(range);
- if (cmp == 2) {
- // Range is before foldLine. No intersection. This means,
- // there might be other foldLines that intersect.
- continue;
- }
- else if (cmp == -2) {
- // Range is after foldLine. There can't be any other foldLines then,
- // so let's give up.
- break;
- }
-
- var folds = foldLines[i].folds;
- for (var j = 0; j < folds.length; j++) {
- var fold = folds[j];
- cmp = fold.range.compareRange(range);
- if (cmp == -2) {
- break;
- } else if (cmp == 2) {
- continue;
- } else
- // WTF-state: Can happen due to -1/+1 to start/end column.
- if (cmp == 42) {
- break;
- }
- foundFolds.push(fold);
- }
- }
- return foundFolds;
- };
-
- /**
- * Returns all folds in the document
- */
- this.getAllFolds = function() {
- var folds = [];
- var foldLines = this.$foldData;
-
- function addFold(fold) {
- folds.push(fold);
- if (!fold.subFolds)
- return;
-
- for (var i = 0; i < fold.subFolds.length; i++)
- addFold(fold.subFolds[i]);
- }
-
- for (var i = 0; i < foldLines.length; i++)
- for (var j = 0; j < foldLines[i].folds.length; j++)
- addFold(foldLines[i].folds[j]);
-
- return folds;
- };
-
- /**
- * Returns the string between folds at the given position.
- * E.g.
- * foo<fold>b|ar<fold>wolrd -> "bar"
- * foo<fold>bar<fold>wol|rd -> "world"
- * foo<fold>bar<fo|ld>wolrd -> <null>
- *
- * where | means the position of row/column
- *
- * The trim option determs if the return string should be trimed according
- * to the "side" passed with the trim value:
- *
- * E.g.
- * foo<fold>b|ar<fold>wolrd -trim=-1> "b"
- * foo<fold>bar<fold>wol|rd -trim=+1> "rld"
- * fo|o<fold>bar<fold>wolrd -trim=00> "foo"
- */
- this.getFoldStringAt = function(row, column, trim, foldLine) {
- foldLine = foldLine || this.getFoldLine(row);
- if (!foldLine)
- return null;
-
- var lastFold = {
- end: { column: 0 }
- };
- // TODO: Refactor to use getNextFoldTo function.
- var str, fold;
- for (var i = 0; i < foldLine.folds.length; i++) {
- fold = foldLine.folds[i];
- var cmp = fold.range.compareEnd(row, column);
- if (cmp == -1) {
- str = this
- .getLine(fold.start.row)
- .substring(lastFold.end.column, fold.start.column);
- break;
- }
- else if (cmp === 0) {
- return null;
- }
- lastFold = fold;
- }
- if (!str)
- str = this.getLine(fold.start.row).substring(lastFold.end.column);
-
- if (trim == -1)
- return str.substring(0, column - lastFold.end.column);
- else if (trim == 1)
- return str.substring(column - lastFold.end.column);
- else
- return str;
- };
-
- this.getFoldLine = function(docRow, startFoldLine) {
- var foldData = this.$foldData;
- var i = 0;
- if (startFoldLine)
- i = foldData.indexOf(startFoldLine);
- if (i == -1)
- i = 0;
- for (i; i < foldData.length; i++) {
- var foldLine = foldData[i];
- if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {
- return foldLine;
- } else if (foldLine.end.row > docRow) {
- return null;
- }
- }
- return null;
- };
-
- // returns the fold which starts after or contains docRow
- this.getNextFoldLine = function(docRow, startFoldLine) {
- var foldData = this.$foldData;
- var i = 0;
- if (startFoldLine)
- i = foldData.indexOf(startFoldLine);
- if (i == -1)
- i = 0;
- for (i; i < foldData.length; i++) {
- var foldLine = foldData[i];
- if (foldLine.end.row >= docRow) {
- return foldLine;
- }
- }
- return null;
- };
-
- this.getFoldedRowCount = function(first, last) {
- var foldData = this.$foldData, rowCount = last-first+1;
- for (var i = 0; i < foldData.length; i++) {
- var foldLine = foldData[i],
- end = foldLine.end.row,
- start = foldLine.start.row;
- if (end >= last) {
- if(start < last) {
- if(start >= first)
- rowCount -= last-start;
- else
- rowCount = 0;//in one fold
- }
- break;
- } else if(end >= first){
- if (start >= first) //fold inside range
- rowCount -= end-start;
- else
- rowCount -= end-first+1;
- }
- }
- return rowCount;
- };
-
- this.$addFoldLine = function(foldLine) {
- this.$foldData.push(foldLine);
- this.$foldData.sort(function(a, b) {
- return a.start.row - b.start.row;
- });
- return foldLine;
- };
-
- /**
- * Adds a new fold.
- *
- * @returns
- * The new created Fold object or an existing fold object in case the
- * passed in range fits an existing fold exactly.
- */
- this.addFold = function(placeholder, range) {
- var foldData = this.$foldData;
- var added = false;
- var fold;
-
- if (placeholder instanceof Fold)
- fold = placeholder;
- else
- fold = new Fold(range, placeholder);
-
- this.$clipRangeToDocument(fold.range);
-
- var startRow = fold.start.row;
- var startColumn = fold.start.column;
- var endRow = fold.end.row;
- var endColumn = fold.end.column;
-
- // --- Some checking ---
- if (fold.placeholder.length < 2)
- throw "Placeholder has to be at least 2 characters";
-
- if (startRow == endRow && endColumn - startColumn < 2)
- throw "The range has to be at least 2 characters width";
-
- var startFold = this.getFoldAt(startRow, startColumn, 1);
- var endFold = this.getFoldAt(endRow, endColumn, -1);
- if (startFold && endFold == startFold)
- return startFold.addSubFold(fold);
-
- if (
- (startFold && !startFold.range.isStart(startRow, startColumn))
- || (endFold && !endFold.range.isEnd(endRow, endColumn))
- ) {
- throw "A fold can't intersect already existing fold" + fold.range + startFold.range;
- }
-
- // Check if there are folds in the range we create the new fold for.
- var folds = this.getFoldsInRange(fold.range);
- if (folds.length > 0) {
- // Remove the folds from fold data.
- this.removeFolds(folds);
- // Add the removed folds as subfolds on the new fold.
- fold.subFolds = folds;
- }
-
- for (var i = 0; i < foldData.length; i++) {
- var foldLine = foldData[i];
- if (endRow == foldLine.start.row) {
- foldLine.addFold(fold);
- added = true;
- break;
- }
- else if (startRow == foldLine.end.row) {
- foldLine.addFold(fold);
- added = true;
- if (!fold.sameRow) {
- // Check if we might have to merge two FoldLines.
- var foldLineNext = foldData[i + 1];
- if (foldLineNext && foldLineNext.start.row == endRow) {
- // We need to merge!
- foldLine.merge(foldLineNext);
- break;
- }
- }
- break;
- }
- else if (endRow <= foldLine.start.row) {
- break;
- }
- }
-
- if (!added)
- foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));
-
- if (this.$useWrapMode)
- this.$updateWrapData(foldLine.start.row, foldLine.start.row);
-
- // Notify that fold data has changed.
- this.$modified = true;
- this._emit("changeFold", { data: fold });
-
- return fold;
- };
-
- this.addFolds = function(folds) {
- folds.forEach(function(fold) {
- this.addFold(fold);
- }, this);
- };
-
- this.removeFold = function(fold) {
- var foldLine = fold.foldLine;
- var startRow = foldLine.start.row;
- var endRow = foldLine.end.row;
-
- var foldLines = this.$foldData;
- var folds = foldLine.folds;
- // Simple case where there is only one fold in the FoldLine such that
- // the entire fold line can get removed directly.
- if (folds.length == 1) {
- foldLines.splice(foldLines.indexOf(foldLine), 1);
- } else
- // If the fold is the last fold of the foldLine, just remove it.
- if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {
- folds.pop();
- foldLine.end.row = folds[folds.length - 1].end.row;
- foldLine.end.column = folds[folds.length - 1].end.column;
- } else
- // If the fold is the first fold of the foldLine, just remove it.
- if (foldLine.range.isStart(fold.start.row, fold.start.column)) {
- folds.shift();
- foldLine.start.row = folds[0].start.row;
- foldLine.start.column = folds[0].start.column;
- } else
- // We know there are more then 2 folds and the fold is not at the edge.
- // This means, the fold is somewhere in between.
- //
- // If the fold is in one row, we just can remove it.
- if (fold.sameRow) {
- folds.splice(folds.indexOf(fold), 1);
- } else
- // The fold goes over more then one row. This means remvoing this fold
- // will cause the fold line to get splitted up. newFoldLine is the second part
- {
- var newFoldLine = foldLine.split(fold.start.row, fold.start.column);
- folds = newFoldLine.folds;
- folds.shift();
- newFoldLine.start.row = folds[0].start.row;
- newFoldLine.start.column = folds[0].start.column;
- }
-
- if (this.$useWrapMode) {
- this.$updateWrapData(startRow, endRow);
- }
-
- // Notify that fold data has changed.
- this.$modified = true;
- this._emit("changeFold", { data: fold });
- };
-
- this.removeFolds = function(folds) {
- // We need to clone the folds array passed in as it might be the folds
- // array of a fold line and as we call this.removeFold(fold), folds
- // are removed from folds and changes the current index.
- var cloneFolds = [];
- for (var i = 0; i < folds.length; i++) {
- cloneFolds.push(folds[i]);
- }
-
- cloneFolds.forEach(function(fold) {
- this.removeFold(fold);
- }, this);
- this.$modified = true;
- };
-
- this.expandFold = function(fold) {
- this.removeFold(fold);
- fold.subFolds.forEach(function(fold) {
- this.addFold(fold);
- }, this);
- fold.subFolds = [];
- };
-
- this.expandFolds = function(folds) {
- folds.forEach(function(fold) {
- this.expandFold(fold);
- }, this);
- };
-
- this.unfold = function(location, expandInner) {
- var range, folds;
- if (location == null)
- range = new Range(0, 0, this.getLength(), 0);
- else if (typeof location == "number")
- range = new Range(location, 0, location, this.getLine(location).length);
- else if ("row" in location)
- range = Range.fromPoints(location, location);
- else
- range = location;
-
- folds = this.getFoldsInRange(range);
- if (expandInner) {
- this.removeFolds(folds);
- } else {
- // TODO: might need to remove and add folds in one go instead of using
- // expandFolds several times.
- while (folds.length) {
- this.expandFolds(folds);
- folds = this.getFoldsInRange(range);
- }
- }
- };
-
- /**
- * Checks if a given documentRow is folded. This is true if there are some
- * folded parts such that some parts of the line is still visible.
- **/
- this.isRowFolded = function(docRow, startFoldRow) {
- return !!this.getFoldLine(docRow, startFoldRow);
- };
-
- this.getRowFoldEnd = function(docRow, startFoldRow) {
- var foldLine = this.getFoldLine(docRow, startFoldRow);
- return (foldLine
- ? foldLine.end.row
- : docRow);
- };
-
- this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {
- if (startRow == null) {
- startRow = foldLine.start.row;
- startColumn = 0;
- }
-
- if (endRow == null) {
- endRow = foldLine.end.row;
- endColumn = this.getLine(endRow).length;
- }
-
- // Build the textline using the FoldLine walker.
- var doc = this.doc;
- var textLine = "";
-
- foldLine.walk(function(placeholder, row, column, lastColumn) {
- if (row < startRow) {
- return;
- } else if (row == startRow) {
- if (column < startColumn) {
- return;
- }
- lastColumn = Math.max(startColumn, lastColumn);
- }
- if (placeholder) {
- textLine += placeholder;
- } else {
- textLine += doc.getLine(row).substring(lastColumn, column);
- }
- }.bind(this), endRow, endColumn);
- return textLine;
- };
-
- this.getDisplayLine = function(row, endColumn, startRow, startColumn) {
- var foldLine = this.getFoldLine(row);
-
- if (!foldLine) {
- var line;
- line = this.doc.getLine(row);
- return line.substring(startColumn || 0, endColumn || line.length);
- } else {
- return this.getFoldDisplayLine(
- foldLine, row, endColumn, startRow, startColumn);
- }
- };
-
- this.$cloneFoldData = function() {
- var fd = [];
- fd = this.$foldData.map(function(foldLine) {
- var folds = foldLine.folds.map(function(fold) {
- return fold.clone();
- });
- return new FoldLine(fd, folds);
- });
-
- return fd;
- };
-
- this.toggleFold = function(tryToUnfold) {
- var selection = this.selection;
- var range = selection.getRange();
- var fold;
- var bracketPos;
-
- if (range.isEmpty()) {
- var cursor = range.start;
- fold = this.getFoldAt(cursor.row, cursor.column);
-
- if (fold) {
- this.expandFold(fold);
- return;
- }
- else if (bracketPos = this.findMatchingBracket(cursor)) {
- if (range.comparePoint(bracketPos) == 1) {
- range.end = bracketPos;
- }
- else {
- range.start = bracketPos;
- range.start.column++;
- range.end.column--;
- }
- }
- else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {
- if (range.comparePoint(bracketPos) == 1)
- range.end = bracketPos;
- else
- range.start = bracketPos;
-
- range.start.column++;
- }
- else {
- range = this.getCommentFoldRange(cursor.row, cursor.column) || range;
- }
- } else {
- var folds = this.getFoldsInRange(range);
- if (tryToUnfold && folds.length) {
- this.expandFolds(folds);
- return;
- }
- else if (folds.length == 1 ) {
- fold = folds[0];
- }
- }
-
- if (!fold)
- fold = this.getFoldAt(range.start.row, range.start.column);
-
- if (fold && fold.range.toString() == range.toString()) {
- this.expandFold(fold);
- return;
- }
-
- var placeholder = "...";
- if (!range.isMultiLine()) {
- placeholder = this.getTextRange(range);
- if(placeholder.length < 4)
- return;
- placeholder = placeholder.trim().substring(0, 2) + "..";
- }
-
- this.addFold(placeholder, range);
- };
-
- this.getCommentFoldRange = function(row, column) {
- var iterator = new TokenIterator(this, row, column);
- var token = iterator.getCurrentToken();
- if (token && /^comment|string/.test(token.type)) {
- var range = new Range();
- var re = new RegExp(token.type.replace(/\..*/, "\\."));
- do {
- token = iterator.stepBackward();
- } while(token && re.test(token.type));
-
- iterator.stepForward();
- range.start.row = iterator.getCurrentTokenRow();
- range.start.column = iterator.getCurrentTokenColumn() + 2;
-
- iterator = new TokenIterator(this, row, column);
-
- do {
- token = iterator.stepForward();
- } while(token && re.test(token.type));
-
- token = iterator.stepBackward();
-
- range.end.row = iterator.getCurrentTokenRow();
- range.end.column = iterator.getCurrentTokenColumn() + token.value.length;
- return range;
- }
- };
-
- this.foldAll = function(startRow, endRow) {
- var foldWidgets = this.foldWidgets;
- endRow = endRow || this.getLength();
- for (var row = startRow || 0; row < endRow; row++) {
- if (foldWidgets[row] == null)
- foldWidgets[row] = this.getFoldWidget(row);
- if (foldWidgets[row] != "start")
- continue;
-
- var range = this.getFoldWidgetRange(row);
- // sometimes range can be incompatible with existing fold
- // wouldn't it be better for addFold to return null istead of throwing?
- if (range && range.end.row < endRow) try {
- this.addFold("...", range);
- } catch(e) {}
- }
- };
-
- this.$foldStyles = {
- "manual": 1,
- "markbegin": 1,
- "markbeginend": 1
- };
- this.$foldStyle = "markbegin";
- this.setFoldStyle = function(style) {
- if (!this.$foldStyles[style])
- throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]");
-
- if (this.$foldStyle == style)
- return;
-
- this.$foldStyle = style;
-
- if (style == "manual")
- this.unfold();
-
- // reset folding
- var mode = this.$foldMode;
- this.$setFolding(null);
- this.$setFolding(mode);
- };
-
- // structured folding
- this.$setFolding = function(foldMode) {
- if (this.$foldMode == foldMode)
- return;
-
- this.$foldMode = foldMode;
-
- this.removeListener('change', this.$updateFoldWidgets);
- this._emit("changeAnnotation");
-
- if (!foldMode || this.$foldStyle == "manual") {
- this.foldWidgets = null;
- return;
- }
-
- this.foldWidgets = [];
- this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);
- this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);
-
- this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);
- this.on('change', this.$updateFoldWidgets);
-
- };
-
- this.onFoldWidgetClick = function(row, e) {
- var type = this.getFoldWidget(row);
- var line = this.getLine(row);
- var onlySubfolds = e.shiftKey;
- var addSubfolds = onlySubfolds || e.ctrlKey || e.altKey || e.metaKey;
- var fold;
-
- if (type == "end")
- fold = this.getFoldAt(row, 0, -1);
- else
- fold = this.getFoldAt(row, line.length, 1);
-
- if (fold) {
- if (addSubfolds)
- this.removeFold(fold);
- else
- this.expandFold(fold);
- return;
- }
-
- var range = this.getFoldWidgetRange(row);
- if (range) {
- // sometimes singleline folds can be missed by the code above
- if (!range.isMultiLine()) {
- fold = this.getFoldAt(range.start.row, range.start.column, 1);
- if (fold && range.isEequal(fold.range)) {
- this.removeFold(fold);
- return;
- }
- }
-
- if (!onlySubfolds)
- this.addFold("...", range);
-
- if (addSubfolds)
- this.foldAll(range.start.row + 1, range.end.row);
- } else {
- if (addSubfolds)
- this.foldAll(row + 1, this.getLength());
- e.target.className += " invalid"
- }
- };
-
- this.updateFoldWidgets = function(e) {
- var delta = e.data;
- var range = delta.range;
- var firstRow = range.start.row;
- var len = range.end.row - firstRow;
-
- if (len === 0) {
- this.foldWidgets[firstRow] = null;
- } else if (delta.action == "removeText" || delta.action == "removeLines") {
- this.foldWidgets.splice(firstRow, len + 1, null);
- } else {
- var args = Array(len + 1);
- args.unshift(firstRow, 1);
- this.foldWidgets.splice.apply(this.foldWidgets, args);
- }
- };
-
-}
-
-exports.Folding = Folding;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/edit_session/fold_line', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-/**
- * If an array is passed in, the folds are expected to be sorted already.
- */
-function FoldLine(foldData, folds) {
- this.foldData = foldData;
- if (Array.isArray(folds)) {
- this.folds = folds;
- } else {
- folds = this.folds = [ folds ];
- }
-
- var last = folds[folds.length - 1]
- this.range = new Range(folds[0].start.row, folds[0].start.column,
- last.end.row, last.end.column);
- this.start = this.range.start;
- this.end = this.range.end;
-
- this.folds.forEach(function(fold) {
- fold.setFoldLine(this);
- }, this);
-}
-
-(function() {
- /**
- * Note: This doesn't update wrapData!
- */
- this.shiftRow = function(shift) {
- this.start.row += shift;
- this.end.row += shift;
- this.folds.forEach(function(fold) {
- fold.start.row += shift;
- fold.end.row += shift;
- });
- }
-
- this.addFold = function(fold) {
- if (fold.sameRow) {
- if (fold.start.row < this.startRow || fold.endRow > this.endRow) {
- throw "Can't add a fold to this FoldLine as it has no connection";
- }
- this.folds.push(fold);
- this.folds.sort(function(a, b) {
- return -a.range.compareEnd(b.start.row, b.start.column);
- });
- if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {
- this.end.row = fold.end.row;
- this.end.column = fold.end.column;
- } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {
- this.start.row = fold.start.row;
- this.start.column = fold.start.column;
- }
- } else if (fold.start.row == this.end.row) {
- this.folds.push(fold);
- this.end.row = fold.end.row;
- this.end.column = fold.end.column;
- } else if (fold.end.row == this.start.row) {
- this.folds.unshift(fold);
- this.start.row = fold.start.row;
- this.start.column = fold.start.column;
- } else {
- throw "Trying to add fold to FoldRow that doesn't have a matching row";
- }
- fold.foldLine = this;
- }
-
- this.containsRow = function(row) {
- return row >= this.start.row && row <= this.end.row;
- }
-
- this.walk = function(callback, endRow, endColumn) {
- var lastEnd = 0,
- folds = this.folds,
- fold,
- comp, stop, isNewRow = true;
-
- if (endRow == null) {
- endRow = this.end.row;
- endColumn = this.end.column;
- }
-
- for (var i = 0; i < folds.length; i++) {
- fold = folds[i];
-
- comp = fold.range.compareStart(endRow, endColumn);
- // This fold is after the endRow/Column.
- if (comp == -1) {
- callback(null, endRow, endColumn, lastEnd, isNewRow);
- return;
- }
-
- stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);
- stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);
-
- // If the user requested to stop the walk or endRow/endColumn is
- // inside of this fold (comp == 0), then end here.
- if (stop || comp == 0) {
- return;
- }
-
- // Note the new lastEnd might not be on the same line. However,
- // it's the callback's job to recognize this.
- isNewRow = !fold.sameRow;
- lastEnd = fold.end.column;
- }
- callback(null, endRow, endColumn, lastEnd, isNewRow);
- }
-
- this.getNextFoldTo = function(row, column) {
- var fold, cmp;
- for (var i = 0; i < this.folds.length; i++) {
- fold = this.folds[i];
- cmp = fold.range.compareEnd(row, column);
- if (cmp == -1) {
- return {
- fold: fold,
- kind: "after"
- };
- } else if (cmp == 0) {
- return {
- fold: fold,
- kind: "inside"
- }
- }
- }
- return null;
- }
-
- this.addRemoveChars = function(row, column, len) {
- var ret = this.getNextFoldTo(row, column),
- fold, folds;
- if (ret) {
- fold = ret.fold;
- if (ret.kind == "inside"
- && fold.start.column != column
- && fold.start.row != row)
- {
- throw "Moving characters inside of a fold should never be reached";
- } else if (fold.start.row == row) {
- folds = this.folds;
- var i = folds.indexOf(fold);
- if (i == 0) {
- this.start.column += len;
- }
- for (i; i < folds.length; i++) {
- fold = folds[i];
- fold.start.column += len;
- if (!fold.sameRow) {
- return;
- }
- fold.end.column += len;
- }
- this.end.column += len;
- }
- }
- }
-
- this.split = function(row, column) {
- var fold = this.getNextFoldTo(row, column).fold,
- folds = this.folds;
- var foldData = this.foldData;
-
- if (!fold) {
- return null;
- }
- var i = folds.indexOf(fold);
- var foldBefore = folds[i - 1];
- this.end.row = foldBefore.end.row;
- this.end.column = foldBefore.end.column;
-
- // Remove the folds after row/column and create a new FoldLine
- // containing these removed folds.
- folds = folds.splice(i, folds.length - i);
-
- var newFoldLine = new FoldLine(foldData, folds);
- foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);
- return newFoldLine;
- }
-
- this.merge = function(foldLineNext) {
- var folds = foldLineNext.folds;
- for (var i = 0; i < folds.length; i++) {
- this.addFold(folds[i]);
- }
- // Remove the foldLineNext - no longer needed, as
- // it's merged now with foldLineNext.
- var foldData = this.foldData;
- foldData.splice(foldData.indexOf(foldLineNext), 1);
- }
-
- this.toString = function() {
- var ret = [this.range.toString() + ": [" ];
-
- this.folds.forEach(function(fold) {
- ret.push(" " + fold.toString());
- });
- ret.push("]")
- return ret.join("\n");
- }
-
- this.idxToPosition = function(idx) {
- var lastFoldEndColumn = 0;
- var fold;
-
- for (var i = 0; i < this.folds.length; i++) {
- var fold = this.folds[i];
-
- idx -= fold.start.column - lastFoldEndColumn;
- if (idx < 0) {
- return {
- row: fold.start.row,
- column: fold.start.column + idx
- };
- }
-
- idx -= fold.placeholder.length;
- if (idx < 0) {
- return fold.start;
- }
-
- lastFoldEndColumn = fold.end.column;
- }
-
- return {
- row: this.end.row,
- column: this.end.column + idx
- };
- }
-}).call(FoldLine.prototype);
-
-exports.FoldLine = FoldLine;
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/edit_session/fold', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-/**
- * Simple fold-data struct.
- **/
-var Fold = exports.Fold = function(range, placeholder) {
- this.foldLine = null;
- this.placeholder = placeholder;
- this.range = range;
- this.start = range.start;
- this.end = range.end;
-
- this.sameRow = range.start.row == range.end.row;
- this.subFolds = [];
-};
-
-(function() {
-
- this.toString = function() {
- return '"' + this.placeholder + '" ' + this.range.toString();
- };
-
- this.setFoldLine = function(foldLine) {
- this.foldLine = foldLine;
- this.subFolds.forEach(function(fold) {
- fold.setFoldLine(foldLine);
- });
- };
-
- this.clone = function() {
- var range = this.range.clone();
- var fold = new Fold(range, this.placeholder);
- this.subFolds.forEach(function(subFold) {
- fold.subFolds.push(subFold.clone());
- });
- return fold;
- };
-
- this.addSubFold = function(fold) {
- if (this.range.isEequal(fold))
- return this;
-
- if (!this.range.containsRange(fold))
- throw "A fold can't intersect already existing fold" + fold.range + this.range;
-
- var row = fold.range.start.row, column = fold.range.start.column;
- for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {
- cmp = this.subFolds[i].range.compare(row, column);
- if (cmp != 1)
- break;
- }
- var afterStart = this.subFolds[i];
-
- if (cmp == 0)
- return afterStart.addSubFold(fold)
-
- // cmp == -1
- var row = fold.range.end.row, column = fold.range.end.column;
- for (var j = i, cmp = -1; j < this.subFolds.length; j++) {
- cmp = this.subFolds[j].range.compare(row, column);
- if (cmp != 1)
- break;
- }
- var afterEnd = this.subFolds[j];
-
- if (cmp == 0)
- throw "A fold can't intersect already existing fold" + fold.range + this.range;
-
- var consumedFolds = this.subFolds.splice(i, j - i, fold)
- fold.setFoldLine(this.foldLine);
-
- return fold;
- }
-
-}).call(Fold.prototype);
-
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/token_iterator', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var TokenIterator = function(session, initialRow, initialColumn) {
- this.$session = session;
- this.$row = initialRow;
- this.$rowTokens = session.getTokens(initialRow, initialRow)[0].tokens;
-
- var token = session.getTokenAt(initialRow, initialColumn);
- this.$tokenIndex = token ? token.index : -1;
-};
-
-(function() {
-
- this.stepBackward = function() {
- this.$tokenIndex -= 1;
-
- while (this.$tokenIndex < 0) {
- this.$row -= 1;
- if (this.$row < 0) {
- this.$row = 0;
- return null;
- }
-
- this.$rowTokens = this.$session.getTokens(this.$row, this.$row)[0].tokens;
- this.$tokenIndex = this.$rowTokens.length - 1;
- }
-
- return this.$rowTokens[this.$tokenIndex];
- };
-
- this.stepForward = function() {
- var rowCount = this.$session.getLength();
- this.$tokenIndex += 1;
-
- while (this.$tokenIndex >= this.$rowTokens.length) {
- this.$row += 1;
- if (this.$row >= rowCount) {
- this.$row = rowCount - 1;
- return null;
- }
-
- this.$rowTokens = this.$session.getTokens(this.$row, this.$row)[0].tokens;
- this.$tokenIndex = 0;
- }
-
- return this.$rowTokens[this.$tokenIndex];
- };
-
- this.getCurrentToken = function () {
- return this.$rowTokens[this.$tokenIndex];
- };
-
- this.getCurrentTokenRow = function () {
- return this.$row;
- };
-
- this.getCurrentTokenColumn = function() {
- var rowTokens = this.$rowTokens;
- var tokenIndex = this.$tokenIndex;
-
- // If a column was cached by EditSession.getTokenAt, then use it
- var column = rowTokens[tokenIndex].start;
- if (column !== undefined)
- return column;
-
- column = 0;
- while (tokenIndex > 0) {
- tokenIndex -= 1;
- column += rowTokens[tokenIndex].value.length;
- }
-
- return column;
- };
-
-}).call(TokenIterator.prototype);
-
-exports.TokenIterator = TokenIterator;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/edit_session/bracket_match', ['require', 'exports', 'module' , 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var TokenIterator = require("../token_iterator").TokenIterator;
-
-function BracketMatch() {
-
- this.findMatchingBracket = function(position) {
- if (position.column == 0) return null;
-
- var charBeforeCursor = this.getLine(position.row).charAt(position.column-1);
- if (charBeforeCursor == "") return null;
-
- var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/);
- if (!match) {
- return null;
- }
-
- if (match[1]) {
- return this.$findClosingBracket(match[1], position);
- } else {
- return this.$findOpeningBracket(match[2], position);
- }
- };
-
- this.$brackets = {
- ")": "(",
- "(": ")",
- "]": "[",
- "[": "]",
- "{": "}",
- "}": "{"
- };
-
- this.$findOpeningBracket = function(bracket, position) {
- var openBracket = this.$brackets[bracket];
- var depth = 1;
-
- var iterator = new TokenIterator(this, position.row, position.column);
- var token = iterator.getCurrentToken();
- if (!token) return null;
-
- // token.type contains a period-delimited list of token identifiers
- // (e.g.: "constant.numeric" or "paren.lparen"). Create a pattern that
- // matches any token containing the same identifiers or a subset. In
- // addition, if token.type includes "rparen", then also match "lparen".
- // So if type.token is "paren.rparen", then typeRe will match "lparen.paren".
- var typeRe = new RegExp("(\\.?" +
- token.type.replace(".", "|").replace("rparen", "lparen|rparen") + ")+");
-
- // Start searching in token, just before the character at position.column
- var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;
- var value = token.value;
-
- while (true) {
-
- while (valueIndex >= 0) {
- var chr = value.charAt(valueIndex);
- if (chr == openBracket) {
- depth -= 1;
- if (depth == 0) {
- return {row: iterator.getCurrentTokenRow(),
- column: valueIndex + iterator.getCurrentTokenColumn()};
- }
- }
- else if (chr == bracket) {
- depth += 1;
- }
- valueIndex -= 1;
- }
-
- // Scan backward through the document, looking for the next token
- // whose type matches typeRe
- do {
- token = iterator.stepBackward();
- } while (token && !typeRe.test(token.type));
-
- if (token == null)
- break;
-
- value = token.value;
- valueIndex = value.length - 1;
- }
-
- return null;
- };
-
- this.$findClosingBracket = function(bracket, position) {
- var closingBracket = this.$brackets[bracket];
- var depth = 1;
-
- var iterator = new TokenIterator(this, position.row, position.column);
- var token = iterator.getCurrentToken();
- if (!token) return null;
-
- // token.type contains a period-delimited list of token identifiers
- // (e.g.: "constant.numeric" or "paren.lparen"). Create a pattern that
- // matches any token containing the same identifiers or a subset. In
- // addition, if token.type includes "lparen", then also match "rparen".
- // So if type.token is "lparen.paren", then typeRe will match "paren.rparen".
- var typeRe = new RegExp("(\\.?" +
- token.type.replace(".", "|").replace("lparen", "lparen|rparen") + ")+");
-
- // Start searching in token, after the character at position.column
- var valueIndex = position.column - iterator.getCurrentTokenColumn();
-
- while (true) {
-
- var value = token.value;
- var valueLength = value.length;
- while (valueIndex < valueLength) {
- var chr = value.charAt(valueIndex);
- if (chr == closingBracket) {
- depth -= 1;
- if (depth == 0) {
- return {row: iterator.getCurrentTokenRow(),
- column: valueIndex + iterator.getCurrentTokenColumn()};
- }
- }
- else if (chr == bracket) {
- depth += 1;
- }
- valueIndex += 1;
- }
-
- // Scan forward through the document, looking for the next token
- // whose type matches typeRe
- do {
- token = iterator.stepForward();
- } while (token && !typeRe.test(token.type));
-
- if (token == null)
- break;
-
- valueIndex = 0;
- }
-
- return null;
- };
-}
-exports.BracketMatch = BracketMatch;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/search', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var lang = require("./lib/lang");
-var oop = require("./lib/oop");
-var Range = require("./range").Range;
-
-var Search = function() {
- this.$options = {
- needle: "",
- backwards: false,
- wrap: false,
- caseSensitive: false,
- wholeWord: false,
- scope: Search.ALL,
- regExp: false
- };
-};
-
-Search.ALL = 1;
-Search.SELECTION = 2;
-
-(function() {
-
- this.set = function(options) {
- oop.mixin(this.$options, options);
- return this;
- };
-
- this.getOptions = function() {
- return lang.copyObject(this.$options);
- };
-
- this.find = function(session) {
- if (!this.$options.needle)
- return null;
-
- if (this.$options.backwards) {
- var iterator = this.$backwardMatchIterator(session);
- } else {
- iterator = this.$forwardMatchIterator(session);
- }
-
- var firstRange = null;
- iterator.forEach(function(range) {
- firstRange = range;
- return true;
- });
-
- return firstRange;
- };
-
- this.findAll = function(session) {
- var options = this.$options;
- if (!options.needle)
- return [];
-
- if (options.backwards) {
- var iterator = this.$backwardMatchIterator(session);
- } else {
- iterator = this.$forwardMatchIterator(session);
- }
-
- var ignoreCursor = !options.start && options.wrap && options.scope == Search.ALL;
- if (ignoreCursor)
- options.start = {row: 0, column: 0};
-
- var ranges = [];
- iterator.forEach(function(range) {
- ranges.push(range);
- });
-
- if (ignoreCursor)
- options.start = null;
-
- return ranges;
- };
-
- this.replace = function(input, replacement) {
- var re = this.$assembleRegExp();
- var match = re.exec(input);
- if (match && match[0].length == input.length) {
- if (this.$options.regExp) {
- return input.replace(re, replacement);
- } else {
- return replacement;
- }
- } else {
- return null;
- }
- };
-
- this.$forwardMatchIterator = function(session) {
- var re = this.$assembleRegExp();
- var self = this;
-
- return {
- forEach: function(callback) {
- self.$forwardLineIterator(session).forEach(function(line, startIndex, row) {
- if (startIndex) {
- line = line.substring(startIndex);
- }
-
- var matches = [];
-
- line.replace(re, function(str) {
- var offset = arguments[arguments.length-2];
- matches.push({
- str: str,
- offset: startIndex + offset
- });
- return str;
- });
-
- for (var i=0; i<matches.length; i++) {
- var match = matches[i];
- var range = self.$rangeFromMatch(row, match.offset, match.str.length);
- if (callback(range))
- return true;
- }
-
- });
- }
- };
- };
-
- this.$backwardMatchIterator = function(session) {
- var re = this.$assembleRegExp();
- var self = this;
-
- return {
- forEach: function(callback) {
- self.$backwardLineIterator(session).forEach(function(line, startIndex, row) {
- if (startIndex) {
- line = line.substring(startIndex);
- }
-
- var matches = [];
-
- line.replace(re, function(str, offset) {
- matches.push({
- str: str,
- offset: startIndex + offset
- });
- return str;
- });
-
- for (var i=matches.length-1; i>= 0; i--) {
- var match = matches[i];
- var range = self.$rangeFromMatch(row, match.offset, match.str.length);
- if (callback(range))
- return true;
- }
- });
- }
- };
- };
-
- this.$rangeFromMatch = function(row, column, length) {
- return new Range(row, column, row, column+length);
- };
-
- this.$assembleRegExp = function() {
- if (this.$options.regExp) {
- var needle = this.$options.needle;
- } else {
- needle = lang.escapeRegExp(this.$options.needle);
- }
-
- if (this.$options.wholeWord) {
- needle = "\\b" + needle + "\\b";
- }
-
- var modifier = "g";
- if (!this.$options.caseSensitive) {
- modifier += "i";
- }
-
- var re = new RegExp(needle, modifier);
- return re;
- };
-
- this.$forwardLineIterator = function(session) {
- var searchSelection = this.$options.scope == Search.SELECTION;
-
- var range = this.$options.range || session.getSelection().getRange();
- var start = this.$options.start || range[searchSelection ? "start" : "end"];
-
- var firstRow = searchSelection ? range.start.row : 0;
- var firstColumn = searchSelection ? range.start.column : 0;
- var lastRow = searchSelection ? range.end.row : session.getLength() - 1;
-
- var wrap = this.$options.wrap;
- var inWrap = false;
-
- function getLine(row) {
- var line = session.getLine(row);
- if (searchSelection && row == range.end.row) {
- line = line.substring(0, range.end.column);
- }
- if (inWrap && row == start.row) {
- line = line.substring(0, start.column);
- }
- return line;
- }
-
- return {
- forEach: function(callback) {
- var row = start.row;
-
- var line = getLine(row);
- var startIndex = start.column;
-
- var stop = false;
- inWrap = false;
-
- while (!callback(line, startIndex, row)) {
-
- if (stop) {
- return;
- }
-
- row++;
- startIndex = 0;
-
- if (row > lastRow) {
- if (wrap) {
- row = firstRow;
- startIndex = firstColumn;
- inWrap = true;
- } else {
- return;
- }
- }
-
- if (row == start.row)
- stop = true;
-
- line = getLine(row);
- }
- }
- };
- };
-
- this.$backwardLineIterator = function(session) {
- var searchSelection = this.$options.scope == Search.SELECTION;
-
- var range = this.$options.range || session.getSelection().getRange();
- var start = this.$options.start || range[searchSelection ? "end" : "start"];
-
- var firstRow = searchSelection ? range.start.row : 0;
- var firstColumn = searchSelection ? range.start.column : 0;
- var lastRow = searchSelection ? range.end.row : session.getLength() - 1;
-
- var wrap = this.$options.wrap;
-
- return {
- forEach : function(callback) {
- var row = start.row;
-
- var line = session.getLine(row).substring(0, start.column);
- var startIndex = 0;
- var stop = false;
- var inWrap = false;
-
- while (!callback(line, startIndex, row)) {
-
- if (stop)
- return;
-
- row--;
- startIndex = 0;
-
- if (row < firstRow) {
- if (wrap) {
- row = lastRow;
- inWrap = true;
- } else {
- return;
- }
- }
-
- if (row == start.row)
- stop = true;
-
- line = session.getLine(row);
- if (searchSelection) {
- if (row == firstRow)
- startIndex = firstColumn;
- else if (row == lastRow)
- line = line.substring(0, range.end.column);
- }
-
- if (inWrap && row == start.row)
- startIndex = start.column;
- }
- }
- };
- };
-
-}).call(Search.prototype);
-
-exports.Search = Search;
-});
-ace.define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
-"use strict";
-
-var keyUtil = require("../lib/keys");
-
-var CommandManager = function(platform, commands) {
- if (typeof platform !== "string")
- throw new TypeError("'platform' argument must be either 'mac' or 'win'");
-
- this.platform = platform;
- this.commands = {};
- this.commmandKeyBinding = {};
-
- if (commands)
- commands.forEach(this.addCommand, this);
-};
-
-(function() {
-
- this.addCommand = function(command) {
- if (this.commands[command.name])
- this.removeCommand(command);
-
- this.commands[command.name] = command;
-
- if (command.bindKey) {
- this._buildKeyHash(command);
- }
- };
-
- this.removeCommand = function(command) {
- var name = (typeof command === 'string' ? command : command.name);
- command = this.commands[name];
- delete this.commands[name];
-
- // exaustive search is brute force but since removeCommand is
- // not a performance critical operation this should be OK
- var ckb = this.commmandKeyBinding;
- for (var hashId in ckb) {
- for (var key in ckb[hashId]) {
- if (ckb[hashId][key] == command)
- delete ckb[hashId][key];
- }
- }
- };
-
- this.addCommands = function(commands) {
- Object.keys(commands).forEach(function(name) {
- var command = commands[name];
- if (typeof command === "string")
- return this.bindKey(command, name);
-
- if (typeof command === "function")
- command = { exec: command };
-
- if (!command.name)
- command.name = name;
-
- this.addCommand(command);
- }, this);
- };
-
- this.removeCommands = function(commands) {
- Object.keys(commands).forEach(function(name) {
- this.removeCommand(commands[name]);
- }, this);
- };
-
- this.bindKey = function(key, command) {
- if(!key)
- return;
-
- var ckb = this.commmandKeyBinding;
- key.split("|").forEach(function(keyPart) {
- var binding = parseKeys(keyPart, command);
- var hashId = binding.hashId;
- (ckb[hashId] || (ckb[hashId] = {}))[binding.key] = command;
- });
- };
-
- this.bindKeys = function(keyList) {
- Object.keys(keyList).forEach(function(key) {
- this.bindKey(key, keyList[key]);
- }, this);
- };
-
- this._buildKeyHash = function(command) {
- var binding = command.bindKey;
- if (!binding)
- return;
-
- var key = typeof binding == "string" ? binding: binding[this.platform];
- this.bindKey(key, command);
- }
-
- function parseKeys(keys, val, ret) {
- var key;
- var hashId = 0;
- var parts = splitSafe(keys);
-
- for (var i=0, l = parts.length; i < l; i++) {
- if (keyUtil.KEY_MODS[parts[i]])
- hashId = hashId | keyUtil.KEY_MODS[parts[i]];
- else
- key = parts[i] || "-"; //when empty, the splitSafe removed a '-'
- }
-
- return {
- key: key,
- hashId: hashId
- }
- }
-
- function splitSafe(s, separator) {
- return (s.toLowerCase()
- .trim()
- .split(new RegExp("[\\s ]*\\-[\\s ]*", "g"), 999));
- }
-
- this.findKeyCommand = function findKeyCommand(hashId, textOrKey) {
- // Convert keyCode to the string representation.
- if (typeof textOrKey == "number") {
- textOrKey = keyUtil.keyCodeToString(textOrKey);
- }
-
- var ckbr = this.commmandKeyBinding;
- return ckbr[hashId] && ckbr[hashId][textOrKey.toLowerCase()];
- }
-
- this.exec = function(command, editor, args) {
- if (typeof command === 'string')
- command = this.commands[command];
-
- if (!command)
- return false;
-
- if (editor && editor.$readOnly && !command.readOnly)
- return false;
-
- command.exec(editor, args || {});
- return true;
- };
-
- this.toggleRecording = function() {
- if (this.$inReplay)
- return;
- if (this.recording) {
- this.macro.pop();
- this.exec = this.normal_exec;
-
- if (!this.macro.length)
- this.macro = this.oldMacro;
-
- return this.recording = false;
- }
- this.oldMacro = this.macro;
- this.macro = [];
- this.normal_exec = this.exec;
- this.exec = function(command, editor, args) {
- this.macro.push([command, args]);
- return this.normal_exec(command, editor, args);
- };
- return this.recording = true;
- };
-
- this.replay = function(editor) {
- if (this.$inReplay || !this.macro)
- return;
-
- if (this.recording)
- return this.toggleRecording();
-
- try {
- this.$inReplay = true;
- this.macro.forEach(function(x) {
- if (typeof x == "string")
- this.exec(x, editor);
- else
- this.exec(x[0], editor, x[1]);
- }, this)
- } finally {
- this.$inReplay = false;
- }
- };
-
- this.trimMacro = function(m) {
- return m.map(function(x){
- if (typeof x[0] != "string")
- x[0] = x[0].name;
- if (!x[1])
- x = x[0];
- return x
- })
- }
-
-}).call(CommandManager.prototype);
-
-exports.CommandManager = CommandManager;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/undomanager', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var UndoManager = function() {
- this.reset();
-};
-
-(function() {
-
- this.execute = function(options) {
- var deltas = options.args[0];
- this.$doc = options.args[1];
- this.$undoStack.push(deltas);
- this.$redoStack = [];
- };
-
- this.undo = function(dontSelect) {
- var deltas = this.$undoStack.pop();
- var undoSelectionRange = null;
- if (deltas) {
- undoSelectionRange =
- this.$doc.undoChanges(deltas, dontSelect);
- this.$redoStack.push(deltas);
- }
- return undoSelectionRange;
- };
-
- this.redo = function(dontSelect) {
- var deltas = this.$redoStack.pop();
- var redoSelectionRange = null;
- if (deltas) {
- redoSelectionRange =
- this.$doc.redoChanges(deltas, dontSelect);
- this.$undoStack.push(deltas);
- }
- return redoSelectionRange;
- };
-
- this.reset = function() {
- this.$undoStack = [];
- this.$redoStack = [];
- };
-
- this.hasUndo = function() {
- return this.$undoStack.length > 0;
- };
-
- this.hasRedo = function() {
- return this.$redoStack.length > 0;
- };
-
-}).call(UndoManager.prototype);
-
-exports.UndoManager = UndoManager;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian@ajax.org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/virtual_renderer', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/event', 'ace/lib/useragent', 'ace/layer/gutter', 'ace/layer/marker', 'ace/layer/text', 'ace/layer/cursor', 'ace/scrollbar', 'ace/renderloop', 'ace/lib/event_emitter', 'text!ace/css/editor.css'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var dom = require("./lib/dom");
-var event = require("./lib/event");
-var useragent = require("./lib/useragent");
-var GutterLayer = require("./layer/gutter").Gutter;
-var MarkerLayer = require("./layer/marker").Marker;
-var TextLayer = require("./layer/text").Text;
-var CursorLayer = require("./layer/cursor").Cursor;
-var ScrollBar = require("./scrollbar").ScrollBar;
-var RenderLoop = require("./renderloop").RenderLoop;
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var editorCss = require("text!./css/editor.css");
-
-dom.importCssString(editorCss, "ace_editor");
-
-var VirtualRenderer = function(container, theme) {
- var _self = this;
-
- this.container = container;
-
- // TODO: this breaks rendering in Cloud9 with multiple ace instances
-// // Imports CSS once per DOM document ('ace_editor' serves as an identifier).
-// dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
-
- dom.addCssClass(container, "ace_editor");
-
- this.setTheme(theme);
-
- this.$gutter = dom.createElement("div");
- this.$gutter.className = "ace_gutter";
- this.container.appendChild(this.$gutter);
-
- this.scroller = dom.createElement("div");
- this.scroller.className = "ace_scroller";
- this.container.appendChild(this.scroller);
-
- this.content = dom.createElement("div");
- this.content.className = "ace_content";
- this.scroller.appendChild(this.content);
-
- this.$gutterLayer = new GutterLayer(this.$gutter);
- this.$gutterLayer.on("changeGutterWidth", this.onResize.bind(this, true));
-
- this.$markerBack = new MarkerLayer(this.content);
-
- var textLayer = this.$textLayer = new TextLayer(this.content);
- this.canvas = textLayer.element;
-
- this.$markerFront = new MarkerLayer(this.content);
-
- this.characterWidth = textLayer.getCharacterWidth();
- this.lineHeight = textLayer.getLineHeight();
-
- this.$cursorLayer = new CursorLayer(this.content);
- this.$cursorPadding = 8;
-
- // Indicates whether the horizontal scrollbar is visible
- this.$horizScroll = true;
- this.$horizScrollAlwaysVisible = true;
-
- this.scrollBar = new ScrollBar(container);
- this.scrollBar.addEventListener("scroll", function(e) {
- _self.session.setScrollTop(e.data);
- });
-
- this.scrollTop = 0;
- this.scrollLeft = 0;
-
- event.addListener(this.scroller, "scroll", function() {
- _self.session.setScrollLeft(_self.scroller.scrollLeft);
- });
-
- this.cursorPos = {
- row : 0,
- column : 0
- };
-
- this.$textLayer.addEventListener("changeCharacterSize", function() {
- _self.characterWidth = textLayer.getCharacterWidth();
- _self.lineHeight = textLayer.getLineHeight();
- _self.$updatePrintMargin();
- _self.onResize(true);
-
- _self.$loop.schedule(_self.CHANGE_FULL);
- });
-
- this.$size = {
- width: 0,
- height: 0,
- scrollerHeight: 0,
- scrollerWidth: 0
- };
-
- this.layerConfig = {
- width : 1,
- padding : 0,
- firstRow : 0,
- firstRowScreen: 0,
- lastRow : 0,
- lineHeight : 1,
- characterWidth : 1,
- minHeight : 1,
- maxHeight : 1,
- offset : 0,
- height : 1
- };
-
- this.$loop = new RenderLoop(
- this.$renderChanges.bind(this),
- this.container.ownerDocument.defaultView
- );
- this.$loop.schedule(this.CHANGE_FULL);
-
- this.setPadding(4);
- this.$updatePrintMargin();
-};
-
-(function() {
- this.showGutter = true;
-
- this.CHANGE_CURSOR = 1;
- this.CHANGE_MARKER = 2;
- this.CHANGE_GUTTER = 4;
- this.CHANGE_SCROLL = 8;
- this.CHANGE_LINES = 16;
- this.CHANGE_TEXT = 32;
- this.CHANGE_SIZE = 64;
- this.CHANGE_MARKER_BACK = 128;
- this.CHANGE_MARKER_FRONT = 256;
- this.CHANGE_FULL = 512;
- this.CHANGE_H_SCROLL = 1024;
-
- oop.implement(this, EventEmitter);
-
- this.setSession = function(session) {
- this.session = session;
- this.$cursorLayer.setSession(session);
- this.$markerBack.setSession(session);
- this.$markerFront.setSession(session);
- this.$gutterLayer.setSession(session);
- this.$textLayer.setSession(session);
- this.$loop.schedule(this.CHANGE_FULL);
- };
-
- /**
- * Triggers partial update of the text layer
- */
- this.updateLines = function(firstRow, lastRow) {
- if (lastRow === undefined)
- lastRow = Infinity;
-
- if (!this.$changedLines) {
- this.$changedLines = {
- firstRow: firstRow,
- lastRow: lastRow
- };
- }
- else {
- if (this.$changedLines.firstRow > firstRow)
- this.$changedLines.firstRow = firstRow;
-
- if (this.$changedLines.lastRow < lastRow)
- this.$changedLines.lastRow = lastRow;
- }
-
- this.$loop.schedule(this.CHANGE_LINES);
- };
-
- /**
- * Triggers full update of the text layer
- */
- this.updateText = function() {
- this.$loop.schedule(this.CHANGE_TEXT);
- };
-
- /**
- * Triggers a full update of all layers
- */
- this.updateFull = function() {
- this.$loop.schedule(this.CHANGE_FULL);
- };
-
- this.updateFontSize = function() {
- this.$textLayer.checkForSizeChanges();
- };
-
- /**
- * Triggers resize of the editor
- */
- this.onResize = function(force) {
- var changes = this.CHANGE_SIZE;
- var size = this.$size;
-
- var height = dom.getInnerHeight(this.container);
- if (force || size.height != height) {
- size.height = height;
-
- this.scroller.style.height = height + "px";
- size.scrollerHeight = this.scroller.clientHeight;
- this.scrollBar.setHeight(size.scrollerHeight);
-
- if (this.session) {
- this.session.setScrollTop(this.getScrollTop());
- changes = changes | this.CHANGE_FULL;
- }
- }
-
- var width = dom.getInnerWidth(this.container);
- if (force || size.width != width) {
- size.width = width;
-
- var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
- this.scroller.style.left = gutterWidth + "px";
- size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBar.getWidth());
- this.scroller.style.width = size.scrollerWidth + "px";
-
- if (this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
- changes = changes | this.CHANGE_FULL;
- }
-
- this.$loop.schedule(changes);
- };
-
- this.adjustWrapLimit = function() {
- var availableWidth = this.$size.scrollerWidth - this.$padding * 2;
- var limit = Math.floor(availableWidth / this.characterWidth);
- return this.session.adjustWrapLimit(limit);
- };
-
- this.setShowInvisibles = function(showInvisibles) {
- if (this.$textLayer.setShowInvisibles(showInvisibles))
- this.$loop.schedule(this.CHANGE_TEXT);
- };
-
- this.getShowInvisibles = function() {
- return this.$textLayer.showInvisibles;
- };
-
- this.$showPrintMargin = true;
- this.setShowPrintMargin = function(showPrintMargin) {
- this.$showPrintMargin = showPrintMargin;
- this.$updatePrintMargin();
- };
-
- this.getShowPrintMargin = function() {
- return this.$showPrintMargin;
- };
-
- this.$printMarginColumn = 80;
- this.setPrintMarginColumn = function(showPrintMargin) {
- this.$printMarginColumn = showPrintMargin;
- this.$updatePrintMargin();
- };
-
- this.getPrintMarginColumn = function() {
- return this.$printMarginColumn;
- };
-
- this.getShowGutter = function(){
- return this.showGutter;
- };
-
- this.setShowGutter = function(show){
- if(this.showGutter === show)
- return;
- this.$gutter.style.display = show ? "block" : "none";
- this.showGutter = show;
- this.onResize(true);
- };
-
- this.$updatePrintMargin = function() {
- var containerEl;
-
- if (!this.$showPrintMargin && !this.$printMarginEl)
- return;
-
- if (!this.$printMarginEl) {
- containerEl = dom.createElement("div");
- containerEl.className = "ace_print_margin_layer";
- this.$printMarginEl = dom.createElement("div");
- this.$printMarginEl.className = "ace_print_margin";
- containerEl.appendChild(this.$printMarginEl);
- this.content.insertBefore(containerEl, this.$textLayer.element);
- }
-
- var style = this.$printMarginEl.style;
- style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px";
- style.visibility = this.$showPrintMargin ? "visible" : "hidden";
- };
-
- this.getContainerElement = function() {
- return this.container;
- };
-
- this.getMouseEventTarget = function() {
- return this.content;
- };
-
- this.getTextAreaContainer = function() {
- return this.container;
- };
-
- this.moveTextAreaToCursor = function(textarea) {
- // in IE the native cursor always shines through
- // this persists in IE9
- if (useragent.isIE)
- return;
-
- if (this.layerConfig.lastRow === 0)
- return;
-
- var pos = this.$cursorLayer.getPixelPosition();
- if (!pos)
- return;
-
- var bounds = this.content.getBoundingClientRect();
- var offset = this.layerConfig.offset;
-
- textarea.style.left = (bounds.left + pos.left) + "px";
- textarea.style.top = (bounds.top + pos.top - this.scrollTop + offset) + "px";
- };
-
- this.getFirstVisibleRow = function() {
- return this.layerConfig.firstRow;
- };
-
- this.getFirstFullyVisibleRow = function() {
- return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
- };
-
- this.getLastFullyVisibleRow = function() {
- var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
- return this.layerConfig.firstRow - 1 + flint;
- };
-
- this.getLastVisibleRow = function() {
- return this.layerConfig.lastRow;
- };
-
- this.$padding = null;
- this.setPadding = function(padding) {
- this.$padding = padding;
- this.$textLayer.setPadding(padding);
- this.$cursorLayer.setPadding(padding);
- this.$markerFront.setPadding(padding);
- this.$markerBack.setPadding(padding);
- this.$loop.schedule(this.CHANGE_FULL);
- this.$updatePrintMargin();
- };
-
- this.getHScrollBarAlwaysVisible = function() {
- return this.$horizScrollAlwaysVisible;
- };
-
- this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
- if (this.$horizScrollAlwaysVisible != alwaysVisible) {
- this.$horizScrollAlwaysVisible = alwaysVisible;
- if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
- this.$loop.schedule(this.CHANGE_SCROLL);
- }
- };
-
- this.$updateScrollBar = function() {
- this.scrollBar.setInnerHeight(this.layerConfig.maxHeight);
- this.scrollBar.setScrollTop(this.scrollTop);
- };
-
- this.$renderChanges = function(changes) {
- if (!changes || !this.session)
- return;
-
- // text, scrolling and resize changes can cause the view port size to change
- if (changes & this.CHANGE_FULL ||
- changes & this.CHANGE_SIZE ||
- changes & this.CHANGE_TEXT ||
- changes & this.CHANGE_LINES ||
- changes & this.CHANGE_SCROLL
- )
- this.$computeLayerConfig();
-
- // full
- if (changes & this.CHANGE_FULL) {
- this.$textLayer.update(this.layerConfig);
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- this.$markerBack.update(this.layerConfig);
- this.$markerFront.update(this.layerConfig);
- this.$cursorLayer.update(this.layerConfig);
- this.$updateScrollBar();
- return;
- }
-
- // scrolling
- if (changes & this.CHANGE_SCROLL) {
- if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
- this.$textLayer.update(this.layerConfig);
- else
- this.$textLayer.scrollLines(this.layerConfig);
-
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- this.$markerBack.update(this.layerConfig);
- this.$markerFront.update(this.layerConfig);
- this.$cursorLayer.update(this.layerConfig);
- this.$updateScrollBar();
- return;
- }
-
- if (changes & this.CHANGE_TEXT) {
- this.$textLayer.update(this.layerConfig);
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- }
- else if (changes & this.CHANGE_LINES) {
- this.$updateLines();
- this.$updateScrollBar();
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- } else if (changes & this.CHANGE_GUTTER) {
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- }
-
- if (changes & this.CHANGE_CURSOR)
- this.$cursorLayer.update(this.layerConfig);
-
- if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
- this.$markerFront.update(this.layerConfig);
- }
-
- if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
- this.$markerBack.update(this.layerConfig);
- }
-
- if (changes & this.CHANGE_SIZE)
- this.$updateScrollBar();
-
- if (changes & this.CHANGE_H_SCROLL) {
- //this.content.style.left = -this.scrollLeft + "px";
- this.scroller.scrollLeft = this.scrollLeft
- }
- };
-
- this.$computeLayerConfig = function() {
- var session = this.session;
-
- var offset = this.scrollTop % this.lineHeight;
- var minHeight = this.$size.scrollerHeight + this.lineHeight;
-
- var longestLine = this.$getLongestLine();
-
- var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
- var horizScrollChanged = this.$horizScroll !== horizScroll;
- this.$horizScroll = horizScroll;
- if (horizScrollChanged)
- this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
-
- var maxHeight = this.session.getScreenLength() * this.lineHeight;
- this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
-
- var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
- var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
- var lastRow = firstRow + lineCount;
-
- // Map lines on the screen to lines in the document.
- var firstRowScreen, firstRowHeight;
- var lineHeight = { lineHeight: this.lineHeight };
- firstRow = session.screenToDocumentRow(firstRow, 0);
-
- // Check if firstRow is inside of a foldLine. If true, then use the first
- // row of the foldLine.
- var foldLine = session.getFoldLine(firstRow);
- if (foldLine) {
- firstRow = foldLine.start.row;
- }
-
- firstRowScreen = session.documentToScreenRow(firstRow, 0);
- firstRowHeight = session.getRowHeight(lineHeight, firstRow);
-
- lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
- minHeight = this.$size.scrollerHeight + session.getRowHeight(lineHeight, lastRow)+
- firstRowHeight;
-
- offset = this.scrollTop - firstRowScreen * this.lineHeight;
-
- this.layerConfig = {
- width : longestLine,
- padding : this.$padding,
- firstRow : firstRow,
- firstRowScreen: firstRowScreen,
- lastRow : lastRow,
- lineHeight : this.lineHeight,
- characterWidth : this.characterWidth,
- minHeight : minHeight,
- maxHeight : maxHeight,
- offset : offset,
- height : this.$size.scrollerHeight
- };
-
- // For debugging.
- // console.log(JSON.stringify(this.layerConfig));
-
- this.$gutterLayer.element.style.marginTop = (-offset) + "px";
- this.content.style.marginTop = (-offset) + "px";
- this.content.style.width = longestLine + 2 * this.$padding + "px";
- this.content.style.height = minHeight + "px";
-
- // Horizontal scrollbar visibility may have changed, which changes
- // the client height of the scroller
- if (horizScrollChanged)
- this.onResize(true);
- };
-
- this.$updateLines = function() {
- var firstRow = this.$changedLines.firstRow;
- var lastRow = this.$changedLines.lastRow;
- this.$changedLines = null;
-
- var layerConfig = this.layerConfig;
-
- // if the update changes the width of the document do a full redraw
- if (layerConfig.width != this.$getLongestLine())
- return this.$textLayer.update(layerConfig);
-
- if (firstRow > layerConfig.lastRow + 1) { return; }
- if (lastRow < layerConfig.firstRow) { return; }
-
- // if the last row is unknown -> redraw everything
- if (lastRow === Infinity) {
- if (this.showGutter)
- this.$gutterLayer.update(layerConfig);
- this.$textLayer.update(layerConfig);
- return;
- }
-
- // else update only the changed rows
- this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
- };
-
- this.$getLongestLine = function() {
- var charCount = this.session.getScreenWidth();
- if (this.$textLayer.showInvisibles)
- charCount += 1;
-
- return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));
- };
-
- this.updateFrontMarkers = function() {
- this.$markerFront.setMarkers(this.session.getMarkers(true));
- this.$loop.schedule(this.CHANGE_MARKER_FRONT);
- };
-
- this.updateBackMarkers = function() {
- this.$markerBack.setMarkers(this.session.getMarkers());
- this.$loop.schedule(this.CHANGE_MARKER_BACK);
- };
-
- this.addGutterDecoration = function(row, className){
- this.$gutterLayer.addGutterDecoration(row, className);
- this.$loop.schedule(this.CHANGE_GUTTER);
- };
-
- this.removeGutterDecoration = function(row, className){
- this.$gutterLayer.removeGutterDecoration(row, className);
- this.$loop.schedule(this.CHANGE_GUTTER);
- };
-
- this.setBreakpoints = function(rows) {
- this.$gutterLayer.setBreakpoints(rows);
- this.$loop.schedule(this.CHANGE_GUTTER);
- };
-
- this.setAnnotations = function(annotations) {
- this.$gutterLayer.setAnnotations(annotations);
- this.$loop.schedule(this.CHANGE_GUTTER);
- };
-
- this.updateCursor = function() {
- this.$loop.schedule(this.CHANGE_CURSOR);
- };
-
- this.hideCursor = function() {
- this.$cursorLayer.hideCursor();
- };
-
- this.showCursor = function() {
- this.$cursorLayer.showCursor();
- };
-
- this.scrollCursorIntoView = function() {
- // the editor is not visible
- if (this.$size.scrollerHeight === 0)
- return;
-
- var pos = this.$cursorLayer.getPixelPosition();
-
- var left = pos.left;
- var top = pos.top;
-
- if (this.scrollTop > top) {
- this.session.setScrollTop(top);
- }
-
- if (this.scrollTop + this.$size.scrollerHeight < top + this.lineHeight) {
- this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
- }
-
- var scrollLeft = this.scrollLeft;
-
- if (scrollLeft > left) {
- if (left < this.$padding + 2 * this.layerConfig.characterWidth)
- left = 0;
- this.session.setScrollLeft(left);
- }
-
- if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
- this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
- }
- };
-
- this.getScrollTop = function() {
- return this.session.getScrollTop();
- };
-
- this.getScrollLeft = function() {
- return this.session.getScrollTop();
- };
-
- this.getScrollTopRow = function() {
- return this.scrollTop / this.lineHeight;
- };
-
- this.getScrollBottomRow = function() {
- return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
- };
-
- this.scrollToRow = function(row) {
- this.session.setScrollTop(row * this.lineHeight);
- };
-
- this.scrollToLine = function(line, center) {
- var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
- var offset = pos.top;
- if (center)
- offset -= this.$size.scrollerHeight / 2;
-
- this.session.setScrollTop(offset);
- };
-
- this.scrollToY = function(scrollTop) {
- // after calling scrollBar.setScrollTop
- // scrollbar sends us event with same scrollTop. ignore it
- if (this.scrollTop !== scrollTop) {
- this.$loop.schedule(this.CHANGE_SCROLL);
- this.scrollTop = scrollTop;
- }
- };
-
- this.scrollToX = function(scrollLeft) {
- if (scrollLeft <= this.$padding)
- scrollLeft = 0;
-
- if (this.scrollLeft !== scrollLeft) {
- this.$loop.schedule(this.CHANGE_H_SCROLL);
- this.scrollLeft = scrollLeft;
- }
- };
-
- this.scrollBy = function(deltaX, deltaY) {
- deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);
- deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);
- };
-
- this.isScrollableBy = function(deltaX, deltaY) {
- if (deltaY < 0 && this.session.getScrollTop() > 0)
- return true;
- if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight < this.layerConfig.maxHeight)
- return true;
- // todo: handle horizontal scrolling
- };
-
- this.screenToTextCoordinates = function(pageX, pageY) {
- var canvasPos = this.scroller.getBoundingClientRect();
-
- var col = Math.round(
- (pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft())
- / this.characterWidth
- );
- var row = Math.floor(
- (pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop())
- / this.lineHeight
- );
-
- return this.session.screenToDocumentPosition(row, Math.max(col, 0));
- };
-
- this.textToScreenCoordinates = function(row, column) {
- var canvasPos = this.scroller.getBoundingClientRect();
- var pos = this.session.documentToScreenPosition(row, column);
-
- var x = this.$padding + Math.round(pos.column * this.characterWidth);
- var y = pos.row * this.lineHeight;
-
- return {
- pageX: canvasPos.left + x - this.scrollLeft,
- pageY: canvasPos.top + y - this.scrollTop
- };
- };
-
- this.visualizeFocus = function() {
- dom.addCssClass(this.container, "ace_focus");
- };
-
- this.visualizeBlur = function() {
- dom.removeCssClass(this.container, "ace_focus");
- };
-
- this.showComposition = function(position) {
- if (!this.$composition) {
- this.$composition = dom.createElement("div");
- this.$composition.className = "ace_composition";
- this.content.appendChild(this.$composition);
- }
-
- this.$composition.innerHTML = "&#160;";
-
- var pos = this.$cursorLayer.getPixelPosition();
- var style = this.$composition.style;
- style.top = pos.top + "px";
- style.left = (pos.left + this.$padding) + "px";
- style.height = this.lineHeight + "px";
-
- this.hideCursor();
- };
-
- this.setCompositionText = function(text) {
- dom.setInnerText(this.$composition, text);
- };
-
- this.hideComposition = function() {
- this.showCursor();
-
- if (!this.$composition)
- return;
-
- var style = this.$composition.style;
- style.top = "-10000px";
- style.left = "-10000px";
- };
-
- this.setTheme = function(theme) {
- var _self = this;
-
- this.$themeValue = theme;
- if (!theme || typeof theme == "string") {
- theme = theme || "ace/theme/textmate";
- require([theme], function(theme) {
- afterLoad(theme);
- });
- } else {
- afterLoad(theme);
- }
-
- function afterLoad(theme) {
- dom.importCssString(
- theme.cssText,
- theme.cssClass,
- _self.container.ownerDocument
- );
-
- if (_self.$theme)
- dom.removeCssClass(_self.container, _self.$theme);
-
- _self.$theme = theme ? theme.cssClass : null;
-
- if (_self.$theme)
- dom.addCssClass(_self.container, _self.$theme);
-
- if (theme && theme.isDark)
- dom.addCssClass(_self.container, "ace_dark");
- else
- dom.removeCssClass(_self.container, "ace_dark");
-
- // force re-measure of the gutter width
- if (_self.$size) {
- _self.$size.width = 0;
- _self.onResize();
- }
- }
- };
-
- this.getTheme = function() {
- return this.$themeValue;
- };
-
- // Methods allows to add / remove CSS classnames to the editor element.
- // This feature can be used by plug-ins to provide a visual indication of
- // a certain mode that editor is in.
-
- this.setStyle = function setStyle(style) {
- dom.addCssClass(this.container, style);
- };
-
- this.unsetStyle = function unsetStyle(style) {
- dom.removeCssClass(this.container, style);
- };
-
- this.destroy = function() {
- this.$textLayer.destroy();
- this.$cursorLayer.destroy();
- };
-
-}).call(VirtualRenderer.prototype);
-
-exports.VirtualRenderer = VirtualRenderer;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/layer/gutter', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var dom = require("../lib/dom");
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var Gutter = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_gutter-layer";
- parentEl.appendChild(this.element);
- this.setShowFoldWidgets(this.$showFoldWidgets);
-
- this.gutterWidth = 0;
-
- this.$breakpoints = [];
- this.$annotations = [];
- this.$decorations = [];
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.addGutterDecoration = function(row, className){
- if (!this.$decorations[row])
- this.$decorations[row] = "";
- this.$decorations[row] += " ace_" + className;
- };
-
- this.removeGutterDecoration = function(row, className){
- this.$decorations[row] = this.$decorations[row].replace(" ace_" + className, "");
- };
-
- this.setBreakpoints = function(rows) {
- this.$breakpoints = rows.concat();
- };
-
- this.setAnnotations = function(annotations) {
- // iterate over sparse array
- this.$annotations = [];
- for (var row in annotations) if (annotations.hasOwnProperty(row)) {
- var rowAnnotations = annotations[row];
- if (!rowAnnotations)
- continue;
-
- var rowInfo = this.$annotations[row] = {
- text: []
- };
- for (var i=0; i<rowAnnotations.length; i++) {
- var annotation = rowAnnotations[i];
- var annoText = annotation.text.replace(/"/g, "&quot;").replace(/'/g, "&#8217;").replace(/</, "&lt;");
- if (rowInfo.text.indexOf(annoText) === -1)
- rowInfo.text.push(annoText);
- var type = annotation.type;
- if (type == "error")
- rowInfo.className = "ace_error";
- else if (type == "warning" && rowInfo.className != "ace_error")
- rowInfo.className = "ace_warning";
- else if (type == "info" && (!rowInfo.className))
- rowInfo.className = "ace_info";
- }
- }
- };
-
- this.update = function(config) {
- this.$config = config;
-
- var emptyAnno = {className: "", text: []};
- var html = [];
- var i = config.firstRow;
- var lastRow = config.lastRow;
- var fold = this.session.getNextFoldLine(i);
- var foldStart = fold ? fold.start.row : Infinity;
- var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets;
-
- while (true) {
- if(i > foldStart) {
- i = fold.end.row + 1;
- fold = this.session.getNextFoldLine(i, fold);
- foldStart = fold ?fold.start.row :Infinity;
- }
- if(i > lastRow)
- break;
-
- var annotation = this.$annotations[i] || emptyAnno;
- html.push("<div class='ace_gutter-cell",
- this.$decorations[i] || "",
- this.$breakpoints[i] ? " ace_breakpoint " : " ",
- annotation.className,
- "' title='", annotation.text.join("\n"),
- "' style='height:", config.lineHeight, "px;'>", (i+1));
-
- if (foldWidgets) {
- var c = foldWidgets[i];
- // check if cached value is invalidated and we need to recompute
- if (c == null)
- c = foldWidgets[i] = this.session.getFoldWidget(i);
- if (c)
- html.push(
- "<span class='ace_fold-widget ", c,
- c == "start" && i == foldStart && i < fold.end.row ? " closed" : " open",
- "'></span>"
- );
- }
-
- var wrappedRowLength = this.session.getRowLength(i) - 1;
- while (wrappedRowLength--) {
- html.push("</div><div class='ace_gutter-cell' style='height:", config.lineHeight, "px'>\xA6");
- }
-
- html.push("</div>");
-
- i++;
- }
- this.element = dom.setInnerHtml(this.element, html.join(""));
- this.element.style.height = config.minHeight + "px";
-
- var gutterWidth = this.element.offsetWidth;
- if (gutterWidth !== this.gutterWidth) {
- this.gutterWidth = gutterWidth;
- this._emit("changeGutterWidth", gutterWidth);
- }
- };
-
- this.$showFoldWidgets = true;
- this.setShowFoldWidgets = function(show) {
- if (show)
- dom.addCssClass(this.element, "ace_folding-enabled");
- else
- dom.removeCssClass(this.element, "ace_folding-enabled");
-
- this.$showFoldWidgets = show;
- };
-
- this.getShowFoldWidgets = function() {
- return this.$showFoldWidgets;
- };
-
-}).call(Gutter.prototype);
-
-exports.Gutter = Gutter;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/layer/marker', ['require', 'exports', 'module' , 'ace/range', 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-var dom = require("../lib/dom");
-
-var Marker = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_marker-layer";
- parentEl.appendChild(this.element);
-};
-
-(function() {
-
- this.$padding = 0;
-
- this.setPadding = function(padding) {
- this.$padding = padding;
- };
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.setMarkers = function(markers) {
- this.markers = markers;
- };
-
- this.update = function(config) {
- var config = config || this.config;
- if (!config)
- return;
-
- this.config = config;
-
-
- var html = [];
- for ( var key in this.markers) {
- var marker = this.markers[key];
-
- var range = marker.range.clipRows(config.firstRow, config.lastRow);
- if (range.isEmpty()) continue;
-
- range = range.toScreenRange(this.session);
- if (marker.renderer) {
- var top = this.$getTop(range.start.row, config);
- var left = Math.round(
- this.$padding + range.start.column * config.characterWidth
- );
- marker.renderer(html, range, left, top, config);
- }
- else if (range.isMultiLine()) {
- if (marker.type == "text") {
- this.drawTextMarker(html, range, marker.clazz, config);
- } else {
- this.drawMultiLineMarker(
- html, range, marker.clazz, config,
- marker.type
- );
- }
- }
- else {
- this.drawSingleLineMarker(
- html, range, marker.clazz, config,
- null, marker.type
- );
- }
- }
- this.element = dom.setInnerHtml(this.element, html.join(""));
- };
-
- this.$getTop = function(row, layerConfig) {
- return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
- };
-
- /**
- * Draws a marker, which spans a range of text in a single line
- */
- this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig) {
- // selection start
- var row = range.start.row;
-
- var lineRange = new Range(
- row, range.start.column,
- row, this.session.getScreenLastRowColumn(row)
- );
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, "text");
-
- // selection end
- row = range.end.row;
- lineRange = new Range(row, 0, row, range.end.column);
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, "text");
-
- for (row = range.start.row + 1; row < range.end.row; row++) {
- lineRange.start.row = row;
- lineRange.end.row = row;
- lineRange.end.column = this.session.getScreenLastRowColumn(row);
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, "text");
- }
- };
-
- /**
- * Draws a multi line marker, where lines span the full width
- */
- this.drawMultiLineMarker = function(stringBuilder, range, clazz, layerConfig, type) {
- var padding = type === "background" ? 0 : this.$padding;
- var layerWidth = layerConfig.width + 2 * this.$padding - padding;
- // from selection start to the end of the line
- var height = layerConfig.lineHeight;
- var width = Math.round(layerWidth - (range.start.column * layerConfig.characterWidth));
- var top = this.$getTop(range.start.row, layerConfig);
- var left = Math.round(
- padding + range.start.column * layerConfig.characterWidth
- );
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", width, "px;",
- "top:", top, "px;",
- "left:", left, "px;'></div>"
- );
-
- // from start of the last line to the selection end
- top = this.$getTop(range.end.row, layerConfig);
- width = Math.round(range.end.column * layerConfig.characterWidth);
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", width, "px;",
- "top:", top, "px;",
- "left:", padding, "px;'></div>"
- );
-
- // all the complete lines
- height = (range.end.row - range.start.row - 1) * layerConfig.lineHeight;
- if (height < 0)
- return;
- top = this.$getTop(range.start.row + 1, layerConfig);
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", layerWidth, "px;",
- "top:", top, "px;",
- "left:", padding, "px;'></div>"
- );
- };
-
- /**
- * Draws a marker which covers one single full line
- */
- this.drawSingleLineMarker = function(stringBuilder, range, clazz, layerConfig, extraLength, type) {
- var padding = type === "background" ? 0 : this.$padding;
- var height = layerConfig.lineHeight;
-
- if (type === "background")
- var width = layerConfig.width;
- else
- width = Math.round((range.end.column + (extraLength || 0) - range.start.column) * layerConfig.characterWidth);
-
- var top = this.$getTop(range.start.row, layerConfig);
- var left = Math.round(
- padding + range.start.column * layerConfig.characterWidth
- );
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", width, "px;",
- "top:", top, "px;",
- "left:", left,"px;'></div>"
- );
- };
-
-}).call(Marker.prototype);
-
-exports.Marker = Marker;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- * Mihai Sucan <mihai.sucan@gmail.com>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/layer/text', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/lang', 'ace/lib/useragent', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var dom = require("../lib/dom");
-var lang = require("../lib/lang");
-var useragent = require("../lib/useragent");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var Text = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_text-layer";
- parentEl.appendChild(this.element);
-
- this.$characterSize = this.$measureSizes() || {width: 0, height: 0};
- this.$pollSizeChanges();
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.EOF_CHAR = "\xB6"; //"&para;";
- this.EOL_CHAR = "\xAC"; //"&not;";
- this.TAB_CHAR = "\u2192"; //"&rarr;";
- this.SPACE_CHAR = "\xB7"; //"&middot;";
- this.$padding = 0;
-
- this.setPadding = function(padding) {
- this.$padding = padding;
- this.element.style.padding = "0 " + padding + "px";
- };
-
- this.getLineHeight = function() {
- return this.$characterSize.height || 1;
- };
-
- this.getCharacterWidth = function() {
- return this.$characterSize.width || 1;
- };
-
- this.checkForSizeChanges = function() {
- var size = this.$measureSizes();
- if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
- this.$characterSize = size;
- this._emit("changeCharacterSize", {data: size});
- }
- };
-
- this.$pollSizeChanges = function() {
- var self = this;
- this.$pollSizeChangesTimer = setInterval(function() {
- self.checkForSizeChanges();
- }, 500);
- };
-
- this.$fontStyles = {
- fontFamily : 1,
- fontSize : 1,
- fontWeight : 1,
- fontStyle : 1,
- lineHeight : 1
- };
-
- this.$measureSizes = function() {
- var n = 1000;
- if (!this.$measureNode) {
- var measureNode = this.$measureNode = dom.createElement("div");
- var style = measureNode.style;
-
- style.width = style.height = "auto";
- style.left = style.top = (-n * 40) + "px";
-
- style.visibility = "hidden";
- style.position = "absolute";
- style.overflow = "visible";
- style.whiteSpace = "nowrap";
-
- // in FF 3.6 monospace fonts can have a fixed sub pixel width.
- // that's why we have to measure many characters
- // Note: characterWidth can be a float!
- measureNode.innerHTML = lang.stringRepeat("Xy", n);
-
- if (this.element.ownerDocument.body) {
- this.element.ownerDocument.body.appendChild(measureNode);
- } else {
- var container = this.element.parentNode;
- while (!dom.hasCssClass(container, "ace_editor"))
- container = container.parentNode;
- container.appendChild(measureNode);
- }
-
- }
-
- var style = this.$measureNode.style;
- var computedStyle = dom.computedStyle(this.element);
- for (var prop in this.$fontStyles)
- style[prop] = computedStyle[prop];
-
- var size = {
- height: this.$measureNode.offsetHeight,
- width: this.$measureNode.offsetWidth / (n * 2)
- };
-
- // Size and width can be null if the editor is not visible or
- // detached from the document
- if (size.width == 0 && size.height == 0)
- return null;
-
- return size;
- };
-
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.showInvisibles = false;
- this.setShowInvisibles = function(showInvisibles) {
- if (this.showInvisibles == showInvisibles)
- return false;
-
- this.showInvisibles = showInvisibles;
- return true;
- };
-
- this.$tabStrings = [];
- this.$computeTabString = function() {
- var tabSize = this.session.getTabSize();
- var tabStr = this.$tabStrings = [0];
- for (var i = 1; i < tabSize + 1; i++) {
- if (this.showInvisibles) {
- tabStr.push("<span class='ace_invisible'>"
- + this.TAB_CHAR
- + new Array(i).join("&#160;")
- + "</span>");
- } else {
- tabStr.push(new Array(i+1).join("&#160;"));
- }
- }
-
- };
-
- this.updateLines = function(config, firstRow, lastRow) {
- this.$computeTabString();
- // Due to wrap line changes there can be new lines if e.g.
- // the line to updated wrapped in the meantime.
- if (this.config.lastRow != config.lastRow ||
- this.config.firstRow != config.firstRow) {
- this.scrollLines(config);
- }
- this.config = config;
-
- var first = Math.max(firstRow, config.firstRow);
- var last = Math.min(lastRow, config.lastRow);
-
- var lineElements = this.element.childNodes;
- var lineElementsIdx = 0;
-
- for (var row = config.firstRow; row < first; row++) {
- var foldLine = this.session.getFoldLine(row);
- if (foldLine) {
- if (foldLine.containsRow(first)) {
- first = foldLine.start.row;
- break;
- } else {
- row = foldLine.end.row;
- }
- }
- lineElementsIdx ++;
- }
-
- for (var i=first; i<=last; i++) {
- var lineElement = lineElements[lineElementsIdx++];
- if (!lineElement)
- continue;
-
- var html = [];
- var tokens = this.session.getTokens(i, i);
- this.$renderLine(html, i, tokens[0].tokens, !this.$useLineGroups());
- lineElement = dom.setInnerHtml(lineElement, html.join(""));
-
- i = this.session.getRowFoldEnd(i);
- }
- };
-
- this.scrollLines = function(config) {
- this.$computeTabString();
- var oldConfig = this.config;
- this.config = config;
-
- if (!oldConfig || oldConfig.lastRow < config.firstRow)
- return this.update(config);
-
- if (config.lastRow < oldConfig.firstRow)
- return this.update(config);
-
- var el = this.element;
- if (oldConfig.firstRow < config.firstRow)
- for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)
- el.removeChild(el.firstChild);
-
- if (oldConfig.lastRow > config.lastRow)
- for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)
- el.removeChild(el.lastChild);
-
- if (config.firstRow < oldConfig.firstRow) {
- var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);
- if (el.firstChild)
- el.insertBefore(fragment, el.firstChild);
- else
- el.appendChild(fragment);
- }
-
- if (config.lastRow > oldConfig.lastRow) {
- var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);
- el.appendChild(fragment);
- }
- };
-
- this.$renderLinesFragment = function(config, firstRow, lastRow) {
- var fragment = this.element.ownerDocument.createDocumentFragment(),
- row = firstRow,
- fold = this.session.getNextFoldLine(row),
- foldStart = fold ?fold.start.row :Infinity;
-
- while (true) {
- if (row > foldStart) {
- row = fold.end.row+1;
- fold = this.session.getNextFoldLine(row, fold);
- foldStart = fold ?fold.start.row :Infinity;
- }
- if (row > lastRow)
- break;
-
- var container = dom.createElement("div");
-
- var html = [];
- // Get the tokens per line as there might be some lines in between
- // beeing folded.
- // OPTIMIZE: If there is a long block of unfolded lines, just make
- // this call once for that big block of unfolded lines.
- var tokens = this.session.getTokens(row, row);
- if (tokens.length == 1)
- this.$renderLine(html, row, tokens[0].tokens, false);
-
- // don't use setInnerHtml since we are working with an empty DIV
- container.innerHTML = html.join("");
- if (this.$useLineGroups()) {
- container.className = 'ace_line_group';
- fragment.appendChild(container);
- } else {
- var lines = container.childNodes
- while(lines.length)
- fragment.appendChild(lines[0]);
- }
-
- row++;
- }
- return fragment;
- };
-
- this.update = function(config) {
- this.$computeTabString();
- this.config = config;
-
- var html = [];
- var firstRow = config.firstRow, lastRow = config.lastRow;
-
- var row = firstRow,
- fold = this.session.getNextFoldLine(row),
- foldStart = fold ?fold.start.row :Infinity;
-
- while (true) {
- if (row > foldStart) {
- row = fold.end.row+1;
- fold = this.session.getNextFoldLine(row, fold);
- foldStart = fold ?fold.start.row :Infinity;
- }
- if (row > lastRow)
- break;
-
- if (this.$useLineGroups())
- html.push("<div class='ace_line_group'>")
-
- // Get the tokens per line as there might be some lines in between
- // beeing folded.
- // OPTIMIZE: If there is a long block of unfolded lines, just make
- // this call once for that big block of unfolded lines.
- var tokens = this.session.getTokens(row, row);
- if (tokens.length == 1)
- this.$renderLine(html, row, tokens[0].tokens, false);
-
- if (this.$useLineGroups())
- html.push("</div>"); // end the line group
-
- row++;
- }
- this.element = dom.setInnerHtml(this.element, html.join(""));
- };
-
- this.$textToken = {
- "text": true,
- "rparen": true,
- "lparen": true
- };
-
- this.$renderToken = function(stringBuilder, screenColumn, token, value) {
- var self = this;
- var replaceReg = /\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g;
- var replaceFunc = function(c, a, b, tabIdx, idx4) {
- if (c.charCodeAt(0) == 32) {
- return new Array(c.length+1).join("&#160;");
- } else if (c == "\t") {
- var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
- screenColumn += tabSize - 1;
- return self.$tabStrings[tabSize];
- } else if (c == "&") {
- if (useragent.isOldGecko)
- return "&";
- else
- return "&amp;";
- } else if (c == "<") {
- return "&lt;";
- } else if (c == "\u3000") {
- // U+3000 is both invisible AND full-width, so must be handled uniquely
- var classToUse = self.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk";
- var space = self.showInvisibles ? self.SPACE_CHAR : "";
- screenColumn += 1;
- return "<span class='" + classToUse + "' style='width:" +
- (self.config.characterWidth * 2) +
- "px'>" + space + "</span>";
- } else if (c.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)) {
- if (self.showInvisibles) {
- var space = new Array(c.length+1).join(self.SPACE_CHAR);
- return "<span class='ace_invisible'>" + space + "</span>";
- } else {
- return "&#160;";
- }
- } else {
- screenColumn += 1;
- return "<span class='ace_cjk' style='width:" +
- (self.config.characterWidth * 2) +
- "px'>" + c + "</span>";
- }
- };
-
- var output = value.replace(replaceReg, replaceFunc);
-
- if (!this.$textToken[token.type]) {
- var classes = "ace_" + token.type.replace(/\./g, " ace_");
- var style = "";
- if (token.type == "fold")
- style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' ";
- stringBuilder.push("<span class='", classes, "'", style, ">", output, "</span>");
- }
- else {
- stringBuilder.push(output);
- }
- return screenColumn + value.length;
- };
-
- this.$renderLineCore = function(stringBuilder, lastRow, tokens, splits, onlyContents) {
- var chars = 0;
- var split = 0;
- var splitChars;
- var screenColumn = 0;
- var self = this;
-
- if (!splits || splits.length == 0)
- splitChars = Number.MAX_VALUE;
- else
- splitChars = splits[0];
-
- if (!onlyContents) {
- stringBuilder.push("<div class='ace_line' style='height:",
- this.config.lineHeight, "px",
- "'>"
- );
- }
-
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- var value = token.value;
-
- if (chars + value.length < splitChars) {
- screenColumn = self.$renderToken(
- stringBuilder, screenColumn, token, value
- );
- chars += value.length;
- }
- else {
- while (chars + value.length >= splitChars) {
- screenColumn = self.$renderToken(
- stringBuilder, screenColumn,
- token, value.substring(0, splitChars - chars)
- );
- value = value.substring(splitChars - chars);
- chars = splitChars;
-
- if (!onlyContents) {
- stringBuilder.push("</div>",
- "<div class='ace_line' style='height:",
- this.config.lineHeight, "px",
- "'>"
- );
- }
-
- split ++;
- screenColumn = 0;
- splitChars = splits[split] || Number.MAX_VALUE;
- }
- if (value.length != 0) {
- chars += value.length;
- screenColumn = self.$renderToken(
- stringBuilder, screenColumn, token, value
- );
- }
- }
- }
-
- if (this.showInvisibles) {
- if (lastRow !== this.session.getLength() - 1)
- stringBuilder.push("<span class='ace_invisible'>" + this.EOL_CHAR + "</span>");
- else
- stringBuilder.push("<span class='ace_invisible'>" + this.EOF_CHAR + "</span>");
- }
- if (!onlyContents)
- stringBuilder.push("</div>");
- };
-
- this.$renderLine = function(stringBuilder, row, tokens, onlyContents) {
- // Check if the line to render is folded or not. If not, things are
- // simple, otherwise, we need to fake some things...
- if (!this.session.isRowFolded(row)) {
- var splits = this.session.getRowSplitData(row);
- this.$renderLineCore(stringBuilder, row, tokens, splits, onlyContents);
- } else {
- this.$renderFoldLine(stringBuilder, row, tokens, onlyContents);
- }
- };
-
- this.$renderFoldLine = function(stringBuilder, row, tokens, onlyContents) {
- var session = this.session,
- foldLine = session.getFoldLine(row),
- renderTokens = [];
-
- function addTokens(tokens, from, to) {
- var idx = 0, col = 0;
- while ((col + tokens[idx].value.length) < from) {
- col += tokens[idx].value.length;
- idx++;
-
- if (idx == tokens.length) {
- return;
- }
- }
- if (col != from) {
- var value = tokens[idx].value.substring(from - col);
- // Check if the token value is longer then the from...to spacing.
- if (value.length > (to - from)) {
- value = value.substring(0, to - from);
- }
-
- renderTokens.push({
- type: tokens[idx].type,
- value: value
- });
-
- col = from + value.length;
- idx += 1;
- }
-
- while (col < to) {
- var value = tokens[idx].value;
- if (value.length + col > to) {
- value = value.substring(0, to - col);
- }
- renderTokens.push({
- type: tokens[idx].type,
- value: value
- });
- col += value.length;
- idx += 1;
- }
- }
-
- foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {
- if (placeholder) {
- renderTokens.push({
- type: "fold",
- value: placeholder
- });
- } else {
- if (isNewRow) {
- tokens = this.session.getTokens(row, row)[0].tokens;
- }
- if (tokens.length != 0) {
- addTokens(tokens, lastColumn, column);
- }
- }
- }.bind(this), foldLine.end.row, this.session.getLine(foldLine.end.row).length);
-
- // TODO: Build a fake splits array!
- var splits = this.session.$useWrapMode?this.session.$wrapData[row]:null;
- this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents);
- };
-
- this.$useLineGroups = function() {
- // For the updateLines function to work correctly, it's important that the
- // child nodes of this.element correspond on a 1-to-1 basis to rows in the
- // document (as distinct from lines on the screen). For sessions that are
- // wrapped, this means we need to add a layer to the node hierarchy (tagged
- // with the class name ace_line_group).
- return this.session.getUseWrapMode();
- };
-
- this.destroy = function() {
- clearInterval(this.$pollSizeChangesTimer);
- if (this.$measureNode)
- this.$measureNode.parentNode.removeChild(this.$measureNode);
- delete this.$measureNode;
- };
-
-}).call(Text.prototype);
-
-exports.Text = Text;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/layer/cursor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-var dom = require("../lib/dom");
-
-var Cursor = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_cursor-layer";
- parentEl.appendChild(this.element);
-
- this.cursor = dom.createElement("div");
- this.cursor.className = "ace_cursor ace_hidden";
- this.element.appendChild(this.cursor);
-
- this.isVisible = false;
-};
-
-(function() {
-
- this.$padding = 0;
- this.setPadding = function(padding) {
- this.$padding = padding;
- };
-
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.hideCursor = function() {
- this.isVisible = false;
- dom.addCssClass(this.cursor, "ace_hidden");
- clearInterval(this.blinkId);
- };
-
- this.showCursor = function() {
- this.isVisible = true;
- dom.removeCssClass(this.cursor, "ace_hidden");
- this.cursor.style.visibility = "visible";
- this.restartTimer();
- };
-
- this.restartTimer = function() {
- clearInterval(this.blinkId);
- if (!this.isVisible) {
- return;
- }
-
- var cursor = this.cursor;
- this.blinkId = setInterval(function() {
- cursor.style.visibility = "hidden";
- setTimeout(function() {
- cursor.style.visibility = "visible";
- }, 400);
- }, 1000);
- };
-
- this.getPixelPosition = function(position, onScreen) {
- if (!this.config || !this.session) {
- return {
- left : 0,
- top : 0
- };
- }
-
- if (!position)
- position = this.session.selection.getCursor();
- var pos = this.session.documentToScreenPosition(position);
- var cursorLeft = Math.round(this.$padding +
- pos.column * this.config.characterWidth);
- var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
- this.config.lineHeight;
-
- return {
- left : cursorLeft,
- top : cursorTop
- };
- };
-
- this.update = function(config) {
- this.config = config;
-
- this.pixelPos = this.getPixelPosition(null, true);
-
- this.cursor.style.left = this.pixelPos.left + "px";
- this.cursor.style.top = this.pixelPos.top + "px";
- this.cursor.style.width = config.characterWidth + "px";
- this.cursor.style.height = config.lineHeight + "px";
-
- var overwrite = this.session.getOverwrite()
- if (overwrite != this.overwrite) {
- this.overwrite = overwrite;
- if (overwrite)
- dom.addCssClass(this.cursor, "ace_overwrite");
- else
- dom.removeCssClass(this.cursor, "ace_overwrite");
- }
-
- this.restartTimer();
- };
-
- this.destroy = function() {
- clearInterval(this.blinkId);
- }
-
-}).call(Cursor.prototype);
-
-exports.Cursor = Cursor;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/scrollbar', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/event', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var dom = require("./lib/dom");
-var event = require("./lib/event");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var ScrollBar = function(parent) {
- this.element = dom.createElement("div");
- this.element.className = "ace_sb";
-
- this.inner = dom.createElement("div");
- this.element.appendChild(this.inner);
-
- parent.appendChild(this.element);
-
- // in OSX lion the scrollbars appear to have no width. In this case resize
- // the to show the scrollbar but still pretend that the scrollbar has a width
- // of 0px
- // in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
- // make element a little bit wider to retain scrollbar when page is zoomed
- this.width = dom.scrollbarWidth(parent.ownerDocument);
- this.element.style.width = (this.width || 15) + 5 + "px";
-
- event.addListener(this.element, "scroll", this.onScroll.bind(this));
-};
-
-(function() {
- oop.implement(this, EventEmitter);
-
- this.onScroll = function() {
- this._emit("scroll", {data: this.element.scrollTop});
- };
-
- this.getWidth = function() {
- return this.width;
- };
-
- this.setHeight = function(height) {
- this.element.style.height = height + "px";
- };
-
- this.setInnerHeight = function(height) {
- this.inner.style.height = height + "px";
- };
-
- this.setScrollTop = function(scrollTop) {
- this.element.scrollTop = scrollTop;
- };
-
-}).call(ScrollBar.prototype);
-
-exports.ScrollBar = ScrollBar;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/renderloop', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
-"use strict";
-
-var event = require("./lib/event");
-
-var RenderLoop = function(onRender, win) {
- this.onRender = onRender;
- this.pending = false;
- this.changes = 0;
- this.window = win || window;
-};
-
-(function() {
-
- this.schedule = function(change) {
- //this.onRender(change);
- //return;
- this.changes = this.changes | change;
- if (!this.pending) {
- this.pending = true;
- var _self = this;
- event.nextTick(function() {
- _self.pending = false;
- var changes;
- while (changes = _self.changes) {
- _self.changes = 0;
- _self.onRender(changes);
- }
- }, this.window);
- }
- };
-
-}).call(RenderLoop.prototype);
-
-exports.RenderLoop = RenderLoop;
-});
-ace.define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);\n" +
- "\n" +
- "\n" +
- ".ace_editor {\n" +
- " position: absolute;\n" +
- " overflow: hidden;\n" +
- " font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Droid Sans Mono', 'Consolas', monospace;\n" +
- " font-size: 12px;\n" +
- "}\n" +
- "\n" +
- ".ace_scroller {\n" +
- " position: absolute;\n" +
- " overflow-x: scroll;\n" +
- " overflow-y: hidden;\n" +
- "}\n" +
- "\n" +
- ".ace_content {\n" +
- " position: absolute;\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- " cursor: text;\n" +
- "}\n" +
- "\n" +
- "/* setting pointer-events: auto; on node under the mouse, which changes during scroll,\n" +
- " will break mouse wheel scrolling in Safari */\n" +
- ".ace_content * {\n" +
- " pointer-events: none;\n" +
- "}\n" +
- "\n" +
- ".ace_composition {\n" +
- " position: absolute;\n" +
- " background: #555;\n" +
- " color: #DDD;\n" +
- " z-index: 4;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter .ace_layer {\n" +
- " position: relative;\n" +
- " min-width: 54px;\n" +
- " text-align: right;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter {\n" +
- " position: absolute;\n" +
- " overflow : hidden;\n" +
- " height: 100%;\n" +
- " width: auto;\n" +
- " cursor: default;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter-cell {\n" +
- " padding-left: 19px;\n" +
- " padding-right: 6px;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter-cell.ace_error {\n" +
- " background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B\");\n" +
- " background-repeat: no-repeat;\n" +
- " background-position: 2px center;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter-cell.ace_warning {\n" +
- " background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B\");\n" +
- " background-repeat: no-repeat;\n" +
- " background-position: 2px center;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter-cell.ace_info {\n" +
- " background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");\n" +
- " background-repeat: no-repeat;\n" +
- " background-position: 2px center;\n" +
- "}\n" +
- "\n" +
- ".ace_editor .ace_sb {\n" +
- " position: absolute;\n" +
- " overflow-x: hidden;\n" +
- " overflow-y: scroll;\n" +
- " right: 0;\n" +
- "}\n" +
- "\n" +
- ".ace_editor .ace_sb div {\n" +
- " position: absolute;\n" +
- " width: 1px;\n" +
- " left: 0;\n" +
- "}\n" +
- "\n" +
- ".ace_editor .ace_print_margin_layer {\n" +
- " z-index: 0;\n" +
- " position: absolute;\n" +
- " overflow: hidden;\n" +
- " margin: 0;\n" +
- " left: 0;\n" +
- " height: 100%;\n" +
- " width: 100%;\n" +
- "}\n" +
- "\n" +
- ".ace_editor .ace_print_margin {\n" +
- " position: absolute;\n" +
- " height: 100%;\n" +
- "}\n" +
- "\n" +
- ".ace_editor textarea {\n" +
- " position: fixed;\n" +
- " z-index: 0;\n" +
- " width: 10px;\n" +
- " height: 30px;\n" +
- " opacity: 0;\n" +
- " background: transparent;\n" +
- " appearance: none;\n" +
- " -moz-appearance: none;\n" +
- " border: none;\n" +
- " resize: none;\n" +
- " outline: none;\n" +
- " overflow: hidden;\n" +
- "}\n" +
- "\n" +
- ".ace_layer {\n" +
- " z-index: 1;\n" +
- " position: absolute;\n" +
- " overflow: hidden;\n" +
- " white-space: nowrap;\n" +
- " height: 100%;\n" +
- " width: 100%;\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- "}\n" +
- "\n" +
- ".ace_text-layer {\n" +
- " color: black;\n" +
- "}\n" +
- "\n" +
- ".ace_cjk {\n" +
- " display: inline-block;\n" +
- " text-align: center;\n" +
- "}\n" +
- "\n" +
- ".ace_cursor-layer {\n" +
- " z-index: 4;\n" +
- "}\n" +
- "\n" +
- ".ace_cursor {\n" +
- " z-index: 4;\n" +
- " position: absolute;\n" +
- "}\n" +
- "\n" +
- ".ace_cursor.ace_hidden {\n" +
- " opacity: 0.2;\n" +
- "}\n" +
- "\n" +
- ".ace_line {\n" +
- " white-space: nowrap;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_step {\n" +
- " position: absolute;\n" +
- " z-index: 3;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_selection {\n" +
- " position: absolute;\n" +
- " z-index: 4;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_bracket {\n" +
- " position: absolute;\n" +
- " z-index: 5;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_active_line {\n" +
- " position: absolute;\n" +
- " z-index: 2;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_selected_word {\n" +
- " position: absolute;\n" +
- " z-index: 6;\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- "}\n" +
- "\n" +
- ".ace_line .ace_fold {\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- " \n" +
- " display: inline-block;\n" +
- " height: 11px;\n" +
- " margin-top: -2px;\n" +
- " vertical-align: middle;\n" +
- "\n" +
- " background-image: \n" +
- " url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\n" +
- " url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");\n" +
- " background-repeat: no-repeat, repeat-x;\n" +
- " background-position: center center, top left;\n" +
- " color: transparent;\n" +
- "\n" +
- " border: 1px solid black;\n" +
- " -moz-border-radius: 2px;\n" +
- " -webkit-border-radius: 2px;\n" +
- " border-radius: 2px;\n" +
- " \n" +
- " cursor: pointer;\n" +
- " pointer-events: auto;\n" +
- "}\n" +
- "\n" +
- ".ace_dark .ace_fold {\n" +
- "}\n" +
- "\n" +
- ".ace_fold:hover{\n" +
- " background-image: \n" +
- " url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\n" +
- " url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");\n" +
- " background-repeat: no-repeat, repeat-x;\n" +
- " background-position: center center, top left;\n" +
- "}\n" +
- "\n" +
- ".ace_dragging .ace_content {\n" +
- " cursor: move;\n" +
- "}\n" +
- "\n" +
- ".ace_folding-enabled .ace_gutter-cell {\n" +
- " padding-right: 13px;\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget {\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- "\n" +
- " margin: 0 -12px 1px 1px;\n" +
- " display: inline-block;\n" +
- " height: 14px;\n" +
- " width: 11px;\n" +
- " vertical-align: text-bottom;\n" +
- " \n" +
- " background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");\n" +
- " background-repeat: no-repeat;\n" +
- " background-position: center 5px;\n" +
- "\n" +
- " border-radius: 3px;\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget.end {\n" +
- " background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget.closed {\n" +
- " background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget:hover {\n" +
- " border: 1px solid rgba(0, 0, 0, 0.3);\n" +
- " background-color: rgba(255, 255, 255, 0.2);\n" +
- " -moz-box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " -webkit-box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " background-position: center 4px;\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget:active {\n" +
- " border: 1px solid rgba(0, 0, 0, 0.4);\n" +
- " background-color: rgba(0, 0, 0, 0.05);\n" +
- " -moz-box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n" +
- " -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n" +
- " -webkit-box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n" +
- " -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n" +
- " box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n" +
- " box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget.invalid {\n" +
- " background-color: #FFB4B4;\n" +
- " border-color: #DE5555;\n" +
- "}\n" +
- "");
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/textmate', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-exports.isDark = false;
-exports.cssClass = "ace-tm";
-exports.cssText = ".ace-tm .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tm .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tm .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tm .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tm .ace_fold {\
- background-color: #0000A2;\
-}\
-\
-.ace-tm .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-tm .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-tm .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
- \
-.ace-tm .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-tm .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_language {\
- color: rgb(88, 92, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_invalid {\
- background-color: rgb(153, 0, 0);\
- color: white;\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_type,\
-.ace-tm .ace_line .ace_support.ace_class {\
- color: rgb(109, 121, 222);\
-}\
-\
-.ace-tm .ace_line .ace_keyword.ace_operator {\
- color: rgb(104, 118, 135);\
-}\
-\
-.ace-tm .ace_line .ace_string {\
- color: rgb(3, 106, 7);\
-}\
-\
-.ace-tm .ace_line .ace_comment {\
- color: rgb(76, 136, 107);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc {\
- color: rgb(0, 102, 255);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(128, 159, 191);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 205);\
-}\
-\
-.ace-tm .ace_line .ace_variable {\
- color: rgb(49, 132, 149);\
-}\
-\
-.ace-tm .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-tm .ace_entity.ace_name.ace_function {\
- color: #0000A2;\
-}\
-\
-.ace-tm .ace_markup.ace_markupine {\
- text-decoration:underline;\
-}\
-\
-.ace-tm .ace_markup.ace_heading {\
- color: rgb(12, 7, 255);\
-}\
-\
-.ace-tm .ace_markup.ace_list {\
- color:rgb(185, 6, 144);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.07);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-tm .ace_meta.ace_tag {\
- color:rgb(28, 2, 255);\
-}\
-\
-.ace-tm .ace_string.ace_regex {\
- color: rgb(255, 0, 0)\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/ace-uncompressed.js b/contexts/data/lib/ace/ace-uncompressed.js
deleted file mode 100644
index 52fa9e9..0000000
--- a/contexts/data/lib/ace/ace-uncompressed.js
+++ /dev/null
@@ -1,14194 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/**
- * Define a module along with a payload
- * @param module a name for the payload
- * @param payload a function to call with (require, exports, module) params
- */
-
-(function() {
-
-var ACE_NAMESPACE = "";
-
-var global = (function() {
- return this;
-})();
-
-if (typeof requirejs !== "undefined")
- return;
-
-var _define = function(module, deps, payload) {
- if (typeof module !== 'string') {
- if (_define.original)
- _define.original.apply(window, arguments);
- else {
- console.error('dropping module because define wasn\'t a string.');
- console.trace();
- }
- return;
- }
-
- if (arguments.length == 2)
- payload = deps;
-
- if (!_define.modules)
- _define.modules = {};
-
- _define.modules[module] = payload;
-};
-
-/**
- * Get at functionality define()ed using the function above
- */
-var _require = function(parentId, module, callback) {
- if (Object.prototype.toString.call(module) === "[object Array]") {
- var params = [];
- for (var i = 0, l = module.length; i < l; ++i) {
- var dep = lookup(parentId, module[i]);
- if (!dep && _require.original)
- return _require.original.apply(window, arguments);
- params.push(dep);
- }
- if (callback) {
- callback.apply(null, params);
- }
- }
- else if (typeof module === 'string') {
- var payload = lookup(parentId, module);
- if (!payload && _require.original)
- return _require.original.apply(window, arguments);
-
- if (callback) {
- callback();
- }
-
- return payload;
- }
- else {
- if (_require.original)
- return _require.original.apply(window, arguments);
- }
-};
-
-var normalizeModule = function(parentId, moduleName) {
- // normalize plugin requires
- if (moduleName.indexOf("!") !== -1) {
- var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
- }
- // normalize relative requires
- if (moduleName.charAt(0) == ".") {
- var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
-
- while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
- var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
- }
- }
-
- return moduleName;
-};
-
-/**
- * Internal function to lookup moduleNames and resolve them by calling the
- * definition function if needed.
- */
-var lookup = function(parentId, moduleName) {
-
- moduleName = normalizeModule(parentId, moduleName);
-
- var module = _define.modules[moduleName];
- if (!module) {
- return null;
- }
-
- if (typeof module === 'function') {
- var exports = {};
- var mod = {
- id: moduleName,
- uri: '',
- exports: exports,
- packaged: true
- };
-
- var req = function(module, callback) {
- return _require(moduleName, module, callback);
- };
-
- var returnValue = module(req, exports, mod);
- exports = returnValue || mod.exports;
-
- // cache the resulting module object for next time
- _define.modules[moduleName] = exports;
- return exports;
- }
-
- return module;
-};
-
-function exportAce(ns) {
- var require = function(module, callback) {
- return _require("", module, callback);
- };
- require.packaged = true;
-
- var root = global;
- if (ns) {
- if (!global[ns])
- global[ns] = {};
- root = global[ns];
- }
-
- if (root.define)
- _define.original = root.define;
-
- root.define = _define;
-
- if (root.require)
- _require.original = root.require;
-
- root.require = require;
-}
-
-exportAce(ACE_NAMESPACE);
-
-})();/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Kevin Dangoor (kdangoor@mozilla.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/ace', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/lib/dom', 'ace/lib/event', 'ace/editor', 'ace/edit_session', 'ace/undomanager', 'ace/virtual_renderer', 'ace/theme/textmate'], function(require, exports, module) {
-"use strict";
-
-require("./lib/fixoldbrowsers");
-
-var Dom = require("./lib/dom");
-var Event = require("./lib/event");
-
-var Editor = require("./editor").Editor;
-var EditSession = require("./edit_session").EditSession;
-var UndoManager = require("./undomanager").UndoManager;
-var Renderer = require("./virtual_renderer").VirtualRenderer;
-
-exports.edit = function(el) {
- if (typeof(el) == "string") {
- el = document.getElementById(el);
- }
-
- var doc = new EditSession(Dom.getInnerText(el));
- doc.setUndoManager(new UndoManager());
- el.innerHTML = '';
-
- var editor = new Editor(new Renderer(el, require("./theme/textmate")));
- editor.setSession(doc);
-
- var env = {};
- env.document = doc;
- env.editor = editor;
- editor.resize();
- Event.addListener(window, "resize", function() {
- editor.resize();
- });
- el.env = env;
- // Store env on editor such that it can be accessed later on from
- // the returned object.
- editor.env = env;
- return editor;
-};
-
-});// vim:set ts=4 sts=4 sw=4 st:
-// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Irakli Gozalishvili Copyright (C) 2010 MIT License
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
-
-define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
-"use strict";
-
-require("./regexp");
-require("./es5-shim");
-
-});/**
- * Based on code from:
- *
- * XRegExp 1.5.0
- * (c) 2007-2010 Steven Levithan
- * MIT License
- * <http://xregexp.com>
- * Provides an augmented, extensible, cross-browser implementation of regular expressions,
- * including support for additional syntax, flags, and methods
- */
-
-define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
- //---------------------------------
- // Private variables
- //---------------------------------
-
- var real = {
- exec: RegExp.prototype.exec,
- test: RegExp.prototype.test,
- match: String.prototype.match,
- replace: String.prototype.replace,
- split: String.prototype.split
- },
- compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
- compliantLastIndexIncrement = function () {
- var x = /^/g;
- real.test.call(x, "");
- return !x.lastIndex;
- }();
-
- //---------------------------------
- // Overriden native methods
- //---------------------------------
-
- // Adds named capture support (with backreferences returned as `result.name`), and fixes two
- // cross-browser issues per ES3:
- // - Captured values for nonparticipating capturing groups should be returned as `undefined`,
- // rather than the empty string.
- // - `lastIndex` should not be incremented after zero-length matches.
- RegExp.prototype.exec = function (str) {
- var match = real.exec.apply(this, arguments),
- name, r2;
- if (match) {
- // Fix browsers whose `exec` methods don't consistently return `undefined` for
- // nonparticipating capturing groups
- if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
- r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
- // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
- // matching due to characters outside the match
- real.replace.call(str.slice(match.index), r2, function () {
- for (var i = 1; i < arguments.length - 2; i++) {
- if (arguments[i] === undefined)
- match[i] = undefined;
- }
- });
- }
- // Attach named capture properties
- if (this._xregexp && this._xregexp.captureNames) {
- for (var i = 1; i < match.length; i++) {
- name = this._xregexp.captureNames[i - 1];
- if (name)
- match[name] = match[i];
- }
- }
- // Fix browsers that increment `lastIndex` after zero-length matches
- if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
- this.lastIndex--;
- }
- return match;
- };
-
- // Don't override `test` if it won't change anything
- if (!compliantLastIndexIncrement) {
- // Fix browser bug in native method
- RegExp.prototype.test = function (str) {
- // Use the native `exec` to skip some processing overhead, even though the overriden
- // `exec` would take care of the `lastIndex` fix
- var match = real.exec.call(this, str);
- // Fix browsers that increment `lastIndex` after zero-length matches
- if (match && this.global && !match[0].length && (this.lastIndex > match.index))
- this.lastIndex--;
- return !!match;
- };
- }
-
- //---------------------------------
- // Private helper functions
- //---------------------------------
-
- function getNativeFlags (regex) {
- return (regex.global ? "g" : "") +
- (regex.ignoreCase ? "i" : "") +
- (regex.multiline ? "m" : "") +
- (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
- (regex.sticky ? "y" : "");
- };
-
- function indexOf (array, item, from) {
- if (Array.prototype.indexOf) // Use the native array method if available
- return array.indexOf(item, from);
- for (var i = from || 0; i < array.length; i++) {
- if (array[i] === item)
- return i;
- }
- return -1;
- };
-
-});// vim: ts=4 sts=4 sw=4 expandtab
-// -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
-// -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
-// -- kossnocorp Sasha Koss XXX TODO License or CLA
-// -- bryanforbes Bryan Forbes XXX TODO License or CLA
-// -- killdream Quildreen Motta Copyright (C) 2011 MIT Licence
-// -- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD License
-// -- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
-// -- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
-// -- iwyg XXX TODO License or CLA
-// -- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
-// -- xavierm02 Montillet Xavier XXX TODO License or CLA
-// -- Raynos Raynos XXX TODO License or CLA
-// -- samsonjs Sami Samhuri Copyright (C) 2010 MIT License
-// -- rwldrn Rick Waldron Copyright (C) 2011 MIT License
-// -- lexer Alexey Zakharov XXX TODO License or CLA
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
-
-define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-/**
- * Brings an environment as close to ECMAScript 5 compliance
- * as is possible with the facilities of erstwhile engines.
- *
- * Annotated ES5: http://es5.github.com/ (specific links below)
- * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
- *
- * @module
- */
-
-/*whatsupdoc*/
-
-//
-// Function
-// ========
-//
-
-// ES-5 15.3.4.5
-// http://es5.github.com/#x15.3.4.5
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- // 1. Let Target be the this value.
- var target = this;
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
- if (typeof target != "function")
- throw new TypeError(); // TODO message
- // 3. Let A be a new (possibly empty) internal list of all of the
- // argument values provided after thisArg (arg1, arg2 etc), in order.
- // XXX slicedArgs will stand in for "A" if used
- var args = slice.call(arguments, 1); // for normal call
- // 4. Let F be a new native ECMAScript object.
- // 11. Set the [[Prototype]] internal property of F to the standard
- // built-in Function prototype object as specified in 15.3.3.1.
- // 12. Set the [[Call]] internal property of F as described in
- // 15.3.4.5.1.
- // 13. Set the [[Construct]] internal property of F as described in
- // 15.3.4.5.2.
- // 14. Set the [[HasInstance]] internal property of F as described in
- // 15.3.4.5.3.
- var bound = function () {
-
- if (this instanceof bound) {
- // 15.3.4.5.2 [[Construct]]
- // When the [[Construct]] internal method of a function object,
- // F that was created using the bind function is called with a
- // list of arguments ExtraArgs, the following steps are taken:
- // 1. Let target be the value of F's [[TargetFunction]]
- // internal property.
- // 2. If target has no [[Construct]] internal method, a
- // TypeError exception is thrown.
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Construct]] internal
- // method of target providing args as the arguments.
-
- var F = function(){};
- F.prototype = target.prototype;
- var self = new F;
-
- var result = target.apply(
- self,
- args.concat(slice.call(arguments))
- );
- if (result !== null && Object(result) === result)
- return result;
- return self;
-
- } else {
- // 15.3.4.5.1 [[Call]]
- // When the [[Call]] internal method of a function object, F,
- // which was created using the bind function is called with a
- // this value and a list of arguments ExtraArgs, the following
- // steps are taken:
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
- // property.
- // 3. Let target be the value of F's [[TargetFunction]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Call]] internal method
- // of target providing boundThis as the this value and
- // providing args as the arguments.
-
- // equiv: target.call(this, ...boundArgs, ...args)
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- // XXX bound.length is never writable, so don't even try
- //
- // 15. If the [[Class]] internal property of Target is "Function", then
- // a. Let L be the length property of Target minus the length of A.
- // b. Set the length own property of F to either 0 or L, whichever is
- // larger.
- // 16. Else set the length own property of F to 0.
- // 17. Set the attributes of the length own property of F to the values
- // specified in 15.3.5.1.
-
- // TODO
- // 18. Set the [[Extensible]] internal property of F to true.
-
- // TODO
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
- // 20. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
- // false.
- // 21. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
- // and false.
-
- // TODO
- // NOTE Function objects created using Function.prototype.bind do not
- // have a prototype property or the [[Code]], [[FormalParameters]], and
- // [[Scope]] internal properties.
- // XXX can't delete prototype in pure-js.
-
- // 22. Return F.
- return bound;
- };
-}
-
-// Shortcut to an often accessed properties, in order to avoid multiple
-// dereference that costs universally.
-// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
-// us it in defining shortcuts.
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-
-// If JS engine supports accessors creating shortcuts.
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-
-//
-// Array
-// =====
-//
-
-// ES5 15.4.3.2
-// http://es5.github.com/#x15.4.3.2
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return toString(obj) == "[object Array]";
- };
-}
-
-// The IsCallable() check in the Array functions
-// has been replaced with a strict check on the
-// internal class of the object to trap cases where
-// the provided function was actually a regular
-// expression literal, which in V8 and
-// JavaScriptCore is a typeof "function". Only in
-// V8 are regular expression literals permitted as
-// reduce parameters, so it is desirable in the
-// general case for the shim to match the more
-// strict and common behavior of rejecting regular
-// expressions.
-
-// ES5 15.4.4.18
-// http://es5.github.com/#x15.4.4.18
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var self = toObject(this),
- thisp = arguments[1],
- i = 0,
- length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (i < length) {
- if (i in self) {
- // Invoke the callback function with call, passing arguments:
- // context, property value, property key, thisArg object context
- fun.call(thisp, self[i], i, self);
- }
- i++;
- }
- };
-}
-
-// ES5 15.4.4.19
-// http://es5.github.com/#x15.4.4.19
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var self = toObject(this),
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, self);
- }
- return result;
- };
-}
-
-// ES5 15.4.4.20
-// http://es5.github.com/#x15.4.4.20
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var self = toObject(this),
- length = self.length >>> 0,
- result = [],
- thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, self))
- result.push(self[i]);
- }
- return result;
- };
-}
-
-// ES5 15.4.4.16
-// http://es5.github.com/#x15.4.4.16
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var self = toObject(this),
- length = self.length >>> 0,
- thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, self))
- return false;
- }
- return true;
- };
-}
-
-// ES5 15.4.4.17
-// http://es5.github.com/#x15.4.4.17
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var self = toObject(this),
- length = self.length >>> 0,
- thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, self))
- return true;
- }
- return false;
- };
-}
-
-// ES5 15.4.4.21
-// http://es5.github.com/#x15.4.4.21
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var self = toObject(this),
- length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- // no value to return if no initial value and an empty array
- if (!length && arguments.length == 1)
- throw new TypeError(); // TODO message
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
-
- // if array contains no values, no initial value to return
- if (++i >= length)
- throw new TypeError(); // TODO message
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self)
- result = fun.call(void 0, result, self[i], i, self);
- }
-
- return result;
- };
-}
-
-// ES5 15.4.4.22
-// http://es5.github.com/#x15.4.4.22
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var self = toObject(this),
- length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
- if (toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- // no value to return if no initial value, empty array
- if (!length && arguments.length == 1)
- throw new TypeError(); // TODO message
-
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
-
- // if array contains no values, no initial value to return
- if (--i < 0)
- throw new TypeError(); // TODO message
- } while (true);
- }
-
- do {
- if (i in this)
- result = fun.call(void 0, result, self[i], i, self);
- } while (i--);
-
- return result;
- };
-}
-
-// ES5 15.4.4.14
-// http://es5.github.com/#x15.4.4.14
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
-if (!Array.prototype.indexOf) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = toObject(this),
- length = self.length >>> 0;
-
- if (!length)
- return -1;
-
- var i = 0;
- if (arguments.length > 1)
- i = toInteger(arguments[1]);
-
- // handle negative indices
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
- };
-}
-
-// ES5 15.4.4.15
-// http://es5.github.com/#x15.4.4.15
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
-if (!Array.prototype.lastIndexOf) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = toObject(this),
- length = self.length >>> 0;
-
- if (!length)
- return -1;
- var i = length - 1;
- if (arguments.length > 1)
- i = Math.min(i, toInteger(arguments[1]));
- // handle negative indices
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i])
- return i;
- }
- return -1;
- };
-}
-
-//
-// Object
-// ======
-//
-
-// ES5 15.2.3.2
-// http://es5.github.com/#x15.2.3.2
-if (!Object.getPrototypeOf) {
- // https://github.com/kriskowal/es5-shim/issues#issue/2
- // http://ejohn.org/blog/objectgetprototypeof/
- // recommended by fschaefer on github
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-
-// ES5 15.2.3.3
-// http://es5.github.com/#x15.2.3.3
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- // If object does not owns property return undefined immediately.
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
-
- // If object has a property then it's for sure both `enumerable` and
- // `configurable`.
- descriptor = { enumerable: true, configurable: true };
-
- // If JS engine supports accessor properties then property may be a
- // getter or setter.
- if (supportsAccessors) {
- // Unfortunately `__lookupGetter__` will return a getter even
- // if object has own non getter property along with a same named
- // inherited getter. To avoid misbehavior we temporary remove
- // `__proto__` so that `__lookupGetter__` will return getter only
- // if it's owned by an object.
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
-
- // Once we have getter and setter we can put values back.
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
-
- // If it was accessor property we're done and return here
- // in order to avoid adding `value` to the descriptor.
- return descriptor;
- }
- }
-
- // If we got this far we know that object has an own property that is
- // not an accessor so we set it as a value and return descriptor.
- descriptor.value = object[property];
- return descriptor;
- };
-}
-
-// ES5 15.2.3.4
-// http://es5.github.com/#x15.2.3.4
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
-}
-
-// ES5 15.2.3.5
-// http://es5.github.com/#x15.2.3.5
-if (!Object.create) {
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = { "__proto__": null };
- } else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- // IE has no built-in implementation of `Object.getPrototypeOf`
- // neither `__proto__`, but this manually setting `__proto__` will
- // guarantee that `Object.getPrototypeOf` will work as expected with
- // objects created using `Object.create`
- object.__proto__ = prototype;
- }
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
- };
-}
-
-// ES5 15.2.3.6
-// http://es5.github.com/#x15.2.3.6
-
-// Patch for WebKit and IE8 standard mode
-// Designed by hax <hax.github.com>
-// related issue: https://github.com/kriskowal/es5-shim/issues#issue/5
-// IE8 Reference:
-// http://msdn.microsoft.com/en-us/library/dd282900.aspx
-// http://msdn.microsoft.com/en-us/library/dd229916.aspx
-// WebKit Bugs:
-// https://bugs.webkit.org/show_bug.cgi?id=36423
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- // returns falsy
- }
-}
-
-// check whether defineProperty works if it's given. Otherwise,
-// shim partially.
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
-
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
-
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
-
- // make a valiant attempt to use the real defineProperty
- // for I8's DOM elements.
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- // try the shim if the real one doesn't work
- }
- }
-
- // If it's a data property.
- if (owns(descriptor, "value")) {
- // fail silently if "writable", "enumerable", or "configurable"
- // are requested but not supported
- /*
- // alternate approach:
- if ( // can't implement these features; allow false but not true
- !(owns(descriptor, "writable") ? descriptor.writable : true) ||
- !(owns(descriptor, "enumerable") ? descriptor.enumerable : true) ||
- !(owns(descriptor, "configurable") ? descriptor.configurable : true)
- )
- throw new RangeError(
- "This implementation of Object.defineProperty does not " +
- "support configurable, enumerable, or writable."
- );
- */
-
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- // As accessors are supported only on engines implementing
- // `__proto__` we can safely override `__proto__` while defining
- // a property to make sure that we don't hit an inherited
- // accessor.
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- // Deleting a property anyway since getter / setter may be
- // defined on object itself.
- delete object[property];
- object[property] = descriptor.value;
- // Setting original `__proto__` back now.
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- // If we got that far then getters and setters can be defined !!
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
-
- return object;
- };
-}
-
-// ES5 15.2.3.7
-// http://es5.github.com/#x15.2.3.7
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
-}
-
-// ES5 15.2.3.8
-// http://es5.github.com/#x15.2.3.8
-if (!Object.seal) {
- Object.seal = function seal(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
- return object;
- };
-}
-
-// ES5 15.2.3.9
-// http://es5.github.com/#x15.2.3.9
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
- return object;
- };
-}
-
-// detect a Rhino bug and patch it
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-
-// ES5 15.2.3.10
-// http://es5.github.com/#x15.2.3.10
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
- return object;
- };
-}
-
-// ES5 15.2.3.11
-// http://es5.github.com/#x15.2.3.11
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
- };
-}
-
-// ES5 15.2.3.12
-// http://es5.github.com/#x15.2.3.12
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
- };
-}
-
-// ES5 15.2.3.13
-// http://es5.github.com/#x15.2.3.13
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- // 1. If Type(O) is not Object throw a TypeError exception.
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- // 2. Return the Boolean value of the [[Extensible]] internal property of O.
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
- };
-}
-
-// ES5 15.2.3.14
-// http://es5.github.com/#x15.2.3.14
-if (!Object.keys) {
- // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
-
- for (var key in {"toString": null})
- hasDontEnumBug = false;
-
- Object.keys = function keys(object) {
-
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError("Object.keys called on a non-object");
-
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
-
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
-
- return keys;
- };
-
-}
-
-//
-// Date
-// ====
-//
-
-// ES5 15.9.5.43
-// http://es5.github.com/#x15.9.5.43
-// This function returns a String value represent the instance in time
-// represented by this Date object. The format of the String is the Date Time
-// string format defined in 15.9.1.15. All fields are present in the String.
-// The time zone is always UTC, denoted by the suffix Z. If the time value of
-// this object is not a finite Number a RangeError exception is thrown.
-if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
- Date.prototype.toISOString = function toISOString() {
- var result, length, value, year;
- if (!isFinite(this))
- throw new RangeError;
-
- // the date time string format is specified in 15.9.1.15.
- result = [this.getUTCMonth() + 1, this.getUTCDate(),
- this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
- year = this.getUTCFullYear();
- year = (year < 0 ? '-' : (year > 9999 ? '+' : '')) + ('00000' + Math.abs(year)).slice(0 <= year && year <= 9999 ? -4 : -6);
-
- length = result.length;
- while (length--) {
- value = result[length];
- // pad months, days, hours, minutes, and seconds to have two digits.
- if (value < 10)
- result[length] = "0" + value;
- }
- // pad milliseconds to have three digits.
- return year + "-" + result.slice(0, 2).join("-") + "T" + result.slice(2).join(":") + "." +
- ("000" + this.getUTCMilliseconds()).slice(-3) + "Z";
- }
-}
-
-// ES5 15.9.4.4
-// http://es5.github.com/#x15.9.4.4
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-
-// ES5 15.9.5.44
-// http://es5.github.com/#x15.9.5.44
-// This function provides a String representation of a Date object for use by
-// JSON.stringify (15.12.3).
-if (!Date.prototype.toJSON) {
- Date.prototype.toJSON = function toJSON(key) {
- // When the toJSON method is called with argument key, the following
- // steps are taken:
-
- // 1. Let O be the result of calling ToObject, giving it the this
- // value as its argument.
- // 2. Let tv be ToPrimitive(O, hint Number).
- // 3. If tv is a Number and is not finite, return null.
- // XXX
- // 4. Let toISO be the result of calling the [[Get]] internal method of
- // O with argument "toISOString".
- // 5. If IsCallable(toISO) is false, throw a TypeError exception.
- if (typeof this.toISOString != "function")
- throw new TypeError(); // TODO message
- // 6. Return the result of calling the [[Call]] internal method of
- // toISO with O as the this value and an empty argument list.
- return this.toISOString();
-
- // NOTE 1 The argument is ignored.
-
- // NOTE 2 The toJSON function is intentionally generic; it does not
- // require that its this value be a Date object. Therefore, it can be
- // transferred to other kinds of objects for use as a method. However,
- // it does require that any such object have a toISOString method. An
- // object is free to use the argument key to filter its
- // stringification.
- };
-}
-
-// ES5 15.9.4.2
-// http://es5.github.com/#x15.9.4.2
-// based on work shared by Daniel Friesen (dantman)
-// http://gist.github.com/303249
-if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
- // XXX global assignment won't work in embeddings that use
- // an alternate object for the context.
- Date = (function(NativeDate) {
-
- // Date.length === 7
- var Date = function Date(Y, M, D, h, m, s, ms) {
- var length = arguments.length;
- if (this instanceof NativeDate) {
- var date = length == 1 && String(Y) === Y ? // isString(Y)
- // We explicitly pass it through parse:
- new NativeDate(Date.parse(Y)) :
- // We have to manually make calls depending on argument
- // length here
- length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
- length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
- length >= 5 ? new NativeDate(Y, M, D, h, m) :
- length >= 4 ? new NativeDate(Y, M, D, h) :
- length >= 3 ? new NativeDate(Y, M, D) :
- length >= 2 ? new NativeDate(Y, M) :
- length >= 1 ? new NativeDate(Y) :
- new NativeDate();
- // Prevent mixups with unfixed Date object
- date.constructor = Date;
- return date;
- }
- return NativeDate.apply(this, arguments);
- };
-
- // 15.9.1.15 Date Time String Format.
- var isoDateExpression = new RegExp("^" +
- "(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + 6-digit extended year
- "(?:-(\\d{2})" + // optional month capture
- "(?:-(\\d{2})" + // optional day capture
- "(?:" + // capture hours:minutes:seconds.milliseconds
- "T(\\d{2})" + // hours capture
- ":(\\d{2})" + // minutes capture
- "(?:" + // optional :seconds.milliseconds
- ":(\\d{2})" + // seconds capture
- "(?:\\.(\\d{3}))?" + // milliseconds capture
- ")?" +
- "(?:" + // capture UTC offset component
- "Z|" + // UTC capture
- "(?:" + // offset specifier +/-hours:minutes
- "([-+])" + // sign capture
- "(\\d{2})" + // hours offset capture
- ":(\\d{2})" + // minutes offset capture
- ")" +
- ")?)?)?)?" +
- "$");
-
- // Copy any custom methods a 3rd party library may have added
- for (var key in NativeDate)
- Date[key] = NativeDate[key];
-
- // Copy "native" methods explicitly; they may be non-enumerable
- Date.now = NativeDate.now;
- Date.UTC = NativeDate.UTC;
- Date.prototype = NativeDate.prototype;
- Date.prototype.constructor = Date;
-
- // Upgrade Date.parse to handle simplified ISO 8601 strings
- Date.parse = function parse(string) {
- var match = isoDateExpression.exec(string);
- if (match) {
- match.shift(); // kill match[0], the full match
- // parse months, days, hours, minutes, seconds, and milliseconds
- for (var i = 1; i < 7; i++) {
- // provide default values if necessary
- match[i] = +(match[i] || (i < 3 ? 1 : 0));
- // match[1] is the month. Months are 0-11 in JavaScript
- // `Date` objects, but 1-12 in ISO notation, so we
- // decrement.
- if (i == 1)
- match[i]--;
- }
-
- // parse the UTC offset component
- var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
-
- // compute the explicit time zone offset if specified
- var offset = 0;
- if (sign) {
- // detect invalid offsets and return early
- if (hourOffset > 23 || minuteOffset > 59)
- return NaN;
-
- // express the provided time zone offset in minutes. The offset is
- // negative for time zones west of UTC; positive otherwise.
- offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == "+" ? -1 : 1);
- }
-
- // Date.UTC for years between 0 and 99 converts year to 1900 + year
- // The Gregorian calendar has a 400-year cycle, so
- // to Date.UTC(year + 400, .... ) - 12622780800000 == Date.UTC(year, ...),
- // where 12622780800000 - number of milliseconds in Gregorian calendar 400 years
- var year = +match[0];
- if (0 <= year && year <= 99) {
- match[0] = year + 400;
- return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
- }
-
- // compute a new UTC date value, accounting for the optional offset
- return NativeDate.UTC.apply(this, match) + offset;
- }
- return NativeDate.parse.apply(this, arguments);
- };
-
- return Date;
- })(Date);
-}
-
-//
-// String
-// ======
-//
-
-// ES5 15.5.4.20
-// http://es5.github.com/#x15.5.4.20
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript
- // http://perfectionkills.com/whitespace-deviations/
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
-}
-
-//
-// Util
-// ======
-//
-
-// ES5 9.4
-// http://es5.github.com/#x9.4
-// http://jsperf.com/to-integer
-var toInteger = function (n) {
- n = +n;
- if (n !== n) // isNaN
- n = 0;
- else if (n !== 0 && n !== (1/0) && n !== -(1/0))
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- return n;
-};
-
-var prepareString = "a"[0] != "a",
- // ES5 9.9
- // http://es5.github.com/#x9.9
- toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError(); // TODO message
- }
- // If the implementation doesn't support by-index access of
- // string characters (ex. IE < 7), split the string
- if (prepareString && typeof o == "string" && o) {
- return o.split("");
- }
- return Object(o);
- };
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai AT sucan AT gmail ODT com>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/lib/dom', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var XHTML_NS = "http://www.w3.org/1999/xhtml";
-
-exports.createElement = function(tag, ns) {
- return document.createElementNS ?
- document.createElementNS(ns || XHTML_NS, tag) :
- document.createElement(tag);
-};
-
-exports.setText = function(elem, text) {
- if (elem.innerText !== undefined) {
- elem.innerText = text;
- }
- if (elem.textContent !== undefined) {
- elem.textContent = text;
- }
-};
-
-exports.hasCssClass = function(el, name) {
- var classes = el.className.split(/\s+/g);
- return classes.indexOf(name) !== -1;
-};
-
-/**
-* Add a CSS class to the list of classes on the given node
-*/
-exports.addCssClass = function(el, name) {
- if (!exports.hasCssClass(el, name)) {
- el.className += " " + name;
- }
-};
-
-/**
-* Remove a CSS class from the list of classes on the given node
-*/
-exports.removeCssClass = function(el, name) {
- var classes = el.className.split(/\s+/g);
- while (true) {
- var index = classes.indexOf(name);
- if (index == -1) {
- break;
- }
- classes.splice(index, 1);
- }
- el.className = classes.join(" ");
-};
-
-exports.toggleCssClass = function(el, name) {
- var classes = el.className.split(/\s+/g), add = true;
- while (true) {
- var index = classes.indexOf(name);
- if (index == -1) {
- break;
- }
- add = false;
- classes.splice(index, 1);
- }
- if(add)
- classes.push(name);
-
- el.className = classes.join(" ");
- return add;
-};
-
-/**
- * Add or remove a CSS class from the list of classes on the given node
- * depending on the value of <tt>include</tt>
- */
-exports.setCssClass = function(node, className, include) {
- if (include) {
- exports.addCssClass(node, className);
- } else {
- exports.removeCssClass(node, className);
- }
-};
-
-exports.hasCssString = function(id, doc) {
- var index = 0, sheets;
- doc = doc || document;
-
- if (doc.createStyleSheet && (sheets = doc.styleSheets)) {
- while (index < sheets.length)
- if (sheets[index++].title === id) return true;
- } else if ((sheets = doc.getElementsByTagName("style"))) {
- while (index < sheets.length)
- if (sheets[index++].id === id) return true;
- }
-
- return false;
-};
-
-exports.importCssString = function importCssString(cssText, id, doc) {
- doc = doc || document;
- // If style is already imported return immediately.
- if (id && exports.hasCssString(id, doc))
- return null;
-
- var style;
-
- if (doc.createStyleSheet) {
- style = doc.createStyleSheet();
- style.cssText = cssText;
- if (id)
- style.title = id;
- } else {
- style = doc.createElementNS
- ? doc.createElementNS(XHTML_NS, "style")
- : doc.createElement("style");
-
- style.appendChild(doc.createTextNode(cssText));
- if (id)
- style.id = id;
-
- var head = doc.getElementsByTagName("head")[0] || doc.documentElement;
- head.appendChild(style);
- }
-};
-
-exports.importCssStylsheet = function(uri, doc) {
- if (doc.createStyleSheet) {
- doc.createStyleSheet(uri);
- } else {
- var link = exports.createElement('link');
- link.rel = 'stylesheet';
- link.href = uri;
-
- var head = doc.getElementsByTagName("head")[0] || doc.documentElement;
- head.appendChild(link);
- }
-};
-
-exports.getInnerWidth = function(element) {
- return (
- parseInt(exports.computedStyle(element, "paddingLeft"), 10) +
- parseInt(exports.computedStyle(element, "paddingRight"), 10) +
- element.clientWidth
- );
-};
-
-exports.getInnerHeight = function(element) {
- return (
- parseInt(exports.computedStyle(element, "paddingTop"), 10) +
- parseInt(exports.computedStyle(element, "paddingBottom"), 10) +
- element.clientHeight
- );
-};
-
-if (window.pageYOffset !== undefined) {
- exports.getPageScrollTop = function() {
- return window.pageYOffset;
- };
-
- exports.getPageScrollLeft = function() {
- return window.pageXOffset;
- };
-}
-else {
- exports.getPageScrollTop = function() {
- return document.body.scrollTop;
- };
-
- exports.getPageScrollLeft = function() {
- return document.body.scrollLeft;
- };
-}
-
-if (window.getComputedStyle)
- exports.computedStyle = function(element, style) {
- if (style)
- return (window.getComputedStyle(element, "") || {})[style] || "";
- return window.getComputedStyle(element, "") || {};
- };
-else
- exports.computedStyle = function(element, style) {
- if (style)
- return element.currentStyle[style];
- return element.currentStyle;
- };
-
-exports.scrollbarWidth = function(document) {
-
- var inner = exports.createElement("p");
- inner.style.width = "100%";
- inner.style.minWidth = "0px";
- inner.style.height = "200px";
-
- var outer = exports.createElement("div");
- var style = outer.style;
-
- style.position = "absolute";
- style.left = "-10000px";
- style.overflow = "hidden";
- style.width = "200px";
- style.minWidth = "0px";
- style.height = "150px";
-
- outer.appendChild(inner);
-
- var body = document.body || document.documentElement;
- body.appendChild(outer);
-
- var noScrollbar = inner.offsetWidth;
-
- style.overflow = "scroll";
- var withScrollbar = inner.offsetWidth;
-
- if (noScrollbar == withScrollbar) {
- withScrollbar = outer.clientWidth;
- }
-
- body.removeChild(outer);
-
- return noScrollbar-withScrollbar;
-};
-
-/**
- * Optimized set innerHTML. This is faster than plain innerHTML if the element
- * already contains a lot of child elements.
- *
- * See http://blog.stevenlevithan.com/archives/faster-than-innerhtml for details
- */
-exports.setInnerHtml = function(el, innerHtml) {
- var element = el.cloneNode(false);//document.createElement("div");
- element.innerHTML = innerHtml;
- el.parentNode.replaceChild(element, el);
- return element;
-};
-
-exports.setInnerText = function(el, innerText) {
- var document = el.ownerDocument;
- if (document.body && "textContent" in document.body)
- el.textContent = innerText;
- else
- el.innerText = innerText;
-
-};
-
-exports.getInnerText = function(el) {
- var document = el.ownerDocument;
- if (document.body && "textContent" in document.body)
- return el.textContent;
- else
- return el.innerText || el.textContent || "";
-};
-
-exports.getParentWindow = function(document) {
- return document.defaultView || document.parentWindow;
-};
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/lib/event', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/useragent', 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-var keys = require("./keys");
-var useragent = require("./useragent");
-var dom = require("./dom");
-
-exports.addListener = function(elem, type, callback) {
- if (elem.addEventListener) {
- return elem.addEventListener(type, callback, false);
- }
- if (elem.attachEvent) {
- var wrapper = function() {
- callback(window.event);
- };
- callback._wrapper = wrapper;
- elem.attachEvent("on" + type, wrapper);
- }
-};
-
-exports.removeListener = function(elem, type, callback) {
- if (elem.removeEventListener) {
- return elem.removeEventListener(type, callback, false);
- }
- if (elem.detachEvent) {
- elem.detachEvent("on" + type, callback._wrapper || callback);
- }
-};
-
-/**
-* Prevents propagation and clobbers the default action of the passed event
-*/
-exports.stopEvent = function(e) {
- exports.stopPropagation(e);
- exports.preventDefault(e);
- return false;
-};
-
-exports.stopPropagation = function(e) {
- if (e.stopPropagation)
- e.stopPropagation();
- else
- e.cancelBubble = true;
-};
-
-exports.preventDefault = function(e) {
- if (e.preventDefault)
- e.preventDefault();
- else
- e.returnValue = false;
-};
-
-exports.getDocumentX = function(e) {
- if (e.clientX) {
- return e.clientX + dom.getPageScrollLeft();
- } else {
- return e.pageX;
- }
-};
-
-exports.getDocumentY = function(e) {
- if (e.clientY) {
- return e.clientY + dom.getPageScrollTop();
- } else {
- return e.pageY;
- }
-};
-
-/**
- * @return {Number} 0 for left button, 1 for middle button, 2 for right button
- */
-exports.getButton = function(e) {
- if (e.type == "dblclick")
- return 0;
- else if (e.type == "contextmenu")
- return 2;
-
- // DOM Event
- if (e.preventDefault) {
- return e.button;
- }
- // old IE
- else {
- return {1:0, 2:2, 4:1}[e.button];
- }
-};
-
-if (document.documentElement.setCapture) {
- exports.capture = function(el, eventHandler, releaseCaptureHandler) {
- function onMouseMove(e) {
- eventHandler(e);
- return exports.stopPropagation(e);
- }
-
- var called = false;
- function onReleaseCapture(e) {
- eventHandler(e);
-
- if (!called) {
- called = true;
- releaseCaptureHandler(e);
- }
-
- exports.removeListener(el, "mousemove", eventHandler);
- exports.removeListener(el, "mouseup", onReleaseCapture);
- exports.removeListener(el, "losecapture", onReleaseCapture);
-
- el.releaseCapture();
- }
-
- exports.addListener(el, "mousemove", eventHandler);
- exports.addListener(el, "mouseup", onReleaseCapture);
- exports.addListener(el, "losecapture", onReleaseCapture);
- el.setCapture();
- };
-}
-else {
- exports.capture = function(el, eventHandler, releaseCaptureHandler) {
- function onMouseMove(e) {
- eventHandler(e);
- e.stopPropagation();
- }
-
- function onMouseUp(e) {
- eventHandler && eventHandler(e);
- releaseCaptureHandler && releaseCaptureHandler(e);
-
- document.removeEventListener("mousemove", onMouseMove, true);
- document.removeEventListener("mouseup", onMouseUp, true);
-
- e.stopPropagation();
- }
-
- document.addEventListener("mousemove", onMouseMove, true);
- document.addEventListener("mouseup", onMouseUp, true);
- };
-}
-
-exports.addMouseWheelListener = function(el, callback) {
- var max = 0;
- var listener = function(e) {
- if (e.wheelDelta !== undefined) {
-
- // some versions of Safari (e.g. 5.0.5) report insanely high
- // scroll values. These browsers require a higher factor
- if (Math.abs(e.wheelDeltaY) > max)
- max = Math.abs(e.wheelDeltaY);
-
- if (max > 5000)
- var factor = 400;
- else
- var factor = 8;
-
- if (e.wheelDeltaX !== undefined) {
- e.wheelX = -e.wheelDeltaX / factor;
- e.wheelY = -e.wheelDeltaY / factor;
- } else {
- e.wheelX = 0;
- e.wheelY = -e.wheelDelta / factor;
- }
- }
- else {
- if (e.axis && e.axis == e.HORIZONTAL_AXIS) {
- e.wheelX = (e.detail || 0) * 5;
- e.wheelY = 0;
- } else {
- e.wheelX = 0;
- e.wheelY = (e.detail || 0) * 5;
- }
- }
- callback(e);
- };
- exports.addListener(el, "DOMMouseScroll", listener);
- exports.addListener(el, "mousewheel", listener);
-};
-
-exports.addMultiMouseDownListener = function(el, button, count, timeout, callback) {
- var clicks = 0;
- var startX, startY;
-
- var listener = function(e) {
- clicks += 1;
- if (clicks == 1) {
- startX = e.clientX;
- startY = e.clientY;
-
- setTimeout(function() {
- clicks = 0;
- }, timeout || 600);
- }
-
- var isButton = exports.getButton(e) == button;
- if (!isButton || Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5)
- clicks = 0;
-
- if (clicks == count) {
- clicks = 0;
- callback(e);
- }
-
- if (isButton)
- return exports.preventDefault(e);
- };
-
- exports.addListener(el, "mousedown", listener);
- useragent.isOldIE && exports.addListener(el, "dblclick", listener);
-};
-
-function normalizeCommandKeys(callback, e, keyCode) {
- var hashId = 0;
- if (useragent.isOpera && useragent.isMac) {
- hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0)
- | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
- } else {
- hashId = 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0)
- | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
- }
-
- if (keyCode in keys.MODIFIER_KEYS) {
- switch (keys.MODIFIER_KEYS[keyCode]) {
- case "Alt":
- hashId = 2;
- break;
- case "Shift":
- hashId = 4;
- break;
- case "Ctrl":
- hashId = 1;
- break;
- default:
- hashId = 8;
- break;
- }
- keyCode = 0;
- }
-
- if (hashId & 8 && (keyCode == 91 || keyCode == 93)) {
- keyCode = 0;
- }
-
- // If there is no hashID and the keyCode is not a function key, then
- // we don't call the callback as we don't handle a command key here
- // (it's a normal key/character input).
- if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {
- return false;
- }
- return callback(e, hashId, keyCode);
-}
-
-exports.addCommandKeyListener = function(el, callback) {
- var addListener = exports.addListener;
- if (useragent.isOldGecko || useragent.isOpera) {
- // Old versions of Gecko aka. Firefox < 4.0 didn't repeat the keydown
- // event if the user pressed the key for a longer time. Instead, the
- // keydown event was fired once and later on only the keypress event.
- // To emulate the 'right' keydown behavior, the keyCode of the initial
- // keyDown event is stored and in the following keypress events the
- // stores keyCode is used to emulate a keyDown event.
- var lastKeyDownKeyCode = null;
- addListener(el, "keydown", function(e) {
- lastKeyDownKeyCode = e.keyCode;
- });
- addListener(el, "keypress", function(e) {
- return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);
- });
- } else {
- var lastDown = null;
-
- addListener(el, "keydown", function(e) {
- lastDown = e.keyIdentifier || e.keyCode;
- return normalizeCommandKeys(callback, e, e.keyCode);
- });
- }
-};
-
-if (window.postMessage) {
- var postMessageId = 1;
- exports.nextTick = function(callback, win) {
- win = win || window;
- var messageName = "zero-timeout-message-" + postMessageId;
- exports.addListener(win, "message", function listener(e) {
- if (e.data == messageName) {
- exports.stopPropagation(e);
- exports.removeListener(win, "message", listener);
- callback();
- }
- });
- win.postMessage(messageName, "*");
- };
-}
-else {
- exports.nextTick = function(callback, win) {
- win = win || window;
- window.setTimeout(callback, 0);
- };
-}
-
-});
-/*! @license
-==========================================================================
-SproutCore -- JavaScript Application Framework
-copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
-
-For more information about SproutCore, visit http://www.sproutcore.com
-
-
-==========================================================================
-@license */
-
-// Most of the following code is taken from SproutCore with a few changes.
-
-define('ace/lib/keys', ['require', 'exports', 'module' , 'ace/lib/oop'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./oop");
-
-/**
- * Helper functions and hashes for key handling.
- */
-var Keys = (function() {
- var ret = {
- MODIFIER_KEYS: {
- 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'
- },
-
- KEY_MODS: {
- "ctrl": 1, "alt": 2, "option" : 2,
- "shift": 4, "meta": 8, "command": 8
- },
-
- FUNCTION_KEYS : {
- 8 : "Backspace",
- 9 : "Tab",
- 13 : "Return",
- 19 : "Pause",
- 27 : "Esc",
- 32 : "Space",
- 33 : "PageUp",
- 34 : "PageDown",
- 35 : "End",
- 36 : "Home",
- 37 : "Left",
- 38 : "Up",
- 39 : "Right",
- 40 : "Down",
- 44 : "Print",
- 45 : "Insert",
- 46 : "Delete",
- 96 : "Numpad0",
- 97 : "Numpad1",
- 98 : "Numpad2",
- 99 : "Numpad3",
- 100: "Numpad4",
- 101: "Numpad5",
- 102: "Numpad6",
- 103: "Numpad7",
- 104: "Numpad8",
- 105: "Numpad9",
- 112: "F1",
- 113: "F2",
- 114: "F3",
- 115: "F4",
- 116: "F5",
- 117: "F6",
- 118: "F7",
- 119: "F8",
- 120: "F9",
- 121: "F10",
- 122: "F11",
- 123: "F12",
- 144: "Numlock",
- 145: "Scrolllock"
- },
-
- PRINTABLE_KEYS: {
- 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',
- 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',
- 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',
- 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
- 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
- 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
- 188: ',', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',
- 221: ']', 222: '\"'
- }
- };
-
- // A reverse map of FUNCTION_KEYS
- for (var i in ret.FUNCTION_KEYS) {
- var name = ret.FUNCTION_KEYS[i].toUpperCase();
- ret[name] = parseInt(i, 10);
- }
-
- // Add the MODIFIER_KEYS, FUNCTION_KEYS and PRINTABLE_KEYS to the KEY
- // variables as well.
- oop.mixin(ret, ret.MODIFIER_KEYS);
- oop.mixin(ret, ret.PRINTABLE_KEYS);
- oop.mixin(ret, ret.FUNCTION_KEYS);
-
- return ret;
-})();
-oop.mixin(exports, Keys);
-
-exports.keyCodeToString = function(keyCode) {
- return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase();
-}
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
-};
-
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
-};
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/lib/useragent', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
-var ua = navigator.userAgent;
-
-/** Is the user using a browser that identifies itself as Windows */
-exports.isWin = (os == "win");
-
-/** Is the user using a browser that identifies itself as Mac OS */
-exports.isMac = (os == "mac");
-
-/** Is the user using a browser that identifies itself as Linux */
-exports.isLinux = (os == "linux");
-
-exports.isIE =
- navigator.appName == "Microsoft Internet Explorer"
- && parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
-
-exports.isOldIE = exports.isIE && exports.isIE < 9;
-
-/** Is this Firefox or related? */
-exports.isGecko = exports.isMozilla = window.controllers && window.navigator.product === "Gecko";
-
-/** oldGecko == rev < 2.0 **/
-exports.isOldGecko = exports.isGecko && parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1], 10) < 4;
-
-/** Is this Opera */
-exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
-
-/** Is the user using a browser that identifies itself as WebKit */
-exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
-
-exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
-
-exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
-
-exports.isIPad = ua.indexOf("iPad") >= 0;
-
-exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
-
-/**
- * I hate doing this, but we need some way to determine if the user is on a Mac
- * The reason is that users have different expectations of their key combinations.
- *
- * Take copy as an example, Mac people expect to use CMD or APPLE + C
- * Windows folks expect to use CTRL + C
- */
-exports.OS = {
- LINUX: "LINUX",
- MAC: "MAC",
- WINDOWS: "WINDOWS"
-};
-
-/**
- * Return an exports.OS constant
- */
-exports.getOS = function() {
- if (exports.isMac) {
- return exports.OS.MAC;
- } else if (exports.isLinux) {
- return exports.OS.LINUX;
- } else {
- return exports.OS.WINDOWS;
- }
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/editor', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/useragent', 'ace/keyboard/textinput', 'ace/mouse/mouse_handler', 'ace/mouse/fold_handler', 'ace/keyboard/keybinding', 'ace/edit_session', 'ace/search', 'ace/range', 'ace/lib/event_emitter', 'ace/commands/command_manager', 'ace/commands/default_commands'], function(require, exports, module) {
-"use strict";
-
-require("./lib/fixoldbrowsers");
-
-var oop = require("./lib/oop");
-var lang = require("./lib/lang");
-var useragent = require("./lib/useragent");
-var TextInput = require("./keyboard/textinput").TextInput;
-var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
-var FoldHandler = require("./mouse/fold_handler").FoldHandler;
-//var TouchHandler = require("./touch_handler").TouchHandler;
-var KeyBinding = require("./keyboard/keybinding").KeyBinding;
-var EditSession = require("./edit_session").EditSession;
-var Search = require("./search").Search;
-var Range = require("./range").Range;
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var CommandManager = require("./commands/command_manager").CommandManager;
-var defaultCommands = require("./commands/default_commands").commands;
-
-var Editor = function(renderer, session) {
- var container = renderer.getContainerElement();
- this.container = container;
- this.renderer = renderer;
-
- this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
- this.keyBinding = new KeyBinding(this);
-
- // TODO detect touch event support
- if (useragent.isIPad) {
- //this.$mouseHandler = new TouchHandler(this);
- } else {
- this.$mouseHandler = new MouseHandler(this);
- new FoldHandler(this);
- }
-
- this.$blockScrolling = 0;
- this.$search = new Search().set({
- wrap: true
- });
-
- this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
- this.setSession(session || new EditSession(""));
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.setKeyboardHandler = function(keyboardHandler) {
- this.keyBinding.setKeyboardHandler(keyboardHandler);
- };
-
- this.getKeyboardHandler = function() {
- return this.keyBinding.getKeyboardHandler();
- };
-
- this.setSession = function(session) {
- if (this.session == session)
- return;
-
- if (this.session) {
- var oldSession = this.session;
- this.session.removeEventListener("change", this.$onDocumentChange);
- this.session.removeEventListener("changeMode", this.$onChangeMode);
- this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
- this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
- this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
- this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
- this.session.removeEventListener("onChangeFold", this.$onChangeFold);
- this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
- this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
- this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
- this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
- this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
- this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
- this.session.removeEventListener("changeLeftTop", this.$onScrollLeftChange);
-
- var selection = this.session.getSelection();
- selection.removeEventListener("changeCursor", this.$onCursorChange);
- selection.removeEventListener("changeSelection", this.$onSelectionChange);
- }
-
- this.session = session;
-
- this.$onDocumentChange = this.onDocumentChange.bind(this);
- session.addEventListener("change", this.$onDocumentChange);
- this.renderer.setSession(session);
-
- this.$onChangeMode = this.onChangeMode.bind(this);
- session.addEventListener("changeMode", this.$onChangeMode);
-
- this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
- session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
-
- this.$onChangeTabSize = this.renderer.updateText.bind(this.renderer);
- session.addEventListener("changeTabSize", this.$onChangeTabSize);
-
- this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
- session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
-
- this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
- session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
-
- this.$onChangeFold = this.onChangeFold.bind(this);
- session.addEventListener("changeFold", this.$onChangeFold);
-
- this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
- this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
-
- this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
- this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
-
- this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
- this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
-
- this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
- this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
-
- this.$onCursorChange = this.onCursorChange.bind(this);
- this.session.addEventListener("changeOverwrite", this.$onCursorChange);
-
- this.$onScrollTopChange = this.onScrollTopChange.bind(this);
- this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
-
- this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
- this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
-
- this.selection = session.getSelection();
- this.selection.addEventListener("changeCursor", this.$onCursorChange);
-
- this.$onSelectionChange = this.onSelectionChange.bind(this);
- this.selection.addEventListener("changeSelection", this.$onSelectionChange);
-
- this.onChangeMode();
-
- this.$blockScrolling += 1;
- this.onCursorChange();
- this.$blockScrolling -= 1;
-
- this.onScrollTopChange();
- this.onScrollLeftChange();
- this.onSelectionChange();
- this.onChangeFrontMarker();
- this.onChangeBackMarker();
- this.onChangeBreakpoint();
- this.onChangeAnnotation();
- this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
- this.renderer.updateFull();
-
- this._emit("changeSession", {
- session: session,
- oldSession: oldSession
- });
- };
-
- this.getSession = function() {
- return this.session;
- };
-
- this.getSelection = function() {
- return this.selection;
- };
-
- this.resize = function() {
- this.renderer.onResize();
- };
-
- this.setTheme = function(theme) {
- this.renderer.setTheme(theme);
- };
-
- this.getTheme = function() {
- return this.renderer.getTheme();
- };
-
- this.setStyle = function(style) {
- this.renderer.setStyle(style);
- };
-
- this.unsetStyle = function(style) {
- this.renderer.unsetStyle(style);
- };
-
- this.setFontSize = function(size) {
- this.container.style.fontSize = size;
- this.renderer.updateFontSize();
- };
-
- this.$highlightBrackets = function() {
- if (this.session.$bracketHighlight) {
- this.session.removeMarker(this.session.$bracketHighlight);
- this.session.$bracketHighlight = null;
- }
-
- if (this.$highlightPending) {
- return;
- }
-
- // perform highlight async to not block the browser during navigation
- var self = this;
- this.$highlightPending = true;
- setTimeout(function() {
- self.$highlightPending = false;
-
- var pos = self.session.findMatchingBracket(self.getCursorPosition());
- if (pos) {
- var range = new Range(pos.row, pos.column, pos.row, pos.column+1);
- self.session.$bracketHighlight = self.session.addMarker(range, "ace_bracket", "text");
- }
- }, 10);
- };
-
- this.focus = function() {
- // Safari needs the timeout
- // iOS and Firefox need it called immediately
- // to be on the save side we do both
- var _self = this;
- setTimeout(function() {
- _self.textInput.focus();
- });
- this.textInput.focus();
- };
-
- this.isFocused = function() {
- return this.textInput.isFocused();
- };
-
- this.blur = function() {
- this.textInput.blur();
- };
-
- this.onFocus = function() {
- this.renderer.showCursor();
- this.renderer.visualizeFocus();
- this._emit("focus");
- };
-
- this.onBlur = function() {
- this.renderer.hideCursor();
- this.renderer.visualizeBlur();
- this._emit("blur");
- };
-
- this.onDocumentChange = function(e) {
- var delta = e.data;
- var range = delta.range;
- var lastRow;
-
- if (range.start.row == range.end.row && delta.action != "insertLines" && delta.action != "removeLines")
- lastRow = range.end.row;
- else
- lastRow = Infinity;
- this.renderer.updateLines(range.start.row, lastRow);
-
- this._emit("change", e);
-
- // update cursor because tab characters can influence the cursor position
- this.onCursorChange();
- };
-
- this.onTokenizerUpdate = function(e) {
- var rows = e.data;
- this.renderer.updateLines(rows.first, rows.last);
- };
-
- this.onScrollTopChange = function() {
- this.renderer.scrollToY(this.session.getScrollTop());
- };
-
- this.onScrollLeftChange = function() {
- this.renderer.scrollToX(this.session.getScrollLeft());
- };
-
- this.onCursorChange = function() {
- this.renderer.updateCursor();
-
- if (!this.$blockScrolling) {
- this.renderer.scrollCursorIntoView();
- }
-
- // move text input over the cursor
- // this is required for iOS and IME
- this.renderer.moveTextAreaToCursor(this.textInput.getElement());
-
- this.$highlightBrackets();
- this.$updateHighlightActiveLine();
- };
-
- this.$updateHighlightActiveLine = function() {
- var session = this.getSession();
-
- if (session.$highlightLineMarker) {
- session.removeMarker(session.$highlightLineMarker);
- }
- session.$highlightLineMarker = null;
-
- if (this.getHighlightActiveLine() && (this.getSelectionStyle() != "line" || !this.selection.isMultiLine())) {
- var cursor = this.getCursorPosition(),
- foldLine = this.session.getFoldLine(cursor.row);
- var range;
- if (foldLine) {
- range = new Range(foldLine.start.row, 0, foldLine.end.row + 1, 0);
- } else {
- range = new Range(cursor.row, 0, cursor.row+1, 0);
- }
- session.$highlightLineMarker = session.addMarker(range, "ace_active_line", "background");
- }
- };
-
- this.onSelectionChange = function(e) {
- var session = this.getSession();
-
- if (session.$selectionMarker) {
- session.removeMarker(session.$selectionMarker);
- }
- session.$selectionMarker = null;
-
- if (!this.selection.isEmpty()) {
- var range = this.selection.getRange();
- var style = this.getSelectionStyle();
- session.$selectionMarker = session.addMarker(range, "ace_selection", style);
- } else {
- this.$updateHighlightActiveLine();
- }
-
- if (this.$highlightSelectedWord)
- this.session.getMode().highlightSelection(this);
- };
-
- this.onChangeFrontMarker = function() {
- this.renderer.updateFrontMarkers();
- };
-
- this.onChangeBackMarker = function() {
- this.renderer.updateBackMarkers();
- };
-
- this.onChangeBreakpoint = function() {
- this.renderer.setBreakpoints(this.session.getBreakpoints());
- };
-
- this.onChangeAnnotation = function() {
- this.renderer.setAnnotations(this.session.getAnnotations());
- };
-
- this.onChangeMode = function() {
- this.renderer.updateText();
- };
-
- this.onChangeWrapLimit = function() {
- this.renderer.updateFull();
- };
-
- this.onChangeWrapMode = function() {
- this.renderer.onResize(true);
- };
-
- this.onChangeFold = function() {
- // Update the active line marker as due to folding changes the current
- // line range on the screen might have changed.
- this.$updateHighlightActiveLine();
- // TODO: This might be too much updating. Okay for now.
- this.renderer.updateFull();
- };
-
- this.getCopyText = function() {
- var text = "";
- if (!this.selection.isEmpty())
- text = this.session.getTextRange(this.getSelectionRange());
-
- this._emit("copy", text);
- return text;
- };
-
- this.onCut = function() {
- if (this.$readOnly)
- return;
-
- var range = this.getSelectionRange();
- this._emit("cut", range);
-
- if (!this.selection.isEmpty()) {
- this.session.remove(range);
- this.clearSelection();
- }
- };
-
- this.insert = function(text) {
- var session = this.session;
- var mode = session.getMode();
-
- var cursor = this.getCursorPosition();
-
- if (this.getBehavioursEnabled()) {
- // Get a transform if the current mode wants one.
- var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
- if (transform)
- text = transform.text;
- }
-
- text = text.replace("\t", this.session.getTabString());
-
- // remove selected text
- if (!this.selection.isEmpty()) {
- cursor = this.session.remove(this.getSelectionRange());
- this.clearSelection();
- }
- else if (this.session.getOverwrite()) {
- var range = new Range.fromPoints(cursor, cursor);
- range.end.column += text.length;
- this.session.remove(range);
- }
-
- this.clearSelection();
-
- var start = cursor.column;
- var lineState = session.getState(cursor.row);
- var shouldOutdent = mode.checkOutdent(lineState, session.getLine(cursor.row), text);
- var line = session.getLine(cursor.row);
- var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());
- var end = session.insert(cursor, text);
-
- if (transform && transform.selection) {
- if (transform.selection.length == 2) { // Transform relative to the current column
- this.selection.setSelectionRange(
- new Range(cursor.row, start + transform.selection[0],
- cursor.row, start + transform.selection[1]));
- } else { // Transform relative to the current row.
- this.selection.setSelectionRange(
- new Range(cursor.row + transform.selection[0],
- transform.selection[1],
- cursor.row + transform.selection[2],
- transform.selection[3]));
- }
- }
-
- var lineState = session.getState(cursor.row);
-
- // TODO disabled multiline auto indent
- // possibly doing the indent before inserting the text
- // if (cursor.row !== end.row) {
- if (session.getDocument().isNewLine(text)) {
- this.moveCursorTo(cursor.row+1, 0);
-
- var size = session.getTabSize();
- var minIndent = Number.MAX_VALUE;
-
- for (var row = cursor.row + 1; row <= end.row; ++row) {
- var indent = 0;
-
- line = session.getLine(row);
- for (var i = 0; i < line.length; ++i)
- if (line.charAt(i) == '\t')
- indent += size;
- else if (line.charAt(i) == ' ')
- indent += 1;
- else
- break;
- if (/[^\s]/.test(line))
- minIndent = Math.min(indent, minIndent);
- }
-
- for (var row = cursor.row + 1; row <= end.row; ++row) {
- var outdent = minIndent;
-
- line = session.getLine(row);
- for (var i = 0; i < line.length && outdent > 0; ++i)
- if (line.charAt(i) == '\t')
- outdent -= size;
- else if (line.charAt(i) == ' ')
- outdent -= 1;
- session.remove(new Range(row, 0, row, i));
- }
- session.indentRows(cursor.row + 1, end.row, lineIndent);
- }
- if (shouldOutdent)
- mode.autoOutdent(lineState, session, cursor.row);
- };
-
- this.onTextInput = function(text, pasted) {
- if (pasted)
- this._emit("paste", text);
-
- this.keyBinding.onTextInput(text, pasted);
- };
-
- this.onCommandKey = function(e, hashId, keyCode) {
- this.keyBinding.onCommandKey(e, hashId, keyCode);
- };
-
- this.setOverwrite = function(overwrite) {
- this.session.setOverwrite(overwrite);
- };
-
- this.getOverwrite = function() {
- return this.session.getOverwrite();
- };
-
- this.toggleOverwrite = function() {
- this.session.toggleOverwrite();
- };
-
- this.setScrollSpeed = function(speed) {
- this.$mouseHandler.setScrollSpeed(speed);
- };
-
- this.getScrollSpeed = function() {
- return this.$mouseHandler.getScrollSpeed();
- };
-
- this.setDragDelay = function(dragDelay) {
- this.$mouseHandler.setDragDelay(dragDelay);
- };
-
- this.getDragDelay = function() {
- return this.$mouseHandler.getDragDelay();
- };
-
- this.$selectionStyle = "line";
- this.setSelectionStyle = function(style) {
- if (this.$selectionStyle == style) return;
-
- this.$selectionStyle = style;
- this.onSelectionChange();
- this._emit("changeSelectionStyle", {data: style});
- };
-
- this.getSelectionStyle = function() {
- return this.$selectionStyle;
- };
-
- this.$highlightActiveLine = true;
- this.setHighlightActiveLine = function(shouldHighlight) {
- if (this.$highlightActiveLine == shouldHighlight) return;
-
- this.$highlightActiveLine = shouldHighlight;
- this.$updateHighlightActiveLine();
- };
-
- this.getHighlightActiveLine = function() {
- return this.$highlightActiveLine;
- };
-
- this.$highlightSelectedWord = true;
- this.setHighlightSelectedWord = function(shouldHighlight) {
- if (this.$highlightSelectedWord == shouldHighlight)
- return;
-
- this.$highlightSelectedWord = shouldHighlight;
- if (shouldHighlight)
- this.session.getMode().highlightSelection(this);
- else
- this.session.getMode().clearSelectionHighlight(this);
- };
-
- this.getHighlightSelectedWord = function() {
- return this.$highlightSelectedWord;
- };
-
- this.setShowInvisibles = function(showInvisibles) {
- if (this.getShowInvisibles() == showInvisibles)
- return;
-
- this.renderer.setShowInvisibles(showInvisibles);
- };
-
- this.getShowInvisibles = function() {
- return this.renderer.getShowInvisibles();
- };
-
- this.setShowPrintMargin = function(showPrintMargin) {
- this.renderer.setShowPrintMargin(showPrintMargin);
- };
-
- this.getShowPrintMargin = function() {
- return this.renderer.getShowPrintMargin();
- };
-
- this.setPrintMarginColumn = function(showPrintMargin) {
- this.renderer.setPrintMarginColumn(showPrintMargin);
- };
-
- this.getPrintMarginColumn = function() {
- return this.renderer.getPrintMarginColumn();
- };
-
- this.$readOnly = false;
- this.setReadOnly = function(readOnly) {
- this.$readOnly = readOnly;
- };
-
- this.getReadOnly = function() {
- return this.$readOnly;
- };
-
- this.$modeBehaviours = true;
- this.setBehavioursEnabled = function (enabled) {
- this.$modeBehaviours = enabled;
- };
-
- this.getBehavioursEnabled = function () {
- return this.$modeBehaviours;
- };
-
- this.setShowFoldWidgets = function(show) {
- var gutter = this.renderer.$gutterLayer;
- if (gutter.getShowFoldWidgets() == show)
- return;
-
- this.renderer.$gutterLayer.setShowFoldWidgets(show);
- this.$showFoldWidgets = show;
- this.renderer.updateFull();
- };
-
- this.getShowFoldWidgets = function() {
- return this.renderer.$gutterLayer.getShowFoldWidgets();
- };
-
- this.remove = function(dir) {
- if (this.selection.isEmpty()){
- if(dir == "left")
- this.selection.selectLeft();
- else
- this.selection.selectRight();
- }
-
- var range = this.getSelectionRange();
- if (this.getBehavioursEnabled()) {
- var session = this.session;
- var state = session.getState(range.start.row);
- var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
- if (new_range)
- range = new_range;
- }
-
- this.session.remove(range);
- this.clearSelection();
- };
-
- this.removeWordRight = function() {
- if (this.selection.isEmpty())
- this.selection.selectWordRight();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
-
- this.removeWordLeft = function() {
- if (this.selection.isEmpty())
- this.selection.selectWordLeft();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
-
- this.removeToLineStart = function() {
- if (this.selection.isEmpty())
- this.selection.selectLineStart();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
-
- this.removeToLineEnd = function() {
- if (this.selection.isEmpty())
- this.selection.selectLineEnd();
-
- var range = this.getSelectionRange();
- if (range.start.column == range.end.column && range.start.row == range.end.row) {
- range.end.column = 0;
- range.end.row++;
- }
-
- this.session.remove(range);
- this.clearSelection();
- };
-
- this.splitLine = function() {
- if (!this.selection.isEmpty()) {
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- }
-
- var cursor = this.getCursorPosition();
- this.insert("\n");
- this.moveCursorToPosition(cursor);
- };
-
- this.transposeLetters = function() {
- if (!this.selection.isEmpty()) {
- return;
- }
-
- var cursor = this.getCursorPosition();
- var column = cursor.column;
- if (column === 0)
- return;
-
- var line = this.session.getLine(cursor.row);
- var swap, range;
- if (column < line.length) {
- swap = line.charAt(column) + line.charAt(column-1);
- range = new Range(cursor.row, column-1, cursor.row, column+1);
- }
- else {
- swap = line.charAt(column-1) + line.charAt(column-2);
- range = new Range(cursor.row, column-2, cursor.row, column);
- }
- this.session.replace(range, swap);
- };
-
- this.toLowerCase = function() {
- var originalRange = this.getSelectionRange();
- if (this.selection.isEmpty()) {
- this.selection.selectWord();
- }
-
- var range = this.getSelectionRange();
- var text = this.session.getTextRange(range);
- this.session.replace(range, text.toLowerCase());
- this.selection.setSelectionRange(originalRange);
- };
-
- this.toUpperCase = function() {
- var originalRange = this.getSelectionRange();
- if (this.selection.isEmpty()) {
- this.selection.selectWord();
- }
-
- var range = this.getSelectionRange();
- var text = this.session.getTextRange(range);
- this.session.replace(range, text.toUpperCase());
- this.selection.setSelectionRange(originalRange);
- };
-
- this.indent = function() {
- var session = this.session;
- var range = this.getSelectionRange();
-
- if (range.start.row < range.end.row || range.start.column < range.end.column) {
- var rows = this.$getSelectedRows();
- session.indentRows(rows.first, rows.last, "\t");
- } else {
- var indentString;
-
- if (this.session.getUseSoftTabs()) {
- var size = session.getTabSize(),
- position = this.getCursorPosition(),
- column = session.documentToScreenColumn(position.row, position.column),
- count = (size - column % size);
-
- indentString = lang.stringRepeat(" ", count);
- } else
- indentString = "\t";
- return this.insert(indentString);
- }
- };
-
- this.blockOutdent = function() {
- var selection = this.session.getSelection();
- this.session.outdentRows(selection.getRange());
- };
-
- this.toggleCommentLines = function() {
- var state = this.session.getState(this.getCursorPosition().row);
- var rows = this.$getSelectedRows();
- this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
- };
-
- this.removeLines = function() {
- var rows = this.$getSelectedRows();
- var range;
- if (rows.first === 0 || rows.last+1 < this.session.getLength())
- range = new Range(rows.first, 0, rows.last+1, 0);
- else
- range = new Range(
- rows.first-1, this.session.getLine(rows.first-1).length,
- rows.last, this.session.getLine(rows.last).length
- );
- this.session.remove(range);
- this.clearSelection();
- };
-
- this.moveLinesDown = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.moveLinesDown(firstRow, lastRow);
- });
- };
-
- this.moveLinesUp = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.moveLinesUp(firstRow, lastRow);
- });
- };
-
- this.moveText = function(range, toPosition) {
- if (this.$readOnly)
- return null;
-
- return this.session.moveText(range, toPosition);
- };
-
- this.copyLinesUp = function() {
- this.$moveLines(function(firstRow, lastRow) {
- this.session.duplicateLines(firstRow, lastRow);
- return 0;
- });
- };
-
- this.copyLinesDown = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.duplicateLines(firstRow, lastRow);
- });
- };
-
-
- this.$moveLines = function(mover) {
- var rows = this.$getSelectedRows();
- var selection = this.selection;
- if (!selection.isMultiLine()) {
- var range = selection.getRange();
- var reverse = selection.isBackwards();
- }
-
- var linesMoved = mover.call(this, rows.first, rows.last);
-
- if (range) {
- range.start.row += linesMoved;
- range.end.row += linesMoved;
- selection.setSelectionRange(range, reverse);
- }
- else {
- selection.setSelectionAnchor(rows.last+linesMoved+1, 0);
- selection.$moveSelection(function() {
- selection.moveCursorTo(rows.first+linesMoved, 0);
- });
- }
- };
-
- this.$getSelectedRows = function() {
- var range = this.getSelectionRange().collapseRows();
-
- return {
- first: range.start.row,
- last: range.end.row
- };
- };
-
- this.onCompositionStart = function(text) {
- this.renderer.showComposition(this.getCursorPosition());
- };
-
- this.onCompositionUpdate = function(text) {
- this.renderer.setCompositionText(text);
- };
-
- this.onCompositionEnd = function() {
- this.renderer.hideComposition();
- };
-
- this.getFirstVisibleRow = function() {
- return this.renderer.getFirstVisibleRow();
- };
-
- this.getLastVisibleRow = function() {
- return this.renderer.getLastVisibleRow();
- };
-
- this.isRowVisible = function(row) {
- return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());
- };
-
- this.isRowFullyVisible = function(row) {
- return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());
- };
-
- this.$getVisibleRowCount = function() {
- return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;
- };
-
- this.$getPageDownRow = function() {
- return this.renderer.getScrollBottomRow();
- };
-
- this.$getPageUpRow = function() {
- var firstRow = this.renderer.getScrollTopRow();
- var lastRow = this.renderer.getScrollBottomRow();
-
- return firstRow - (lastRow - firstRow);
- };
-
- this.selectPageDown = function() {
- var row = this.$getPageDownRow() + Math.floor(this.$getVisibleRowCount() / 2);
-
- this.scrollPageDown();
-
- var selection = this.getSelection();
- var leadScreenPos = this.session.documentToScreenPosition(selection.getSelectionLead());
- var dest = this.session.screenToDocumentPosition(row, leadScreenPos.column);
- selection.selectTo(dest.row, dest.column);
- };
-
- this.selectPageUp = function() {
- var visibleRows = this.renderer.getScrollTopRow() - this.renderer.getScrollBottomRow();
- var row = this.$getPageUpRow() + Math.round(visibleRows / 2);
-
- this.scrollPageUp();
-
- var selection = this.getSelection();
- var leadScreenPos = this.session.documentToScreenPosition(selection.getSelectionLead());
- var dest = this.session.screenToDocumentPosition(row, leadScreenPos.column);
- selection.selectTo(dest.row, dest.column);
- };
-
- this.gotoPageDown = function() {
- var row = this.$getPageDownRow();
- var column = this.getCursorPositionScreen().column;
-
- this.scrollToRow(row);
- this.getSelection().moveCursorToScreen(row, column);
- };
-
- this.gotoPageUp = function() {
- var row = this.$getPageUpRow();
- var column = this.getCursorPositionScreen().column;
-
- this.scrollToRow(row);
- this.getSelection().moveCursorToScreen(row, column);
- };
-
- this.scrollPageDown = function() {
- this.scrollToRow(this.$getPageDownRow());
- };
-
- this.scrollPageUp = function() {
- this.renderer.scrollToRow(this.$getPageUpRow());
- };
-
- this.scrollToRow = function(row) {
- this.renderer.scrollToRow(row);
- };
-
- this.scrollToLine = function(line, center) {
- this.renderer.scrollToLine(line, center);
- };
-
- this.centerSelection = function() {
- var range = this.getSelectionRange();
- var line = Math.floor(range.start.row + (range.end.row - range.start.row) / 2);
- this.renderer.scrollToLine(line, true);
- };
-
- this.getCursorPosition = function() {
- return this.selection.getCursor();
- };
-
- this.getCursorPositionScreen = function() {
- return this.session.documentToScreenPosition(this.getCursorPosition());
- };
-
- this.getSelectionRange = function() {
- return this.selection.getRange();
- };
-
-
- this.selectAll = function() {
- this.$blockScrolling += 1;
- this.selection.selectAll();
- this.$blockScrolling -= 1;
- };
-
- this.clearSelection = function() {
- this.selection.clearSelection();
- };
-
- this.moveCursorTo = function(row, column) {
- this.selection.moveCursorTo(row, column);
- };
-
- this.moveCursorToPosition = function(pos) {
- this.selection.moveCursorToPosition(pos);
- };
-
- this.jumpToMatching = function() {
- var cursor = this.getCursorPosition();
- var pos = this.session.findMatchingBracket(cursor);
- if (!pos) {
- cursor.column += 1;
- pos = this.session.findMatchingBracket(cursor);
- }
- if (!pos) {
- cursor.column -= 2;
- pos = this.session.findMatchingBracket(cursor);
- }
-
- if (pos) {
- this.clearSelection();
- this.moveCursorTo(pos.row, pos.column);
- }
- };
-
- this.gotoLine = function(lineNumber, column) {
- this.selection.clearSelection();
- this.session.unfold({row: lineNumber - 1, column: column || 0});
-
- this.$blockScrolling += 1;
- this.moveCursorTo(lineNumber-1, column || 0);
- this.$blockScrolling -= 1;
- if (!this.isRowFullyVisible(this.getCursorPosition().row))
- this.scrollToLine(lineNumber, true);
- };
-
- this.navigateTo = function(row, column) {
- this.clearSelection();
- this.moveCursorTo(row, column);
- };
-
- this.navigateUp = function(times) {
- this.selection.clearSelection();
- times = times || 1;
- this.selection.moveCursorBy(-times, 0);
- };
-
- this.navigateDown = function(times) {
- this.selection.clearSelection();
- times = times || 1;
- this.selection.moveCursorBy(times, 0);
- };
-
- this.navigateLeft = function(times) {
- if (!this.selection.isEmpty()) {
- var selectionStart = this.getSelectionRange().start;
- this.moveCursorToPosition(selectionStart);
- }
- else {
- times = times || 1;
- while (times--) {
- this.selection.moveCursorLeft();
- }
- }
- this.clearSelection();
- };
-
- this.navigateRight = function(times) {
- if (!this.selection.isEmpty()) {
- var selectionEnd = this.getSelectionRange().end;
- this.moveCursorToPosition(selectionEnd);
- }
- else {
- times = times || 1;
- while (times--) {
- this.selection.moveCursorRight();
- }
- }
- this.clearSelection();
- };
-
- this.navigateLineStart = function() {
- this.selection.moveCursorLineStart();
- this.clearSelection();
- };
-
- this.navigateLineEnd = function() {
- this.selection.moveCursorLineEnd();
- this.clearSelection();
- };
-
- this.navigateFileEnd = function() {
- this.selection.moveCursorFileEnd();
- this.clearSelection();
- };
-
- this.navigateFileStart = function() {
- this.selection.moveCursorFileStart();
- this.clearSelection();
- };
-
- this.navigateWordRight = function() {
- this.selection.moveCursorWordRight();
- this.clearSelection();
- };
-
- this.navigateWordLeft = function() {
- this.selection.moveCursorWordLeft();
- this.clearSelection();
- };
-
- this.replace = function(replacement, options) {
- if (options)
- this.$search.set(options);
-
- var range = this.$search.find(this.session);
- if (!range)
- return;
-
- this.$tryReplace(range, replacement);
- if (range !== null)
- this.selection.setSelectionRange(range);
- };
-
- this.replaceAll = function(replacement, options) {
- if (options) {
- this.$search.set(options);
- }
-
- var ranges = this.$search.findAll(this.session);
- if (!ranges.length)
- return;
-
- var selection = this.getSelectionRange();
- this.clearSelection();
- this.selection.moveCursorTo(0, 0);
-
- this.$blockScrolling += 1;
- for (var i = ranges.length - 1; i >= 0; --i)
- this.$tryReplace(ranges[i], replacement);
-
- this.selection.setSelectionRange(selection);
- this.$blockScrolling -= 1;
- };
-
- this.$tryReplace = function(range, replacement) {
- var input = this.session.getTextRange(range);
- replacement = this.$search.replace(input, replacement);
- if (replacement !== null) {
- range.end = this.session.replace(range, replacement);
- return range;
- } else {
- return null;
- }
- };
-
- this.getLastSearchOptions = function() {
- return this.$search.getOptions();
- };
-
- this.find = function(needle, options) {
- this.clearSelection();
- options = options || {};
- options.needle = needle;
- this.$search.set(options);
- this.$find();
- };
-
- this.findNext = function(options) {
- options = options || {};
- if (typeof options.backwards == "undefined")
- options.backwards = false;
- this.$search.set(options);
- this.$find();
- };
-
- this.findPrevious = function(options) {
- options = options || {};
- if (typeof options.backwards == "undefined")
- options.backwards = true;
- this.$search.set(options);
- this.$find();
- };
-
- this.$find = function(backwards) {
- if (!this.selection.isEmpty())
- this.$search.set({needle: this.session.getTextRange(this.getSelectionRange())});
-
- if (typeof backwards != "undefined")
- this.$search.set({backwards: backwards});
-
- var range = this.$search.find(this.session);
- if (range) {
- this.session.unfold(range);
- this.selection.setSelectionRange(range); // this scrolls selection into view
- }
- };
-
- this.undo = function() {
- this.session.getUndoManager().undo();
- };
-
- this.redo = function() {
- this.session.getUndoManager().redo();
- };
-
- this.destroy = function() {
- this.renderer.destroy();
- };
-
-}).call(Editor.prototype);
-
-
-exports.Editor = Editor;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.stringReverse = function(string) {
- return string.split("").reverse().join("");
-};
-
-exports.stringRepeat = function (string, count) {
- return new Array(count + 1).join(string);
-};
-
-var trimBeginRegexp = /^\s\s*/;
-var trimEndRegexp = /\s\s*$/;
-
-exports.stringTrimLeft = function (string) {
- return string.replace(trimBeginRegexp, '');
-};
-
-exports.stringTrimRight = function (string) {
- return string.replace(trimEndRegexp, '');
-};
-
-exports.copyObject = function(obj) {
- var copy = {};
- for (var key in obj) {
- copy[key] = obj[key];
- }
- return copy;
-};
-
-exports.copyArray = function(array){
- var copy = [];
- for (var i=0, l=array.length; i<l; i++) {
- if (array[i] && typeof array[i] == "object")
- copy[i] = this.copyObject( array[i] );
- else
- copy[i] = array[i];
- }
- return copy;
-};
-
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
- return obj;
- }
-
- var copy = obj.constructor();
- for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
- }
- return copy;
-};
-
-exports.arrayToMap = function(arr) {
- var map = {};
- for (var i=0; i<arr.length; i++) {
- map[arr[i]] = 1;
- }
- return map;
-
-};
-
-/**
- * splice out of 'array' anything that === 'value'
- */
-exports.arrayRemove = function(array, value) {
- for (var i = 0; i <= array.length; i++) {
- if (value === array[i]) {
- array.splice(i, 1);
- }
- }
-};
-
-exports.escapeRegExp = function(str) {
- return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
-};
-
-exports.deferredCall = function(fcn) {
-
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var deferred = function(timeout) {
- deferred.cancel();
- timer = setTimeout(callback, timeout || 0);
- return deferred;
- };
-
- deferred.schedule = deferred;
-
- deferred.call = function() {
- this.cancel();
- fcn();
- return deferred;
- };
-
- deferred.cancel = function() {
- clearTimeout(timer);
- timer = null;
- return deferred;
- };
-
- return deferred;
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/keyboard/textinput', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-var event = require("../lib/event");
-var useragent = require("../lib/useragent");
-var dom = require("../lib/dom");
-
-var TextInput = function(parentNode, host) {
-
- var text = dom.createElement("textarea");
- if (useragent.isTouchPad)
- text.setAttribute("x-palm-disable-auto-cap", true);
-
- text.style.left = "-10000px";
- text.style.position = "fixed";
- parentNode.insertBefore(text, parentNode.firstChild);
-
- var PLACEHOLDER = String.fromCharCode(0);
- sendText();
-
- var inCompostion = false;
- var copied = false;
- var pasted = false;
- var tempStyle = '';
-
- function select() {
- try {
- text.select();
- } catch (e) {}
- }
-
- function sendText(valueToSend) {
- if (!copied) {
- var value = valueToSend || text.value;
- if (value) {
- if (value.charCodeAt(value.length-1) == PLACEHOLDER.charCodeAt(0)) {
- value = value.slice(0, -1);
- if (value)
- host.onTextInput(value, pasted);
- }
- else {
- host.onTextInput(value, pasted);
- }
-
- // If editor is no longer focused we quit immediately, since
- // it means that something else is in charge now.
- if (!isFocused())
- return false;
- }
- }
-
- copied = false;
- pasted = false;
-
- // Safari doesn't fire copy events if no text is selected
- text.value = PLACEHOLDER;
- select();
- }
-
- var onTextInput = function(e) {
- setTimeout(function () {
- if (!inCompostion)
- sendText(e.data);
- }, 0);
- };
-
- var onPropertyChange = function(e) {
- if (useragent.isOldIE && text.value.charCodeAt(0) > 128) return;
- setTimeout(function() {
- if (!inCompostion)
- sendText();
- }, 0);
- };
-
- var onCompositionStart = function(e) {
- inCompostion = true;
- host.onCompositionStart();
- if (!useragent.isGecko) setTimeout(onCompositionUpdate, 0);
- };
-
- var onCompositionUpdate = function() {
- if (!inCompostion) return;
- host.onCompositionUpdate(text.value);
- };
-
- var onCompositionEnd = function(e) {
- inCompostion = false;
- host.onCompositionEnd();
- };
-
- var onCopy = function(e) {
- copied = true;
- var copyText = host.getCopyText();
- if(copyText)
- text.value = copyText;
- else
- e.preventDefault();
- select();
- setTimeout(function () {
- sendText();
- }, 0);
- };
-
- var onCut = function(e) {
- copied = true;
- var copyText = host.getCopyText();
- if(copyText) {
- text.value = copyText;
- host.onCut();
- } else
- e.preventDefault();
- select();
- setTimeout(function () {
- sendText();
- }, 0);
- };
-
- event.addCommandKeyListener(text, host.onCommandKey.bind(host));
- if (useragent.isOldIE) {
- var keytable = { 13:1, 27:1 };
- event.addListener(text, "keyup", function (e) {
- if (inCompostion && (!text.value || keytable[e.keyCode]))
- setTimeout(onCompositionEnd, 0);
- if ((text.value.charCodeAt(0)|0) < 129) {
- return;
- }
- inCompostion ? onCompositionUpdate() : onCompositionStart();
- });
- }
-
- if ("onpropertychange" in text && !("oninput" in text))
- event.addListener(text, "propertychange", onPropertyChange);
- else
- event.addListener(text, "input", onTextInput);
-
- event.addListener(text, "paste", function(e) {
- // Mark that the next input text comes from past.
- pasted = true;
- // Some browsers support the event.clipboardData API. Use this to get
- // the pasted content which increases speed if pasting a lot of lines.
- if (e.clipboardData && e.clipboardData.getData) {
- sendText(e.clipboardData.getData("text/plain"));
- e.preventDefault();
- }
- else {
- // If a browser doesn't support any of the things above, use the regular
- // method to detect the pasted input.
- onPropertyChange();
- }
- });
-
- if ("onbeforecopy" in text && typeof clipboardData !== "undefined") {
- event.addListener(text, "beforecopy", function(e) {
- var copyText = host.getCopyText();
- if (copyText)
- clipboardData.setData("Text", copyText);
- else
- e.preventDefault();
- });
- event.addListener(parentNode, "keydown", function(e) {
- if (e.ctrlKey && e.keyCode == 88) {
- var copyText = host.getCopyText();
- if (copyText) {
- clipboardData.setData("Text", copyText);
- host.onCut();
- }
- event.preventDefault(e);
- }
- });
- }
- else {
- event.addListener(text, "copy", onCopy);
- event.addListener(text, "cut", onCut);
- }
-
- event.addListener(text, "compositionstart", onCompositionStart);
- if (useragent.isGecko) {
- event.addListener(text, "text", onCompositionUpdate);
- }
- if (useragent.isWebKit) {
- event.addListener(text, "keyup", onCompositionUpdate);
- }
- event.addListener(text, "compositionend", onCompositionEnd);
-
- event.addListener(text, "blur", function() {
- host.onBlur();
- });
-
- event.addListener(text, "focus", function() {
- host.onFocus();
- select();
- });
-
- this.focus = function() {
- host.onFocus();
- select();
- text.focus();
- };
-
- this.blur = function() {
- text.blur();
- };
-
- function isFocused() {
- return document.activeElement === text;
- }
- this.isFocused = isFocused;
-
- this.getElement = function() {
- return text;
- };
-
- this.onContextMenu = function(mousePos, isEmpty){
- if (mousePos) {
- if (!tempStyle)
- tempStyle = text.style.cssText;
-
- text.style.cssText =
- 'position:fixed; z-index:1000;' +
- 'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;';
-
- }
- if (isEmpty)
- text.value='';
- };
-
- this.onContextMenuClose = function(){
- setTimeout(function () {
- if (tempStyle) {
- text.style.cssText = tempStyle;
- tempStyle = '';
- }
- sendText();
- }, 0);
- };
-};
-
-exports.TextInput = TextInput;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mouse/mouse_handler', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/mouse/default_handlers', 'ace/mouse/default_gutter_handler', 'ace/mouse/mouse_event'], function(require, exports, module) {
-"use strict";
-
-var event = require("../lib/event");
-var DefaultHandlers = require("./default_handlers").DefaultHandlers;
-var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler;
-var MouseEvent = require("./mouse_event").MouseEvent;
-
-var MouseHandler = function(editor) {
- this.editor = editor;
-
- new DefaultHandlers(editor);
- new DefaultGutterHandler(editor);
-
- event.addListener(editor.container, "mousedown", function(e) {
- editor.focus();
- return event.preventDefault(e);
- });
- event.addListener(editor.container, "selectstart", function(e) {
- return event.preventDefault(e);
- });
-
- var mouseTarget = editor.renderer.getMouseEventTarget();
- event.addListener(mouseTarget, "mousedown", this.onMouseEvent.bind(this, "mousedown"));
- event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
- event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
- event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, this.onMouseEvent.bind(this, "dblclick"));
- event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, this.onMouseEvent.bind(this, "tripleclick"));
- event.addMultiMouseDownListener(mouseTarget, 0, 4, 600, this.onMouseEvent.bind(this, "quadclick"));
- event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
-
- var gutterEl = editor.renderer.$gutter;
- event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"));
- event.addListener(gutterEl, "click", this.onMouseEvent.bind(this, "gutterclick"));
- event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"));
- event.addListener(gutterEl, "mousemove", this.onMouseMove.bind(this, "gutter"));
-};
-
-(function() {
-
- this.$scrollSpeed = 1;
- this.setScrollSpeed = function(speed) {
- this.$scrollSpeed = speed;
- };
-
- this.getScrollSpeed = function() {
- return this.$scrollSpeed;
- };
-
- this.onMouseEvent = function(name, e) {
- this.editor._emit(name, new MouseEvent(e, this.editor));
- };
-
- this.$dragDelay = 250;
- this.setDragDelay = function(dragDelay) {
- this.$dragDelay = dragDelay;
- };
-
- this.getDragDelay = function() {
- return this.$dragDelay;
- };
-
- this.onMouseMove = function(name, e) {
- // optimization, because mousemove doesn't have a default handler.
- var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
- if (!listeners || !listeners.length)
- return;
-
- this.editor._emit(name, new MouseEvent(e, this.editor));
- };
-
- this.onMouseWheel = function(name, e) {
- var mouseEvent = new MouseEvent(e, this.editor);
- mouseEvent.speed = this.$scrollSpeed * 2;
- mouseEvent.wheelX = e.wheelX;
- mouseEvent.wheelY = e.wheelY;
-
- this.editor._emit(name, mouseEvent);
- };
-
-}).call(MouseHandler.prototype);
-
-exports.MouseHandler = MouseHandler;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mike de Boer <mike AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mouse/default_handlers', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/dom', 'ace/lib/browser_focus'], function(require, exports, module) {
-"use strict";
-
-var event = require("../lib/event");
-var dom = require("../lib/dom");
-var BrowserFocus = require("../lib/browser_focus").BrowserFocus;
-
-var STATE_UNKNOWN = 0;
-var STATE_SELECT = 1;
-var STATE_DRAG = 2;
-
-var DRAG_OFFSET = 5; // pixels
-
-function DefaultHandlers(editor) {
- this.editor = editor;
- this.$clickSelection = null;
- this.browserFocus = new BrowserFocus();
-
- editor.setDefaultHandler("mousedown", this.onMouseDown.bind(this));
- editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(this));
- editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(this));
- editor.setDefaultHandler("quadclick", this.onQuadClick.bind(this));
- editor.setDefaultHandler("mousewheel", this.onScroll.bind(this));
-}
-
-(function() {
-
- this.onMouseDown = function(ev) {
- var inSelection = ev.inSelection();
- var pageX = ev.pageX;
- var pageY = ev.pageY;
- var pos = ev.getDocumentPosition();
- var editor = this.editor;
- var _self = this;
-
- var selectionRange = editor.getSelectionRange();
- var selectionEmpty = selectionRange.isEmpty();
- var state = STATE_UNKNOWN;
-
- // if this click caused the editor to be focused should not clear the
- // selection
- if (
- inSelection && (
- !this.browserFocus.isFocused()
- || new Date().getTime() - this.browserFocus.lastFocus < 20
- || !editor.isFocused()
- )
- ) {
- editor.focus();
- return;
- }
-
- var button = ev.getButton();
- if (button !== 0) {
- if (selectionEmpty) {
- editor.moveCursorToPosition(pos);
- }
- if (button == 2) {
- editor.textInput.onContextMenu({x: ev.clientX, y: ev.clientY}, selectionEmpty);
- event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose);
- }
- return;
- }
-
- if (!inSelection) {
- // Directly pick STATE_SELECT, since the user is not clicking inside
- // a selection.
- onStartSelect(pos);
- }
-
- var mousePageX = pageX, mousePageY = pageY;
- var mousedownTime = (new Date()).getTime();
- var dragCursor, dragRange, dragSelectionMarker;
-
- var onMouseSelection = function(e) {
- mousePageX = event.getDocumentX(e);
- mousePageY = event.getDocumentY(e);
- };
-
- var onMouseSelectionEnd = function(e) {
- clearInterval(timerId);
- if (state == STATE_UNKNOWN)
- onStartSelect(pos);
- else if (state == STATE_DRAG)
- onMouseDragSelectionEnd(e);
-
- _self.$clickSelection = null;
- state = STATE_UNKNOWN;
- };
-
- var onMouseDragSelectionEnd = function(e) {
- dom.removeCssClass(editor.container, "ace_dragging");
- editor.session.removeMarker(dragSelectionMarker);
-
- if (!editor.$mouseHandler.$clickSelection) {
- if (!dragCursor) {
- editor.moveCursorToPosition(pos);
- editor.selection.clearSelection(pos.row, pos.column);
- }
- }
-
- if (!dragCursor)
- return;
-
- if (dragRange.contains(dragCursor.row, dragCursor.column)) {
- dragCursor = null;
- return;
- }
-
- editor.clearSelection();
- if (e && (e.ctrlKey || e.altKey)) {
- var session = editor.session;
- var newRange = session.insert(dragCursor, session.getTextRange(dragRange));
- } else {
- var newRange = editor.moveText(dragRange, dragCursor);
- }
- if (!newRange) {
- dragCursor = null;
- return;
- }
-
- editor.selection.setSelectionRange(newRange);
- };
-
- var onSelectionInterval = function() {
- if (state == STATE_UNKNOWN) {
- var distance = calcDistance(pageX, pageY, mousePageX, mousePageY);
- var time = (new Date()).getTime();
-
- if (distance > DRAG_OFFSET) {
- state = STATE_SELECT;
- var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
- cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1));
- onStartSelect(cursor);
- }
- else if ((time - mousedownTime) > editor.getDragDelay()) {
- state = STATE_DRAG;
- dragRange = editor.getSelectionRange();
- var style = editor.getSelectionStyle();
- dragSelectionMarker = editor.session.addMarker(dragRange, "ace_selection", style);
- editor.clearSelection();
- dom.addCssClass(editor.container, "ace_dragging");
- }
-
- }
-
- if (state == STATE_DRAG)
- onDragSelectionInterval();
- else if (state == STATE_SELECT)
- onUpdateSelectionInterval();
- };
-
- function onStartSelect(pos) {
- if (ev.getShiftKey()) {
- editor.selection.selectToPosition(pos);
- }
- else {
- if (!_self.$clickSelection) {
- editor.moveCursorToPosition(pos);
- editor.selection.clearSelection(pos.row, pos.column);
- }
- }
- state = STATE_SELECT;
- }
-
- var onUpdateSelectionInterval = function() {
- var anchor;
- var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
- cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1));
-
- if (_self.$clickSelection) {
- if (_self.$clickSelection.contains(cursor.row, cursor.column)) {
- editor.selection.setSelectionRange(_self.$clickSelection);
- }
- else {
- if (_self.$clickSelection.compare(cursor.row, cursor.column) == -1) {
- anchor = _self.$clickSelection.end;
- }
- else {
- anchor = _self.$clickSelection.start;
- }
- editor.selection.setSelectionAnchor(anchor.row, anchor.column);
- editor.selection.selectToPosition(cursor);
- }
- }
- else {
- editor.selection.selectToPosition(cursor);
- }
-
- editor.renderer.scrollCursorIntoView();
- };
-
- var onDragSelectionInterval = function() {
- dragCursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
- dragCursor.row = Math.max(0, Math.min(dragCursor.row, editor.session.getLength() - 1));
-
- editor.moveCursorToPosition(dragCursor);
- };
-
- event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
- var timerId = setInterval(onSelectionInterval, 20);
-
- return ev.preventDefault();
- };
-
- this.onDoubleClick = function(ev) {
- var pos = ev.getDocumentPosition();
- var editor = this.editor;
-
- editor.moveCursorToPosition(pos);
- editor.selection.selectWord();
- this.$clickSelection = editor.getSelectionRange();
- };
-
- this.onTripleClick = function(ev) {
- var pos = ev.getDocumentPosition();
- var editor = this.editor;
-
- editor.moveCursorToPosition(pos);
- editor.selection.selectLine();
- this.$clickSelection = editor.getSelectionRange();
- };
-
- this.onQuadClick = function(ev) {
- var editor = this.editor;
-
- editor.selectAll();
- this.$clickSelection = editor.getSelectionRange();
- };
-
- this.onScroll = function(ev) {
- var editor = this.editor;
-
- editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
- if (editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed))
- return ev.preventDefault();
- };
-
-}).call(DefaultHandlers.prototype);
-
-exports.DefaultHandlers = DefaultHandlers;
-
-function calcDistance(ax, ay, bx, by) {
- return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
-}
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/lib/browser_focus', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./oop");
-var event = require("./event");
-var EventEmitter = require("./event_emitter").EventEmitter;
-
-/**
- * This class keeps track of the focus state of the given window.
- * Focus changes for example when the user switches a browser tab,
- * goes to the location bar or switches to another application.
- */
-var BrowserFocus = function(win) {
- win = win || window;
-
- this.lastFocus = new Date().getTime();
- this._isFocused = true;
-
- var _self = this;
-
- // IE < 9 supports focusin and focusout events
- if ("onfocusin" in win.document) {
- event.addListener(win.document, "focusin", function(e) {
- _self._setFocused(true);
- });
-
- event.addListener(win.document, "focusout", function(e) {
- _self._setFocused(!!e.toElement);
- });
- }
- else {
- event.addListener(win, "blur", function(e) {
- _self._setFocused(false);
- });
-
- event.addListener(win, "focus", function(e) {
- _self._setFocused(true);
- });
- }
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.isFocused = function() {
- return this._isFocused;
- };
-
- this._setFocused = function(isFocused) {
- if (this._isFocused == isFocused)
- return;
-
- if (isFocused)
- this.lastFocus = new Date().getTime();
-
- this._isFocused = isFocused;
- this._emit("changeFocus");
- };
-
-}).call(BrowserFocus.prototype);
-
-
-exports.BrowserFocus = BrowserFocus;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Mike de Boer <mike AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var EventEmitter = {};
-
-EventEmitter._emit =
-EventEmitter._dispatchEvent = function(eventName, e) {
- this._eventRegistry = this._eventRegistry || {};
- this._defaultHandlers = this._defaultHandlers || {};
-
- var listeners = this._eventRegistry[eventName] || [];
- var defaultHandler = this._defaultHandlers[eventName];
- if (!listeners.length && !defaultHandler)
- return;
-
- e = e || {};
- e.type = eventName;
-
- if (!e.stopPropagation) {
- e.stopPropagation = function() {
- this.propagationStopped = true;
- };
- }
-
- if (!e.preventDefault) {
- e.preventDefault = function() {
- this.defaultPrevented = true;
- };
- }
-
- for (var i=0; i<listeners.length; i++) {
- listeners[i](e);
- if (e.propagationStopped)
- break;
- }
-
- if (defaultHandler && !e.defaultPrevented)
- defaultHandler(e);
-};
-
-EventEmitter.setDefaultHandler = function(eventName, callback) {
- this._defaultHandlers = this._defaultHandlers || {};
-
- if (this._defaultHandlers[eventName])
- throw new Error("The default handler for '" + eventName + "' is already set");
-
- this._defaultHandlers[eventName] = callback;
-};
-
-EventEmitter.on =
-EventEmitter.addEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- var listeners = this._eventRegistry[eventName] = [];
-
- if (listeners.indexOf(callback) == -1)
- listeners.push(callback);
-};
-
-EventEmitter.removeListener =
-EventEmitter.removeEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- return;
-
- var index = listeners.indexOf(callback);
- if (index !== -1)
- listeners.splice(index, 1);
-};
-
-EventEmitter.removeAllListeners = function(eventName) {
- if (this._eventRegistry) this._eventRegistry[eventName] = [];
-};
-
-exports.EventEmitter = EventEmitter;
-
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mouse/default_gutter_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-function GutterHandler(editor) {
- editor.setDefaultHandler("gutterclick", function(e) {
- var row = e.getDocumentPosition().row;
- var selection = editor.session.selection;
-
- selection.moveCursorTo(row, 0);
- selection.selectLine();
- });
-}
-
-exports.GutterHandler = GutterHandler;
-
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mouse/mouse_event', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
-"use strict";
-
-var event = require("../lib/event");
-
-/**
- * Custom Ace mouse event
- */
-var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
- this.domEvent = domEvent;
- this.editor = editor;
-
- this.pageX = event.getDocumentX(domEvent);
- this.pageY = event.getDocumentY(domEvent);
-
- this.clientX = domEvent.clientX;
- this.clientY = domEvent.clientY;
-
- this.$pos = null;
- this.$inSelection = null;
-
- this.propagationStopped = false;
- this.defaultPrevented = false;
-};
-
-(function() {
-
- this.stopPropagation = function() {
- event.stopPropagation(this.domEvent);
- this.propagationStopped = true;
- };
-
- this.preventDefault = function() {
- event.preventDefault(this.domEvent);
- this.defaultPrevented = true;
- };
-
- this.stop = function() {
- this.stopPropagation();
- this.preventDefault();
- };
-
- /**
- * Get the document position below the mouse cursor
- *
- * @return {Object} 'row' and 'column' of the document position
- */
- this.getDocumentPosition = function() {
- if (this.$pos)
- return this.$pos;
-
- var pageX = event.getDocumentX(this.domEvent);
- var pageY = event.getDocumentY(this.domEvent);
- this.$pos = this.editor.renderer.screenToTextCoordinates(pageX, pageY);
- this.$pos.row = Math.max(0, Math.min(this.$pos.row, this.editor.session.getLength()-1));
- return this.$pos;
- };
-
- /**
- * Check if the mouse cursor is inside of the text selection
- *
- * @return {Boolean} whether the mouse cursor is inside of the selection
- */
- this.inSelection = function() {
- if (this.$inSelection !== null)
- return this.$inSelection;
-
- var editor = this.editor;
-
- if (editor.getReadOnly()) {
- this.$inSelection = false;
- }
- else {
- var selectionRange = editor.getSelectionRange();
- if (selectionRange.isEmpty())
- this.$inSelection = false;
- else {
- var pos = this.getDocumentPosition();
- this.$inSelection = selectionRange.contains(pos.row, pos.column);
- }
- }
- return this.$inSelection;
- };
-
- /**
- * Get the clicked mouse button
- *
- * @return {Number} 0 for left button, 1 for middle button, 2 for right button
- */
- this.getButton = function() {
- return event.getButton(this.domEvent);
- };
-
- /**
- * @return {Boolean} whether the shift key was pressed when the event was emitted
- */
- this.getShiftKey = function() {
- return this.domEvent.shiftKey;
- };
-
- this.getAccelKey = function() {
- return this.domEvent.ctrlKey || this.domEvent.metaKey ;
- };
-
-}).call(MouseEvent.prototype);
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mouse/fold_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-function FoldHandler(editor) {
-
- editor.on("click", function(e) {
- var position = e.getDocumentPosition();
- var session = editor.session;
-
- // If the user dclicked on a fold, then expand it.
- var fold = session.getFoldAt(position.row, position.column, 1);
- if (fold) {
- if (e.getAccelKey())
- session.removeFold(fold);
- else
- session.expandFold(fold);
-
- e.stop();
- }
- });
-
- editor.on("gutterclick", function(e) {
- if (e.domEvent.target.className.indexOf("ace_fold-widget") != -1) {
- var row = e.getDocumentPosition().row;
- editor.session.onFoldWidgetClick(row, e.domEvent);
- e.stop();
- }
- });
-}
-
-exports.FoldHandler = FoldHandler;
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- * Harutyun Amirjanyan <amirjanyan@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/event', 'ace/commands/default_commands'], function(require, exports, module) {
-"use strict";
-
-var keyUtil = require("../lib/keys");
-var event = require("../lib/event");
-require("../commands/default_commands");
-
-var KeyBinding = function(editor) {
- this.$editor = editor;
- this.$data = { };
- this.$handlers = [this];
-};
-
-(function() {
- this.setKeyboardHandler = function(keyboardHandler) {
- if (this.$handlers[this.$handlers.length - 1] == keyboardHandler)
- return;
- this.$data = { };
- this.$handlers = keyboardHandler ? [this, keyboardHandler] : [this];
- };
-
- this.addKeyboardHandler = function(keyboardHandler) {
- this.removeKeyboardHandler(keyboardHandler);
- this.$handlers.push(keyboardHandler);
- };
-
- this.removeKeyboardHandler = function(keyboardHandler) {
- var i = this.$handlers.indexOf(keyboardHandler);
- if (i == -1)
- return false;
- this.$handlers.splice(i, 1);
- return true;
- };
-
- this.getKeyboardHandler = function() {
- return this.$handlers[this.$handlers.length - 1];
- };
-
- this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
- var toExecute;
- for (var i = this.$handlers.length; i--;) {
- toExecute = this.$handlers[i].handleKeyboard(
- this.$data, hashId, keyString, keyCode, e
- );
- if (toExecute && toExecute.command)
- break;
- }
-
- if (!toExecute || !toExecute.command)
- return false;
-
- var success = false;
- var commands = this.$editor.commands;
-
- // allow keyboardHandler to consume keys
- if (toExecute.command != "null")
- success = commands.exec(toExecute.command, this.$editor, toExecute.args);
- else
- success = true;
-
- if (success && e)
- event.stopEvent(e);
-
- return success;
- };
-
- this.handleKeyboard = function(data, hashId, keyString) {
- return {
- command: this.$editor.commands.findKeyCommand(hashId, keyString)
- };
- };
-
- this.onCommandKey = function(e, hashId, keyCode) {
- var keyString = keyUtil.keyCodeToString(keyCode);
- this.$callKeyboardHandlers(hashId, keyString, keyCode, e);
- };
-
- this.onTextInput = function(text, pasted) {
- var success = false;
- if (!pasted && text.length == 1)
- success = this.$callKeyboardHandlers(0, text);
- if (!success)
- this.$editor.commands.exec("insertstring", this.$editor, text);
- };
-
-}).call(KeyBinding.prototype);
-
-exports.KeyBinding = KeyBinding;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- * Mihai Sucan <mihai.sucan@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/commands/default_commands', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-function bindKey(win, mac) {
- return {
- win: win,
- mac: mac
- };
-}
-
-exports.commands = [{
- name: "selectall",
- bindKey: bindKey("Ctrl-A", "Command-A"),
- exec: function(editor) { editor.selectAll(); },
- readOnly: true
-}, {
- name: "centerselection",
- bindKey: bindKey(null, "Ctrl-L"),
- exec: function(editor) { editor.centerSelection(); },
- readOnly: true
-}, {
- name: "gotoline",
- bindKey: bindKey("Ctrl-L", "Command-L"),
- exec: function(editor) {
- var line = parseInt(prompt("Enter line number:"), 10);
- if (!isNaN(line)) {
- editor.gotoLine(line);
- }
- },
- readOnly: true
-}, {
- name: "fold",
- bindKey: bindKey("Alt-L", "Alt-L"),
- exec: function(editor) { editor.session.toggleFold(false); },
- readOnly: true
-}, {
- name: "unfold",
- bindKey: bindKey("Alt-Shift-L", "Alt-Shift-L"),
- exec: function(editor) { editor.session.toggleFold(true); },
- readOnly: true
-}, {
- name: "foldall",
- bindKey: bindKey("Alt-0", "Alt-0"),
- exec: function(editor) { editor.session.foldAll(); },
- readOnly: true
-}, {
- name: "unfoldall",
- bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
- exec: function(editor) { editor.session.unfold(); },
- readOnly: true
-}, {
- name: "findnext",
- bindKey: bindKey("Ctrl-K", "Command-G"),
- exec: function(editor) { editor.findNext(); },
- readOnly: true
-}, {
- name: "findprevious",
- bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
- exec: function(editor) { editor.findPrevious(); },
- readOnly: true
-}, {
- name: "find",
- bindKey: bindKey("Ctrl-F", "Command-F"),
- exec: function(editor) {
- var needle = prompt("Find:", editor.getCopyText());
- editor.find(needle);
- },
- readOnly: true
-}, {
- name: "overwrite",
- bindKey: bindKey("Insert", "Insert"),
- exec: function(editor) { editor.toggleOverwrite(); },
- readOnly: true
-}, {
- name: "selecttostart",
- bindKey: bindKey("Ctrl-Shift-Home|Alt-Shift-Up", "Command-Shift-Up"),
- exec: function(editor) { editor.getSelection().selectFileStart(); },
- readOnly: true
-}, {
- name: "gotostart",
- bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"),
- exec: function(editor) { editor.navigateFileStart(); },
- readOnly: true
-}, {
- name: "selectup",
- bindKey: bindKey("Shift-Up", "Shift-Up"),
- exec: function(editor) { editor.getSelection().selectUp(); },
- readOnly: true
-}, {
- name: "golineup",
- bindKey: bindKey("Up", "Up|Ctrl-P"),
- exec: function(editor, args) { editor.navigateUp(args.times); },
- readOnly: true
-}, {
- name: "selecttoend",
- bindKey: bindKey("Ctrl-Shift-End|Alt-Shift-Down", "Command-Shift-Down"),
- exec: function(editor) { editor.getSelection().selectFileEnd(); },
- readOnly: true
-}, {
- name: "gotoend",
- bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"),
- exec: function(editor) { editor.navigateFileEnd(); },
- readOnly: true
-}, {
- name: "selectdown",
- bindKey: bindKey("Shift-Down", "Shift-Down"),
- exec: function(editor) { editor.getSelection().selectDown(); },
- readOnly: true
-}, {
- name: "golinedown",
- bindKey: bindKey("Down", "Down|Ctrl-N"),
- exec: function(editor, args) { editor.navigateDown(args.times); },
- readOnly: true
-}, {
- name: "selectwordleft",
- bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
- exec: function(editor) { editor.getSelection().selectWordLeft(); },
- readOnly: true
-}, {
- name: "gotowordleft",
- bindKey: bindKey("Ctrl-Left", "Option-Left"),
- exec: function(editor) { editor.navigateWordLeft(); },
- readOnly: true
-}, {
- name: "selecttolinestart",
- bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
- exec: function(editor) { editor.getSelection().selectLineStart(); },
- readOnly: true
-}, {
- name: "gotolinestart",
- bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
- exec: function(editor) { editor.navigateLineStart(); },
- readOnly: true
-}, {
- name: "selectleft",
- bindKey: bindKey("Shift-Left", "Shift-Left"),
- exec: function(editor) { editor.getSelection().selectLeft(); },
- readOnly: true
-}, {
- name: "gotoleft",
- bindKey: bindKey("Left", "Left|Ctrl-B"),
- exec: function(editor, args) { editor.navigateLeft(args.times); },
- readOnly: true
-}, {
- name: "selectwordright",
- bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
- exec: function(editor) { editor.getSelection().selectWordRight(); },
- readOnly: true
-}, {
- name: "gotowordright",
- bindKey: bindKey("Ctrl-Right", "Option-Right"),
- exec: function(editor) { editor.navigateWordRight(); },
- readOnly: true
-}, {
- name: "selecttolineend",
- bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
- exec: function(editor) { editor.getSelection().selectLineEnd(); },
- readOnly: true
-}, {
- name: "gotolineend",
- bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
- exec: function(editor) { editor.navigateLineEnd(); },
- readOnly: true
-}, {
- name: "selectright",
- bindKey: bindKey("Shift-Right", "Shift-Right"),
- exec: function(editor) { editor.getSelection().selectRight(); },
- readOnly: true
-}, {
- name: "gotoright",
- bindKey: bindKey("Right", "Right|Ctrl-F"),
- exec: function(editor, args) { editor.navigateRight(args.times); },
- readOnly: true
-}, {
- name: "selectpagedown",
- bindKey: bindKey("Shift-PageDown", "Shift-PageDown"),
- exec: function(editor) { editor.selectPageDown(); },
- readOnly: true
-}, {
- name: "pagedown",
- bindKey: bindKey(null, "PageDown"),
- exec: function(editor) { editor.scrollPageDown(); },
- readOnly: true
-}, {
- name: "gotopagedown",
- bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"),
- exec: function(editor) { editor.gotoPageDown(); },
- readOnly: true
-}, {
- name: "selectpageup",
- bindKey: bindKey("Shift-PageUp", "Shift-PageUp"),
- exec: function(editor) { editor.selectPageUp(); },
- readOnly: true
-}, {
- name: "pageup",
- bindKey: bindKey(null, "PageUp"),
- exec: function(editor) { editor.scrollPageUp(); },
- readOnly: true
-}, {
- name: "gotopageup",
- bindKey: bindKey("PageUp", "Option-PageUp"),
- exec: function(editor) { editor.gotoPageUp(); },
- readOnly: true
-}, {
- name: "selectlinestart",
- bindKey: bindKey("Shift-Home", "Shift-Home"),
- exec: function(editor) { editor.getSelection().selectLineStart(); },
- readOnly: true
-}, {
- name: "selectlineend",
- bindKey: bindKey("Shift-End", "Shift-End"),
- exec: function(editor) { editor.getSelection().selectLineEnd(); },
- readOnly: true
-}, {
- name: "togglerecording",
- bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
- exec: function(editor) { editor.commands.toggleRecording(); },
- readOnly: true
-}, {
- name: "replaymacro",
- bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
- exec: function(editor) { editor.commands.replay(editor); },
- readOnly: true
-}, {
- name: "jumptomatching",
- bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"),
- exec: function(editor) { editor.jumpToMatching(); },
- readOnly: true
-},
-
-// commands disabled in readOnly mode
-{
- name: "removeline",
- bindKey: bindKey("Ctrl-D", "Command-D"),
- exec: function(editor) { editor.removeLines(); }
-}, {
- name: "togglecomment",
- bindKey: bindKey("Ctrl-7", "Command-7"),
- exec: function(editor) { editor.toggleCommentLines(); }
-}, {
- name: "replace",
- bindKey: bindKey("Ctrl-R", "Command-Option-F"),
- exec: function(editor) {
- var needle = prompt("Find:", editor.getCopyText());
- if (!needle)
- return;
- var replacement = prompt("Replacement:");
- if (!replacement)
- return;
- editor.replace(replacement, {needle: needle});
- }
-}, {
- name: "replaceall",
- bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"),
- exec: function(editor) {
- var needle = prompt("Find:");
- if (!needle)
- return;
- var replacement = prompt("Replacement:");
- if (!replacement)
- return;
- editor.replaceAll(replacement, {needle: needle});
- }
-}, {
- name: "undo",
- bindKey: bindKey("Ctrl-Z", "Command-Z"),
- exec: function(editor) { editor.undo(); }
-}, {
- name: "redo",
- bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
- exec: function(editor) { editor.redo(); }
-}, {
- name: "copylinesup",
- bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"),
- exec: function(editor) { editor.copyLinesUp(); }
-}, {
- name: "movelinesup",
- bindKey: bindKey("Alt-Up", "Option-Up"),
- exec: function(editor) { editor.moveLinesUp(); }
-}, {
- name: "copylinesdown",
- bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"),
- exec: function(editor) { editor.copyLinesDown(); }
-}, {
- name: "movelinesdown",
- bindKey: bindKey("Alt-Down", "Option-Down"),
- exec: function(editor) { editor.moveLinesDown(); }
-}, {
- name: "del",
- bindKey: bindKey("Delete", "Delete|Ctrl-D"),
- exec: function(editor) { editor.remove("right"); }
-}, {
- name: "backspace",
- bindKey: bindKey(
- "Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace",
- "Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"
- ),
- exec: function(editor) { editor.remove("left"); }
-}, {
- name: "removetolinestart",
- bindKey: bindKey("Alt-Backspace", "Option-Backspace"),
- exec: function(editor) { editor.removeToLineStart(); }
-}, {
- name: "removetolineend",
- bindKey: bindKey("Alt-Delete", "Ctrl-K"),
- exec: function(editor) { editor.removeToLineEnd(); }
-}, {
- name: "removewordleft",
- bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
- exec: function(editor) { editor.removeWordLeft(); }
-}, {
- name: "removewordright",
- bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
- exec: function(editor) { editor.removeWordRight(); }
-}, {
- name: "outdent",
- bindKey: bindKey("Shift-Tab", "Shift-Tab"),
- exec: function(editor) { editor.blockOutdent(); }
-}, {
- name: "indent",
- bindKey: bindKey("Tab", "Tab"),
- exec: function(editor) { editor.indent(); }
-}, {
- name: "insertstring",
- exec: function(editor, str) { editor.insert(str); }
-}, {
- name: "inserttext",
- exec: function(editor, args) {
- editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
- }
-}, {
- name: "splitline",
- bindKey: bindKey(null, "Ctrl-O"),
- exec: function(editor) { editor.splitLine(); }
-}, {
- name: "transposeletters",
- bindKey: bindKey("Ctrl-T", "Ctrl-T"),
- exec: function(editor) { editor.transposeLetters(); }
-}, {
- name: "touppercase",
- bindKey: bindKey("Ctrl-U", "Ctrl-U"),
- exec: function(editor) { editor.toUpperCase(); }
-}, {
- name: "tolowercase",
- bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"),
- exec: function(editor) { editor.toLowerCase(); }
-}];
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/edit_session', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/selection', 'ace/mode/text', 'ace/range', 'ace/document', 'ace/background_tokenizer', 'ace/edit_session/folding', 'ace/edit_session/bracket_match'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var lang = require("./lib/lang");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Selection = require("./selection").Selection;
-var TextMode = require("./mode/text").Mode;
-var Range = require("./range").Range;
-var Document = require("./document").Document;
-var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
-
-var EditSession = function(text, mode) {
- this.$modified = true;
- this.$breakpoints = [];
- this.$frontMarkers = {};
- this.$backMarkers = {};
- this.$markerId = 1;
- this.$rowCache = [];
- this.$wrapData = [];
- this.$foldData = [];
- this.$undoSelect = true;
- this.$foldData.toString = function() {
- var str = "";
- this.forEach(function(foldLine) {
- str += "\n" + foldLine.toString();
- });
- return str;
- }
-
- if (text instanceof Document) {
- this.setDocument(text);
- } else {
- this.setDocument(new Document(text));
- }
-
- this.selection = new Selection(this);
- if (mode)
- this.setMode(mode);
- else
- this.setMode(new TextMode());
-};
-
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.setDocument = function(doc) {
- if (this.doc)
- throw new Error("Document is already set");
-
- this.doc = doc;
- doc.on("change", this.onChange.bind(this));
- this.on("changeFold", this.onChangeFold.bind(this));
-
- if (this.bgTokenizer) {
- this.bgTokenizer.setDocument(this.getDocument());
- this.bgTokenizer.start(0);
- }
- };
-
- this.getDocument = function() {
- return this.doc;
- };
-
- this.$resetRowCache = function(row) {
- if (row == 0) {
- this.$rowCache = [];
- return;
- }
- var rowCache = this.$rowCache;
- for (var i = 0; i < rowCache.length; i++) {
- if (rowCache[i].docRow >= row) {
- rowCache.splice(i, rowCache.length);
- return;
- }
- }
- };
-
- this.onChangeFold = function(e) {
- var fold = e.data;
- this.$resetRowCache(fold.start.row);
- };
-
- this.onChange = function(e) {
- var delta = e.data;
- this.$modified = true;
-
- this.$resetRowCache(delta.range.start.row);
-
- var removedFolds = this.$updateInternalDataOnChange(e);
- if (!this.$fromUndo && this.$undoManager && !delta.ignore) {
- this.$deltasDoc.push(delta);
- if (removedFolds && removedFolds.length != 0) {
- this.$deltasFold.push({
- action: "removeFolds",
- folds: removedFolds
- });
- }
-
- this.$informUndoManager.schedule();
- }
-
- this.bgTokenizer.start(delta.range.start.row);
- this._emit("change", e);
- };
-
- this.setValue = function(text) {
- this.doc.setValue(text);
- this.selection.moveCursorTo(0, 0);
- this.selection.clearSelection();
-
- this.$resetRowCache(0);
- this.$deltas = [];
- this.$deltasDoc = [];
- this.$deltasFold = [];
- this.getUndoManager().reset();
- };
-
- this.getValue =
- this.toString = function() {
- return this.doc.getValue();
- };
-
- this.getSelection = function() {
- return this.selection;
- };
-
- this.getState = function(row) {
- return this.bgTokenizer.getState(row);
- };
-
- this.getTokens = function(firstRow, lastRow) {
- return this.bgTokenizer.getTokens(firstRow, lastRow);
- };
-
- this.getTokenAt = function(row, column) {
- var tokens = this.bgTokenizer.getTokens(row, row)[0].tokens;
- var token, c = 0;
- if (column == null) {
- i = tokens.length - 1;
- c = this.getLine(row).length;
- } else {
- for (var i = 0; i < tokens.length; i++) {
- c += tokens[i].value.length;
- if (c >= column)
- break;
- }
- }
- token = tokens[i];
- if (!token)
- return null;
- token.index = i;
- token.start = c - token.value.length;
- return token;
- };
-
- this.setUndoManager = function(undoManager) {
- this.$undoManager = undoManager;
- this.$resetRowCache(0);
- this.$deltas = [];
- this.$deltasDoc = [];
- this.$deltasFold = [];
-
- if (this.$informUndoManager)
- this.$informUndoManager.cancel();
-
- if (undoManager) {
- var self = this;
- this.$syncInformUndoManager = function() {
- self.$informUndoManager.cancel();
-
- if (self.$deltasFold.length) {
- self.$deltas.push({
- group: "fold",
- deltas: self.$deltasFold
- });
- self.$deltasFold = [];
- }
-
- if (self.$deltasDoc.length) {
- self.$deltas.push({
- group: "doc",
- deltas: self.$deltasDoc
- });
- self.$deltasDoc = [];
- }
-
- if (self.$deltas.length > 0) {
- undoManager.execute({
- action: "aceupdate",
- args: [self.$deltas, self]
- });
- }
-
- self.$deltas = [];
- }
- this.$informUndoManager =
- lang.deferredCall(this.$syncInformUndoManager);
- }
- };
-
- this.$defaultUndoManager = {
- undo: function() {},
- redo: function() {},
- reset: function() {}
- };
-
- this.getUndoManager = function() {
- return this.$undoManager || this.$defaultUndoManager;
- },
-
- this.getTabString = function() {
- if (this.getUseSoftTabs()) {
- return lang.stringRepeat(" ", this.getTabSize());
- } else {
- return "\t";
- }
- };
-
- this.$useSoftTabs = true;
- this.setUseSoftTabs = function(useSoftTabs) {
- if (this.$useSoftTabs === useSoftTabs) return;
-
- this.$useSoftTabs = useSoftTabs;
- };
-
- this.getUseSoftTabs = function() {
- return this.$useSoftTabs;
- };
-
- this.$tabSize = 4;
- this.setTabSize = function(tabSize) {
- if (isNaN(tabSize) || this.$tabSize === tabSize) return;
-
- this.$modified = true;
- this.$tabSize = tabSize;
- this._emit("changeTabSize");
- };
-
- this.getTabSize = function() {
- return this.$tabSize;
- };
-
- this.isTabStop = function(position) {
- return this.$useSoftTabs && (position.column % this.$tabSize == 0);
- };
-
- this.$overwrite = false;
- this.setOverwrite = function(overwrite) {
- if (this.$overwrite == overwrite) return;
-
- this.$overwrite = overwrite;
- this._emit("changeOverwrite");
- };
-
- this.getOverwrite = function() {
- return this.$overwrite;
- };
-
- this.toggleOverwrite = function() {
- this.setOverwrite(!this.$overwrite);
- };
-
- this.getBreakpoints = function() {
- return this.$breakpoints;
- };
-
- this.setBreakpoints = function(rows) {
- this.$breakpoints = [];
- for (var i=0; i<rows.length; i++) {
- this.$breakpoints[rows[i]] = true;
- }
- this._emit("changeBreakpoint", {});
- };
-
- this.clearBreakpoints = function() {
- this.$breakpoints = [];
- this._emit("changeBreakpoint", {});
- };
-
- this.setBreakpoint = function(row) {
- this.$breakpoints[row] = true;
- this._emit("changeBreakpoint", {});
- };
-
- this.clearBreakpoint = function(row) {
- delete this.$breakpoints[row];
- this._emit("changeBreakpoint", {});
- };
-
- this.getBreakpoints = function() {
- return this.$breakpoints;
- };
-
- this.addMarker = function(range, clazz, type, inFront) {
- var id = this.$markerId++;
-
- var marker = {
- range : range,
- type : type || "line",
- renderer: typeof type == "function" ? type : null,
- clazz : clazz,
- inFront: !!inFront
- }
-
- if (inFront) {
- this.$frontMarkers[id] = marker;
- this._emit("changeFrontMarker")
- } else {
- this.$backMarkers[id] = marker;
- this._emit("changeBackMarker")
- }
-
- return id;
- };
-
- this.removeMarker = function(markerId) {
- var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];
- if (!marker)
- return;
-
- var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;
- if (marker) {
- delete (markers[markerId]);
- this._emit(marker.inFront ? "changeFrontMarker" : "changeBackMarker");
- }
- };
-
- this.getMarkers = function(inFront) {
- return inFront ? this.$frontMarkers : this.$backMarkers;
- };
-
- /**
- * Error:
- * {
- * row: 12,
- * column: 2, //can be undefined
- * text: "Missing argument",
- * type: "error" // or "warning" or "info"
- * }
- */
- this.setAnnotations = function(annotations) {
- this.$annotations = {};
- for (var i=0; i<annotations.length; i++) {
- var annotation = annotations[i];
- var row = annotation.row;
- if (this.$annotations[row])
- this.$annotations[row].push(annotation);
- else
- this.$annotations[row] = [annotation];
- }
- this._emit("changeAnnotation", {});
- };
-
- this.getAnnotations = function() {
- return this.$annotations || {};
- };
-
- this.clearAnnotations = function() {
- this.$annotations = {};
- this._emit("changeAnnotation", {});
- };
-
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r?\n)/m);
- if (match) {
- this.$autoNewLine = match[1];
- } else {
- this.$autoNewLine = "\n";
- }
- };
-
- this.getWordRange = function(row, column) {
- var line = this.getLine(row);
-
- var inToken = false;
- if (column > 0) {
- inToken = !!line.charAt(column - 1).match(this.tokenRe);
- }
-
- if (!inToken) {
- inToken = !!line.charAt(column).match(this.tokenRe);
- }
-
- var re = inToken ? this.tokenRe : this.nonTokenRe;
-
- var start = column;
- if (start > 0) {
- do {
- start--;
- }
- while (start >= 0 && line.charAt(start).match(re));
- start++;
- }
-
- var end = column;
- while (end < line.length && line.charAt(end).match(re)) {
- end++;
- }
-
- return new Range(row, start, row, end);
- };
-
- // Gets the range of a word including its right whitespace
- this.getAWordRange = function(row, column) {
- var wordRange = this.getWordRange(row, column);
- var line = this.getLine(wordRange.end.row);
-
- while (line.charAt(wordRange.end.column).match(/[ \t]/)) {
- wordRange.end.column += 1;
- }
- return wordRange;
- };
-
- this.setNewLineMode = function(newLineMode) {
- this.doc.setNewLineMode(newLineMode);
- };
-
- this.getNewLineMode = function() {
- return this.doc.getNewLineMode();
- };
-
- this.$useWorker = true;
- this.setUseWorker = function(useWorker) {
- if (this.$useWorker == useWorker)
- return;
-
- this.$useWorker = useWorker;
-
- this.$stopWorker();
- if (useWorker)
- this.$startWorker();
- };
-
- this.getUseWorker = function() {
- return this.$useWorker;
- };
-
- this.onReloadTokenizer = function(e) {
- var rows = e.data;
- this.bgTokenizer.start(rows.first);
- this._emit("tokenizerUpdate", e);
- };
-
- this.$mode = null;
- this.setMode = function(mode) {
- if (this.$mode === mode) return;
- this.$mode = mode;
-
- this.$stopWorker();
-
- if (this.$useWorker)
- this.$startWorker();
-
- var tokenizer = mode.getTokenizer();
-
- if(tokenizer.addEventListener !== undefined) {
- var onReloadTokenizer = this.onReloadTokenizer.bind(this);
- tokenizer.addEventListener("update", onReloadTokenizer);
- }
-
- if (!this.bgTokenizer) {
- this.bgTokenizer = new BackgroundTokenizer(tokenizer);
- var _self = this;
- this.bgTokenizer.addEventListener("update", function(e) {
- _self._emit("tokenizerUpdate", e);
- });
- } else {
- this.bgTokenizer.setTokenizer(tokenizer);
- }
-
- this.bgTokenizer.setDocument(this.getDocument());
- this.bgTokenizer.start(0);
-
- this.tokenRe = mode.tokenRe;
- this.nonTokenRe = mode.nonTokenRe;
-
- this.$setFolding(mode.foldingRules);
-
- this._emit("changeMode");
- };
-
- this.$stopWorker = function() {
- if (this.$worker)
- this.$worker.terminate();
-
- this.$worker = null;
- };
-
- this.$startWorker = function() {
- if (typeof Worker !== "undefined" && !require.noWorker) {
- try {
- this.$worker = this.$mode.createWorker(this);
- } catch (e) {
- console.log("Could not load worker");
- console.log(e);
- this.$worker = null;
- }
- }
- else
- this.$worker = null;
- };
-
- this.getMode = function() {
- return this.$mode;
- };
-
- this.$scrollTop = 0;
- this.setScrollTop = function(scrollTop) {
- scrollTop = Math.round(Math.max(0, scrollTop));
- if (this.$scrollTop === scrollTop)
- return;
-
- this.$scrollTop = scrollTop;
- this._emit("changeScrollTop", scrollTop);
- };
-
- this.getScrollTop = function() {
- return this.$scrollTop;
- };
-
- this.$scrollLeft = 0;
- this.setScrollLeft = function(scrollLeft) {
- scrollLeft = Math.round(Math.max(0, scrollLeft));
- if (this.$scrollLeft === scrollLeft)
- return;
-
- this.$scrollLeft = scrollLeft;
- this._emit("changeScrollLeft", scrollLeft);
- };
-
- this.getScrollLeft = function() {
- return this.$scrollLeft;
- };
-
- this.getWidth = function() {
- this.$computeWidth();
- return this.width;
- };
-
- this.getScreenWidth = function() {
- this.$computeWidth();
- return this.screenWidth;
- };
-
- this.$computeWidth = function(force) {
- if (this.$modified || force) {
- this.$modified = false;
-
- var lines = this.doc.getAllLines();
- var longestLine = 0;
- var longestScreenLine = 0;
-
- for ( var i = 0; i < lines.length; i++) {
- var foldLine = this.getFoldLine(i),
- line, len;
-
- line = lines[i];
- if (foldLine) {
- var end = foldLine.range.end;
- line = this.getFoldDisplayLine(foldLine);
- // Continue after the foldLine.end.row. All the lines in
- // between are folded.
- i = end.row;
- }
- len = line.length;
- longestLine = Math.max(longestLine, len);
- if (!this.$useWrapMode) {
- longestScreenLine = Math.max(
- longestScreenLine,
- this.$getStringScreenWidth(line)[0]
- );
- }
- }
- this.width = longestLine;
-
- if (this.$useWrapMode) {
- this.screenWidth = this.$wrapLimit;
- } else {
- this.screenWidth = longestScreenLine;
- }
- }
- };
-
- /**
- * Get a verbatim copy of the given line as it is in the document
- */
- this.getLine = function(row) {
- return this.doc.getLine(row);
- };
-
- this.getLines = function(firstRow, lastRow) {
- return this.doc.getLines(firstRow, lastRow);
- };
-
- this.getLength = function() {
- return this.doc.getLength();
- };
-
- this.getTextRange = function(range) {
- return this.doc.getTextRange(range);
- };
-
- this.insert = function(position, text) {
- return this.doc.insert(position, text);
- };
-
- this.remove = function(range) {
- return this.doc.remove(range);
- };
-
- this.undoChanges = function(deltas, dontSelect) {
- if (!deltas.length)
- return;
-
- this.$fromUndo = true;
- var lastUndoRange = null;
- for (var i = deltas.length - 1; i != -1; i--) {
- var delta = deltas[i];
- if (delta.group == "doc") {
- this.doc.revertDeltas(delta.deltas);
- lastUndoRange =
- this.$getUndoSelection(delta.deltas, true, lastUndoRange);
- } else {
- delta.deltas.forEach(function(foldDelta) {
- this.addFolds(foldDelta.folds);
- }, this);
- }
- }
- this.$fromUndo = false;
- lastUndoRange &&
- this.$undoSelect &&
- !dontSelect &&
- this.selection.setSelectionRange(lastUndoRange);
- return lastUndoRange;
- };
-
- this.redoChanges = function(deltas, dontSelect) {
- if (!deltas.length)
- return;
-
- this.$fromUndo = true;
- var lastUndoRange = null;
- for (var i = 0; i < deltas.length; i++) {
- var delta = deltas[i];
- if (delta.group == "doc") {
- this.doc.applyDeltas(delta.deltas);
- lastUndoRange =
- this.$getUndoSelection(delta.deltas, false, lastUndoRange);
- }
- }
- this.$fromUndo = false;
- lastUndoRange &&
- this.$undoSelect &&
- !dontSelect &&
- this.selection.setSelectionRange(lastUndoRange);
- return lastUndoRange;
- };
-
- this.setUndoSelect = function(enable) {
- this.$undoSelect = enable;
- };
-
- this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {
- function isInsert(delta) {
- var insert =
- delta.action == "insertText" || delta.action == "insertLines";
- return isUndo ? !insert : insert;
- }
-
- var delta = deltas[0];
- var range, point;
- var lastDeltaIsInsert = false;
- if (isInsert(delta)) {
- range = delta.range.clone();
- lastDeltaIsInsert = true;
- } else {
- range = Range.fromPoints(delta.range.start, delta.range.start);
- lastDeltaIsInsert = false;
- }
-
- for (var i = 1; i < deltas.length; i++) {
- delta = deltas[i];
- if (isInsert(delta)) {
- point = delta.range.start;
- if (range.compare(point.row, point.column) == -1) {
- range.setStart(delta.range.start);
- }
- point = delta.range.end;
- if (range.compare(point.row, point.column) == 1) {
- range.setEnd(delta.range.end);
- }
- lastDeltaIsInsert = true;
- } else {
- point = delta.range.start;
- if (range.compare(point.row, point.column) == -1) {
- range =
- Range.fromPoints(delta.range.start, delta.range.start);
- }
- lastDeltaIsInsert = false;
- }
- }
-
- // Check if this range and the last undo range has something in common.
- // If true, merge the ranges.
- if (lastUndoRange != null) {
- var cmp = lastUndoRange.compareRange(range);
- if (cmp == 1) {
- range.setStart(lastUndoRange.start);
- } else if (cmp == -1) {
- range.setEnd(lastUndoRange.end);
- }
- }
-
- return range;
- },
-
- this.replace = function(range, text) {
- return this.doc.replace(range, text);
- };
-
- /**
- * Move a range of text from the given range to the given position.
- *
- * @param fromRange {Range} The range of text you want moved within the
- * document.
- * @param toPosition {Object} The location (row and column) where you want
- * to move the text to.
- * @return {Range} The new range where the text was moved to.
- */
- this.moveText = function(fromRange, toPosition) {
- var text = this.getTextRange(fromRange);
- this.remove(fromRange);
-
- var toRow = toPosition.row;
- var toColumn = toPosition.column;
-
- // Make sure to update the insert location, when text is removed in
- // front of the chosen point of insertion.
- if (!fromRange.isMultiLine() && fromRange.start.row == toRow &&
- fromRange.end.column < toColumn)
- toColumn -= text.length;
-
- if (fromRange.isMultiLine() && fromRange.end.row < toRow) {
- var lines = this.doc.$split(text);
- toRow -= lines.length - 1;
- }
-
- var endRow = toRow + fromRange.end.row - fromRange.start.row;
- var endColumn = fromRange.isMultiLine() ?
- fromRange.end.column :
- toColumn + fromRange.end.column - fromRange.start.column;
-
- var toRange = new Range(toRow, toColumn, endRow, endColumn);
-
- this.insert(toRange.start, text);
-
- return toRange;
- };
-
- this.indentRows = function(startRow, endRow, indentString) {
- indentString = indentString.replace(/\t/g, this.getTabString());
- for (var row=startRow; row<=endRow; row++)
- this.insert({row: row, column:0}, indentString);
- };
-
- this.outdentRows = function (range) {
- var rowRange = range.collapseRows();
- var deleteRange = new Range(0, 0, 0, 0);
- var size = this.getTabSize();
-
- for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {
- var line = this.getLine(i);
-
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- for (var j = 0; j < size; ++j)
- if (line.charAt(j) != ' ')
- break;
- if (j < size && line.charAt(j) == '\t') {
- deleteRange.start.column = j;
- deleteRange.end.column = j + 1;
- } else {
- deleteRange.start.column = 0;
- deleteRange.end.column = j;
- }
- this.remove(deleteRange);
- }
- };
-
- this.moveLinesUp = function(firstRow, lastRow) {
- if (firstRow <= 0) return 0;
-
- var removed = this.doc.removeLines(firstRow, lastRow);
- this.doc.insertLines(firstRow - 1, removed);
- return -1;
- };
-
- this.moveLinesDown = function(firstRow, lastRow) {
- if (lastRow >= this.doc.getLength()-1) return 0;
-
- var removed = this.doc.removeLines(firstRow, lastRow);
- this.doc.insertLines(firstRow+1, removed);
- return 1;
- };
-
- this.duplicateLines = function(firstRow, lastRow) {
- var firstRow = this.$clipRowToDocument(firstRow);
- var lastRow = this.$clipRowToDocument(lastRow);
-
- var lines = this.getLines(firstRow, lastRow);
- this.doc.insertLines(firstRow, lines);
-
- var addedRows = lastRow - firstRow + 1;
- return addedRows;
- };
-
- this.$clipRowToDocument = function(row) {
- return Math.max(0, Math.min(row, this.doc.getLength()-1));
- };
-
- this.$clipColumnToRow = function(row, column) {
- if (column < 0)
- return 0;
- return Math.min(this.doc.getLine(row).length, column);
- };
-
- this.$clipPositionToDocument = function(row, column) {
- column = Math.max(0, column);
-
- if (row < 0) {
- row = 0;
- column = 0;
- } else {
- var len = this.doc.getLength();
- if (row >= len) {
- row = len - 1;
- column = this.doc.getLine(len-1).length;
- } else {
- column = Math.min(this.doc.getLine(row).length, column);
- }
- }
-
- return {
- row: row,
- column: column
- };
- };
-
- this.$clipRangeToDocument = function(range) {
- if (range.start.row < 0) {
- range.start.row = 0;
- range.start.column = 0
- } else {
- range.start.column = this.$clipColumnToRow(
- range.start.row,
- range.start.column
- );
- }
-
- var len = this.doc.getLength() - 1;
- if (range.end.row > len) {
- range.end.row = len;
- range.end.column = this.doc.getLine(len).length;
- } else {
- range.end.column = this.$clipColumnToRow(
- range.end.row,
- range.end.column
- );
- }
- return range;
- };
-
- // WRAPMODE
- this.$wrapLimit = 80;
- this.$useWrapMode = false;
- this.$wrapLimitRange = {
- min : null,
- max : null
- };
-
- this.setUseWrapMode = function(useWrapMode) {
- if (useWrapMode != this.$useWrapMode) {
- this.$useWrapMode = useWrapMode;
- this.$modified = true;
- this.$resetRowCache(0);
-
- // If wrapMode is activaed, the wrapData array has to be initialized.
- if (useWrapMode) {
- var len = this.getLength();
- this.$wrapData = [];
- for (var i = 0; i < len; i++) {
- this.$wrapData.push([]);
- }
- this.$updateWrapData(0, len - 1);
- }
-
- this._emit("changeWrapMode");
- }
- };
-
- this.getUseWrapMode = function() {
- return this.$useWrapMode;
- };
-
- // Allow the wrap limit to move freely between min and max. Either
- // parameter can be null to allow the wrap limit to be unconstrained
- // in that direction. Or set both parameters to the same number to pin
- // the limit to that value.
- this.setWrapLimitRange = function(min, max) {
- if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
- this.$wrapLimitRange.min = min;
- this.$wrapLimitRange.max = max;
- this.$modified = true;
- // This will force a recalculation of the wrap limit
- this._emit("changeWrapMode");
- }
- };
-
- // This should generally only be called by the renderer when a resize
- // is detected.
- this.adjustWrapLimit = function(desiredLimit) {
- var wrapLimit = this.$constrainWrapLimit(desiredLimit);
- if (wrapLimit != this.$wrapLimit && wrapLimit > 0) {
- this.$wrapLimit = wrapLimit;
- this.$modified = true;
- if (this.$useWrapMode) {
- this.$updateWrapData(0, this.getLength() - 1);
- this.$resetRowCache(0)
- this._emit("changeWrapLimit");
- }
- return true;
- }
- return false;
- };
-
- this.$constrainWrapLimit = function(wrapLimit) {
- var min = this.$wrapLimitRange.min;
- if (min)
- wrapLimit = Math.max(min, wrapLimit);
-
- var max = this.$wrapLimitRange.max;
- if (max)
- wrapLimit = Math.min(max, wrapLimit);
-
- // What would a limit of 0 even mean?
- return Math.max(1, wrapLimit);
- };
-
- this.getWrapLimit = function() {
- return this.$wrapLimit;
- };
-
- this.getWrapLimitRange = function() {
- // Avoid unexpected mutation by returning a copy
- return {
- min : this.$wrapLimitRange.min,
- max : this.$wrapLimitRange.max
- };
- };
-
- this.$updateInternalDataOnChange = function(e) {
- var useWrapMode = this.$useWrapMode;
- var len;
- var action = e.data.action;
- var firstRow = e.data.range.start.row;
- var lastRow = e.data.range.end.row;
- var start = e.data.range.start;
- var end = e.data.range.end;
- var removedFolds = null;
-
- if (action.indexOf("Lines") != -1) {
- if (action == "insertLines") {
- lastRow = firstRow + (e.data.lines.length);
- } else {
- lastRow = firstRow;
- }
- len = e.data.lines ? e.data.lines.length : lastRow - firstRow;
- } else {
- len = lastRow - firstRow;
- }
-
- if (len != 0) {
- if (action.indexOf("remove") != -1) {
- useWrapMode && this.$wrapData.splice(firstRow, len);
-
- var foldLines = this.$foldData;
- removedFolds = this.getFoldsInRange(e.data.range);
- this.removeFolds(removedFolds);
-
- var foldLine = this.getFoldLine(end.row);
- var idx = 0;
- if (foldLine) {
- foldLine.addRemoveChars(end.row, end.column, start.column - end.column);
- foldLine.shiftRow(-len);
-
- var foldLineBefore = this.getFoldLine(firstRow);
- if (foldLineBefore && foldLineBefore !== foldLine) {
- foldLineBefore.merge(foldLine);
- foldLine = foldLineBefore;
- }
- idx = foldLines.indexOf(foldLine) + 1;
- }
-
- for (idx; idx < foldLines.length; idx++) {
- var foldLine = foldLines[idx];
- if (foldLine.start.row >= end.row) {
- foldLine.shiftRow(-len);
- }
- }
-
- lastRow = firstRow;
- } else {
- var args;
- if (useWrapMode) {
- args = [firstRow, 0];
- for (var i = 0; i < len; i++) args.push([]);
- this.$wrapData.splice.apply(this.$wrapData, args);
- }
-
- // If some new line is added inside of a foldLine, then split
- // the fold line up.
- var foldLines = this.$foldData;
- var foldLine = this.getFoldLine(firstRow);
- var idx = 0;
- if (foldLine) {
- var cmp = foldLine.range.compareInside(start.row, start.column)
- // Inside of the foldLine range. Need to split stuff up.
- if (cmp == 0) {
- foldLine = foldLine.split(start.row, start.column);
- foldLine.shiftRow(len);
- foldLine.addRemoveChars(
- lastRow, 0, end.column - start.column);
- } else
- // Infront of the foldLine but same row. Need to shift column.
- if (cmp == -1) {
- foldLine.addRemoveChars(firstRow, 0, end.column - start.column);
- foldLine.shiftRow(len);
- }
- // Nothing to do if the insert is after the foldLine.
- idx = foldLines.indexOf(foldLine) + 1;
- }
-
- for (idx; idx < foldLines.length; idx++) {
- var foldLine = foldLines[idx];
- if (foldLine.start.row >= firstRow) {
- foldLine.shiftRow(len);
- }
- }
- }
- } else {
- // Realign folds. E.g. if you add some new chars before a fold, the
- // fold should "move" to the right.
- len = Math.abs(e.data.range.start.column - e.data.range.end.column);
- if (action.indexOf("remove") != -1) {
- // Get all the folds in the change range and remove them.
- removedFolds = this.getFoldsInRange(e.data.range);
- this.removeFolds(removedFolds);
-
- len = -len;
- }
- var foldLine = this.getFoldLine(firstRow);
- if (foldLine) {
- foldLine.addRemoveChars(firstRow, start.column, len);
- }
- }
-
- if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {
- console.error("doc.getLength() and $wrapData.length have to be the same!");
- }
-
- useWrapMode && this.$updateWrapData(firstRow, lastRow);
-
- return removedFolds;
- };
-
- this.$updateWrapData = function(firstRow, lastRow) {
- var lines = this.doc.getAllLines();
- var tabSize = this.getTabSize();
- var wrapData = this.$wrapData;
- var wrapLimit = this.$wrapLimit;
- var tokens;
- var foldLine;
-
- var row = firstRow;
- lastRow = Math.min(lastRow, lines.length - 1);
- while (row <= lastRow) {
- foldLine = this.getFoldLine(row, foldLine);
- if (!foldLine) {
- tokens = this.$getDisplayTokens(lang.stringTrimRight(lines[row]));
- wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
- row ++;
- } else {
- tokens = [];
- foldLine.walk(
- function(placeholder, row, column, lastColumn) {
- var walkTokens;
- if (placeholder) {
- walkTokens = this.$getDisplayTokens(
- placeholder, tokens.length);
- walkTokens[0] = PLACEHOLDER_START;
- for (var i = 1; i < walkTokens.length; i++) {
- walkTokens[i] = PLACEHOLDER_BODY;
- }
- } else {
- walkTokens = this.$getDisplayTokens(
- lines[row].substring(lastColumn, column),
- tokens.length);
- }
- tokens = tokens.concat(walkTokens);
- }.bind(this),
- foldLine.end.row,
- lines[foldLine.end.row].length + 1
- );
- // Remove spaces/tabs from the back of the token array.
- while (tokens.length != 0 && tokens[tokens.length - 1] >= SPACE)
- tokens.pop();
-
- wrapData[foldLine.start.row]
- = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
- row = foldLine.end.row + 1;
- }
- }
- };
-
- // "Tokens"
- var CHAR = 1,
- CHAR_EXT = 2,
- PLACEHOLDER_START = 3,
- PLACEHOLDER_BODY = 4,
- PUNCTUATION = 9,
- SPACE = 10,
- TAB = 11,
- TAB_SPACE = 12;
-
- this.$computeWrapSplits = function(tokens, wrapLimit) {
- if (tokens.length == 0) {
- return [];
- }
-
- var splits = [];
- var displayLength = tokens.length;
- var lastSplit = 0, lastDocSplit = 0;
-
- function addSplit(screenPos) {
- var displayed = tokens.slice(lastSplit, screenPos);
-
- // The document size is the current size - the extra width for tabs
- // and multipleWidth characters.
- var len = displayed.length;
- displayed.join("").
- // Get all the TAB_SPACEs.
- replace(/12/g, function() {
- len -= 1;
- }).
- // Get all the CHAR_EXT/multipleWidth characters.
- replace(/2/g, function() {
- len -= 1;
- });
-
- lastDocSplit += len;
- splits.push(lastDocSplit);
- lastSplit = screenPos;
- }
-
- while (displayLength - lastSplit > wrapLimit) {
- // This is, where the split should be.
- var split = lastSplit + wrapLimit;
-
- // If there is a space or tab at this split position, then making
- // a split is simple.
- if (tokens[split] >= SPACE) {
- // Include all following spaces + tabs in this split as well.
- while (tokens[split] >= SPACE) {
- split ++;
- }
- addSplit(split);
- continue;
- }
-
- // === ELSE ===
- // Check if split is inside of a placeholder. Placeholder are
- // not splitable. Therefore, seek the beginning of the placeholder
- // and try to place the split beofre the placeholder's start.
- if (tokens[split] == PLACEHOLDER_START
- || tokens[split] == PLACEHOLDER_BODY)
- {
- // Seek the start of the placeholder and do the split
- // before the placeholder. By definition there always
- // a PLACEHOLDER_START between split and lastSplit.
- for (split; split != lastSplit - 1; split--) {
- if (tokens[split] == PLACEHOLDER_START) {
- // split++; << No incremental here as we want to
- // have the position before the Placeholder.
- break;
- }
- }
-
- // If the PLACEHOLDER_START is not the index of the
- // last split, then we can do the split
- if (split > lastSplit) {
- addSplit(split);
- continue;
- }
-
- // If the PLACEHOLDER_START IS the index of the last
- // split, then we have to place the split after the
- // placeholder. So, let's seek for the end of the placeholder.
- split = lastSplit + wrapLimit;
- for (split; split < tokens.length; split++) {
- if (tokens[split] != PLACEHOLDER_BODY)
- {
- break;
- }
- }
-
- // If spilt == tokens.length, then the placeholder is the last
- // thing in the line and adding a new split doesn't make sense.
- if (split == tokens.length) {
- break; // Breaks the while-loop.
- }
-
- // Finally, add the split...
- addSplit(split);
- continue;
- }
-
- // === ELSE ===
- // Search for the first non space/tab/placeholder/punctuation token backwards.
- var minSplit = Math.max(split - 10, lastSplit - 1);
- while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
- split --;
- }
- while (split > minSplit && tokens[split] == PUNCTUATION) {
- split --;
- }
- // If we found one, then add the split.
- if (split > minSplit) {
- addSplit(++split);
- continue;
- }
-
- // === ELSE ===
- split = lastSplit + wrapLimit;
- // The split is inside of a CHAR or CHAR_EXT token and no space
- // around -> force a split.
- addSplit(split);
- }
- return splits;
- }
-
- /**
- * @param
- * offset: The offset in screenColumn at which position str starts.
- * Important for calculating the realTabSize.
- */
- this.$getDisplayTokens = function(str, offset) {
- var arr = [];
- var tabSize;
- offset = offset || 0;
-
- for (var i = 0; i < str.length; i++) {
- var c = str.charCodeAt(i);
- // Tab
- if (c == 9) {
- tabSize = this.getScreenTabSize(arr.length + offset);
- arr.push(TAB);
- for (var n = 1; n < tabSize; n++) {
- arr.push(TAB_SPACE);
- }
- }
- // Space
- else if (c == 32) {
- arr.push(SPACE);
- } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {
- arr.push(PUNCTUATION);
- }
- // full width characters
- else if (c >= 0x1100 && isFullWidth(c)) {
- arr.push(CHAR, CHAR_EXT);
- } else {
- arr.push(CHAR);
- }
- }
- return arr;
- }
-
- /**
- * Calculates the width of the a string on the screen while assuming that
- * the string starts at the first column on the screen.
- *
- * @param string str String to calculate the screen width of
- * @return array
- * [0]: number of columns for str on screen.
- * [1]: docColumn position that was read until (useful with screenColumn)
- */
- this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
- if (maxScreenColumn == 0) {
- return [0, 0];
- }
- if (maxScreenColumn == null) {
- maxScreenColumn = screenColumn +
- str.length * Math.max(this.getTabSize(), 2);
- }
- screenColumn = screenColumn || 0;
-
- var c, column;
- for (column = 0; column < str.length; column++) {
- c = str.charCodeAt(column);
- // tab
- if (c == 9) {
- screenColumn += this.getScreenTabSize(screenColumn);
- }
- // full width characters
- else if (c >= 0x1100 && isFullWidth(c)) {
- screenColumn += 2;
- } else {
- screenColumn += 1;
- }
- if (screenColumn > maxScreenColumn) {
- break
- }
- }
-
- return [screenColumn, column];
- }
-
- /**
- * Returns the number of rows required to render this row on the screen
- */
- this.getRowLength = function(row) {
- if (!this.$useWrapMode || !this.$wrapData[row]) {
- return 1;
- } else {
- return this.$wrapData[row].length + 1;
- }
- }
-
- /**
- * Returns the height in pixels required to render this row on the screen
- **/
- this.getRowHeight = function(config, row) {
- return this.getRowLength(row) * config.lineHeight;
- }
-
- this.getScreenLastRowColumn = function(screenRow) {
- //return this.screenToDocumentColumn(screenRow, Number.MAX_VALUE / 10)
- return this.documentToScreenColumn(screenRow, this.doc.getLine(screenRow).length);
- };
-
- this.getDocumentLastRowColumn = function(docRow, docColumn) {
- var screenRow = this.documentToScreenRow(docRow, docColumn);
- return this.getScreenLastRowColumn(screenRow);
- };
-
- this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {
- var screenRow = this.documentToScreenRow(docRow, docColumn);
- return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);
- };
-
- this.getRowSplitData = function(row) {
- if (!this.$useWrapMode) {
- return undefined;
- } else {
- return this.$wrapData[row];
- }
- };
-
- /**
- * Returns the width of a tab character at screenColumn.
- */
- this.getScreenTabSize = function(screenColumn) {
- return this.$tabSize - screenColumn % this.$tabSize;
- };
-
- this.screenToDocumentRow = function(screenRow, screenColumn) {
- return this.screenToDocumentPosition(screenRow, screenColumn).row;
- };
-
- this.screenToDocumentColumn = function(screenRow, screenColumn) {
- return this.screenToDocumentPosition(screenRow, screenColumn).column;
- };
-
- this.screenToDocumentPosition = function(screenRow, screenColumn) {
- if (screenRow < 0) {
- return {
- row: 0,
- column: 0
- }
- }
-
- var line;
- var docRow = 0;
- var docColumn = 0;
- var column;
- var row = 0;
- var rowLength = 0;
-
- var rowCache = this.$rowCache;
- for (var i = 0; i < rowCache.length; i++) {
- if (rowCache[i].screenRow < screenRow) {
- row = rowCache[i].screenRow;
- docRow = rowCache[i].docRow;
- }
- else {
- break;
- }
- }
- var doCache = !rowCache.length || i == rowCache.length;
-
- var maxRow = this.getLength() - 1;
- var foldLine = this.getNextFoldLine(docRow);
- var foldStart = foldLine ? foldLine.start.row : Infinity;
-
- while (row <= screenRow) {
- rowLength = this.getRowLength(docRow);
- if (row + rowLength - 1 >= screenRow || docRow >= maxRow) {
- break;
- } else {
- row += rowLength;
- docRow++;
- if (docRow > foldStart) {
- docRow = foldLine.end.row+1;
- foldLine = this.getNextFoldLine(docRow, foldLine);
- foldStart = foldLine ? foldLine.start.row : Infinity;
- }
- }
- if (doCache) {
- rowCache.push({
- docRow: docRow,
- screenRow: row
- });
- }
- }
-
- if (foldLine && foldLine.start.row <= docRow) {
- line = this.getFoldDisplayLine(foldLine);
- docRow = foldLine.start.row;
- } else if (row + rowLength <= screenRow || docRow > maxRow) {
- // clip at the end of the document
- return {
- row: maxRow,
- column: this.getLine(maxRow).length
- }
- } else {
- line = this.getLine(docRow);
- foldLine = null;
- }
-
- if (this.$useWrapMode) {
- var splits = this.$wrapData[docRow];
- if (splits) {
- column = splits[screenRow - row];
- if(screenRow > row && splits.length) {
- docColumn = splits[screenRow - row - 1] || splits[splits.length - 1];
- line = line.substring(docColumn);
- }
- }
- }
-
- docColumn += this.$getStringScreenWidth(line, screenColumn)[1];
-
- // Need to do some clamping action here.
- if (this.$useWrapMode) {
- if (docColumn >= column) {
- // We remove one character at the end such that the docColumn
- // position returned is not associated to the next row on the
- // screen.
- docColumn = column - 1;
- }
- } else {
- docColumn = Math.min(docColumn, line.length);
- }
-
- if (foldLine) {
- return foldLine.idxToPosition(docColumn);
- }
-
- return {
- row: docRow,
- column: docColumn
- }
- };
-
- this.documentToScreenPosition = function(docRow, docColumn) {
- // Normalize the passed in arguments.
- if (typeof docColumn === "undefined")
- var pos = this.$clipPositionToDocument(docRow.row, docRow.column);
- else
- pos = this.$clipPositionToDocument(docRow, docColumn);
-
- docRow = pos.row;
- docColumn = pos.column;
-
- var wrapData;
- // Special case in wrapMode if the doc is at the end of the document.
- if (this.$useWrapMode) {
- wrapData = this.$wrapData;
- if (docRow > wrapData.length - 1) {
- return {
- row: this.getScreenLength(),
- column: wrapData.length == 0
- ? 0
- : (wrapData[wrapData.length - 1].length - 1)
- };
- }
- }
-
- var screenRow = 0;
- var foldStartRow = null;
- var fold = null;
-
- // Clamp the docRow position in case it's inside of a folded block.
- fold = this.getFoldAt(docRow, docColumn, 1);
- if (fold) {
- docRow = fold.start.row;
- docColumn = fold.start.column;
- }
-
- var rowEnd, row = 0;
- var rowCache = this.$rowCache;
-
- for (var i = 0; i < rowCache.length; i++) {
- if (rowCache[i].docRow < docRow) {
- screenRow = rowCache[i].screenRow;
- row = rowCache[i].docRow;
- } else {
- break;
- }
- }
- var doCache = !rowCache.length || i == rowCache.length;
-
- var foldLine = this.getNextFoldLine(row);
- var foldStart = foldLine ?foldLine.start.row :Infinity;
-
- while (row < docRow) {
- if (row >= foldStart) {
- rowEnd = foldLine.end.row + 1;
- if (rowEnd > docRow)
- break;
- foldLine = this.getNextFoldLine(rowEnd, foldLine);
- foldStart = foldLine ?foldLine.start.row :Infinity;
- }
- else {
- rowEnd = row + 1;
- }
-
- screenRow += this.getRowLength(row);
- row = rowEnd;
-
- if (doCache) {
- rowCache.push({
- docRow: row,
- screenRow: screenRow
- });
- }
- }
-
- // Calculate the text line that is displayed in docRow on the screen.
- var textLine = "";
- // Check if the final row we want to reach is inside of a fold.
- if (foldLine && row >= foldStart) {
- textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);
- foldStartRow = foldLine.start.row;
- } else {
- textLine = this.getLine(docRow).substring(0, docColumn);
- foldStartRow = docRow;
- }
- // Clamp textLine if in wrapMode.
- if (this.$useWrapMode) {
- var wrapRow = wrapData[foldStartRow];
- var screenRowOffset = 0;
- while (textLine.length >= wrapRow[screenRowOffset]) {
- screenRow ++;
- screenRowOffset++;
- }
- textLine = textLine.substring(
- wrapRow[screenRowOffset - 1] || 0, textLine.length
- );
- }
-
- return {
- row: screenRow,
- column: this.$getStringScreenWidth(textLine)[0]
- };
- };
-
- this.documentToScreenColumn = function(row, docColumn) {
- return this.documentToScreenPosition(row, docColumn).column;
- };
-
- this.documentToScreenRow = function(docRow, docColumn) {
- return this.documentToScreenPosition(docRow, docColumn).row;
- };
-
- this.getScreenLength = function() {
- var screenRows = 0;
- var fold = null;
- if (!this.$useWrapMode) {
- screenRows = this.getLength();
-
- // Remove the folded lines again.
- var foldData = this.$foldData;
- for (var i = 0; i < foldData.length; i++) {
- fold = foldData[i];
- screenRows -= fold.end.row - fold.start.row;
- }
- } else {
- var lastRow = this.$wrapData.length;
- var row = 0, i = 0;
- var fold = this.$foldData[i++];
- var foldStart = fold ? fold.start.row :Infinity;
-
- while (row < lastRow) {
- screenRows += this.$wrapData[row].length + 1;
- row ++;
- if (row > foldStart) {
- row = fold.end.row+1;
- fold = this.$foldData[i++];
- foldStart = fold ?fold.start.row :Infinity;
- }
- }
- }
-
- return screenRows;
- }
-
- // For every keystroke this gets called once per char in the whole doc!!
- // Wouldn't hurt to make it a bit faster for c >= 0x1100
- function isFullWidth(c) {
- if (c < 0x1100)
- return false;
- return c >= 0x1100 && c <= 0x115F ||
- c >= 0x11A3 && c <= 0x11A7 ||
- c >= 0x11FA && c <= 0x11FF ||
- c >= 0x2329 && c <= 0x232A ||
- c >= 0x2E80 && c <= 0x2E99 ||
- c >= 0x2E9B && c <= 0x2EF3 ||
- c >= 0x2F00 && c <= 0x2FD5 ||
- c >= 0x2FF0 && c <= 0x2FFB ||
- c >= 0x3000 && c <= 0x303E ||
- c >= 0x3041 && c <= 0x3096 ||
- c >= 0x3099 && c <= 0x30FF ||
- c >= 0x3105 && c <= 0x312D ||
- c >= 0x3131 && c <= 0x318E ||
- c >= 0x3190 && c <= 0x31BA ||
- c >= 0x31C0 && c <= 0x31E3 ||
- c >= 0x31F0 && c <= 0x321E ||
- c >= 0x3220 && c <= 0x3247 ||
- c >= 0x3250 && c <= 0x32FE ||
- c >= 0x3300 && c <= 0x4DBF ||
- c >= 0x4E00 && c <= 0xA48C ||
- c >= 0xA490 && c <= 0xA4C6 ||
- c >= 0xA960 && c <= 0xA97C ||
- c >= 0xAC00 && c <= 0xD7A3 ||
- c >= 0xD7B0 && c <= 0xD7C6 ||
- c >= 0xD7CB && c <= 0xD7FB ||
- c >= 0xF900 && c <= 0xFAFF ||
- c >= 0xFE10 && c <= 0xFE19 ||
- c >= 0xFE30 && c <= 0xFE52 ||
- c >= 0xFE54 && c <= 0xFE66 ||
- c >= 0xFE68 && c <= 0xFE6B ||
- c >= 0xFF01 && c <= 0xFF60 ||
- c >= 0xFFE0 && c <= 0xFFE6;
- };
-
-}).call(EditSession.prototype);
-
-require("./edit_session/folding").Folding.call(EditSession.prototype);
-require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype);
-
-exports.EditSession = EditSession;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/selection', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var lang = require("./lib/lang");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Range = require("./range").Range;
-
-/**
- * Keeps cursor position and the text selection of an edit session.
- *
- * The row/columns used in the selection are in document coordinates
- * representing ths coordinates as thez appear in the document
- * before applying soft wrap and folding.
- */
-var Selection = function(session) {
- this.session = session;
- this.doc = session.getDocument();
-
- this.clearSelection();
- this.selectionLead = this.doc.createAnchor(0, 0);
- this.selectionAnchor = this.doc.createAnchor(0, 0);
-
- var _self = this;
- this.selectionLead.on("change", function(e) {
- _self._emit("changeCursor");
- if (!_self.$isEmpty)
- _self._emit("changeSelection");
- if (!_self.$preventUpdateDesiredColumnOnChange && e.old.column != e.value.column)
- _self.$updateDesiredColumn();
- });
-
- this.selectionAnchor.on("change", function() {
- if (!_self.$isEmpty)
- _self._emit("changeSelection");
- });
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.isEmpty = function() {
- return (this.$isEmpty || (
- this.selectionAnchor.row == this.selectionLead.row &&
- this.selectionAnchor.column == this.selectionLead.column
- ));
- };
-
- this.isMultiLine = function() {
- if (this.isEmpty()) {
- return false;
- }
-
- return this.getRange().isMultiLine();
- };
-
- this.getCursor = function() {
- return this.selectionLead.getPosition();
- };
-
- this.setSelectionAnchor = function(row, column) {
- this.selectionAnchor.setPosition(row, column);
-
- if (this.$isEmpty) {
- this.$isEmpty = false;
- this._emit("changeSelection");
- }
- };
-
- this.getSelectionAnchor = function() {
- if (this.$isEmpty)
- return this.getSelectionLead()
- else
- return this.selectionAnchor.getPosition();
- };
-
- this.getSelectionLead = function() {
- return this.selectionLead.getPosition();
- };
-
- this.shiftSelection = function(columns) {
- if (this.$isEmpty) {
- this.moveCursorTo(this.selectionLead.row, this.selectionLead.column + columns);
- return;
- };
-
- var anchor = this.getSelectionAnchor();
- var lead = this.getSelectionLead();
-
- var isBackwards = this.isBackwards();
-
- if (!isBackwards || anchor.column !== 0)
- this.setSelectionAnchor(anchor.row, anchor.column + columns);
-
- if (isBackwards || lead.column !== 0) {
- this.$moveSelection(function() {
- this.moveCursorTo(lead.row, lead.column + columns);
- });
- }
- };
-
- this.isBackwards = function() {
- var anchor = this.selectionAnchor;
- var lead = this.selectionLead;
- return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));
- };
-
- this.getRange = function() {
- var anchor = this.selectionAnchor;
- var lead = this.selectionLead;
-
- if (this.isEmpty())
- return Range.fromPoints(lead, lead);
-
- if (this.isBackwards()) {
- return Range.fromPoints(lead, anchor);
- }
- else {
- return Range.fromPoints(anchor, lead);
- }
- };
-
- this.clearSelection = function() {
- if (!this.$isEmpty) {
- this.$isEmpty = true;
- this._emit("changeSelection");
- }
- };
-
- this.selectAll = function() {
- var lastRow = this.doc.getLength() - 1;
- this.setSelectionAnchor(lastRow, this.doc.getLine(lastRow).length);
- this.moveCursorTo(0, 0);
- };
-
- this.setSelectionRange = function(range, reverse) {
- if (reverse) {
- this.setSelectionAnchor(range.end.row, range.end.column);
- this.selectTo(range.start.row, range.start.column);
- } else {
- this.setSelectionAnchor(range.start.row, range.start.column);
- this.selectTo(range.end.row, range.end.column);
- }
- this.$updateDesiredColumn();
- };
-
- this.$updateDesiredColumn = function() {
- var cursor = this.getCursor();
- this.$desiredColumn = this.session.documentToScreenColumn(cursor.row, cursor.column);
- };
-
- this.$moveSelection = function(mover) {
- var lead = this.selectionLead;
- if (this.$isEmpty)
- this.setSelectionAnchor(lead.row, lead.column);
-
- mover.call(this);
- };
-
- this.selectTo = function(row, column) {
- this.$moveSelection(function() {
- this.moveCursorTo(row, column);
- });
- };
-
- this.selectToPosition = function(pos) {
- this.$moveSelection(function() {
- this.moveCursorToPosition(pos);
- });
- };
-
- this.selectUp = function() {
- this.$moveSelection(this.moveCursorUp);
- };
-
- this.selectDown = function() {
- this.$moveSelection(this.moveCursorDown);
- };
-
- this.selectRight = function() {
- this.$moveSelection(this.moveCursorRight);
- };
-
- this.selectLeft = function() {
- this.$moveSelection(this.moveCursorLeft);
- };
-
- this.selectLineStart = function() {
- this.$moveSelection(this.moveCursorLineStart);
- };
-
- this.selectLineEnd = function() {
- this.$moveSelection(this.moveCursorLineEnd);
- };
-
- this.selectFileEnd = function() {
- this.$moveSelection(this.moveCursorFileEnd);
- };
-
- this.selectFileStart = function() {
- this.$moveSelection(this.moveCursorFileStart);
- };
-
- this.selectWordRight = function() {
- this.$moveSelection(this.moveCursorWordRight);
- };
-
- this.selectWordLeft = function() {
- this.$moveSelection(this.moveCursorWordLeft);
- };
-
- this.selectWord = function() {
- var cursor = this.getCursor();
- var range = this.session.getWordRange(cursor.row, cursor.column);
- this.setSelectionRange(range);
- };
-
- // Selects a word including its right whitespace
- this.selectAWord = function() {
- var cursor = this.getCursor();
- var range = this.session.getAWordRange(cursor.row, cursor.column);
- this.setSelectionRange(range);
- };
-
- this.selectLine = function() {
- var rowStart = this.selectionLead.row;
- var rowEnd;
-
- var foldLine = this.session.getFoldLine(rowStart);
- if (foldLine) {
- rowStart = foldLine.start.row;
- rowEnd = foldLine.end.row;
- } else {
- rowEnd = rowStart;
- }
- this.setSelectionAnchor(rowStart, 0);
- this.$moveSelection(function() {
- this.moveCursorTo(rowEnd + 1, 0);
- });
- };
-
- this.moveCursorUp = function() {
- this.moveCursorBy(-1, 0);
- };
-
- this.moveCursorDown = function() {
- this.moveCursorBy(1, 0);
- };
-
- this.moveCursorLeft = function() {
- var cursor = this.selectionLead.getPosition(),
- fold;
-
- if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {
- this.moveCursorTo(fold.start.row, fold.start.column);
- } else if (cursor.column == 0) {
- // cursor is a line (start
- if (cursor.row > 0) {
- this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);
- }
- }
- else {
- var tabSize = this.session.getTabSize();
- if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize)
- this.moveCursorBy(0, -tabSize);
- else
- this.moveCursorBy(0, -1);
- }
- };
-
- this.moveCursorRight = function() {
- var cursor = this.selectionLead.getPosition(),
- fold;
- if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {
- this.moveCursorTo(fold.end.row, fold.end.column);
- }
- else if (this.selectionLead.column == this.doc.getLine(this.selectionLead.row).length) {
- if (this.selectionLead.row < this.doc.getLength() - 1) {
- this.moveCursorTo(this.selectionLead.row + 1, 0);
- }
- }
- else {
- var tabSize = this.session.getTabSize();
- var cursor = this.selectionLead;
- if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize)
- this.moveCursorBy(0, tabSize);
- else
- this.moveCursorBy(0, 1);
- }
- };
-
- this.moveCursorLineStart = function() {
- var row = this.selectionLead.row;
- var column = this.selectionLead.column;
- var screenRow = this.session.documentToScreenRow(row, column);
-
- // Determ the doc-position of the first character at the screen line.
- var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);
-
- // Determ the line
- var beforeCursor = this.session.getDisplayLine(
- row, null,
- firstColumnPosition.row, firstColumnPosition.column
- );
-
- var leadingSpace = beforeCursor.match(/^\s*/);
- if (leadingSpace[0].length == column) {
- this.moveCursorTo(
- firstColumnPosition.row, firstColumnPosition.column
- );
- }
- else {
- this.moveCursorTo(
- firstColumnPosition.row,
- firstColumnPosition.column + leadingSpace[0].length
- );
- }
- };
-
- this.moveCursorLineEnd = function() {
- var lead = this.selectionLead;
- var lastRowColumnPosition =
- this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);
- this.moveCursorTo(
- lastRowColumnPosition.row,
- lastRowColumnPosition.column
- );
- };
-
- this.moveCursorFileEnd = function() {
- var row = this.doc.getLength() - 1;
- var column = this.doc.getLine(row).length;
- this.moveCursorTo(row, column);
- };
-
- this.moveCursorFileStart = function() {
- this.moveCursorTo(0, 0);
- };
-
- this.moveCursorWordRight = function() {
- var row = this.selectionLead.row;
- var column = this.selectionLead.column;
- var line = this.doc.getLine(row);
- var rightOfCursor = line.substring(column);
-
- var match;
- this.session.nonTokenRe.lastIndex = 0;
- this.session.tokenRe.lastIndex = 0;
-
- // skip folds
- var fold = this.session.getFoldAt(row, column, 1);
- if (fold) {
- this.moveCursorTo(fold.end.row, fold.end.column);
- return;
- }
-
- // first skip space
- if (match = this.session.nonTokenRe.exec(rightOfCursor)) {
- column += this.session.nonTokenRe.lastIndex;
- this.session.nonTokenRe.lastIndex = 0;
- rightOfCursor = line.substring(column);
- }
-
- // if at line end proceed with next line
- if (column >= line.length) {
- this.moveCursorTo(row, line.length);
- this.moveCursorRight();
- if (row < this.doc.getLength() - 1)
- this.moveCursorWordRight();
- return;
- }
-
- // advance to the end of the next token
- if (match = this.session.tokenRe.exec(rightOfCursor)) {
- column += this.session.tokenRe.lastIndex;
- this.session.tokenRe.lastIndex = 0;
- }
-
- this.moveCursorTo(row, column);
- };
-
- this.moveCursorWordLeft = function() {
- var row = this.selectionLead.row;
- var column = this.selectionLead.column;
-
- // skip folds
- var fold;
- if (fold = this.session.getFoldAt(row, column, -1)) {
- this.moveCursorTo(fold.start.row, fold.start.column);
- return;
- }
-
- var str = this.session.getFoldStringAt(row, column, -1);
- if (str == null) {
- str = this.doc.getLine(row).substring(0, column)
- }
-
- var leftOfCursor = lang.stringReverse(str);
- var match;
- this.session.nonTokenRe.lastIndex = 0;
- this.session.tokenRe.lastIndex = 0;
-
- // skip whitespace
- if (match = this.session.nonTokenRe.exec(leftOfCursor)) {
- column -= this.session.nonTokenRe.lastIndex;
- leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);
- this.session.nonTokenRe.lastIndex = 0;
- }
-
- // if at begin of the line proceed in line above
- if (column <= 0) {
- this.moveCursorTo(row, 0);
- this.moveCursorLeft();
- if (row > 0)
- this.moveCursorWordLeft();
- return;
- }
-
- // move to the begin of the word
- if (match = this.session.tokenRe.exec(leftOfCursor)) {
- column -= this.session.tokenRe.lastIndex;
- this.session.tokenRe.lastIndex = 0;
- }
-
- this.moveCursorTo(row, column);
- };
-
- this.moveCursorBy = function(rows, chars) {
- var screenPos = this.session.documentToScreenPosition(
- this.selectionLead.row,
- this.selectionLead.column
- );
-
- var screenCol = (chars === 0 && this.$desiredColumn) || screenPos.column;
- var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenCol);
-
- // move the cursor and update the desired column
- this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);
- };
-
- this.moveCursorToPosition = function(position) {
- this.moveCursorTo(position.row, position.column);
- };
-
- this.moveCursorTo = function(row, column, preventUpdateDesiredColumn) {
- // Ensure the row/column is not inside of a fold.
- var fold = this.session.getFoldAt(row, column, 1);
- if (fold) {
- row = fold.start.row;
- column = fold.start.column;
- }
-
- this.$preventUpdateDesiredColumnOnChange = true;
- this.selectionLead.setPosition(row, column);
- this.$preventUpdateDesiredColumnOnChange = false;
-
- if (!preventUpdateDesiredColumn)
- this.$updateDesiredColumn(this.selectionLead.column);
- };
-
- this.moveCursorToScreen = function(row, column, preventUpdateDesiredColumn) {
- var pos = this.session.screenToDocumentPosition(row, column);
- row = pos.row;
- column = pos.column;
- this.moveCursorTo(row, column, preventUpdateDesiredColumn);
- };
-
-}).call(Selection.prototype);
-
-exports.Selection = Selection;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEequal = function(range) {
- return this.start.row == range.start.row &&
- this.end.row == range.end.row &&
- this.start.column == range.start.column &&
- this.end.column == range.end.column
- };
-
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
-
- /**
- * Compares this range (A) with another range (B), where B is the passed in
- * range.
- *
- * Return values:
- * -2: (B) is infront of (A) and doesn't intersect with (A)
- * -1: (B) begins before (A) but ends inside of (A)
- * 0: (B) is completly inside of (A) OR (A) is complety inside of (B)
- * +1: (B) begins inside of (A) but ends outside of (A)
- * +2: (B) is after (A) and doesn't intersect with (A)
- *
- * 42: FTW state: (B) ends in (A) but starts outside of (A)
- */
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- }
-
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- }
-
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- }
-
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- }
-
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- }
-
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- }
-
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- }
-
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- }
-
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- }
-
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- }
-
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
-
- /**
- * Like .compare(), but if isStart is true, return -1;
- */
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- }
-
- /**
- * Like .compare(), but if isEnd is true, return 1;
- */
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- }
-
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- }
-
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow) {
- var end = {
- row: lastRow+1,
- column: 0
- };
- }
-
- if (this.start.row > lastRow) {
- var start = {
- row: lastRow+1,
- column: 0
- };
- }
-
- if (this.start.row < firstRow) {
- var start = {
- row: firstRow,
- column: 0
- };
- }
-
- if (this.end.row < firstRow) {
- var end = {
- row: firstRow,
- column: 0
- };
- }
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row == this.end.row && this.start.column == this.end.column);
- };
-
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
-
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
-
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
-
- this.toScreenRange = function(session) {
- var screenPosStart =
- session.documentToScreenPosition(this.start);
- var screenPosEnd =
- session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
-
-}).call(Range.prototype);
-
-
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-
-exports.Range = Range;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/text', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/behaviour', 'ace/unicode'], function(require, exports, module) {
-"use strict";
-
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Behaviour = require("./behaviour").Behaviour;
-var unicode = require("../unicode");
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
- this.$behaviour = new Behaviour();
-};
-
-(function() {
-
- this.tokenRe = new RegExp("^["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]+", "g"
- );
-
- this.nonTokenRe = new RegExp("^(?:[^"
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]|\s])+", "g"
- );
-
- this.getTokenizer = function() {
- return this.$tokenizer;
- };
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- return "";
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
- this.autoOutdent = function(state, doc, row) {
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
- this.createWorker = function(session) {
- return null;
- };
-
- this.highlightSelection = function(editor) {
- var session = editor.session;
- if (!session.$selectionOccurrences)
- session.$selectionOccurrences = [];
-
- if (session.$selectionOccurrences.length)
- this.clearSelectionHighlight(editor);
-
- var selection = editor.getSelectionRange();
- if (selection.isEmpty() || selection.isMultiLine())
- return;
-
- var startOuter = selection.start.column - 1;
- var endOuter = selection.end.column + 1;
- var line = session.getLine(selection.start.row);
- var lineCols = line.length;
- var needle = line.substring(Math.max(startOuter, 0),
- Math.min(endOuter, lineCols));
-
- // Make sure the outer characters are not part of the word.
- if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
- (endOuter <= lineCols && /[\w\d]$/.test(needle)))
- return;
-
- needle = line.substring(selection.start.column, selection.end.column);
- if (!/^[\w\d]+$/.test(needle))
- return;
-
- var cursor = editor.getCursorPosition();
-
- var newOptions = {
- wrap: true,
- wholeWord: true,
- caseSensitive: true,
- needle: needle
- };
-
- var currentOptions = editor.$search.getOptions();
- editor.$search.set(newOptions);
-
- var ranges = editor.$search.findAll(session);
- ranges.forEach(function(range) {
- if (!range.contains(cursor.row, cursor.column)) {
- var marker = session.addMarker(range, "ace_selected_word", "text");
- session.$selectionOccurrences.push(marker);
- }
- });
-
- editor.$search.set(currentOptions);
- };
-
- this.clearSelectionHighlight = function(editor) {
- if (!editor.session.$selectionOccurrences)
- return;
-
- editor.session.$selectionOccurrences.forEach(function(marker) {
- editor.session.removeMarker(marker);
- });
-
- editor.session.$selectionOccurrences = [];
- };
-
- this.createModeDelegates = function (mapping) {
- if (!this.$embeds) {
- return;
- }
- this.$modes = {};
- for (var i = 0; i < this.$embeds.length; i++) {
- if (mapping[this.$embeds[i]]) {
- this.$modes[this.$embeds[i]] = new mapping[this.$embeds[i]]();
- }
- }
-
- var delegations = ['toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction'];
-
- for (var i = 0; i < delegations.length; i++) {
- (function(scope) {
- var functionName = delegations[i];
- var defaultHandler = scope[functionName];
- scope[delegations[i]] = function() {
- return this.$delegator(functionName, arguments, defaultHandler);
- }
- } (this));
- }
- }
-
- this.$delegator = function(method, args, defaultHandler) {
- var state = args[0];
-
- for (var i = 0; i < this.$embeds.length; i++) {
- if (!this.$modes[this.$embeds[i]]) continue;
-
- var split = state.split(this.$embeds[i]);
- if (!split[0] && split[1]) {
- args[0] = split[1];
- var mode = this.$modes[this.$embeds[i]];
- return mode[method].apply(mode, args);
- }
- }
- var ret = defaultHandler.apply(this, args);
- return defaultHandler ? ret : undefined;
- };
-
- this.transformAction = function(state, action, editor, session, param) {
- if (this.$behaviour) {
- var behaviours = this.$behaviour.getBehaviours();
- for (var key in behaviours) {
- if (behaviours[key][action]) {
- var ret = behaviours[key][action].apply(this, arguments);
- if (ret) {
- return ret;
- }
- }
- }
- }
- }
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/tokenizer', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var Tokenizer = function(rules, flag) {
- flag = flag ? "g" + flag : "g";
- this.rules = rules;
-
- this.regExps = {};
- this.matchMappings = {};
- for ( var key in this.rules) {
- var rule = this.rules[key];
- var state = rule;
- var ruleRegExps = [];
- var matchTotal = 0;
- var mapping = this.matchMappings[key] = {};
-
- for ( var i = 0; i < state.length; i++) {
- // Count number of matching groups. 2 extra groups from the full match
- // And the catch-all on the end (used to force a match);
- var matchcount = new RegExp("(?:(" + state[i].regex + ")|(.))").exec("a").length - 2;
-
- // Replace any backreferences and offset appropriately.
- var adjustedregex = state[i].regex.replace(/\\([0-9]+)/g, function (match, digit) {
- return "\\" + (parseInt(digit, 10) + matchTotal + 1);
- });
-
- mapping[matchTotal] = {
- rule: i,
- len: matchcount
- };
- matchTotal += matchcount;
-
- ruleRegExps.push(adjustedregex);
- }
-
- this.regExps[key] = new RegExp("(?:(" + ruleRegExps.join(")|(") + ")|(.))", flag);
- }
-};
-
-(function() {
-
- this.getLineTokens = function(line, startState) {
- var currentState = startState;
- var state = this.rules[currentState];
- var mapping = this.matchMappings[currentState];
- var re = this.regExps[currentState];
- re.lastIndex = 0;
-
- var match, tokens = [];
-
- var lastIndex = 0;
-
- var token = {
- type: null,
- value: ""
- };
-
- while (match = re.exec(line)) {
- var type = "text";
- var rule = null;
- var value = [match[0]];
-
- for (var i = 0; i < match.length-2; i++) {
- if (match[i + 1] !== undefined) {
- rule = state[mapping[i].rule];
-
- if (mapping[i].len > 1) {
- value = match.slice(i+2, i+1+mapping[i].len);
- }
-
- // compute token type
- if (typeof rule.token == "function")
- type = rule.token.apply(this, value);
- else
- type = rule.token;
-
- var next = rule.next;
- if (next && next !== currentState) {
- currentState = next;
- state = this.rules[currentState];
- mapping = this.matchMappings[currentState];
- lastIndex = re.lastIndex;
-
- re = this.regExps[currentState];
- re.lastIndex = lastIndex;
- }
- break;
- }
- }
-
- if (value[0]) {
- if (typeof type == "string") {
- value = [value.join("")];
- type = [type];
- }
- for (var i = 0; i < value.length; i++) {
- if ((!rule || rule.merge || type[i] === "text") && token.type === type[i]) {
- token.value += value[i];
- } else {
- if (token.type) {
- tokens.push(token);
- }
-
- token = {
- type: type[i],
- value: value[i]
- };
- }
- }
- }
-
- if (lastIndex == line.length)
- break;
-
- lastIndex = re.lastIndex;
- }
-
- if (token.type)
- tokens.push(token);
-
- return {
- tokens : tokens,
- state : currentState
- };
- };
-
-}).call(Tokenizer.prototype);
-
-exports.Tokenizer = Tokenizer;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/text_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var TextHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [{
- token : "empty_line",
- regex : '^$'
- }, {
- token : "text",
- regex : ".+"
- }]
- };
-};
-
-(function() {
-
- this.addRules = function(rules, prefix) {
- for (var key in rules) {
- var state = rules[key];
- for (var i=0; i<state.length; i++) {
- var rule = state[i];
- if (rule.next) {
- rule.next = prefix + rule.next;
- } else {
- rule.next = prefix + key;
- }
- }
- this.$rules[prefix + key] = state;
- }
- };
-
- this.getRules = function() {
- return this.$rules;
- };
-
- this.embedRules = function (HighlightRules, prefix, escapeRules, states) {
- var embedRules = new HighlightRules().getRules();
- if (states) {
- for (var i = 0; i < states.length; i++) {
- states[i] = prefix + states[i];
- }
- } else {
- states = [];
- for (var key in embedRules) {
- states.push(prefix + key);
- }
- }
- this.addRules(embedRules, prefix);
-
- for (var i = 0; i < states.length; i++) {
- Array.prototype.unshift.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));
- }
-
- if (!this.$embeds) {
- this.$embeds = [];
- }
- this.$embeds.push(prefix);
- }
-
- this.getEmbeds = function() {
- return this.$embeds;
- }
-
-}).call(TextHighlightRules.prototype);
-
-exports.TextHighlightRules = TextHighlightRules;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var Behaviour = function() {
- this.$behaviours = {};
-};
-
-(function () {
-
- this.add = function (name, action, callback) {
- switch (undefined) {
- case this.$behaviours:
- this.$behaviours = {};
- case this.$behaviours[name]:
- this.$behaviours[name] = {};
- }
- this.$behaviours[name][action] = callback;
- }
-
- this.addBehaviours = function (behaviours) {
- for (var key in behaviours) {
- for (var action in behaviours[key]) {
- this.add(key, action, behaviours[key][action]);
- }
- }
- }
-
- this.remove = function (name) {
- if (this.$behaviours && this.$behaviours[name]) {
- delete this.$behaviours[name];
- }
- }
-
- this.inherit = function (mode, filter) {
- if (typeof mode === "function") {
- var behaviours = new mode().getBehaviours(filter);
- } else {
- var behaviours = mode.getBehaviours(filter);
- }
- this.addBehaviours(behaviours);
- }
-
- this.getBehaviours = function (filter) {
- if (!filter) {
- return this.$behaviours;
- } else {
- var ret = {}
- for (var i = 0; i < filter.length; i++) {
- if (this.$behaviours[filter[i]]) {
- ret[filter[i]] = this.$behaviours[filter[i]];
- }
- }
- return ret;
- }
- }
-
-}).call(Behaviour.prototype);
-
-exports.Behaviour = Behaviour;
-});define('ace/unicode', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-/*
-XRegExp Unicode plugin pack: Categories 1.0
-(c) 2010 Steven Levithan
-MIT License
-<http://xregexp.com>
-Uses the Unicode 5.2 character database
-
-This package for the XRegExp Unicode plugin enables the following Unicode categories (aka properties):
-
-L - Letter (the top-level Letter category is included in the Unicode plugin base script)
- Ll - Lowercase letter
- Lu - Uppercase letter
- Lt - Titlecase letter
- Lm - Modifier letter
- Lo - Letter without case
-M - Mark
- Mn - Non-spacing mark
- Mc - Spacing combining mark
- Me - Enclosing mark
-N - Number
- Nd - Decimal digit
- Nl - Letter number
- No - Other number
-P - Punctuation
- Pd - Dash punctuation
- Ps - Open punctuation
- Pe - Close punctuation
- Pi - Initial punctuation
- Pf - Final punctuation
- Pc - Connector punctuation
- Po - Other punctuation
-S - Symbol
- Sm - Math symbol
- Sc - Currency symbol
- Sk - Modifier symbol
- So - Other symbol
-Z - Separator
- Zs - Space separator
- Zl - Line separator
- Zp - Paragraph separator
-C - Other
- Cc - Control
- Cf - Format
- Co - Private use
- Cs - Surrogate
- Cn - Unassigned
-
-Example usage:
-
- \p{N}
- \p{Cn}
-*/
-
-
-// will be populated by addUnicodePackage
-exports.packages = {};
-
-addUnicodePackage({
- L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
- Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",
- Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",
- Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",
- Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",
- Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
- M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",
- Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",
- Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",
- Me: "0488048906DE20DD-20E020E2-20E4A670-A672",
- N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
- Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
- Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",
- No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",
- P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",
- Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",
- Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",
- Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",
- Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",
- Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21",
- Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F",
- Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",
- S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",
- Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",
- Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",
- Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",
- So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",
- Z: "002000A01680180E2000-200A20282029202F205F3000",
- Zs: "002000A01680180E2000-200A202F205F3000",
- Zl: "2028",
- Zp: "2029",
- C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
- Cc: "0000-001F007F-009F",
- Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",
- Co: "E000-F8FF",
- Cs: "D800-DFFF",
- Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"
-});
-
-function addUnicodePackage (pack) {
- var codePoint = /\w{4}/g;
- for (var name in pack)
- exports.packages[name] = pack[name].replace(codePoint, "\\u$&");
-};
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Range = require("./range").Range;
-var Anchor = require("./anchor").Anchor;
-
-var Document = function(text) {
- this.$lines = [];
-
- if (Array.isArray(text)) {
- this.insertLines(0, text);
- }
- // There has to be one line at least in the document. If you pass an empty
- // string to the insert function, nothing will happen. Workaround.
- else if (text.length == 0) {
- this.$lines = [""];
- } else {
- this.insert({row: 0, column:0}, text);
- }
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.setValue = function(text) {
- var len = this.getLength();
- this.remove(new Range(0, 0, len, this.getLine(len-1).length));
- this.insert({row: 0, column:0}, text);
- };
-
- this.getValue = function() {
- return this.getAllLines().join(this.getNewLineCharacter());
- };
-
- this.createAnchor = function(row, column) {
- return new Anchor(this, row, column);
- };
-
- // check for IE split bug
- if ("aaa".split(/a/).length == 0)
- this.$split = function(text) {
- return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
- else
- this.$split = function(text) {
- return text.split(/\r\n|\r|\n/);
- };
-
-
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r\n|\r|\n)/m);
- if (match) {
- this.$autoNewLine = match[1];
- } else {
- this.$autoNewLine = "\n";
- }
- };
-
- this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
- case "windows":
- return "\r\n";
-
- case "unix":
- return "\n";
-
- case "auto":
- return this.$autoNewLine;
- }
- };
-
- this.$autoNewLine = "\n";
- this.$newLineMode = "auto";
- this.setNewLineMode = function(newLineMode) {
- if (this.$newLineMode === newLineMode)
- return;
-
- this.$newLineMode = newLineMode;
- };
-
- this.getNewLineMode = function() {
- return this.$newLineMode;
- };
-
- this.isNewLine = function(text) {
- return (text == "\r\n" || text == "\r" || text == "\n");
- };
-
- /**
- * Get a verbatim copy of the given line as it is in the document
- */
- this.getLine = function(row) {
- return this.$lines[row] || "";
- };
-
- this.getLines = function(firstRow, lastRow) {
- return this.$lines.slice(firstRow, lastRow + 1);
- };
-
- /**
- * Returns all lines in the document as string array. Warning: The caller
- * should not modify this array!
- */
- this.getAllLines = function() {
- return this.getLines(0, this.getLength());
- };
-
- this.getLength = function() {
- return this.$lines.length;
- };
-
- this.getTextRange = function(range) {
- if (range.start.row == range.end.row) {
- return this.$lines[range.start.row].substring(range.start.column,
- range.end.column);
- }
- else {
- var lines = [];
- lines.push(this.$lines[range.start.row].substring(range.start.column));
- lines.push.apply(lines, this.getLines(range.start.row+1, range.end.row-1));
- lines.push(this.$lines[range.end.row].substring(0, range.end.column));
- return lines.join(this.getNewLineCharacter());
- }
- };
-
- this.$clipPosition = function(position) {
- var length = this.getLength();
- if (position.row >= length) {
- position.row = Math.max(0, length - 1);
- position.column = this.getLine(length-1).length;
- }
- return position;
- };
-
- this.insert = function(position, text) {
- if (text.length == 0)
- return position;
-
- position = this.$clipPosition(position);
-
- if (this.getLength() <= 1)
- this.$detectNewLine(text);
-
- var lines = this.$split(text);
- var firstLine = lines.splice(0, 1)[0];
- var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
-
- position = this.insertInLine(position, firstLine);
- if (lastLine !== null) {
- position = this.insertNewLine(position); // terminate first line
- position = this.insertLines(position.row, lines);
- position = this.insertInLine(position, lastLine || "");
- }
- return position;
- };
-
- this.insertLines = function(row, lines) {
- if (lines.length == 0)
- return {row: row, column: 0};
-
- var args = [row, 0];
- args.push.apply(args, lines);
- this.$lines.splice.apply(this.$lines, args);
-
- var range = new Range(row, 0, row + lines.length, 0);
- var delta = {
- action: "insertLines",
- range: range,
- lines: lines
- };
- this._emit("change", { data: delta });
- return range.end;
- };
-
- this.insertNewLine = function(position) {
- position = this.$clipPosition(position);
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column);
- this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
-
- var end = {
- row : position.row + 1,
- column : 0
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
-
- return end;
- };
-
- this.insertInLine = function(position, text) {
- if (text.length == 0)
- return position;
-
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column) + text
- + line.substring(position.column);
-
- var end = {
- row : position.row,
- column : position.column + text.length
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: text
- };
- this._emit("change", { data: delta });
-
- return end;
- };
-
- this.remove = function(range) {
- // clip to document
- range.start = this.$clipPosition(range.start);
- range.end = this.$clipPosition(range.end);
-
- if (range.isEmpty())
- return range.start;
-
- var firstRow = range.start.row;
- var lastRow = range.end.row;
-
- if (range.isMultiLine()) {
- var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
- var lastFullRow = lastRow - 1;
-
- if (range.end.column > 0)
- this.removeInLine(lastRow, 0, range.end.column);
-
- if (lastFullRow >= firstFullRow)
- this.removeLines(firstFullRow, lastFullRow);
-
- if (firstFullRow != firstRow) {
- this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
- this.removeNewLine(range.start.row);
- }
- }
- else {
- this.removeInLine(firstRow, range.start.column, range.end.column);
- }
- return range.start;
- };
-
- this.removeInLine = function(row, startColumn, endColumn) {
- if (startColumn == endColumn)
- return;
-
- var range = new Range(row, startColumn, row, endColumn);
- var line = this.getLine(row);
- var removed = line.substring(startColumn, endColumn);
- var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
- this.$lines.splice(row, 1, newLine);
-
- var delta = {
- action: "removeText",
- range: range,
- text: removed
- };
- this._emit("change", { data: delta });
- return range.start;
- };
-
- /**
- * Removes a range of full lines
- *
- * @param firstRow {Integer} The first row to be removed
- * @param lastRow {Integer} The last row to be removed
- * @return {String[]} The removed lines
- */
- this.removeLines = function(firstRow, lastRow) {
- var range = new Range(firstRow, 0, lastRow + 1, 0);
- var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
-
- var delta = {
- action: "removeLines",
- range: range,
- nl: this.getNewLineCharacter(),
- lines: removed
- };
- this._emit("change", { data: delta });
- return removed;
- };
-
- this.removeNewLine = function(row) {
- var firstLine = this.getLine(row);
- var secondLine = this.getLine(row+1);
-
- var range = new Range(row, firstLine.length, row+1, 0);
- var line = firstLine + secondLine;
-
- this.$lines.splice(row, 2, line);
-
- var delta = {
- action: "removeText",
- range: range,
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
- };
-
- this.replace = function(range, text) {
- if (text.length == 0 && range.isEmpty())
- return range.start;
-
- // Shortcut: If the text we want to insert is the same as it is already
- // in the document, we don't have to replace anything.
- if (text == this.getTextRange(range))
- return range.end;
-
- this.remove(range);
- if (text) {
- var end = this.insert(range.start, text);
- }
- else {
- end = range.start;
- }
-
- return end;
- };
-
- this.applyDeltas = function(deltas) {
- for (var i=0; i<deltas.length; i++) {
- var delta = deltas[i];
- var range = Range.fromPoints(delta.range.start, delta.range.end);
-
- if (delta.action == "insertLines")
- this.insertLines(range.start.row, delta.lines);
- else if (delta.action == "insertText")
- this.insert(range.start, delta.text);
- else if (delta.action == "removeLines")
- this.removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "removeText")
- this.remove(range);
- }
- };
-
- this.revertDeltas = function(deltas) {
- for (var i=deltas.length-1; i>=0; i--) {
- var delta = deltas[i];
-
- var range = Range.fromPoints(delta.range.start, delta.range.end);
-
- if (delta.action == "insertLines")
- this.removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "insertText")
- this.remove(range);
- else if (delta.action == "removeLines")
- this.insertLines(range.start.row, delta.lines);
- else if (delta.action == "removeText")
- this.insert(range.start, delta.text);
- }
- };
-
-}).call(Document.prototype);
-
-exports.Document = Document;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-/**
- * An Anchor is a floating pointer in the document. Whenever text is inserted or
- * deleted before the cursor, the position of the cursor is updated
- */
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.document = doc;
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
-
- this.$onChange = this.onChange.bind(this);
- doc.on("change", this.$onChange);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
-
- this.getDocument = function() {
- return this.document;
- };
-
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
-
- if (delta.action === "insertText") {
- if (range.start.row === row && range.start.column <= column) {
- if (range.start.row === range.end.row) {
- column += range.end.column - range.start.column;
- }
- else {
- column -= range.start.column;
- row += range.end.row - range.start.row;
- }
- }
- else if (range.start.row !== range.end.row && range.start.row < row) {
- row += range.end.row - range.start.row;
- }
- } else if (delta.action === "insertLines") {
- if (range.start.row <= row) {
- row += range.end.row - range.start.row;
- }
- }
- else if (delta.action == "removeText") {
- if (range.start.row == row && range.start.column < column) {
- if (range.end.column >= column)
- column = range.start.column;
- else
- column = Math.max(0, column - (range.end.column - range.start.column));
-
- } else if (range.start.row !== range.end.row && range.start.row < row) {
- if (range.end.row == row) {
- column = Math.max(0, column - range.end.column) + range.start.column;
- }
- row -= (range.end.row - range.start.row);
- }
- else if (range.end.row == row) {
- row -= range.end.row - range.start.row;
- column = Math.max(0, column - range.end.column) + range.start.column;
- }
- } else if (delta.action == "removeLines") {
- if (range.start.row <= row) {
- if (range.end.row <= row)
- row -= range.end.row - range.start.row;
- else {
- row = range.start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
-
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- }
- else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
-
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
-
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/background_tokenizer', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var BackgroundTokenizer = function(tokenizer, editor) {
- this.running = false;
- this.lines = [];
- this.currentLine = 0;
- this.tokenizer = tokenizer;
-
- var self = this;
-
- this.$worker = function() {
- if (!self.running) { return; }
-
- var workerStart = new Date();
- var startLine = self.currentLine;
- var doc = self.doc;
-
- var processedLines = 0;
-
- var len = doc.getLength();
- while (self.currentLine < len) {
- self.lines[self.currentLine] = self.$tokenizeRows(self.currentLine, self.currentLine)[0];
- self.currentLine++;
-
- // only check every 5 lines
- processedLines += 1;
- if ((processedLines % 5 == 0) && (new Date() - workerStart) > 20) {
- self.fireUpdateEvent(startLine, self.currentLine-1);
- self.running = setTimeout(self.$worker, 20);
- return;
- }
- }
-
- self.running = false;
-
- self.fireUpdateEvent(startLine, len - 1);
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.setTokenizer = function(tokenizer) {
- this.tokenizer = tokenizer;
- this.lines = [];
-
- this.start(0);
- };
-
- this.setDocument = function(doc) {
- this.doc = doc;
- this.lines = [];
-
- this.stop();
- };
-
- this.fireUpdateEvent = function(firstRow, lastRow) {
- var data = {
- first: firstRow,
- last: lastRow
- };
- this._emit("update", {data: data});
- };
-
- this.start = function(startRow) {
- this.currentLine = Math.min(startRow || 0, this.currentLine,
- this.doc.getLength());
-
- // remove all cached items below this line
- this.lines.splice(this.currentLine, this.lines.length);
-
- this.stop();
- // pretty long delay to prevent the tokenizer from interfering with the user
- this.running = setTimeout(this.$worker, 700);
- };
-
- this.stop = function() {
- if (this.running)
- clearTimeout(this.running);
- this.running = false;
- };
-
- this.getTokens = function(firstRow, lastRow) {
- return this.$tokenizeRows(firstRow, lastRow);
- };
-
- this.getState = function(row) {
- return this.$tokenizeRows(row, row)[0].state;
- };
-
- this.$tokenizeRows = function(firstRow, lastRow) {
- if (!this.doc || isNaN(firstRow) || isNaN(lastRow))
- return [{'state':'start','tokens':[]}];
-
- var rows = [];
-
- // determine start state
- var state = "start";
- var doCache = false;
- if (firstRow > 0 && this.lines[firstRow - 1]) {
- state = this.lines[firstRow - 1].state;
- doCache = true;
- } else if (firstRow == 0) {
- state = "start";
- doCache = true;
- } else if (this.lines.length > 0) {
- // Guess that we haven't changed state.
- state = this.lines[this.lines.length-1].state;
- }
-
- var lines = this.doc.getLines(firstRow, lastRow);
- for (var row=firstRow; row<=lastRow; row++) {
- if (!this.lines[row]) {
- var tokens = this.tokenizer.getLineTokens(lines[row-firstRow] || "", state);
- var state = tokens.state;
- rows.push(tokens);
-
- if (doCache) {
- this.lines[row] = tokens;
- }
- }
- else {
- var tokens = this.lines[row];
- state = tokens.state;
- rows.push(tokens);
- }
- }
- return rows;
- };
-
-}).call(BackgroundTokenizer.prototype);
-
-exports.BackgroundTokenizer = BackgroundTokenizer;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/edit_session/folding', ['require', 'exports', 'module' , 'ace/range', 'ace/edit_session/fold_line', 'ace/edit_session/fold', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-var FoldLine = require("./fold_line").FoldLine;
-var Fold = require("./fold").Fold;
-var TokenIterator = require("../token_iterator").TokenIterator;
-
-function Folding() {
- /**
- * Looks up a fold at a given row/column. Possible values for side:
- * -1: ignore a fold if fold.start = row/column
- * +1: ignore a fold if fold.end = row/column
- */
- this.getFoldAt = function(row, column, side) {
- var foldLine = this.getFoldLine(row);
- if (!foldLine)
- return null;
-
- var folds = foldLine.folds;
- for (var i = 0; i < folds.length; i++) {
- var fold = folds[i];
- if (fold.range.contains(row, column)) {
- if (side == 1 && fold.range.isEnd(row, column)) {
- continue;
- } else if (side == -1 && fold.range.isStart(row, column)) {
- continue;
- }
- return fold;
- }
- }
- };
-
- /**
- * Returns all folds in the given range. Note, that this will return folds
- *
- */
- this.getFoldsInRange = function(range) {
- range = range.clone();
- var start = range.start;
- var end = range.end;
- var foldLines = this.$foldData;
- var foundFolds = [];
-
- start.column += 1;
- end.column -= 1;
-
- for (var i = 0; i < foldLines.length; i++) {
- var cmp = foldLines[i].range.compareRange(range);
- if (cmp == 2) {
- // Range is before foldLine. No intersection. This means,
- // there might be other foldLines that intersect.
- continue;
- }
- else if (cmp == -2) {
- // Range is after foldLine. There can't be any other foldLines then,
- // so let's give up.
- break;
- }
-
- var folds = foldLines[i].folds;
- for (var j = 0; j < folds.length; j++) {
- var fold = folds[j];
- cmp = fold.range.compareRange(range);
- if (cmp == -2) {
- break;
- } else if (cmp == 2) {
- continue;
- } else
- // WTF-state: Can happen due to -1/+1 to start/end column.
- if (cmp == 42) {
- break;
- }
- foundFolds.push(fold);
- }
- }
- return foundFolds;
- };
-
- /**
- * Returns all folds in the document
- */
- this.getAllFolds = function() {
- var folds = [];
- var foldLines = this.$foldData;
-
- function addFold(fold) {
- folds.push(fold);
- if (!fold.subFolds)
- return;
-
- for (var i = 0; i < fold.subFolds.length; i++)
- addFold(fold.subFolds[i]);
- }
-
- for (var i = 0; i < foldLines.length; i++)
- for (var j = 0; j < foldLines[i].folds.length; j++)
- addFold(foldLines[i].folds[j]);
-
- return folds;
- };
-
- /**
- * Returns the string between folds at the given position.
- * E.g.
- * foo<fold>b|ar<fold>wolrd -> "bar"
- * foo<fold>bar<fold>wol|rd -> "world"
- * foo<fold>bar<fo|ld>wolrd -> <null>
- *
- * where | means the position of row/column
- *
- * The trim option determs if the return string should be trimed according
- * to the "side" passed with the trim value:
- *
- * E.g.
- * foo<fold>b|ar<fold>wolrd -trim=-1> "b"
- * foo<fold>bar<fold>wol|rd -trim=+1> "rld"
- * fo|o<fold>bar<fold>wolrd -trim=00> "foo"
- */
- this.getFoldStringAt = function(row, column, trim, foldLine) {
- foldLine = foldLine || this.getFoldLine(row);
- if (!foldLine)
- return null;
-
- var lastFold = {
- end: { column: 0 }
- };
- // TODO: Refactor to use getNextFoldTo function.
- var str, fold;
- for (var i = 0; i < foldLine.folds.length; i++) {
- fold = foldLine.folds[i];
- var cmp = fold.range.compareEnd(row, column);
- if (cmp == -1) {
- str = this
- .getLine(fold.start.row)
- .substring(lastFold.end.column, fold.start.column);
- break;
- }
- else if (cmp === 0) {
- return null;
- }
- lastFold = fold;
- }
- if (!str)
- str = this.getLine(fold.start.row).substring(lastFold.end.column);
-
- if (trim == -1)
- return str.substring(0, column - lastFold.end.column);
- else if (trim == 1)
- return str.substring(column - lastFold.end.column);
- else
- return str;
- };
-
- this.getFoldLine = function(docRow, startFoldLine) {
- var foldData = this.$foldData;
- var i = 0;
- if (startFoldLine)
- i = foldData.indexOf(startFoldLine);
- if (i == -1)
- i = 0;
- for (i; i < foldData.length; i++) {
- var foldLine = foldData[i];
- if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {
- return foldLine;
- } else if (foldLine.end.row > docRow) {
- return null;
- }
- }
- return null;
- };
-
- // returns the fold which starts after or contains docRow
- this.getNextFoldLine = function(docRow, startFoldLine) {
- var foldData = this.$foldData;
- var i = 0;
- if (startFoldLine)
- i = foldData.indexOf(startFoldLine);
- if (i == -1)
- i = 0;
- for (i; i < foldData.length; i++) {
- var foldLine = foldData[i];
- if (foldLine.end.row >= docRow) {
- return foldLine;
- }
- }
- return null;
- };
-
- this.getFoldedRowCount = function(first, last) {
- var foldData = this.$foldData, rowCount = last-first+1;
- for (var i = 0; i < foldData.length; i++) {
- var foldLine = foldData[i],
- end = foldLine.end.row,
- start = foldLine.start.row;
- if (end >= last) {
- if(start < last) {
- if(start >= first)
- rowCount -= last-start;
- else
- rowCount = 0;//in one fold
- }
- break;
- } else if(end >= first){
- if (start >= first) //fold inside range
- rowCount -= end-start;
- else
- rowCount -= end-first+1;
- }
- }
- return rowCount;
- };
-
- this.$addFoldLine = function(foldLine) {
- this.$foldData.push(foldLine);
- this.$foldData.sort(function(a, b) {
- return a.start.row - b.start.row;
- });
- return foldLine;
- };
-
- /**
- * Adds a new fold.
- *
- * @returns
- * The new created Fold object or an existing fold object in case the
- * passed in range fits an existing fold exactly.
- */
- this.addFold = function(placeholder, range) {
- var foldData = this.$foldData;
- var added = false;
- var fold;
-
- if (placeholder instanceof Fold)
- fold = placeholder;
- else
- fold = new Fold(range, placeholder);
-
- this.$clipRangeToDocument(fold.range);
-
- var startRow = fold.start.row;
- var startColumn = fold.start.column;
- var endRow = fold.end.row;
- var endColumn = fold.end.column;
-
- // --- Some checking ---
- if (fold.placeholder.length < 2)
- throw "Placeholder has to be at least 2 characters";
-
- if (startRow == endRow && endColumn - startColumn < 2)
- throw "The range has to be at least 2 characters width";
-
- var startFold = this.getFoldAt(startRow, startColumn, 1);
- var endFold = this.getFoldAt(endRow, endColumn, -1);
- if (startFold && endFold == startFold)
- return startFold.addSubFold(fold);
-
- if (
- (startFold && !startFold.range.isStart(startRow, startColumn))
- || (endFold && !endFold.range.isEnd(endRow, endColumn))
- ) {
- throw "A fold can't intersect already existing fold" + fold.range + startFold.range;
- }
-
- // Check if there are folds in the range we create the new fold for.
- var folds = this.getFoldsInRange(fold.range);
- if (folds.length > 0) {
- // Remove the folds from fold data.
- this.removeFolds(folds);
- // Add the removed folds as subfolds on the new fold.
- fold.subFolds = folds;
- }
-
- for (var i = 0; i < foldData.length; i++) {
- var foldLine = foldData[i];
- if (endRow == foldLine.start.row) {
- foldLine.addFold(fold);
- added = true;
- break;
- }
- else if (startRow == foldLine.end.row) {
- foldLine.addFold(fold);
- added = true;
- if (!fold.sameRow) {
- // Check if we might have to merge two FoldLines.
- var foldLineNext = foldData[i + 1];
- if (foldLineNext && foldLineNext.start.row == endRow) {
- // We need to merge!
- foldLine.merge(foldLineNext);
- break;
- }
- }
- break;
- }
- else if (endRow <= foldLine.start.row) {
- break;
- }
- }
-
- if (!added)
- foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));
-
- if (this.$useWrapMode)
- this.$updateWrapData(foldLine.start.row, foldLine.start.row);
-
- // Notify that fold data has changed.
- this.$modified = true;
- this._emit("changeFold", { data: fold });
-
- return fold;
- };
-
- this.addFolds = function(folds) {
- folds.forEach(function(fold) {
- this.addFold(fold);
- }, this);
- };
-
- this.removeFold = function(fold) {
- var foldLine = fold.foldLine;
- var startRow = foldLine.start.row;
- var endRow = foldLine.end.row;
-
- var foldLines = this.$foldData;
- var folds = foldLine.folds;
- // Simple case where there is only one fold in the FoldLine such that
- // the entire fold line can get removed directly.
- if (folds.length == 1) {
- foldLines.splice(foldLines.indexOf(foldLine), 1);
- } else
- // If the fold is the last fold of the foldLine, just remove it.
- if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {
- folds.pop();
- foldLine.end.row = folds[folds.length - 1].end.row;
- foldLine.end.column = folds[folds.length - 1].end.column;
- } else
- // If the fold is the first fold of the foldLine, just remove it.
- if (foldLine.range.isStart(fold.start.row, fold.start.column)) {
- folds.shift();
- foldLine.start.row = folds[0].start.row;
- foldLine.start.column = folds[0].start.column;
- } else
- // We know there are more then 2 folds and the fold is not at the edge.
- // This means, the fold is somewhere in between.
- //
- // If the fold is in one row, we just can remove it.
- if (fold.sameRow) {
- folds.splice(folds.indexOf(fold), 1);
- } else
- // The fold goes over more then one row. This means remvoing this fold
- // will cause the fold line to get splitted up. newFoldLine is the second part
- {
- var newFoldLine = foldLine.split(fold.start.row, fold.start.column);
- folds = newFoldLine.folds;
- folds.shift();
- newFoldLine.start.row = folds[0].start.row;
- newFoldLine.start.column = folds[0].start.column;
- }
-
- if (this.$useWrapMode) {
- this.$updateWrapData(startRow, endRow);
- }
-
- // Notify that fold data has changed.
- this.$modified = true;
- this._emit("changeFold", { data: fold });
- };
-
- this.removeFolds = function(folds) {
- // We need to clone the folds array passed in as it might be the folds
- // array of a fold line and as we call this.removeFold(fold), folds
- // are removed from folds and changes the current index.
- var cloneFolds = [];
- for (var i = 0; i < folds.length; i++) {
- cloneFolds.push(folds[i]);
- }
-
- cloneFolds.forEach(function(fold) {
- this.removeFold(fold);
- }, this);
- this.$modified = true;
- };
-
- this.expandFold = function(fold) {
- this.removeFold(fold);
- fold.subFolds.forEach(function(fold) {
- this.addFold(fold);
- }, this);
- fold.subFolds = [];
- };
-
- this.expandFolds = function(folds) {
- folds.forEach(function(fold) {
- this.expandFold(fold);
- }, this);
- };
-
- this.unfold = function(location, expandInner) {
- var range, folds;
- if (location == null)
- range = new Range(0, 0, this.getLength(), 0);
- else if (typeof location == "number")
- range = new Range(location, 0, location, this.getLine(location).length);
- else if ("row" in location)
- range = Range.fromPoints(location, location);
- else
- range = location;
-
- folds = this.getFoldsInRange(range);
- if (expandInner) {
- this.removeFolds(folds);
- } else {
- // TODO: might need to remove and add folds in one go instead of using
- // expandFolds several times.
- while (folds.length) {
- this.expandFolds(folds);
- folds = this.getFoldsInRange(range);
- }
- }
- };
-
- /**
- * Checks if a given documentRow is folded. This is true if there are some
- * folded parts such that some parts of the line is still visible.
- **/
- this.isRowFolded = function(docRow, startFoldRow) {
- return !!this.getFoldLine(docRow, startFoldRow);
- };
-
- this.getRowFoldEnd = function(docRow, startFoldRow) {
- var foldLine = this.getFoldLine(docRow, startFoldRow);
- return (foldLine
- ? foldLine.end.row
- : docRow);
- };
-
- this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {
- if (startRow == null) {
- startRow = foldLine.start.row;
- startColumn = 0;
- }
-
- if (endRow == null) {
- endRow = foldLine.end.row;
- endColumn = this.getLine(endRow).length;
- }
-
- // Build the textline using the FoldLine walker.
- var doc = this.doc;
- var textLine = "";
-
- foldLine.walk(function(placeholder, row, column, lastColumn) {
- if (row < startRow) {
- return;
- } else if (row == startRow) {
- if (column < startColumn) {
- return;
- }
- lastColumn = Math.max(startColumn, lastColumn);
- }
- if (placeholder) {
- textLine += placeholder;
- } else {
- textLine += doc.getLine(row).substring(lastColumn, column);
- }
- }.bind(this), endRow, endColumn);
- return textLine;
- };
-
- this.getDisplayLine = function(row, endColumn, startRow, startColumn) {
- var foldLine = this.getFoldLine(row);
-
- if (!foldLine) {
- var line;
- line = this.doc.getLine(row);
- return line.substring(startColumn || 0, endColumn || line.length);
- } else {
- return this.getFoldDisplayLine(
- foldLine, row, endColumn, startRow, startColumn);
- }
- };
-
- this.$cloneFoldData = function() {
- var fd = [];
- fd = this.$foldData.map(function(foldLine) {
- var folds = foldLine.folds.map(function(fold) {
- return fold.clone();
- });
- return new FoldLine(fd, folds);
- });
-
- return fd;
- };
-
- this.toggleFold = function(tryToUnfold) {
- var selection = this.selection;
- var range = selection.getRange();
- var fold;
- var bracketPos;
-
- if (range.isEmpty()) {
- var cursor = range.start;
- fold = this.getFoldAt(cursor.row, cursor.column);
-
- if (fold) {
- this.expandFold(fold);
- return;
- }
- else if (bracketPos = this.findMatchingBracket(cursor)) {
- if (range.comparePoint(bracketPos) == 1) {
- range.end = bracketPos;
- }
- else {
- range.start = bracketPos;
- range.start.column++;
- range.end.column--;
- }
- }
- else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {
- if (range.comparePoint(bracketPos) == 1)
- range.end = bracketPos;
- else
- range.start = bracketPos;
-
- range.start.column++;
- }
- else {
- range = this.getCommentFoldRange(cursor.row, cursor.column) || range;
- }
- } else {
- var folds = this.getFoldsInRange(range);
- if (tryToUnfold && folds.length) {
- this.expandFolds(folds);
- return;
- }
- else if (folds.length == 1 ) {
- fold = folds[0];
- }
- }
-
- if (!fold)
- fold = this.getFoldAt(range.start.row, range.start.column);
-
- if (fold && fold.range.toString() == range.toString()) {
- this.expandFold(fold);
- return;
- }
-
- var placeholder = "...";
- if (!range.isMultiLine()) {
- placeholder = this.getTextRange(range);
- if(placeholder.length < 4)
- return;
- placeholder = placeholder.trim().substring(0, 2) + "..";
- }
-
- this.addFold(placeholder, range);
- };
-
- this.getCommentFoldRange = function(row, column) {
- var iterator = new TokenIterator(this, row, column);
- var token = iterator.getCurrentToken();
- if (token && /^comment|string/.test(token.type)) {
- var range = new Range();
- var re = new RegExp(token.type.replace(/\..*/, "\\."));
- do {
- token = iterator.stepBackward();
- } while(token && re.test(token.type));
-
- iterator.stepForward();
- range.start.row = iterator.getCurrentTokenRow();
- range.start.column = iterator.getCurrentTokenColumn() + 2;
-
- iterator = new TokenIterator(this, row, column);
-
- do {
- token = iterator.stepForward();
- } while(token && re.test(token.type));
-
- token = iterator.stepBackward();
-
- range.end.row = iterator.getCurrentTokenRow();
- range.end.column = iterator.getCurrentTokenColumn() + token.value.length;
- return range;
- }
- };
-
- this.foldAll = function(startRow, endRow) {
- var foldWidgets = this.foldWidgets;
- endRow = endRow || this.getLength();
- for (var row = startRow || 0; row < endRow; row++) {
- if (foldWidgets[row] == null)
- foldWidgets[row] = this.getFoldWidget(row);
- if (foldWidgets[row] != "start")
- continue;
-
- var range = this.getFoldWidgetRange(row);
- // sometimes range can be incompatible with existing fold
- // wouldn't it be better for addFold to return null istead of throwing?
- if (range && range.end.row < endRow) try {
- this.addFold("...", range);
- } catch(e) {}
- }
- };
-
- this.$foldStyles = {
- "manual": 1,
- "markbegin": 1,
- "markbeginend": 1
- };
- this.$foldStyle = "markbegin";
- this.setFoldStyle = function(style) {
- if (!this.$foldStyles[style])
- throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]");
-
- if (this.$foldStyle == style)
- return;
-
- this.$foldStyle = style;
-
- if (style == "manual")
- this.unfold();
-
- // reset folding
- var mode = this.$foldMode;
- this.$setFolding(null);
- this.$setFolding(mode);
- };
-
- // structured folding
- this.$setFolding = function(foldMode) {
- if (this.$foldMode == foldMode)
- return;
-
- this.$foldMode = foldMode;
-
- this.removeListener('change', this.$updateFoldWidgets);
- this._emit("changeAnnotation");
-
- if (!foldMode || this.$foldStyle == "manual") {
- this.foldWidgets = null;
- return;
- }
-
- this.foldWidgets = [];
- this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);
- this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);
-
- this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);
- this.on('change', this.$updateFoldWidgets);
-
- };
-
- this.onFoldWidgetClick = function(row, e) {
- var type = this.getFoldWidget(row);
- var line = this.getLine(row);
- var onlySubfolds = e.shiftKey;
- var addSubfolds = onlySubfolds || e.ctrlKey || e.altKey || e.metaKey;
- var fold;
-
- if (type == "end")
- fold = this.getFoldAt(row, 0, -1);
- else
- fold = this.getFoldAt(row, line.length, 1);
-
- if (fold) {
- if (addSubfolds)
- this.removeFold(fold);
- else
- this.expandFold(fold);
- return;
- }
-
- var range = this.getFoldWidgetRange(row);
- if (range) {
- // sometimes singleline folds can be missed by the code above
- if (!range.isMultiLine()) {
- fold = this.getFoldAt(range.start.row, range.start.column, 1);
- if (fold && range.isEequal(fold.range)) {
- this.removeFold(fold);
- return;
- }
- }
-
- if (!onlySubfolds)
- this.addFold("...", range);
-
- if (addSubfolds)
- this.foldAll(range.start.row + 1, range.end.row);
- } else {
- if (addSubfolds)
- this.foldAll(row + 1, this.getLength());
- e.target.className += " invalid"
- }
- };
-
- this.updateFoldWidgets = function(e) {
- var delta = e.data;
- var range = delta.range;
- var firstRow = range.start.row;
- var len = range.end.row - firstRow;
-
- if (len === 0) {
- this.foldWidgets[firstRow] = null;
- } else if (delta.action == "removeText" || delta.action == "removeLines") {
- this.foldWidgets.splice(firstRow, len + 1, null);
- } else {
- var args = Array(len + 1);
- args.unshift(firstRow, 1);
- this.foldWidgets.splice.apply(this.foldWidgets, args);
- }
- };
-
-}
-
-exports.Folding = Folding;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/edit_session/fold_line', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-/**
- * If an array is passed in, the folds are expected to be sorted already.
- */
-function FoldLine(foldData, folds) {
- this.foldData = foldData;
- if (Array.isArray(folds)) {
- this.folds = folds;
- } else {
- folds = this.folds = [ folds ];
- }
-
- var last = folds[folds.length - 1]
- this.range = new Range(folds[0].start.row, folds[0].start.column,
- last.end.row, last.end.column);
- this.start = this.range.start;
- this.end = this.range.end;
-
- this.folds.forEach(function(fold) {
- fold.setFoldLine(this);
- }, this);
-}
-
-(function() {
- /**
- * Note: This doesn't update wrapData!
- */
- this.shiftRow = function(shift) {
- this.start.row += shift;
- this.end.row += shift;
- this.folds.forEach(function(fold) {
- fold.start.row += shift;
- fold.end.row += shift;
- });
- }
-
- this.addFold = function(fold) {
- if (fold.sameRow) {
- if (fold.start.row < this.startRow || fold.endRow > this.endRow) {
- throw "Can't add a fold to this FoldLine as it has no connection";
- }
- this.folds.push(fold);
- this.folds.sort(function(a, b) {
- return -a.range.compareEnd(b.start.row, b.start.column);
- });
- if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {
- this.end.row = fold.end.row;
- this.end.column = fold.end.column;
- } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {
- this.start.row = fold.start.row;
- this.start.column = fold.start.column;
- }
- } else if (fold.start.row == this.end.row) {
- this.folds.push(fold);
- this.end.row = fold.end.row;
- this.end.column = fold.end.column;
- } else if (fold.end.row == this.start.row) {
- this.folds.unshift(fold);
- this.start.row = fold.start.row;
- this.start.column = fold.start.column;
- } else {
- throw "Trying to add fold to FoldRow that doesn't have a matching row";
- }
- fold.foldLine = this;
- }
-
- this.containsRow = function(row) {
- return row >= this.start.row && row <= this.end.row;
- }
-
- this.walk = function(callback, endRow, endColumn) {
- var lastEnd = 0,
- folds = this.folds,
- fold,
- comp, stop, isNewRow = true;
-
- if (endRow == null) {
- endRow = this.end.row;
- endColumn = this.end.column;
- }
-
- for (var i = 0; i < folds.length; i++) {
- fold = folds[i];
-
- comp = fold.range.compareStart(endRow, endColumn);
- // This fold is after the endRow/Column.
- if (comp == -1) {
- callback(null, endRow, endColumn, lastEnd, isNewRow);
- return;
- }
-
- stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);
- stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);
-
- // If the user requested to stop the walk or endRow/endColumn is
- // inside of this fold (comp == 0), then end here.
- if (stop || comp == 0) {
- return;
- }
-
- // Note the new lastEnd might not be on the same line. However,
- // it's the callback's job to recognize this.
- isNewRow = !fold.sameRow;
- lastEnd = fold.end.column;
- }
- callback(null, endRow, endColumn, lastEnd, isNewRow);
- }
-
- this.getNextFoldTo = function(row, column) {
- var fold, cmp;
- for (var i = 0; i < this.folds.length; i++) {
- fold = this.folds[i];
- cmp = fold.range.compareEnd(row, column);
- if (cmp == -1) {
- return {
- fold: fold,
- kind: "after"
- };
- } else if (cmp == 0) {
- return {
- fold: fold,
- kind: "inside"
- }
- }
- }
- return null;
- }
-
- this.addRemoveChars = function(row, column, len) {
- var ret = this.getNextFoldTo(row, column),
- fold, folds;
- if (ret) {
- fold = ret.fold;
- if (ret.kind == "inside"
- && fold.start.column != column
- && fold.start.row != row)
- {
- throw "Moving characters inside of a fold should never be reached";
- } else if (fold.start.row == row) {
- folds = this.folds;
- var i = folds.indexOf(fold);
- if (i == 0) {
- this.start.column += len;
- }
- for (i; i < folds.length; i++) {
- fold = folds[i];
- fold.start.column += len;
- if (!fold.sameRow) {
- return;
- }
- fold.end.column += len;
- }
- this.end.column += len;
- }
- }
- }
-
- this.split = function(row, column) {
- var fold = this.getNextFoldTo(row, column).fold,
- folds = this.folds;
- var foldData = this.foldData;
-
- if (!fold) {
- return null;
- }
- var i = folds.indexOf(fold);
- var foldBefore = folds[i - 1];
- this.end.row = foldBefore.end.row;
- this.end.column = foldBefore.end.column;
-
- // Remove the folds after row/column and create a new FoldLine
- // containing these removed folds.
- folds = folds.splice(i, folds.length - i);
-
- var newFoldLine = new FoldLine(foldData, folds);
- foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);
- return newFoldLine;
- }
-
- this.merge = function(foldLineNext) {
- var folds = foldLineNext.folds;
- for (var i = 0; i < folds.length; i++) {
- this.addFold(folds[i]);
- }
- // Remove the foldLineNext - no longer needed, as
- // it's merged now with foldLineNext.
- var foldData = this.foldData;
- foldData.splice(foldData.indexOf(foldLineNext), 1);
- }
-
- this.toString = function() {
- var ret = [this.range.toString() + ": [" ];
-
- this.folds.forEach(function(fold) {
- ret.push(" " + fold.toString());
- });
- ret.push("]")
- return ret.join("\n");
- }
-
- this.idxToPosition = function(idx) {
- var lastFoldEndColumn = 0;
- var fold;
-
- for (var i = 0; i < this.folds.length; i++) {
- var fold = this.folds[i];
-
- idx -= fold.start.column - lastFoldEndColumn;
- if (idx < 0) {
- return {
- row: fold.start.row,
- column: fold.start.column + idx
- };
- }
-
- idx -= fold.placeholder.length;
- if (idx < 0) {
- return fold.start;
- }
-
- lastFoldEndColumn = fold.end.column;
- }
-
- return {
- row: this.end.row,
- column: this.end.column + idx
- };
- }
-}).call(FoldLine.prototype);
-
-exports.FoldLine = FoldLine;
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/edit_session/fold', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-/**
- * Simple fold-data struct.
- **/
-var Fold = exports.Fold = function(range, placeholder) {
- this.foldLine = null;
- this.placeholder = placeholder;
- this.range = range;
- this.start = range.start;
- this.end = range.end;
-
- this.sameRow = range.start.row == range.end.row;
- this.subFolds = [];
-};
-
-(function() {
-
- this.toString = function() {
- return '"' + this.placeholder + '" ' + this.range.toString();
- };
-
- this.setFoldLine = function(foldLine) {
- this.foldLine = foldLine;
- this.subFolds.forEach(function(fold) {
- fold.setFoldLine(foldLine);
- });
- };
-
- this.clone = function() {
- var range = this.range.clone();
- var fold = new Fold(range, this.placeholder);
- this.subFolds.forEach(function(subFold) {
- fold.subFolds.push(subFold.clone());
- });
- return fold;
- };
-
- this.addSubFold = function(fold) {
- if (this.range.isEequal(fold))
- return this;
-
- if (!this.range.containsRange(fold))
- throw "A fold can't intersect already existing fold" + fold.range + this.range;
-
- var row = fold.range.start.row, column = fold.range.start.column;
- for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {
- cmp = this.subFolds[i].range.compare(row, column);
- if (cmp != 1)
- break;
- }
- var afterStart = this.subFolds[i];
-
- if (cmp == 0)
- return afterStart.addSubFold(fold)
-
- // cmp == -1
- var row = fold.range.end.row, column = fold.range.end.column;
- for (var j = i, cmp = -1; j < this.subFolds.length; j++) {
- cmp = this.subFolds[j].range.compare(row, column);
- if (cmp != 1)
- break;
- }
- var afterEnd = this.subFolds[j];
-
- if (cmp == 0)
- throw "A fold can't intersect already existing fold" + fold.range + this.range;
-
- var consumedFolds = this.subFolds.splice(i, j - i, fold)
- fold.setFoldLine(this.foldLine);
-
- return fold;
- }
-
-}).call(Fold.prototype);
-
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/token_iterator', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var TokenIterator = function(session, initialRow, initialColumn) {
- this.$session = session;
- this.$row = initialRow;
- this.$rowTokens = session.getTokens(initialRow, initialRow)[0].tokens;
-
- var token = session.getTokenAt(initialRow, initialColumn);
- this.$tokenIndex = token ? token.index : -1;
-};
-
-(function() {
-
- this.stepBackward = function() {
- this.$tokenIndex -= 1;
-
- while (this.$tokenIndex < 0) {
- this.$row -= 1;
- if (this.$row < 0) {
- this.$row = 0;
- return null;
- }
-
- this.$rowTokens = this.$session.getTokens(this.$row, this.$row)[0].tokens;
- this.$tokenIndex = this.$rowTokens.length - 1;
- }
-
- return this.$rowTokens[this.$tokenIndex];
- };
-
- this.stepForward = function() {
- var rowCount = this.$session.getLength();
- this.$tokenIndex += 1;
-
- while (this.$tokenIndex >= this.$rowTokens.length) {
- this.$row += 1;
- if (this.$row >= rowCount) {
- this.$row = rowCount - 1;
- return null;
- }
-
- this.$rowTokens = this.$session.getTokens(this.$row, this.$row)[0].tokens;
- this.$tokenIndex = 0;
- }
-
- return this.$rowTokens[this.$tokenIndex];
- };
-
- this.getCurrentToken = function () {
- return this.$rowTokens[this.$tokenIndex];
- };
-
- this.getCurrentTokenRow = function () {
- return this.$row;
- };
-
- this.getCurrentTokenColumn = function() {
- var rowTokens = this.$rowTokens;
- var tokenIndex = this.$tokenIndex;
-
- // If a column was cached by EditSession.getTokenAt, then use it
- var column = rowTokens[tokenIndex].start;
- if (column !== undefined)
- return column;
-
- column = 0;
- while (tokenIndex > 0) {
- tokenIndex -= 1;
- column += rowTokens[tokenIndex].value.length;
- }
-
- return column;
- };
-
-}).call(TokenIterator.prototype);
-
-exports.TokenIterator = TokenIterator;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/edit_session/bracket_match', ['require', 'exports', 'module' , 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var TokenIterator = require("../token_iterator").TokenIterator;
-
-function BracketMatch() {
-
- this.findMatchingBracket = function(position) {
- if (position.column == 0) return null;
-
- var charBeforeCursor = this.getLine(position.row).charAt(position.column-1);
- if (charBeforeCursor == "") return null;
-
- var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/);
- if (!match) {
- return null;
- }
-
- if (match[1]) {
- return this.$findClosingBracket(match[1], position);
- } else {
- return this.$findOpeningBracket(match[2], position);
- }
- };
-
- this.$brackets = {
- ")": "(",
- "(": ")",
- "]": "[",
- "[": "]",
- "{": "}",
- "}": "{"
- };
-
- this.$findOpeningBracket = function(bracket, position) {
- var openBracket = this.$brackets[bracket];
- var depth = 1;
-
- var iterator = new TokenIterator(this, position.row, position.column);
- var token = iterator.getCurrentToken();
- if (!token) return null;
-
- // token.type contains a period-delimited list of token identifiers
- // (e.g.: "constant.numeric" or "paren.lparen"). Create a pattern that
- // matches any token containing the same identifiers or a subset. In
- // addition, if token.type includes "rparen", then also match "lparen".
- // So if type.token is "paren.rparen", then typeRe will match "lparen.paren".
- var typeRe = new RegExp("(\\.?" +
- token.type.replace(".", "|").replace("rparen", "lparen|rparen") + ")+");
-
- // Start searching in token, just before the character at position.column
- var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;
- var value = token.value;
-
- while (true) {
-
- while (valueIndex >= 0) {
- var chr = value.charAt(valueIndex);
- if (chr == openBracket) {
- depth -= 1;
- if (depth == 0) {
- return {row: iterator.getCurrentTokenRow(),
- column: valueIndex + iterator.getCurrentTokenColumn()};
- }
- }
- else if (chr == bracket) {
- depth += 1;
- }
- valueIndex -= 1;
- }
-
- // Scan backward through the document, looking for the next token
- // whose type matches typeRe
- do {
- token = iterator.stepBackward();
- } while (token && !typeRe.test(token.type));
-
- if (token == null)
- break;
-
- value = token.value;
- valueIndex = value.length - 1;
- }
-
- return null;
- };
-
- this.$findClosingBracket = function(bracket, position) {
- var closingBracket = this.$brackets[bracket];
- var depth = 1;
-
- var iterator = new TokenIterator(this, position.row, position.column);
- var token = iterator.getCurrentToken();
- if (!token) return null;
-
- // token.type contains a period-delimited list of token identifiers
- // (e.g.: "constant.numeric" or "paren.lparen"). Create a pattern that
- // matches any token containing the same identifiers or a subset. In
- // addition, if token.type includes "lparen", then also match "rparen".
- // So if type.token is "lparen.paren", then typeRe will match "paren.rparen".
- var typeRe = new RegExp("(\\.?" +
- token.type.replace(".", "|").replace("lparen", "lparen|rparen") + ")+");
-
- // Start searching in token, after the character at position.column
- var valueIndex = position.column - iterator.getCurrentTokenColumn();
-
- while (true) {
-
- var value = token.value;
- var valueLength = value.length;
- while (valueIndex < valueLength) {
- var chr = value.charAt(valueIndex);
- if (chr == closingBracket) {
- depth -= 1;
- if (depth == 0) {
- return {row: iterator.getCurrentTokenRow(),
- column: valueIndex + iterator.getCurrentTokenColumn()};
- }
- }
- else if (chr == bracket) {
- depth += 1;
- }
- valueIndex += 1;
- }
-
- // Scan forward through the document, looking for the next token
- // whose type matches typeRe
- do {
- token = iterator.stepForward();
- } while (token && !typeRe.test(token.type));
-
- if (token == null)
- break;
-
- valueIndex = 0;
- }
-
- return null;
- };
-}
-exports.BracketMatch = BracketMatch;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/search', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var lang = require("./lib/lang");
-var oop = require("./lib/oop");
-var Range = require("./range").Range;
-
-var Search = function() {
- this.$options = {
- needle: "",
- backwards: false,
- wrap: false,
- caseSensitive: false,
- wholeWord: false,
- scope: Search.ALL,
- regExp: false
- };
-};
-
-Search.ALL = 1;
-Search.SELECTION = 2;
-
-(function() {
-
- this.set = function(options) {
- oop.mixin(this.$options, options);
- return this;
- };
-
- this.getOptions = function() {
- return lang.copyObject(this.$options);
- };
-
- this.find = function(session) {
- if (!this.$options.needle)
- return null;
-
- if (this.$options.backwards) {
- var iterator = this.$backwardMatchIterator(session);
- } else {
- iterator = this.$forwardMatchIterator(session);
- }
-
- var firstRange = null;
- iterator.forEach(function(range) {
- firstRange = range;
- return true;
- });
-
- return firstRange;
- };
-
- this.findAll = function(session) {
- var options = this.$options;
- if (!options.needle)
- return [];
-
- if (options.backwards) {
- var iterator = this.$backwardMatchIterator(session);
- } else {
- iterator = this.$forwardMatchIterator(session);
- }
-
- var ignoreCursor = !options.start && options.wrap && options.scope == Search.ALL;
- if (ignoreCursor)
- options.start = {row: 0, column: 0};
-
- var ranges = [];
- iterator.forEach(function(range) {
- ranges.push(range);
- });
-
- if (ignoreCursor)
- options.start = null;
-
- return ranges;
- };
-
- this.replace = function(input, replacement) {
- var re = this.$assembleRegExp();
- var match = re.exec(input);
- if (match && match[0].length == input.length) {
- if (this.$options.regExp) {
- return input.replace(re, replacement);
- } else {
- return replacement;
- }
- } else {
- return null;
- }
- };
-
- this.$forwardMatchIterator = function(session) {
- var re = this.$assembleRegExp();
- var self = this;
-
- return {
- forEach: function(callback) {
- self.$forwardLineIterator(session).forEach(function(line, startIndex, row) {
- if (startIndex) {
- line = line.substring(startIndex);
- }
-
- var matches = [];
-
- line.replace(re, function(str) {
- var offset = arguments[arguments.length-2];
- matches.push({
- str: str,
- offset: startIndex + offset
- });
- return str;
- });
-
- for (var i=0; i<matches.length; i++) {
- var match = matches[i];
- var range = self.$rangeFromMatch(row, match.offset, match.str.length);
- if (callback(range))
- return true;
- }
-
- });
- }
- };
- };
-
- this.$backwardMatchIterator = function(session) {
- var re = this.$assembleRegExp();
- var self = this;
-
- return {
- forEach: function(callback) {
- self.$backwardLineIterator(session).forEach(function(line, startIndex, row) {
- if (startIndex) {
- line = line.substring(startIndex);
- }
-
- var matches = [];
-
- line.replace(re, function(str, offset) {
- matches.push({
- str: str,
- offset: startIndex + offset
- });
- return str;
- });
-
- for (var i=matches.length-1; i>= 0; i--) {
- var match = matches[i];
- var range = self.$rangeFromMatch(row, match.offset, match.str.length);
- if (callback(range))
- return true;
- }
- });
- }
- };
- };
-
- this.$rangeFromMatch = function(row, column, length) {
- return new Range(row, column, row, column+length);
- };
-
- this.$assembleRegExp = function() {
- if (this.$options.regExp) {
- var needle = this.$options.needle;
- } else {
- needle = lang.escapeRegExp(this.$options.needle);
- }
-
- if (this.$options.wholeWord) {
- needle = "\\b" + needle + "\\b";
- }
-
- var modifier = "g";
- if (!this.$options.caseSensitive) {
- modifier += "i";
- }
-
- var re = new RegExp(needle, modifier);
- return re;
- };
-
- this.$forwardLineIterator = function(session) {
- var searchSelection = this.$options.scope == Search.SELECTION;
-
- var range = this.$options.range || session.getSelection().getRange();
- var start = this.$options.start || range[searchSelection ? "start" : "end"];
-
- var firstRow = searchSelection ? range.start.row : 0;
- var firstColumn = searchSelection ? range.start.column : 0;
- var lastRow = searchSelection ? range.end.row : session.getLength() - 1;
-
- var wrap = this.$options.wrap;
- var inWrap = false;
-
- function getLine(row) {
- var line = session.getLine(row);
- if (searchSelection && row == range.end.row) {
- line = line.substring(0, range.end.column);
- }
- if (inWrap && row == start.row) {
- line = line.substring(0, start.column);
- }
- return line;
- }
-
- return {
- forEach: function(callback) {
- var row = start.row;
-
- var line = getLine(row);
- var startIndex = start.column;
-
- var stop = false;
- inWrap = false;
-
- while (!callback(line, startIndex, row)) {
-
- if (stop) {
- return;
- }
-
- row++;
- startIndex = 0;
-
- if (row > lastRow) {
- if (wrap) {
- row = firstRow;
- startIndex = firstColumn;
- inWrap = true;
- } else {
- return;
- }
- }
-
- if (row == start.row)
- stop = true;
-
- line = getLine(row);
- }
- }
- };
- };
-
- this.$backwardLineIterator = function(session) {
- var searchSelection = this.$options.scope == Search.SELECTION;
-
- var range = this.$options.range || session.getSelection().getRange();
- var start = this.$options.start || range[searchSelection ? "end" : "start"];
-
- var firstRow = searchSelection ? range.start.row : 0;
- var firstColumn = searchSelection ? range.start.column : 0;
- var lastRow = searchSelection ? range.end.row : session.getLength() - 1;
-
- var wrap = this.$options.wrap;
-
- return {
- forEach : function(callback) {
- var row = start.row;
-
- var line = session.getLine(row).substring(0, start.column);
- var startIndex = 0;
- var stop = false;
- var inWrap = false;
-
- while (!callback(line, startIndex, row)) {
-
- if (stop)
- return;
-
- row--;
- startIndex = 0;
-
- if (row < firstRow) {
- if (wrap) {
- row = lastRow;
- inWrap = true;
- } else {
- return;
- }
- }
-
- if (row == start.row)
- stop = true;
-
- line = session.getLine(row);
- if (searchSelection) {
- if (row == firstRow)
- startIndex = firstColumn;
- else if (row == lastRow)
- line = line.substring(0, range.end.column);
- }
-
- if (inWrap && row == start.row)
- startIndex = start.column;
- }
- }
- };
- };
-
-}).call(Search.prototype);
-
-exports.Search = Search;
-});
-define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
-"use strict";
-
-var keyUtil = require("../lib/keys");
-
-var CommandManager = function(platform, commands) {
- if (typeof platform !== "string")
- throw new TypeError("'platform' argument must be either 'mac' or 'win'");
-
- this.platform = platform;
- this.commands = {};
- this.commmandKeyBinding = {};
-
- if (commands)
- commands.forEach(this.addCommand, this);
-};
-
-(function() {
-
- this.addCommand = function(command) {
- if (this.commands[command.name])
- this.removeCommand(command);
-
- this.commands[command.name] = command;
-
- if (command.bindKey) {
- this._buildKeyHash(command);
- }
- };
-
- this.removeCommand = function(command) {
- var name = (typeof command === 'string' ? command : command.name);
- command = this.commands[name];
- delete this.commands[name];
-
- // exaustive search is brute force but since removeCommand is
- // not a performance critical operation this should be OK
- var ckb = this.commmandKeyBinding;
- for (var hashId in ckb) {
- for (var key in ckb[hashId]) {
- if (ckb[hashId][key] == command)
- delete ckb[hashId][key];
- }
- }
- };
-
- this.addCommands = function(commands) {
- Object.keys(commands).forEach(function(name) {
- var command = commands[name];
- if (typeof command === "string")
- return this.bindKey(command, name);
-
- if (typeof command === "function")
- command = { exec: command };
-
- if (!command.name)
- command.name = name;
-
- this.addCommand(command);
- }, this);
- };
-
- this.removeCommands = function(commands) {
- Object.keys(commands).forEach(function(name) {
- this.removeCommand(commands[name]);
- }, this);
- };
-
- this.bindKey = function(key, command) {
- if(!key)
- return;
-
- var ckb = this.commmandKeyBinding;
- key.split("|").forEach(function(keyPart) {
- var binding = parseKeys(keyPart, command);
- var hashId = binding.hashId;
- (ckb[hashId] || (ckb[hashId] = {}))[binding.key] = command;
- });
- };
-
- this.bindKeys = function(keyList) {
- Object.keys(keyList).forEach(function(key) {
- this.bindKey(key, keyList[key]);
- }, this);
- };
-
- this._buildKeyHash = function(command) {
- var binding = command.bindKey;
- if (!binding)
- return;
-
- var key = typeof binding == "string" ? binding: binding[this.platform];
- this.bindKey(key, command);
- }
-
- function parseKeys(keys, val, ret) {
- var key;
- var hashId = 0;
- var parts = splitSafe(keys);
-
- for (var i=0, l = parts.length; i < l; i++) {
- if (keyUtil.KEY_MODS[parts[i]])
- hashId = hashId | keyUtil.KEY_MODS[parts[i]];
- else
- key = parts[i] || "-"; //when empty, the splitSafe removed a '-'
- }
-
- return {
- key: key,
- hashId: hashId
- }
- }
-
- function splitSafe(s, separator) {
- return (s.toLowerCase()
- .trim()
- .split(new RegExp("[\\s ]*\\-[\\s ]*", "g"), 999));
- }
-
- this.findKeyCommand = function findKeyCommand(hashId, textOrKey) {
- // Convert keyCode to the string representation.
- if (typeof textOrKey == "number") {
- textOrKey = keyUtil.keyCodeToString(textOrKey);
- }
-
- var ckbr = this.commmandKeyBinding;
- return ckbr[hashId] && ckbr[hashId][textOrKey.toLowerCase()];
- }
-
- this.exec = function(command, editor, args) {
- if (typeof command === 'string')
- command = this.commands[command];
-
- if (!command)
- return false;
-
- if (editor && editor.$readOnly && !command.readOnly)
- return false;
-
- command.exec(editor, args || {});
- return true;
- };
-
- this.toggleRecording = function() {
- if (this.$inReplay)
- return;
- if (this.recording) {
- this.macro.pop();
- this.exec = this.normal_exec;
-
- if (!this.macro.length)
- this.macro = this.oldMacro;
-
- return this.recording = false;
- }
- this.oldMacro = this.macro;
- this.macro = [];
- this.normal_exec = this.exec;
- this.exec = function(command, editor, args) {
- this.macro.push([command, args]);
- return this.normal_exec(command, editor, args);
- };
- return this.recording = true;
- };
-
- this.replay = function(editor) {
- if (this.$inReplay || !this.macro)
- return;
-
- if (this.recording)
- return this.toggleRecording();
-
- try {
- this.$inReplay = true;
- this.macro.forEach(function(x) {
- if (typeof x == "string")
- this.exec(x, editor);
- else
- this.exec(x[0], editor, x[1]);
- }, this)
- } finally {
- this.$inReplay = false;
- }
- };
-
- this.trimMacro = function(m) {
- return m.map(function(x){
- if (typeof x[0] != "string")
- x[0] = x[0].name;
- if (!x[1])
- x = x[0];
- return x
- })
- }
-
-}).call(CommandManager.prototype);
-
-exports.CommandManager = CommandManager;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/undomanager', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-var UndoManager = function() {
- this.reset();
-};
-
-(function() {
-
- this.execute = function(options) {
- var deltas = options.args[0];
- this.$doc = options.args[1];
- this.$undoStack.push(deltas);
- this.$redoStack = [];
- };
-
- this.undo = function(dontSelect) {
- var deltas = this.$undoStack.pop();
- var undoSelectionRange = null;
- if (deltas) {
- undoSelectionRange =
- this.$doc.undoChanges(deltas, dontSelect);
- this.$redoStack.push(deltas);
- }
- return undoSelectionRange;
- };
-
- this.redo = function(dontSelect) {
- var deltas = this.$redoStack.pop();
- var redoSelectionRange = null;
- if (deltas) {
- redoSelectionRange =
- this.$doc.redoChanges(deltas, dontSelect);
- this.$undoStack.push(deltas);
- }
- return redoSelectionRange;
- };
-
- this.reset = function() {
- this.$undoStack = [];
- this.$redoStack = [];
- };
-
- this.hasUndo = function() {
- return this.$undoStack.length > 0;
- };
-
- this.hasRedo = function() {
- return this.$redoStack.length > 0;
- };
-
-}).call(UndoManager.prototype);
-
-exports.UndoManager = UndoManager;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian@ajax.org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/virtual_renderer', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/event', 'ace/lib/useragent', 'ace/layer/gutter', 'ace/layer/marker', 'ace/layer/text', 'ace/layer/cursor', 'ace/scrollbar', 'ace/renderloop', 'ace/lib/event_emitter', 'text!ace/css/editor.css'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var dom = require("./lib/dom");
-var event = require("./lib/event");
-var useragent = require("./lib/useragent");
-var GutterLayer = require("./layer/gutter").Gutter;
-var MarkerLayer = require("./layer/marker").Marker;
-var TextLayer = require("./layer/text").Text;
-var CursorLayer = require("./layer/cursor").Cursor;
-var ScrollBar = require("./scrollbar").ScrollBar;
-var RenderLoop = require("./renderloop").RenderLoop;
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var editorCss = require("text!./css/editor.css");
-
-dom.importCssString(editorCss, "ace_editor");
-
-var VirtualRenderer = function(container, theme) {
- var _self = this;
-
- this.container = container;
-
- // TODO: this breaks rendering in Cloud9 with multiple ace instances
-// // Imports CSS once per DOM document ('ace_editor' serves as an identifier).
-// dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
-
- dom.addCssClass(container, "ace_editor");
-
- this.setTheme(theme);
-
- this.$gutter = dom.createElement("div");
- this.$gutter.className = "ace_gutter";
- this.container.appendChild(this.$gutter);
-
- this.scroller = dom.createElement("div");
- this.scroller.className = "ace_scroller";
- this.container.appendChild(this.scroller);
-
- this.content = dom.createElement("div");
- this.content.className = "ace_content";
- this.scroller.appendChild(this.content);
-
- this.$gutterLayer = new GutterLayer(this.$gutter);
- this.$gutterLayer.on("changeGutterWidth", this.onResize.bind(this, true));
-
- this.$markerBack = new MarkerLayer(this.content);
-
- var textLayer = this.$textLayer = new TextLayer(this.content);
- this.canvas = textLayer.element;
-
- this.$markerFront = new MarkerLayer(this.content);
-
- this.characterWidth = textLayer.getCharacterWidth();
- this.lineHeight = textLayer.getLineHeight();
-
- this.$cursorLayer = new CursorLayer(this.content);
- this.$cursorPadding = 8;
-
- // Indicates whether the horizontal scrollbar is visible
- this.$horizScroll = true;
- this.$horizScrollAlwaysVisible = true;
-
- this.scrollBar = new ScrollBar(container);
- this.scrollBar.addEventListener("scroll", function(e) {
- _self.session.setScrollTop(e.data);
- });
-
- this.scrollTop = 0;
- this.scrollLeft = 0;
-
- event.addListener(this.scroller, "scroll", function() {
- _self.session.setScrollLeft(_self.scroller.scrollLeft);
- });
-
- this.cursorPos = {
- row : 0,
- column : 0
- };
-
- this.$textLayer.addEventListener("changeCharacterSize", function() {
- _self.characterWidth = textLayer.getCharacterWidth();
- _self.lineHeight = textLayer.getLineHeight();
- _self.$updatePrintMargin();
- _self.onResize(true);
-
- _self.$loop.schedule(_self.CHANGE_FULL);
- });
-
- this.$size = {
- width: 0,
- height: 0,
- scrollerHeight: 0,
- scrollerWidth: 0
- };
-
- this.layerConfig = {
- width : 1,
- padding : 0,
- firstRow : 0,
- firstRowScreen: 0,
- lastRow : 0,
- lineHeight : 1,
- characterWidth : 1,
- minHeight : 1,
- maxHeight : 1,
- offset : 0,
- height : 1
- };
-
- this.$loop = new RenderLoop(
- this.$renderChanges.bind(this),
- this.container.ownerDocument.defaultView
- );
- this.$loop.schedule(this.CHANGE_FULL);
-
- this.setPadding(4);
- this.$updatePrintMargin();
-};
-
-(function() {
- this.showGutter = true;
-
- this.CHANGE_CURSOR = 1;
- this.CHANGE_MARKER = 2;
- this.CHANGE_GUTTER = 4;
- this.CHANGE_SCROLL = 8;
- this.CHANGE_LINES = 16;
- this.CHANGE_TEXT = 32;
- this.CHANGE_SIZE = 64;
- this.CHANGE_MARKER_BACK = 128;
- this.CHANGE_MARKER_FRONT = 256;
- this.CHANGE_FULL = 512;
- this.CHANGE_H_SCROLL = 1024;
-
- oop.implement(this, EventEmitter);
-
- this.setSession = function(session) {
- this.session = session;
- this.$cursorLayer.setSession(session);
- this.$markerBack.setSession(session);
- this.$markerFront.setSession(session);
- this.$gutterLayer.setSession(session);
- this.$textLayer.setSession(session);
- this.$loop.schedule(this.CHANGE_FULL);
- };
-
- /**
- * Triggers partial update of the text layer
- */
- this.updateLines = function(firstRow, lastRow) {
- if (lastRow === undefined)
- lastRow = Infinity;
-
- if (!this.$changedLines) {
- this.$changedLines = {
- firstRow: firstRow,
- lastRow: lastRow
- };
- }
- else {
- if (this.$changedLines.firstRow > firstRow)
- this.$changedLines.firstRow = firstRow;
-
- if (this.$changedLines.lastRow < lastRow)
- this.$changedLines.lastRow = lastRow;
- }
-
- this.$loop.schedule(this.CHANGE_LINES);
- };
-
- /**
- * Triggers full update of the text layer
- */
- this.updateText = function() {
- this.$loop.schedule(this.CHANGE_TEXT);
- };
-
- /**
- * Triggers a full update of all layers
- */
- this.updateFull = function() {
- this.$loop.schedule(this.CHANGE_FULL);
- };
-
- this.updateFontSize = function() {
- this.$textLayer.checkForSizeChanges();
- };
-
- /**
- * Triggers resize of the editor
- */
- this.onResize = function(force) {
- var changes = this.CHANGE_SIZE;
- var size = this.$size;
-
- var height = dom.getInnerHeight(this.container);
- if (force || size.height != height) {
- size.height = height;
-
- this.scroller.style.height = height + "px";
- size.scrollerHeight = this.scroller.clientHeight;
- this.scrollBar.setHeight(size.scrollerHeight);
-
- if (this.session) {
- this.session.setScrollTop(this.getScrollTop());
- changes = changes | this.CHANGE_FULL;
- }
- }
-
- var width = dom.getInnerWidth(this.container);
- if (force || size.width != width) {
- size.width = width;
-
- var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
- this.scroller.style.left = gutterWidth + "px";
- size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBar.getWidth());
- this.scroller.style.width = size.scrollerWidth + "px";
-
- if (this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
- changes = changes | this.CHANGE_FULL;
- }
-
- this.$loop.schedule(changes);
- };
-
- this.adjustWrapLimit = function() {
- var availableWidth = this.$size.scrollerWidth - this.$padding * 2;
- var limit = Math.floor(availableWidth / this.characterWidth);
- return this.session.adjustWrapLimit(limit);
- };
-
- this.setShowInvisibles = function(showInvisibles) {
- if (this.$textLayer.setShowInvisibles(showInvisibles))
- this.$loop.schedule(this.CHANGE_TEXT);
- };
-
- this.getShowInvisibles = function() {
- return this.$textLayer.showInvisibles;
- };
-
- this.$showPrintMargin = true;
- this.setShowPrintMargin = function(showPrintMargin) {
- this.$showPrintMargin = showPrintMargin;
- this.$updatePrintMargin();
- };
-
- this.getShowPrintMargin = function() {
- return this.$showPrintMargin;
- };
-
- this.$printMarginColumn = 80;
- this.setPrintMarginColumn = function(showPrintMargin) {
- this.$printMarginColumn = showPrintMargin;
- this.$updatePrintMargin();
- };
-
- this.getPrintMarginColumn = function() {
- return this.$printMarginColumn;
- };
-
- this.getShowGutter = function(){
- return this.showGutter;
- };
-
- this.setShowGutter = function(show){
- if(this.showGutter === show)
- return;
- this.$gutter.style.display = show ? "block" : "none";
- this.showGutter = show;
- this.onResize(true);
- };
-
- this.$updatePrintMargin = function() {
- var containerEl;
-
- if (!this.$showPrintMargin && !this.$printMarginEl)
- return;
-
- if (!this.$printMarginEl) {
- containerEl = dom.createElement("div");
- containerEl.className = "ace_print_margin_layer";
- this.$printMarginEl = dom.createElement("div");
- this.$printMarginEl.className = "ace_print_margin";
- containerEl.appendChild(this.$printMarginEl);
- this.content.insertBefore(containerEl, this.$textLayer.element);
- }
-
- var style = this.$printMarginEl.style;
- style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px";
- style.visibility = this.$showPrintMargin ? "visible" : "hidden";
- };
-
- this.getContainerElement = function() {
- return this.container;
- };
-
- this.getMouseEventTarget = function() {
- return this.content;
- };
-
- this.getTextAreaContainer = function() {
- return this.container;
- };
-
- this.moveTextAreaToCursor = function(textarea) {
- // in IE the native cursor always shines through
- // this persists in IE9
- if (useragent.isIE)
- return;
-
- if (this.layerConfig.lastRow === 0)
- return;
-
- var pos = this.$cursorLayer.getPixelPosition();
- if (!pos)
- return;
-
- var bounds = this.content.getBoundingClientRect();
- var offset = this.layerConfig.offset;
-
- textarea.style.left = (bounds.left + pos.left) + "px";
- textarea.style.top = (bounds.top + pos.top - this.scrollTop + offset) + "px";
- };
-
- this.getFirstVisibleRow = function() {
- return this.layerConfig.firstRow;
- };
-
- this.getFirstFullyVisibleRow = function() {
- return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
- };
-
- this.getLastFullyVisibleRow = function() {
- var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
- return this.layerConfig.firstRow - 1 + flint;
- };
-
- this.getLastVisibleRow = function() {
- return this.layerConfig.lastRow;
- };
-
- this.$padding = null;
- this.setPadding = function(padding) {
- this.$padding = padding;
- this.$textLayer.setPadding(padding);
- this.$cursorLayer.setPadding(padding);
- this.$markerFront.setPadding(padding);
- this.$markerBack.setPadding(padding);
- this.$loop.schedule(this.CHANGE_FULL);
- this.$updatePrintMargin();
- };
-
- this.getHScrollBarAlwaysVisible = function() {
- return this.$horizScrollAlwaysVisible;
- };
-
- this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
- if (this.$horizScrollAlwaysVisible != alwaysVisible) {
- this.$horizScrollAlwaysVisible = alwaysVisible;
- if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
- this.$loop.schedule(this.CHANGE_SCROLL);
- }
- };
-
- this.$updateScrollBar = function() {
- this.scrollBar.setInnerHeight(this.layerConfig.maxHeight);
- this.scrollBar.setScrollTop(this.scrollTop);
- };
-
- this.$renderChanges = function(changes) {
- if (!changes || !this.session)
- return;
-
- // text, scrolling and resize changes can cause the view port size to change
- if (changes & this.CHANGE_FULL ||
- changes & this.CHANGE_SIZE ||
- changes & this.CHANGE_TEXT ||
- changes & this.CHANGE_LINES ||
- changes & this.CHANGE_SCROLL
- )
- this.$computeLayerConfig();
-
- // full
- if (changes & this.CHANGE_FULL) {
- this.$textLayer.update(this.layerConfig);
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- this.$markerBack.update(this.layerConfig);
- this.$markerFront.update(this.layerConfig);
- this.$cursorLayer.update(this.layerConfig);
- this.$updateScrollBar();
- return;
- }
-
- // scrolling
- if (changes & this.CHANGE_SCROLL) {
- if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
- this.$textLayer.update(this.layerConfig);
- else
- this.$textLayer.scrollLines(this.layerConfig);
-
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- this.$markerBack.update(this.layerConfig);
- this.$markerFront.update(this.layerConfig);
- this.$cursorLayer.update(this.layerConfig);
- this.$updateScrollBar();
- return;
- }
-
- if (changes & this.CHANGE_TEXT) {
- this.$textLayer.update(this.layerConfig);
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- }
- else if (changes & this.CHANGE_LINES) {
- this.$updateLines();
- this.$updateScrollBar();
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- } else if (changes & this.CHANGE_GUTTER) {
- if (this.showGutter)
- this.$gutterLayer.update(this.layerConfig);
- }
-
- if (changes & this.CHANGE_CURSOR)
- this.$cursorLayer.update(this.layerConfig);
-
- if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
- this.$markerFront.update(this.layerConfig);
- }
-
- if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
- this.$markerBack.update(this.layerConfig);
- }
-
- if (changes & this.CHANGE_SIZE)
- this.$updateScrollBar();
-
- if (changes & this.CHANGE_H_SCROLL) {
- //this.content.style.left = -this.scrollLeft + "px";
- this.scroller.scrollLeft = this.scrollLeft
- }
- };
-
- this.$computeLayerConfig = function() {
- var session = this.session;
-
- var offset = this.scrollTop % this.lineHeight;
- var minHeight = this.$size.scrollerHeight + this.lineHeight;
-
- var longestLine = this.$getLongestLine();
-
- var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
- var horizScrollChanged = this.$horizScroll !== horizScroll;
- this.$horizScroll = horizScroll;
- if (horizScrollChanged)
- this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
-
- var maxHeight = this.session.getScreenLength() * this.lineHeight;
- this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
-
- var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
- var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
- var lastRow = firstRow + lineCount;
-
- // Map lines on the screen to lines in the document.
- var firstRowScreen, firstRowHeight;
- var lineHeight = { lineHeight: this.lineHeight };
- firstRow = session.screenToDocumentRow(firstRow, 0);
-
- // Check if firstRow is inside of a foldLine. If true, then use the first
- // row of the foldLine.
- var foldLine = session.getFoldLine(firstRow);
- if (foldLine) {
- firstRow = foldLine.start.row;
- }
-
- firstRowScreen = session.documentToScreenRow(firstRow, 0);
- firstRowHeight = session.getRowHeight(lineHeight, firstRow);
-
- lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
- minHeight = this.$size.scrollerHeight + session.getRowHeight(lineHeight, lastRow)+
- firstRowHeight;
-
- offset = this.scrollTop - firstRowScreen * this.lineHeight;
-
- this.layerConfig = {
- width : longestLine,
- padding : this.$padding,
- firstRow : firstRow,
- firstRowScreen: firstRowScreen,
- lastRow : lastRow,
- lineHeight : this.lineHeight,
- characterWidth : this.characterWidth,
- minHeight : minHeight,
- maxHeight : maxHeight,
- offset : offset,
- height : this.$size.scrollerHeight
- };
-
- // For debugging.
- // console.log(JSON.stringify(this.layerConfig));
-
- this.$gutterLayer.element.style.marginTop = (-offset) + "px";
- this.content.style.marginTop = (-offset) + "px";
- this.content.style.width = longestLine + 2 * this.$padding + "px";
- this.content.style.height = minHeight + "px";
-
- // Horizontal scrollbar visibility may have changed, which changes
- // the client height of the scroller
- if (horizScrollChanged)
- this.onResize(true);
- };
-
- this.$updateLines = function() {
- var firstRow = this.$changedLines.firstRow;
- var lastRow = this.$changedLines.lastRow;
- this.$changedLines = null;
-
- var layerConfig = this.layerConfig;
-
- // if the update changes the width of the document do a full redraw
- if (layerConfig.width != this.$getLongestLine())
- return this.$textLayer.update(layerConfig);
-
- if (firstRow > layerConfig.lastRow + 1) { return; }
- if (lastRow < layerConfig.firstRow) { return; }
-
- // if the last row is unknown -> redraw everything
- if (lastRow === Infinity) {
- if (this.showGutter)
- this.$gutterLayer.update(layerConfig);
- this.$textLayer.update(layerConfig);
- return;
- }
-
- // else update only the changed rows
- this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
- };
-
- this.$getLongestLine = function() {
- var charCount = this.session.getScreenWidth();
- if (this.$textLayer.showInvisibles)
- charCount += 1;
-
- return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));
- };
-
- this.updateFrontMarkers = function() {
- this.$markerFront.setMarkers(this.session.getMarkers(true));
- this.$loop.schedule(this.CHANGE_MARKER_FRONT);
- };
-
- this.updateBackMarkers = function() {
- this.$markerBack.setMarkers(this.session.getMarkers());
- this.$loop.schedule(this.CHANGE_MARKER_BACK);
- };
-
- this.addGutterDecoration = function(row, className){
- this.$gutterLayer.addGutterDecoration(row, className);
- this.$loop.schedule(this.CHANGE_GUTTER);
- };
-
- this.removeGutterDecoration = function(row, className){
- this.$gutterLayer.removeGutterDecoration(row, className);
- this.$loop.schedule(this.CHANGE_GUTTER);
- };
-
- this.setBreakpoints = function(rows) {
- this.$gutterLayer.setBreakpoints(rows);
- this.$loop.schedule(this.CHANGE_GUTTER);
- };
-
- this.setAnnotations = function(annotations) {
- this.$gutterLayer.setAnnotations(annotations);
- this.$loop.schedule(this.CHANGE_GUTTER);
- };
-
- this.updateCursor = function() {
- this.$loop.schedule(this.CHANGE_CURSOR);
- };
-
- this.hideCursor = function() {
- this.$cursorLayer.hideCursor();
- };
-
- this.showCursor = function() {
- this.$cursorLayer.showCursor();
- };
-
- this.scrollCursorIntoView = function() {
- // the editor is not visible
- if (this.$size.scrollerHeight === 0)
- return;
-
- var pos = this.$cursorLayer.getPixelPosition();
-
- var left = pos.left;
- var top = pos.top;
-
- if (this.scrollTop > top) {
- this.session.setScrollTop(top);
- }
-
- if (this.scrollTop + this.$size.scrollerHeight < top + this.lineHeight) {
- this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
- }
-
- var scrollLeft = this.scrollLeft;
-
- if (scrollLeft > left) {
- if (left < this.$padding + 2 * this.layerConfig.characterWidth)
- left = 0;
- this.session.setScrollLeft(left);
- }
-
- if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
- this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
- }
- };
-
- this.getScrollTop = function() {
- return this.session.getScrollTop();
- };
-
- this.getScrollLeft = function() {
- return this.session.getScrollTop();
- };
-
- this.getScrollTopRow = function() {
- return this.scrollTop / this.lineHeight;
- };
-
- this.getScrollBottomRow = function() {
- return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
- };
-
- this.scrollToRow = function(row) {
- this.session.setScrollTop(row * this.lineHeight);
- };
-
- this.scrollToLine = function(line, center) {
- var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
- var offset = pos.top;
- if (center)
- offset -= this.$size.scrollerHeight / 2;
-
- this.session.setScrollTop(offset);
- };
-
- this.scrollToY = function(scrollTop) {
- // after calling scrollBar.setScrollTop
- // scrollbar sends us event with same scrollTop. ignore it
- if (this.scrollTop !== scrollTop) {
- this.$loop.schedule(this.CHANGE_SCROLL);
- this.scrollTop = scrollTop;
- }
- };
-
- this.scrollToX = function(scrollLeft) {
- if (scrollLeft <= this.$padding)
- scrollLeft = 0;
-
- if (this.scrollLeft !== scrollLeft) {
- this.$loop.schedule(this.CHANGE_H_SCROLL);
- this.scrollLeft = scrollLeft;
- }
- };
-
- this.scrollBy = function(deltaX, deltaY) {
- deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);
- deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);
- };
-
- this.isScrollableBy = function(deltaX, deltaY) {
- if (deltaY < 0 && this.session.getScrollTop() > 0)
- return true;
- if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight < this.layerConfig.maxHeight)
- return true;
- // todo: handle horizontal scrolling
- };
-
- this.screenToTextCoordinates = function(pageX, pageY) {
- var canvasPos = this.scroller.getBoundingClientRect();
-
- var col = Math.round(
- (pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft())
- / this.characterWidth
- );
- var row = Math.floor(
- (pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop())
- / this.lineHeight
- );
-
- return this.session.screenToDocumentPosition(row, Math.max(col, 0));
- };
-
- this.textToScreenCoordinates = function(row, column) {
- var canvasPos = this.scroller.getBoundingClientRect();
- var pos = this.session.documentToScreenPosition(row, column);
-
- var x = this.$padding + Math.round(pos.column * this.characterWidth);
- var y = pos.row * this.lineHeight;
-
- return {
- pageX: canvasPos.left + x - this.scrollLeft,
- pageY: canvasPos.top + y - this.scrollTop
- };
- };
-
- this.visualizeFocus = function() {
- dom.addCssClass(this.container, "ace_focus");
- };
-
- this.visualizeBlur = function() {
- dom.removeCssClass(this.container, "ace_focus");
- };
-
- this.showComposition = function(position) {
- if (!this.$composition) {
- this.$composition = dom.createElement("div");
- this.$composition.className = "ace_composition";
- this.content.appendChild(this.$composition);
- }
-
- this.$composition.innerHTML = "&#160;";
-
- var pos = this.$cursorLayer.getPixelPosition();
- var style = this.$composition.style;
- style.top = pos.top + "px";
- style.left = (pos.left + this.$padding) + "px";
- style.height = this.lineHeight + "px";
-
- this.hideCursor();
- };
-
- this.setCompositionText = function(text) {
- dom.setInnerText(this.$composition, text);
- };
-
- this.hideComposition = function() {
- this.showCursor();
-
- if (!this.$composition)
- return;
-
- var style = this.$composition.style;
- style.top = "-10000px";
- style.left = "-10000px";
- };
-
- this.setTheme = function(theme) {
- var _self = this;
-
- this.$themeValue = theme;
- if (!theme || typeof theme == "string") {
- theme = theme || "ace/theme/textmate";
- require([theme], function(theme) {
- afterLoad(theme);
- });
- } else {
- afterLoad(theme);
- }
-
- function afterLoad(theme) {
- dom.importCssString(
- theme.cssText,
- theme.cssClass,
- _self.container.ownerDocument
- );
-
- if (_self.$theme)
- dom.removeCssClass(_self.container, _self.$theme);
-
- _self.$theme = theme ? theme.cssClass : null;
-
- if (_self.$theme)
- dom.addCssClass(_self.container, _self.$theme);
-
- if (theme && theme.isDark)
- dom.addCssClass(_self.container, "ace_dark");
- else
- dom.removeCssClass(_self.container, "ace_dark");
-
- // force re-measure of the gutter width
- if (_self.$size) {
- _self.$size.width = 0;
- _self.onResize();
- }
- }
- };
-
- this.getTheme = function() {
- return this.$themeValue;
- };
-
- // Methods allows to add / remove CSS classnames to the editor element.
- // This feature can be used by plug-ins to provide a visual indication of
- // a certain mode that editor is in.
-
- this.setStyle = function setStyle(style) {
- dom.addCssClass(this.container, style);
- };
-
- this.unsetStyle = function unsetStyle(style) {
- dom.removeCssClass(this.container, style);
- };
-
- this.destroy = function() {
- this.$textLayer.destroy();
- this.$cursorLayer.destroy();
- };
-
-}).call(VirtualRenderer.prototype);
-
-exports.VirtualRenderer = VirtualRenderer;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/layer/gutter', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var dom = require("../lib/dom");
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var Gutter = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_gutter-layer";
- parentEl.appendChild(this.element);
- this.setShowFoldWidgets(this.$showFoldWidgets);
-
- this.gutterWidth = 0;
-
- this.$breakpoints = [];
- this.$annotations = [];
- this.$decorations = [];
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.addGutterDecoration = function(row, className){
- if (!this.$decorations[row])
- this.$decorations[row] = "";
- this.$decorations[row] += " ace_" + className;
- };
-
- this.removeGutterDecoration = function(row, className){
- this.$decorations[row] = this.$decorations[row].replace(" ace_" + className, "");
- };
-
- this.setBreakpoints = function(rows) {
- this.$breakpoints = rows.concat();
- };
-
- this.setAnnotations = function(annotations) {
- // iterate over sparse array
- this.$annotations = [];
- for (var row in annotations) if (annotations.hasOwnProperty(row)) {
- var rowAnnotations = annotations[row];
- if (!rowAnnotations)
- continue;
-
- var rowInfo = this.$annotations[row] = {
- text: []
- };
- for (var i=0; i<rowAnnotations.length; i++) {
- var annotation = rowAnnotations[i];
- var annoText = annotation.text.replace(/"/g, "&quot;").replace(/'/g, "&#8217;").replace(/</, "&lt;");
- if (rowInfo.text.indexOf(annoText) === -1)
- rowInfo.text.push(annoText);
- var type = annotation.type;
- if (type == "error")
- rowInfo.className = "ace_error";
- else if (type == "warning" && rowInfo.className != "ace_error")
- rowInfo.className = "ace_warning";
- else if (type == "info" && (!rowInfo.className))
- rowInfo.className = "ace_info";
- }
- }
- };
-
- this.update = function(config) {
- this.$config = config;
-
- var emptyAnno = {className: "", text: []};
- var html = [];
- var i = config.firstRow;
- var lastRow = config.lastRow;
- var fold = this.session.getNextFoldLine(i);
- var foldStart = fold ? fold.start.row : Infinity;
- var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets;
-
- while (true) {
- if(i > foldStart) {
- i = fold.end.row + 1;
- fold = this.session.getNextFoldLine(i, fold);
- foldStart = fold ?fold.start.row :Infinity;
- }
- if(i > lastRow)
- break;
-
- var annotation = this.$annotations[i] || emptyAnno;
- html.push("<div class='ace_gutter-cell",
- this.$decorations[i] || "",
- this.$breakpoints[i] ? " ace_breakpoint " : " ",
- annotation.className,
- "' title='", annotation.text.join("\n"),
- "' style='height:", config.lineHeight, "px;'>", (i+1));
-
- if (foldWidgets) {
- var c = foldWidgets[i];
- // check if cached value is invalidated and we need to recompute
- if (c == null)
- c = foldWidgets[i] = this.session.getFoldWidget(i);
- if (c)
- html.push(
- "<span class='ace_fold-widget ", c,
- c == "start" && i == foldStart && i < fold.end.row ? " closed" : " open",
- "'></span>"
- );
- }
-
- var wrappedRowLength = this.session.getRowLength(i) - 1;
- while (wrappedRowLength--) {
- html.push("</div><div class='ace_gutter-cell' style='height:", config.lineHeight, "px'>\xA6");
- }
-
- html.push("</div>");
-
- i++;
- }
- this.element = dom.setInnerHtml(this.element, html.join(""));
- this.element.style.height = config.minHeight + "px";
-
- var gutterWidth = this.element.offsetWidth;
- if (gutterWidth !== this.gutterWidth) {
- this.gutterWidth = gutterWidth;
- this._emit("changeGutterWidth", gutterWidth);
- }
- };
-
- this.$showFoldWidgets = true;
- this.setShowFoldWidgets = function(show) {
- if (show)
- dom.addCssClass(this.element, "ace_folding-enabled");
- else
- dom.removeCssClass(this.element, "ace_folding-enabled");
-
- this.$showFoldWidgets = show;
- };
-
- this.getShowFoldWidgets = function() {
- return this.$showFoldWidgets;
- };
-
-}).call(Gutter.prototype);
-
-exports.Gutter = Gutter;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/layer/marker', ['require', 'exports', 'module' , 'ace/range', 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-var dom = require("../lib/dom");
-
-var Marker = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_marker-layer";
- parentEl.appendChild(this.element);
-};
-
-(function() {
-
- this.$padding = 0;
-
- this.setPadding = function(padding) {
- this.$padding = padding;
- };
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.setMarkers = function(markers) {
- this.markers = markers;
- };
-
- this.update = function(config) {
- var config = config || this.config;
- if (!config)
- return;
-
- this.config = config;
-
-
- var html = [];
- for ( var key in this.markers) {
- var marker = this.markers[key];
-
- var range = marker.range.clipRows(config.firstRow, config.lastRow);
- if (range.isEmpty()) continue;
-
- range = range.toScreenRange(this.session);
- if (marker.renderer) {
- var top = this.$getTop(range.start.row, config);
- var left = Math.round(
- this.$padding + range.start.column * config.characterWidth
- );
- marker.renderer(html, range, left, top, config);
- }
- else if (range.isMultiLine()) {
- if (marker.type == "text") {
- this.drawTextMarker(html, range, marker.clazz, config);
- } else {
- this.drawMultiLineMarker(
- html, range, marker.clazz, config,
- marker.type
- );
- }
- }
- else {
- this.drawSingleLineMarker(
- html, range, marker.clazz, config,
- null, marker.type
- );
- }
- }
- this.element = dom.setInnerHtml(this.element, html.join(""));
- };
-
- this.$getTop = function(row, layerConfig) {
- return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
- };
-
- /**
- * Draws a marker, which spans a range of text in a single line
- */
- this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig) {
- // selection start
- var row = range.start.row;
-
- var lineRange = new Range(
- row, range.start.column,
- row, this.session.getScreenLastRowColumn(row)
- );
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, "text");
-
- // selection end
- row = range.end.row;
- lineRange = new Range(row, 0, row, range.end.column);
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, "text");
-
- for (row = range.start.row + 1; row < range.end.row; row++) {
- lineRange.start.row = row;
- lineRange.end.row = row;
- lineRange.end.column = this.session.getScreenLastRowColumn(row);
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, "text");
- }
- };
-
- /**
- * Draws a multi line marker, where lines span the full width
- */
- this.drawMultiLineMarker = function(stringBuilder, range, clazz, layerConfig, type) {
- var padding = type === "background" ? 0 : this.$padding;
- var layerWidth = layerConfig.width + 2 * this.$padding - padding;
- // from selection start to the end of the line
- var height = layerConfig.lineHeight;
- var width = Math.round(layerWidth - (range.start.column * layerConfig.characterWidth));
- var top = this.$getTop(range.start.row, layerConfig);
- var left = Math.round(
- padding + range.start.column * layerConfig.characterWidth
- );
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", width, "px;",
- "top:", top, "px;",
- "left:", left, "px;'></div>"
- );
-
- // from start of the last line to the selection end
- top = this.$getTop(range.end.row, layerConfig);
- width = Math.round(range.end.column * layerConfig.characterWidth);
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", width, "px;",
- "top:", top, "px;",
- "left:", padding, "px;'></div>"
- );
-
- // all the complete lines
- height = (range.end.row - range.start.row - 1) * layerConfig.lineHeight;
- if (height < 0)
- return;
- top = this.$getTop(range.start.row + 1, layerConfig);
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", layerWidth, "px;",
- "top:", top, "px;",
- "left:", padding, "px;'></div>"
- );
- };
-
- /**
- * Draws a marker which covers one single full line
- */
- this.drawSingleLineMarker = function(stringBuilder, range, clazz, layerConfig, extraLength, type) {
- var padding = type === "background" ? 0 : this.$padding;
- var height = layerConfig.lineHeight;
-
- if (type === "background")
- var width = layerConfig.width;
- else
- width = Math.round((range.end.column + (extraLength || 0) - range.start.column) * layerConfig.characterWidth);
-
- var top = this.$getTop(range.start.row, layerConfig);
- var left = Math.round(
- padding + range.start.column * layerConfig.characterWidth
- );
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", width, "px;",
- "top:", top, "px;",
- "left:", left,"px;'></div>"
- );
- };
-
-}).call(Marker.prototype);
-
-exports.Marker = Marker;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian DOT viereck AT gmail DOT com>
- * Mihai Sucan <mihai.sucan@gmail.com>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/layer/text', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/lang', 'ace/lib/useragent', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var dom = require("../lib/dom");
-var lang = require("../lib/lang");
-var useragent = require("../lib/useragent");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var Text = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_text-layer";
- parentEl.appendChild(this.element);
-
- this.$characterSize = this.$measureSizes() || {width: 0, height: 0};
- this.$pollSizeChanges();
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.EOF_CHAR = "\xB6"; //"&para;";
- this.EOL_CHAR = "\xAC"; //"&not;";
- this.TAB_CHAR = "\u2192"; //"&rarr;";
- this.SPACE_CHAR = "\xB7"; //"&middot;";
- this.$padding = 0;
-
- this.setPadding = function(padding) {
- this.$padding = padding;
- this.element.style.padding = "0 " + padding + "px";
- };
-
- this.getLineHeight = function() {
- return this.$characterSize.height || 1;
- };
-
- this.getCharacterWidth = function() {
- return this.$characterSize.width || 1;
- };
-
- this.checkForSizeChanges = function() {
- var size = this.$measureSizes();
- if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
- this.$characterSize = size;
- this._emit("changeCharacterSize", {data: size});
- }
- };
-
- this.$pollSizeChanges = function() {
- var self = this;
- this.$pollSizeChangesTimer = setInterval(function() {
- self.checkForSizeChanges();
- }, 500);
- };
-
- this.$fontStyles = {
- fontFamily : 1,
- fontSize : 1,
- fontWeight : 1,
- fontStyle : 1,
- lineHeight : 1
- };
-
- this.$measureSizes = function() {
- var n = 1000;
- if (!this.$measureNode) {
- var measureNode = this.$measureNode = dom.createElement("div");
- var style = measureNode.style;
-
- style.width = style.height = "auto";
- style.left = style.top = (-n * 40) + "px";
-
- style.visibility = "hidden";
- style.position = "absolute";
- style.overflow = "visible";
- style.whiteSpace = "nowrap";
-
- // in FF 3.6 monospace fonts can have a fixed sub pixel width.
- // that's why we have to measure many characters
- // Note: characterWidth can be a float!
- measureNode.innerHTML = lang.stringRepeat("Xy", n);
-
- if (this.element.ownerDocument.body) {
- this.element.ownerDocument.body.appendChild(measureNode);
- } else {
- var container = this.element.parentNode;
- while (!dom.hasCssClass(container, "ace_editor"))
- container = container.parentNode;
- container.appendChild(measureNode);
- }
-
- }
-
- var style = this.$measureNode.style;
- var computedStyle = dom.computedStyle(this.element);
- for (var prop in this.$fontStyles)
- style[prop] = computedStyle[prop];
-
- var size = {
- height: this.$measureNode.offsetHeight,
- width: this.$measureNode.offsetWidth / (n * 2)
- };
-
- // Size and width can be null if the editor is not visible or
- // detached from the document
- if (size.width == 0 && size.height == 0)
- return null;
-
- return size;
- };
-
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.showInvisibles = false;
- this.setShowInvisibles = function(showInvisibles) {
- if (this.showInvisibles == showInvisibles)
- return false;
-
- this.showInvisibles = showInvisibles;
- return true;
- };
-
- this.$tabStrings = [];
- this.$computeTabString = function() {
- var tabSize = this.session.getTabSize();
- var tabStr = this.$tabStrings = [0];
- for (var i = 1; i < tabSize + 1; i++) {
- if (this.showInvisibles) {
- tabStr.push("<span class='ace_invisible'>"
- + this.TAB_CHAR
- + new Array(i).join("&#160;")
- + "</span>");
- } else {
- tabStr.push(new Array(i+1).join("&#160;"));
- }
- }
-
- };
-
- this.updateLines = function(config, firstRow, lastRow) {
- this.$computeTabString();
- // Due to wrap line changes there can be new lines if e.g.
- // the line to updated wrapped in the meantime.
- if (this.config.lastRow != config.lastRow ||
- this.config.firstRow != config.firstRow) {
- this.scrollLines(config);
- }
- this.config = config;
-
- var first = Math.max(firstRow, config.firstRow);
- var last = Math.min(lastRow, config.lastRow);
-
- var lineElements = this.element.childNodes;
- var lineElementsIdx = 0;
-
- for (var row = config.firstRow; row < first; row++) {
- var foldLine = this.session.getFoldLine(row);
- if (foldLine) {
- if (foldLine.containsRow(first)) {
- first = foldLine.start.row;
- break;
- } else {
- row = foldLine.end.row;
- }
- }
- lineElementsIdx ++;
- }
-
- for (var i=first; i<=last; i++) {
- var lineElement = lineElements[lineElementsIdx++];
- if (!lineElement)
- continue;
-
- var html = [];
- var tokens = this.session.getTokens(i, i);
- this.$renderLine(html, i, tokens[0].tokens, !this.$useLineGroups());
- lineElement = dom.setInnerHtml(lineElement, html.join(""));
-
- i = this.session.getRowFoldEnd(i);
- }
- };
-
- this.scrollLines = function(config) {
- this.$computeTabString();
- var oldConfig = this.config;
- this.config = config;
-
- if (!oldConfig || oldConfig.lastRow < config.firstRow)
- return this.update(config);
-
- if (config.lastRow < oldConfig.firstRow)
- return this.update(config);
-
- var el = this.element;
- if (oldConfig.firstRow < config.firstRow)
- for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)
- el.removeChild(el.firstChild);
-
- if (oldConfig.lastRow > config.lastRow)
- for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)
- el.removeChild(el.lastChild);
-
- if (config.firstRow < oldConfig.firstRow) {
- var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);
- if (el.firstChild)
- el.insertBefore(fragment, el.firstChild);
- else
- el.appendChild(fragment);
- }
-
- if (config.lastRow > oldConfig.lastRow) {
- var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);
- el.appendChild(fragment);
- }
- };
-
- this.$renderLinesFragment = function(config, firstRow, lastRow) {
- var fragment = this.element.ownerDocument.createDocumentFragment(),
- row = firstRow,
- fold = this.session.getNextFoldLine(row),
- foldStart = fold ?fold.start.row :Infinity;
-
- while (true) {
- if (row > foldStart) {
- row = fold.end.row+1;
- fold = this.session.getNextFoldLine(row, fold);
- foldStart = fold ?fold.start.row :Infinity;
- }
- if (row > lastRow)
- break;
-
- var container = dom.createElement("div");
-
- var html = [];
- // Get the tokens per line as there might be some lines in between
- // beeing folded.
- // OPTIMIZE: If there is a long block of unfolded lines, just make
- // this call once for that big block of unfolded lines.
- var tokens = this.session.getTokens(row, row);
- if (tokens.length == 1)
- this.$renderLine(html, row, tokens[0].tokens, false);
-
- // don't use setInnerHtml since we are working with an empty DIV
- container.innerHTML = html.join("");
- if (this.$useLineGroups()) {
- container.className = 'ace_line_group';
- fragment.appendChild(container);
- } else {
- var lines = container.childNodes
- while(lines.length)
- fragment.appendChild(lines[0]);
- }
-
- row++;
- }
- return fragment;
- };
-
- this.update = function(config) {
- this.$computeTabString();
- this.config = config;
-
- var html = [];
- var firstRow = config.firstRow, lastRow = config.lastRow;
-
- var row = firstRow,
- fold = this.session.getNextFoldLine(row),
- foldStart = fold ?fold.start.row :Infinity;
-
- while (true) {
- if (row > foldStart) {
- row = fold.end.row+1;
- fold = this.session.getNextFoldLine(row, fold);
- foldStart = fold ?fold.start.row :Infinity;
- }
- if (row > lastRow)
- break;
-
- if (this.$useLineGroups())
- html.push("<div class='ace_line_group'>")
-
- // Get the tokens per line as there might be some lines in between
- // beeing folded.
- // OPTIMIZE: If there is a long block of unfolded lines, just make
- // this call once for that big block of unfolded lines.
- var tokens = this.session.getTokens(row, row);
- if (tokens.length == 1)
- this.$renderLine(html, row, tokens[0].tokens, false);
-
- if (this.$useLineGroups())
- html.push("</div>"); // end the line group
-
- row++;
- }
- this.element = dom.setInnerHtml(this.element, html.join(""));
- };
-
- this.$textToken = {
- "text": true,
- "rparen": true,
- "lparen": true
- };
-
- this.$renderToken = function(stringBuilder, screenColumn, token, value) {
- var self = this;
- var replaceReg = /\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g;
- var replaceFunc = function(c, a, b, tabIdx, idx4) {
- if (c.charCodeAt(0) == 32) {
- return new Array(c.length+1).join("&#160;");
- } else if (c == "\t") {
- var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
- screenColumn += tabSize - 1;
- return self.$tabStrings[tabSize];
- } else if (c == "&") {
- if (useragent.isOldGecko)
- return "&";
- else
- return "&amp;";
- } else if (c == "<") {
- return "&lt;";
- } else if (c == "\u3000") {
- // U+3000 is both invisible AND full-width, so must be handled uniquely
- var classToUse = self.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk";
- var space = self.showInvisibles ? self.SPACE_CHAR : "";
- screenColumn += 1;
- return "<span class='" + classToUse + "' style='width:" +
- (self.config.characterWidth * 2) +
- "px'>" + space + "</span>";
- } else if (c.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)) {
- if (self.showInvisibles) {
- var space = new Array(c.length+1).join(self.SPACE_CHAR);
- return "<span class='ace_invisible'>" + space + "</span>";
- } else {
- return "&#160;";
- }
- } else {
- screenColumn += 1;
- return "<span class='ace_cjk' style='width:" +
- (self.config.characterWidth * 2) +
- "px'>" + c + "</span>";
- }
- };
-
- var output = value.replace(replaceReg, replaceFunc);
-
- if (!this.$textToken[token.type]) {
- var classes = "ace_" + token.type.replace(/\./g, " ace_");
- var style = "";
- if (token.type == "fold")
- style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' ";
- stringBuilder.push("<span class='", classes, "'", style, ">", output, "</span>");
- }
- else {
- stringBuilder.push(output);
- }
- return screenColumn + value.length;
- };
-
- this.$renderLineCore = function(stringBuilder, lastRow, tokens, splits, onlyContents) {
- var chars = 0;
- var split = 0;
- var splitChars;
- var screenColumn = 0;
- var self = this;
-
- if (!splits || splits.length == 0)
- splitChars = Number.MAX_VALUE;
- else
- splitChars = splits[0];
-
- if (!onlyContents) {
- stringBuilder.push("<div class='ace_line' style='height:",
- this.config.lineHeight, "px",
- "'>"
- );
- }
-
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- var value = token.value;
-
- if (chars + value.length < splitChars) {
- screenColumn = self.$renderToken(
- stringBuilder, screenColumn, token, value
- );
- chars += value.length;
- }
- else {
- while (chars + value.length >= splitChars) {
- screenColumn = self.$renderToken(
- stringBuilder, screenColumn,
- token, value.substring(0, splitChars - chars)
- );
- value = value.substring(splitChars - chars);
- chars = splitChars;
-
- if (!onlyContents) {
- stringBuilder.push("</div>",
- "<div class='ace_line' style='height:",
- this.config.lineHeight, "px",
- "'>"
- );
- }
-
- split ++;
- screenColumn = 0;
- splitChars = splits[split] || Number.MAX_VALUE;
- }
- if (value.length != 0) {
- chars += value.length;
- screenColumn = self.$renderToken(
- stringBuilder, screenColumn, token, value
- );
- }
- }
- }
-
- if (this.showInvisibles) {
- if (lastRow !== this.session.getLength() - 1)
- stringBuilder.push("<span class='ace_invisible'>" + this.EOL_CHAR + "</span>");
- else
- stringBuilder.push("<span class='ace_invisible'>" + this.EOF_CHAR + "</span>");
- }
- if (!onlyContents)
- stringBuilder.push("</div>");
- };
-
- this.$renderLine = function(stringBuilder, row, tokens, onlyContents) {
- // Check if the line to render is folded or not. If not, things are
- // simple, otherwise, we need to fake some things...
- if (!this.session.isRowFolded(row)) {
- var splits = this.session.getRowSplitData(row);
- this.$renderLineCore(stringBuilder, row, tokens, splits, onlyContents);
- } else {
- this.$renderFoldLine(stringBuilder, row, tokens, onlyContents);
- }
- };
-
- this.$renderFoldLine = function(stringBuilder, row, tokens, onlyContents) {
- var session = this.session,
- foldLine = session.getFoldLine(row),
- renderTokens = [];
-
- function addTokens(tokens, from, to) {
- var idx = 0, col = 0;
- while ((col + tokens[idx].value.length) < from) {
- col += tokens[idx].value.length;
- idx++;
-
- if (idx == tokens.length) {
- return;
- }
- }
- if (col != from) {
- var value = tokens[idx].value.substring(from - col);
- // Check if the token value is longer then the from...to spacing.
- if (value.length > (to - from)) {
- value = value.substring(0, to - from);
- }
-
- renderTokens.push({
- type: tokens[idx].type,
- value: value
- });
-
- col = from + value.length;
- idx += 1;
- }
-
- while (col < to) {
- var value = tokens[idx].value;
- if (value.length + col > to) {
- value = value.substring(0, to - col);
- }
- renderTokens.push({
- type: tokens[idx].type,
- value: value
- });
- col += value.length;
- idx += 1;
- }
- }
-
- foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {
- if (placeholder) {
- renderTokens.push({
- type: "fold",
- value: placeholder
- });
- } else {
- if (isNewRow) {
- tokens = this.session.getTokens(row, row)[0].tokens;
- }
- if (tokens.length != 0) {
- addTokens(tokens, lastColumn, column);
- }
- }
- }.bind(this), foldLine.end.row, this.session.getLine(foldLine.end.row).length);
-
- // TODO: Build a fake splits array!
- var splits = this.session.$useWrapMode?this.session.$wrapData[row]:null;
- this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents);
- };
-
- this.$useLineGroups = function() {
- // For the updateLines function to work correctly, it's important that the
- // child nodes of this.element correspond on a 1-to-1 basis to rows in the
- // document (as distinct from lines on the screen). For sessions that are
- // wrapped, this means we need to add a layer to the node hierarchy (tagged
- // with the class name ace_line_group).
- return this.session.getUseWrapMode();
- };
-
- this.destroy = function() {
- clearInterval(this.$pollSizeChangesTimer);
- if (this.$measureNode)
- this.$measureNode.parentNode.removeChild(this.$measureNode);
- delete this.$measureNode;
- };
-
-}).call(Text.prototype);
-
-exports.Text = Text;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Julian Viereck <julian.viereck@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/layer/cursor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-var dom = require("../lib/dom");
-
-var Cursor = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_cursor-layer";
- parentEl.appendChild(this.element);
-
- this.cursor = dom.createElement("div");
- this.cursor.className = "ace_cursor ace_hidden";
- this.element.appendChild(this.cursor);
-
- this.isVisible = false;
-};
-
-(function() {
-
- this.$padding = 0;
- this.setPadding = function(padding) {
- this.$padding = padding;
- };
-
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.hideCursor = function() {
- this.isVisible = false;
- dom.addCssClass(this.cursor, "ace_hidden");
- clearInterval(this.blinkId);
- };
-
- this.showCursor = function() {
- this.isVisible = true;
- dom.removeCssClass(this.cursor, "ace_hidden");
- this.cursor.style.visibility = "visible";
- this.restartTimer();
- };
-
- this.restartTimer = function() {
- clearInterval(this.blinkId);
- if (!this.isVisible) {
- return;
- }
-
- var cursor = this.cursor;
- this.blinkId = setInterval(function() {
- cursor.style.visibility = "hidden";
- setTimeout(function() {
- cursor.style.visibility = "visible";
- }, 400);
- }, 1000);
- };
-
- this.getPixelPosition = function(position, onScreen) {
- if (!this.config || !this.session) {
- return {
- left : 0,
- top : 0
- };
- }
-
- if (!position)
- position = this.session.selection.getCursor();
- var pos = this.session.documentToScreenPosition(position);
- var cursorLeft = Math.round(this.$padding +
- pos.column * this.config.characterWidth);
- var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
- this.config.lineHeight;
-
- return {
- left : cursorLeft,
- top : cursorTop
- };
- };
-
- this.update = function(config) {
- this.config = config;
-
- this.pixelPos = this.getPixelPosition(null, true);
-
- this.cursor.style.left = this.pixelPos.left + "px";
- this.cursor.style.top = this.pixelPos.top + "px";
- this.cursor.style.width = config.characterWidth + "px";
- this.cursor.style.height = config.lineHeight + "px";
-
- var overwrite = this.session.getOverwrite()
- if (overwrite != this.overwrite) {
- this.overwrite = overwrite;
- if (overwrite)
- dom.addCssClass(this.cursor, "ace_overwrite");
- else
- dom.removeCssClass(this.cursor, "ace_overwrite");
- }
-
- this.restartTimer();
- };
-
- this.destroy = function() {
- clearInterval(this.blinkId);
- }
-
-}).call(Cursor.prototype);
-
-exports.Cursor = Cursor;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/scrollbar', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/event', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var dom = require("./lib/dom");
-var event = require("./lib/event");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var ScrollBar = function(parent) {
- this.element = dom.createElement("div");
- this.element.className = "ace_sb";
-
- this.inner = dom.createElement("div");
- this.element.appendChild(this.inner);
-
- parent.appendChild(this.element);
-
- // in OSX lion the scrollbars appear to have no width. In this case resize
- // the to show the scrollbar but still pretend that the scrollbar has a width
- // of 0px
- // in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
- // make element a little bit wider to retain scrollbar when page is zoomed
- this.width = dom.scrollbarWidth(parent.ownerDocument);
- this.element.style.width = (this.width || 15) + 5 + "px";
-
- event.addListener(this.element, "scroll", this.onScroll.bind(this));
-};
-
-(function() {
- oop.implement(this, EventEmitter);
-
- this.onScroll = function() {
- this._emit("scroll", {data: this.element.scrollTop});
- };
-
- this.getWidth = function() {
- return this.width;
- };
-
- this.setHeight = function(height) {
- this.element.style.height = height + "px";
- };
-
- this.setInnerHeight = function(height) {
- this.inner.style.height = height + "px";
- };
-
- this.setScrollTop = function(scrollTop) {
- this.element.scrollTop = scrollTop;
- };
-
-}).call(ScrollBar.prototype);
-
-exports.ScrollBar = ScrollBar;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/renderloop', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
-"use strict";
-
-var event = require("./lib/event");
-
-var RenderLoop = function(onRender, win) {
- this.onRender = onRender;
- this.pending = false;
- this.changes = 0;
- this.window = win || window;
-};
-
-(function() {
-
- this.schedule = function(change) {
- //this.onRender(change);
- //return;
- this.changes = this.changes | change;
- if (!this.pending) {
- this.pending = true;
- var _self = this;
- event.nextTick(function() {
- _self.pending = false;
- var changes;
- while (changes = _self.changes) {
- _self.changes = 0;
- _self.onRender(changes);
- }
- }, this.window);
- }
- };
-
-}).call(RenderLoop.prototype);
-
-exports.RenderLoop = RenderLoop;
-});
-define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);\n" +
- "\n" +
- "\n" +
- ".ace_editor {\n" +
- " position: absolute;\n" +
- " overflow: hidden;\n" +
- " font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Droid Sans Mono', 'Consolas', monospace;\n" +
- " font-size: 12px;\n" +
- "}\n" +
- "\n" +
- ".ace_scroller {\n" +
- " position: absolute;\n" +
- " overflow-x: scroll;\n" +
- " overflow-y: hidden;\n" +
- "}\n" +
- "\n" +
- ".ace_content {\n" +
- " position: absolute;\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- " cursor: text;\n" +
- "}\n" +
- "\n" +
- "/* setting pointer-events: auto; on node under the mouse, which changes during scroll,\n" +
- " will break mouse wheel scrolling in Safari */\n" +
- ".ace_content * {\n" +
- " pointer-events: none;\n" +
- "}\n" +
- "\n" +
- ".ace_composition {\n" +
- " position: absolute;\n" +
- " background: #555;\n" +
- " color: #DDD;\n" +
- " z-index: 4;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter .ace_layer {\n" +
- " position: relative;\n" +
- " min-width: 54px;\n" +
- " text-align: right;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter {\n" +
- " position: absolute;\n" +
- " overflow : hidden;\n" +
- " height: 100%;\n" +
- " width: auto;\n" +
- " cursor: default;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter-cell {\n" +
- " padding-left: 19px;\n" +
- " padding-right: 6px;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter-cell.ace_error {\n" +
- " background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B\");\n" +
- " background-repeat: no-repeat;\n" +
- " background-position: 2px center;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter-cell.ace_warning {\n" +
- " background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B\");\n" +
- " background-repeat: no-repeat;\n" +
- " background-position: 2px center;\n" +
- "}\n" +
- "\n" +
- ".ace_gutter-cell.ace_info {\n" +
- " background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");\n" +
- " background-repeat: no-repeat;\n" +
- " background-position: 2px center;\n" +
- "}\n" +
- "\n" +
- ".ace_editor .ace_sb {\n" +
- " position: absolute;\n" +
- " overflow-x: hidden;\n" +
- " overflow-y: scroll;\n" +
- " right: 0;\n" +
- "}\n" +
- "\n" +
- ".ace_editor .ace_sb div {\n" +
- " position: absolute;\n" +
- " width: 1px;\n" +
- " left: 0;\n" +
- "}\n" +
- "\n" +
- ".ace_editor .ace_print_margin_layer {\n" +
- " z-index: 0;\n" +
- " position: absolute;\n" +
- " overflow: hidden;\n" +
- " margin: 0;\n" +
- " left: 0;\n" +
- " height: 100%;\n" +
- " width: 100%;\n" +
- "}\n" +
- "\n" +
- ".ace_editor .ace_print_margin {\n" +
- " position: absolute;\n" +
- " height: 100%;\n" +
- "}\n" +
- "\n" +
- ".ace_editor textarea {\n" +
- " position: fixed;\n" +
- " z-index: 0;\n" +
- " width: 10px;\n" +
- " height: 30px;\n" +
- " opacity: 0;\n" +
- " background: transparent;\n" +
- " appearance: none;\n" +
- " -moz-appearance: none;\n" +
- " border: none;\n" +
- " resize: none;\n" +
- " outline: none;\n" +
- " overflow: hidden;\n" +
- "}\n" +
- "\n" +
- ".ace_layer {\n" +
- " z-index: 1;\n" +
- " position: absolute;\n" +
- " overflow: hidden;\n" +
- " white-space: nowrap;\n" +
- " height: 100%;\n" +
- " width: 100%;\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- "}\n" +
- "\n" +
- ".ace_text-layer {\n" +
- " color: black;\n" +
- "}\n" +
- "\n" +
- ".ace_cjk {\n" +
- " display: inline-block;\n" +
- " text-align: center;\n" +
- "}\n" +
- "\n" +
- ".ace_cursor-layer {\n" +
- " z-index: 4;\n" +
- "}\n" +
- "\n" +
- ".ace_cursor {\n" +
- " z-index: 4;\n" +
- " position: absolute;\n" +
- "}\n" +
- "\n" +
- ".ace_cursor.ace_hidden {\n" +
- " opacity: 0.2;\n" +
- "}\n" +
- "\n" +
- ".ace_line {\n" +
- " white-space: nowrap;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_step {\n" +
- " position: absolute;\n" +
- " z-index: 3;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_selection {\n" +
- " position: absolute;\n" +
- " z-index: 4;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_bracket {\n" +
- " position: absolute;\n" +
- " z-index: 5;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_active_line {\n" +
- " position: absolute;\n" +
- " z-index: 2;\n" +
- "}\n" +
- "\n" +
- ".ace_marker-layer .ace_selected_word {\n" +
- " position: absolute;\n" +
- " z-index: 6;\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- "}\n" +
- "\n" +
- ".ace_line .ace_fold {\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- " \n" +
- " display: inline-block;\n" +
- " height: 11px;\n" +
- " margin-top: -2px;\n" +
- " vertical-align: middle;\n" +
- "\n" +
- " background-image: \n" +
- " url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\n" +
- " url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");\n" +
- " background-repeat: no-repeat, repeat-x;\n" +
- " background-position: center center, top left;\n" +
- " color: transparent;\n" +
- "\n" +
- " border: 1px solid black;\n" +
- " -moz-border-radius: 2px;\n" +
- " -webkit-border-radius: 2px;\n" +
- " border-radius: 2px;\n" +
- " \n" +
- " cursor: pointer;\n" +
- " pointer-events: auto;\n" +
- "}\n" +
- "\n" +
- ".ace_dark .ace_fold {\n" +
- "}\n" +
- "\n" +
- ".ace_fold:hover{\n" +
- " background-image: \n" +
- " url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\n" +
- " url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");\n" +
- " background-repeat: no-repeat, repeat-x;\n" +
- " background-position: center center, top left;\n" +
- "}\n" +
- "\n" +
- ".ace_dragging .ace_content {\n" +
- " cursor: move;\n" +
- "}\n" +
- "\n" +
- ".ace_folding-enabled .ace_gutter-cell {\n" +
- " padding-right: 13px;\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget {\n" +
- " box-sizing: border-box;\n" +
- " -moz-box-sizing: border-box;\n" +
- " -webkit-box-sizing: border-box;\n" +
- "\n" +
- " margin: 0 -12px 1px 1px;\n" +
- " display: inline-block;\n" +
- " height: 14px;\n" +
- " width: 11px;\n" +
- " vertical-align: text-bottom;\n" +
- " \n" +
- " background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");\n" +
- " background-repeat: no-repeat;\n" +
- " background-position: center 5px;\n" +
- "\n" +
- " border-radius: 3px;\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget.end {\n" +
- " background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget.closed {\n" +
- " background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget:hover {\n" +
- " border: 1px solid rgba(0, 0, 0, 0.3);\n" +
- " background-color: rgba(255, 255, 255, 0.2);\n" +
- " -moz-box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " -webkit-box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n" +
- " background-position: center 4px;\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget:active {\n" +
- " border: 1px solid rgba(0, 0, 0, 0.4);\n" +
- " background-color: rgba(0, 0, 0, 0.05);\n" +
- " -moz-box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n" +
- " -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n" +
- " -webkit-box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n" +
- " -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n" +
- " box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n" +
- " box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n" +
- "}\n" +
- "\n" +
- ".ace_fold-widget.invalid {\n" +
- " background-color: #FFB4B4;\n" +
- " border-color: #DE5555;\n" +
- "}\n" +
- "");
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/textmate', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-"use strict";
-
-exports.isDark = false;
-exports.cssClass = "ace-tm";
-exports.cssText = ".ace-tm .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tm .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tm .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tm .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tm .ace_fold {\
- background-color: #0000A2;\
-}\
-\
-.ace-tm .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-tm .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-tm .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
- \
-.ace-tm .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-tm .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_language {\
- color: rgb(88, 92, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_invalid {\
- background-color: rgb(153, 0, 0);\
- color: white;\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_type,\
-.ace-tm .ace_line .ace_support.ace_class {\
- color: rgb(109, 121, 222);\
-}\
-\
-.ace-tm .ace_line .ace_keyword.ace_operator {\
- color: rgb(104, 118, 135);\
-}\
-\
-.ace-tm .ace_line .ace_string {\
- color: rgb(3, 106, 7);\
-}\
-\
-.ace-tm .ace_line .ace_comment {\
- color: rgb(76, 136, 107);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc {\
- color: rgb(0, 102, 255);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(128, 159, 191);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 205);\
-}\
-\
-.ace-tm .ace_line .ace_variable {\
- color: rgb(49, 132, 149);\
-}\
-\
-.ace-tm .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-tm .ace_entity.ace_name.ace_function {\
- color: #0000A2;\
-}\
-\
-.ace-tm .ace_markup.ace_markupine {\
- text-decoration:underline;\
-}\
-\
-.ace-tm .ace_markup.ace_heading {\
- color: rgb(12, 7, 255);\
-}\
-\
-.ace-tm .ace_markup.ace_list {\
- color:rgb(185, 6, 144);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.07);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-tm .ace_meta.ace_tag {\
- color:rgb(28, 2, 255);\
-}\
-\
-.ace-tm .ace_string.ace_regex {\
- color: rgb(255, 0, 0)\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/ace.js b/contexts/data/lib/ace/ace.js
index 425d5e9..9c8eb2a 100644
--- a/contexts/data/lib/ace/ace.js
+++ b/contexts/data/lib/ace/ace.js
@@ -1 +1,14281 @@
-(function(){function g(a){var e=function(a,b){return d("",a,b)};e.packaged=!0;var f=b;a&&(b[a]||(b[a]={}),f=b[a]),f.define&&(c.original=f.define),f.define=c,f.require&&(d.original=f.require),f.require=e}var a="",b=function(){return this}();if(typeof requirejs!="undefined")return;var c=function(a,b,d){if(typeof a!="string"){c.original?c.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(d=b),c.modules||(c.modules={}),c.modules[a]=d},d=function(a,b,c){if(Object.prototype.toString.call(b)==="[object Array]"){var e=[];for(var g=0,h=b.length;g<h;++g){var i=f(a,b[g]);if(!i&&d.original)return d.original.apply(window,arguments);e.push(i)}c&&c.apply(null,e)}else{if(typeof b=="string"){var j=f(a,b);return!j&&d.original?d.original.apply(window,arguments):(c&&c(),j)}if(d.original)return d.original.apply(window,arguments)}},e=function(a,b){if(b.indexOf("!")!==-1){var c=b.split("!");return e(a,c[0])+"!"+e(a,c[1])}if(b.charAt(0)=="."){var d=a.split("/").slice(0,-1).join("/");b=d+"/"+b;while(b.indexOf(".")!==-1&&f!=b){var f=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},f=function(a,b){b=e(a,b);var f=c.modules[b];if(!f)return null;if(typeof f=="function"){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return d(b,a,c)},j=f(i,g,h);return g=j||h.exports,c.modules[b]=g,g}return f};g(a)})(),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/theme/textmate"],function(a,b,c){"use strict",a("./lib/fixoldbrowsers");var d=a("./lib/dom"),e=a("./lib/event"),f=a("./editor").Editor,g=a("./edit_session").EditSession,h=a("./undomanager").UndoManager,i=a("./virtual_renderer").VirtualRenderer;b.edit=function(b){typeof b=="string"&&(b=document.getElementById(b));var c=new g(d.getInnerText(b));c.setUndoManager(new h),b.innerHTML="";var j=new f(new i(b,a("./theme/textmate")));j.setSession(c);var k={};return k.document=c,k.editor=j,j.resize(),e.addListener(window,"resize",function(){j.resize()}),b.env=k,j.env=k,j}}),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(a,b,c){"use strict",a("./regexp"),a("./es5-shim")}),define("ace/lib/regexp",["require","exports","module"],function(a,b,c){function g(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function h(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d<a.length;d++)if(a[d]===b)return d;return-1}"use strict";var d={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},e=d.exec.call(/()??/,"")[1]===undefined,f=function(){var a=/^/g;return d.test.call(a,""),!a.lastIndex}();RegExp.prototype.exec=function(a){var b=d.exec.apply(this,arguments),c,i;if(b){!e&&b.length>1&&h(b,"")>-1&&(i=RegExp(this.source,d.replace.call(g(this),"g","")),d.replace.call(a.slice(b.index),i,function(){for(var a=1;a<arguments.length-2;a++)arguments[a]===undefined&&(b[a]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var j=1;j<b.length;j++)c=this._xregexp.captureNames[j-1],c&&(b[c]=b[j]);!f&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--}return b},f||(RegExp.prototype.test=function(a){var b=d.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b})}),define("ace/lib/es5-shim",["require","exports","module"],function(a,b,c){function p(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if(typeof b!="function")throw new TypeError;var c=g.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,h=b.apply(f,c.concat(g.call(arguments)));return h!==null&&Object(h)===h?h:f}return b.apply(a,c.concat(g.call(arguments)))};return d});var d=Function.prototype.call,e=Array.prototype,f=Object.prototype,g=e.slice,h=d.bind(f.toString),i=d.bind(f.hasOwnProperty),j,k,l,m,n;if(n=i(f,"__defineGetter__"))j=d.bind(f.__defineGetter__),k=d.bind(f.__defineSetter__),l=d.bind(f.__lookupGetter__),m=d.bind(f.__lookupSetter__);Array.isArray||(Array.isArray=function(a){return h(a)=="[object Array]"}),Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=G(this),c=arguments[1],d=0,e=b.length>>>0;if(h(a)!="[object Function]")throw new TypeError;while(d<e)d in b&&a.call(c,b[d],d,b),d++}),Array.prototype.map||(Array.prototype.map=function(a){var b=G(this),c=b.length>>>0,d=Array(c),e=arguments[1];if(h(a)!="[object Function]")throw new TypeError;for(var f=0;f<c;f++)f in b&&(d[f]=a.call(e,b[f],f,b));return d}),Array.prototype.filter||(Array.prototype.filter=function(a){var b=G(this),c=b.length>>>0,d=[],e=arguments[1];if(h(a)!="[object Function]")throw new TypeError;for(var f=0;f<c;f++)f in b&&a.call(e,b[f],f,b)&&d.push(b[f]);return d}),Array.prototype.every||(Array.prototype.every=function(a){var b=G(this),c=b.length>>>0,d=arguments[1];if(h(a)!="[object Function]")throw new TypeError;for(var e=0;e<c;e++)if(e in b&&!a.call(d,b[e],e,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=G(this),c=b.length>>>0,d=arguments[1];if(h(a)!="[object Function]")throw new TypeError;for(var e=0;e<c;e++)if(e in b&&a.call(d,b[e],e,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=G(this),c=b.length>>>0;if(h(a)!="[object Function]")throw new TypeError;if(!c&&arguments.length==1)throw new TypeError;var d=0,e;if(arguments.length>=2)e=arguments[1];else do{if(d in b){e=b[d++];break}if(++d>=c)throw new TypeError}while(!0);for(;d<c;d++)d in b&&(e=a.call(void 0,e,b[d],d,b));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=G(this),c=b.length>>>0;if(h(a)!="[object Function]")throw new TypeError;if(!c&&arguments.length==1)throw new TypeError;var d,e=c-1;if(arguments.length>=2)d=arguments[1];else do{if(e in b){d=b[e--];break}if(--e<0)throw new TypeError}while(!0);do e in this&&(d=a.call(void 0,d,b[e],e,b));while(e--);return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=G(this),c=b.length>>>0;if(!c)return-1;var d=0;arguments.length>1&&(d=E(arguments[1])),d=d>=0?d:Math.max(0,c+d);for(;d<c;d++)if(d in b&&b[d]===a)return d;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){var b=G(this),c=b.length>>>0;if(!c)return-1;var d=c-1;arguments.length>1&&(d=Math.min(d,E(arguments[1]))),d=d>=0?d:c-Math.abs(d);for(;d>=0;d--)if(d in b&&a===b[d])return d;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:f)});if(!Object.getOwnPropertyDescriptor){var o="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError(o+a);if(!i(a,b))return;var c,d,e;c={enumerable:!0,configurable:!0};if(n){var g=a.__proto__;a.__proto__=f;var d=l(a,b),e=m(a,b);a.__proto__=g;if(d||e)return d&&(c.get=d),e&&(c.set=e),c}return c.value=a[b],c}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),Object.create||(Object.create=function(a,b){var c;if(a===null)c={"__proto__":null};else{if(typeof a!="object")throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return b!==void 0&&Object.defineProperties(c,b),c});if(Object.defineProperty){var q=p({}),r=typeof document=="undefined"||p(document.createElement("div"));if(!q||!r)var s=Object.defineProperty}if(!Object.defineProperty||s){var t="Property description must be an object: ",u="Object.defineProperty called on non-object: ",v="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError(u+a);if(typeof c!="object"&&typeof c!="function"||c===null)throw new TypeError(t+c);if(s)try{return s.call(Object,a,b,c)}catch(d){}if(i(c,"value"))if(n&&(l(a,b)||m(a,b))){var e=a.__proto__;a.__proto__=f,delete a[b],a[b]=c.value,a.__proto__=e}else a[b]=c.value;else{if(!n)throw new TypeError(v);i(c,"get")&&j(a,b,c.get),i(c,"set")&&k(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)i(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(w){Object.freeze=function(a){return function b(b){return typeof b=="function"?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(a){return!1}),Object.isFrozen||(Object.isFrozen=function(a){return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)===a)throw new TypeError;var b="";while(i(a,b))b+="?";a[b]=!0;var c=i(a,b);return delete a[b],c});if(!Object.keys){var x=!0,y=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],z=y.length;for(var A in{toString:null})x=!1;Object.keys=function bd(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var bd=[];for(var b in a)i(a,b)&&bd.push(b);if(x)for(var c=0,d=z;c<d;c++){var e=y[c];i(a,e)&&bd.push(e)}return bd}}if(!Date.prototype.toISOString||(new Date(-621987552e5)).toISOString().indexOf("-000001")===-1)Date.prototype.toISOString=function(){var a,b,c,d;if(!isFinite(this))throw new RangeError;a=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],d=this.getUTCFullYear(),d=(d<0?"-":d>9999?"+":"")+("00000"+Math.abs(d)).slice(0<=d&&d<=9999?-4:-6),b=a.length;while(b--)c=a[b],c<10&&(a[b]="0"+c);return d+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};Date.now||(Date.now=function(){return(new Date).getTime()}),Date.prototype.toJSON||(Date.prototype.toJSON=function(a){if(typeof this.toISOString!="function")throw new TypeError;return this.toISOString()}),Date.parse("+275760-09-13T00:00:00.000Z")!==864e13&&(Date=function(a){var b=function e(b,c,d,f,g,h,i){var j=arguments.length;if(this instanceof a){var k=j==1&&String(b)===b?new a(e.parse(b)):j>=7?new a(b,c,d,f,g,h,i):j>=6?new a(b,c,d,f,g,h):j>=5?new a(b,c,d,f,g):j>=4?new a(b,c,d,f):j>=3?new a(b,c,d):j>=2?new a(b,c):j>=1?new a(b):new a;return k.constructor=e,k}return a.apply(this,arguments)},c=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$");for(var d in a)b[d]=a[d];return b.now=a.now,b.UTC=a.UTC,b.prototype=a.prototype,b.prototype.constructor=b,b.parse=function f(b){var d=c.exec(b);if(d){d.shift();for(var e=1;e<7;e++)d[e]=+(d[e]||(e<3?1:0)),e==1&&d[e]--;var f=+d.pop(),g=+d.pop(),h=d.pop(),i=0;if(h){if(g>23||f>59)return NaN;i=(g*60+f)*6e4*(h=="+"?-1:1)}var j=+d[0];return 0<=j&&j<=99?(d[0]=j+400,a.UTC.apply(this,d)+i-126227808e5):a.UTC.apply(this,d)+i}return a.parse.apply(this,arguments)},b}(Date));var B="\t\n \f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||B.trim()){B="["+B+"]";var C=new RegExp("^"+B+B+"*"),D=new RegExp(B+B+"*$");String.prototype.trim=function(){return String(this).replace(C,"").replace(D,"")}}var E=function(a){return a=+a,a!==a?a=0:a!==0&&a!==1/0&&a!==-Infinity&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a},F="a"[0]!="a",G=function(a){if(a==null)throw new TypeError;return F&&typeof a=="string"&&a?a.split(""):Object(a)}}),define("ace/lib/dom",["require","exports","module"],function(a,b,c){"use strict";var d="http://www.w3.org/1999/xhtml";b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||d,a):document.createElement(a)},b.setText=function(a,b){a.innerText!==undefined&&(a.innerText=b),a.textContent!==undefined&&(a.textContent=b)},b.hasCssClass=function(a,b){var c=a.className.split(/\s+/g);return c.indexOf(b)!==-1},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){var c=a.className.split(/\s+/g);for(;;){var d=c.indexOf(b);if(d==-1)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){var c=a.className.split(/\s+/g),d=!0;for(;;){var e=c.indexOf(b);if(e==-1)break;d=!1,c.splice(e,1)}return d&&c.push(b),a.className=c.join(" "),d},b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.hasCssString=function(a,b){var c=0,d;b=b||document;if(b.createStyleSheet&&(d=b.styleSheets)){while(c<d.length)if(d[c++].title===a)return!0}else if(d=b.getElementsByTagName("style"))while(c<d.length)if(d[c++].id===a)return!0;return!1},b.importCssString=function e(a,c,e){e=e||document;if(c&&b.hasCssString(c,e))return null;var f;if(e.createStyleSheet)f=e.createStyleSheet(),f.cssText=a,c&&(f.title=c);else{f=e.createElementNS?e.createElementNS(d,"style"):e.createElement("style"),f.appendChild(e.createTextNode(a)),c&&(f.id=c);var g=e.getElementsByTagName("head")[0]||e.documentElement;g.appendChild(f)}},b.importCssStylsheet=function(a,c){if(c.createStyleSheet)c.createStyleSheet(a);else{var d=b.createElement("link");d.rel="stylesheet",d.href=a;var e=c.getElementsByTagName("head")[0]||c.documentElement;e.appendChild(d)}},b.getInnerWidth=function(a){return parseInt(b.computedStyle(a,"paddingLeft"),10)+parseInt(b.computedStyle(a,"paddingRight"),10)+a.clientWidth},b.getInnerHeight=function(a){return parseInt(b.computedStyle(a,"paddingTop"),10)+parseInt(b.computedStyle(a,"paddingBottom"),10)+a.clientHeight},window.pageYOffset!==undefined?(b.getPageScrollTop=function(){return window.pageYOffset},b.getPageScrollLeft=function(){return window.pageXOffset}):(b.getPageScrollTop=function(){return document.body.scrollTop},b.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?b.computedStyle=function(a,b){return b?(window.getComputedStyle(a,"")||{})[b]||"":window.getComputedStyle(a,"")||{}}:b.computedStyle=function(a,b){return b?a.currentStyle[b]:a.currentStyle},b.scrollbarWidth=function(a){var c=b.createElement("p");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px";var d=b.createElement("div"),e=d.style;e.position="absolute",e.left="-10000px",e.overflow="hidden",e.width="200px",e.minWidth="0px",e.height="150px",d.appendChild(c);var f=a.body||a.documentElement;f.appendChild(d);var g=c.offsetWidth;e.overflow="scroll";var h=c.offsetWidth;return g==h&&(h=d.clientWidth),f.removeChild(d),g-h},b.setInnerHtml=function(a,b){var c=a.cloneNode(!1);return c.innerHTML=b,a.parentNode.replaceChild(c,a),c},b.setInnerText=function(a,b){var c=a.ownerDocument;c.body&&"textContent"in c.body?a.textContent=b:a.innerText=b},b.getInnerText=function(a){var b=a.ownerDocument;return b.body&&"textContent"in b.body?a.textContent:a.innerText||a.textContent||""},b.getParentWindow=function(a){return a.defaultView||a.parentWindow}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent","ace/lib/dom"],function(a,b,c){function g(a,b,c){var f=0;e.isOpera&&e.isMac?f=0|(b.metaKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.ctrlKey?8:0):f=0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0);if(c in d.MODIFIER_KEYS){switch(d.MODIFIER_KEYS[c]){case"Alt":f=2;break;case"Shift":f=4;break;case"Ctrl":f=1;break;default:f=8}c=0}return f&8&&(c==91||c==93)&&(c=0),!!f||c in d.FUNCTION_KEYS||c in d.PRINTABLE_KEYS?a(b,f,c):!1}"use strict";var d=a("./keys"),e=a("./useragent"),f=a("./dom");b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c(window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){if(a.removeEventListener)return a.removeEventListener(b,c,!1);a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c)},b.stopEvent=function(a){return b.stopPropagation(a),b.preventDefault(a),!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getDocumentX=function(a){return a.clientX?a.clientX+f.getPageScrollLeft():a.pageX},b.getDocumentY=function(a){return a.clientY?a.clientY+f.getPageScrollTop():a.pageY},b.getButton=function(a){return a.type=="dblclick"?0:a.type=="contextmenu"?2:a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},document.documentElement.setCapture?b.capture=function(a,c,d){function e(a){return c(a),b.stopPropagation(a)}function g(e){c(e),f||(f=!0,d(e)),b.removeListener(a,"mousemove",c),b.removeListener(a,"mouseup",g),b.removeListener(a,"losecapture",g),a.releaseCapture()}var f=!1;b.addListener(a,"mousemove",c),b.addListener(a,"mouseup",g),b.addListener(a,"losecapture",g),a.setCapture()}:b.capture=function(a,b,c){function d(a){b(a),a.stopPropagation()}function e(a){b&&b(a),c&&c(a),document.removeEventListener("mousemove",d,!0),document.removeEventListener("mouseup",e,!0),a.stopPropagation()}document.addEventListener("mousemove",d,!0),document.addEventListener("mouseup",e,!0)},b.addMouseWheelListener=function(a,c){var d=0,e=function(a){if(a.wheelDelta!==undefined){Math.abs(a.wheelDeltaY)>d&&(d=Math.abs(a.wheelDeltaY));if(d>5e3)var b=400;else var b=8;a.wheelDeltaX!==undefined?(a.wheelX=-a.wheelDeltaX/b,a.wheelY=-a.wheelDeltaY/b):(a.wheelX=0,a.wheelY=-a.wheelDelta/b)}else a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=(a.detail||0)*5,a.wheelY=0):(a.wheelX=0,a.wheelY=(a.detail||0)*5);c(a)};b.addListener(a,"DOMMouseScroll",e),b.addListener(a,"mousewheel",e)},b.addMultiMouseDownListener=function(a,c,d,f,g){var h=0,i,j,k=function(a){h+=1,h==1&&(i=a.clientX,j=a.clientY,setTimeout(function(){h=0},f||600));var e=b.getButton(a)==c;if(!e||Math.abs(a.clientX-i)>5||Math.abs(a.clientY-j)>5)h=0;h==d&&(h=0,g(a));if(e)return b.preventDefault(a)};b.addListener(a,"mousedown",k),e.isOldIE&&b.addListener(a,"dblclick",k)},b.addCommandKeyListener=function(a,c){var d=b.addListener;if(e.isOldGecko||e.isOpera){var f=null;d(a,"keydown",function(a){f=a.keyCode}),d(a,"keypress",function(a){return g(c,a,f)})}else{var h=null;d(a,"keydown",function(a){return h=a.keyIdentifier||a.keyCode,g(c,a,a.keyCode)})}};if(window.postMessage){var h=1;b.nextTick=function(a,c){c=c||window;var d="zero-timeout-message-"+h;b.addListener(c,"message",function e(f){f.data==d&&(b.stopPropagation(f),b.removeListener(c,"message",e),a())}),c.postMessage(d,"*")}}else b.nextTick=function(a,b){b=b||window,window.setTimeout(a,0)}}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(a,b,c){"use strict";var d=a("./oop"),e=function(){var a={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:'"'}};for(var b in a.FUNCTION_KEYS){var c=a.FUNCTION_KEYS[b].toUpperCase();a[c]=parseInt(b,10)}return d.mixin(a,a.MODIFIER_KEYS),d.mixin(a,a.PRINTABLE_KEYS),d.mixin(a,a.FUNCTION_KEYS),a}();d.mixin(b,e),b.keyCodeToString=function(a){return(e[a]||String.fromCharCode(a)).toLowerCase()}}),define("ace/lib/oop",["require","exports","module"],function(a,b,c){"use strict",b.inherits=function(){var a=function(){};return function(b,c){a.prototype=c.prototype,b.super_=c.prototype,b.prototype=new a,b.prototype.constructor=b}}(),b.mixin=function(a,b){for(var c in b)a[c]=b[c]},b.implement=function(a,c){b.mixin(a,c)}}),define("ace/lib/useragent",["require","exports","module"],function(a,b,c){"use strict";var d=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),e=navigator.userAgent;b.isWin=d=="win",b.isMac=d=="mac",b.isLinux=d=="linux",b.isIE=navigator.appName=="Microsoft Internet Explorer"&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=window.controllers&&window.navigator.product==="Gecko",b.isOldGecko=b.isGecko&&parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10)<4,b.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",b.isWebKit=parseFloat(e.split("WebKit/")[1])||undefined,b.isChrome=parseFloat(e.split(" Chrome/")[1])||undefined,b.isAIR=e.indexOf("AdobeAIR")>=0,b.isIPad=e.indexOf("iPad")>=0,b.isTouchPad=e.indexOf("TouchPad")>=0,b.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},b.getOS=function(){return b.isMac?b.OS.MAC:b.isLinux?b.OS.LINUX:b.OS.WINDOWS}}),define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands"],function(a,b,c){"use strict",a("./lib/fixoldbrowsers");var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./lib/useragent"),g=a("./keyboard/textinput").TextInput,h=a("./mouse/mouse_handler").MouseHandler,i=a("./mouse/fold_handler").FoldHandler,j=a("./keyboard/keybinding").KeyBinding,k=a("./edit_session").EditSession,l=a("./search").Search,m=a("./range").Range,n=a("./lib/event_emitter").EventEmitter,o=a("./commands/command_manager").CommandManager,p=a("./commands/default_commands").commands,q=function(a,b){var c=a.getContainerElement();this.container=c,this.renderer=a,this.textInput=new g(a.getTextAreaContainer(),this),this.keyBinding=new j(this),f.isIPad||(this.$mouseHandler=new h(this),new i(this)),this.$blockScrolling=0,this.$search=(new l).set({wrap:!0}),this.commands=new o(f.isMac?"mac":"win",p),this.setSession(b||new k(""))};((function(){d.implement(this,n),this.setKeyboardHandler=function(a){this.keyBinding.setKeyboardHandler(a)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session==a)return;if(this.session){var b=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeLeftTop",this.$onScrollLeftChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=a,this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.updateText.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:a,oldSession:b})},this.getSession=function(){return this.session},this.getSelection=function(){return this.selection},this.resize=function(){this.renderer.onResize()},this.setTheme=function(a){this.renderer.setTheme(a)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.setFontSize=function(a){this.container.style.fontSize=a,this.renderer.updateFontSize()},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(this.$highlightPending)return;var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session.findMatchingBracket(a.getCursorPosition());if(b){var c=new m(b.row,b.column,b.row,b.column+1);a.session.$bracketHighlight=a.session.addMarker(c,"ace_bracket","text")}},10)},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus")},this.onBlur=function(){this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur")},this.onDocumentChange=function(a){var b=a.data,c=b.range,d;c.start.row==c.end.row&&b.action!="insertLines"&&b.action!="removeLines"?d=c.end.row:d=Infinity,this.renderer.updateLines(c.start.row,d),this._emit("change",a),this.onCursorChange()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.renderer.updateCursor(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.renderer.moveTextAreaToCursor(this.textInput.getElement()),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.$updateHighlightActiveLine=function(){var a=this.getSession();a.$highlightLineMarker&&a.removeMarker(a.$highlightLineMarker),a.$highlightLineMarker=null;if(this.getHighlightActiveLine()&&(this.getSelectionStyle()!="line"||!this.selection.isMultiLine())){var b=this.getCursorPosition(),c=this.session.getFoldLine(b.row),d;c?d=new m(c.start.row,0,c.end.row+1,0):d=new m(b.row,0,b.row+1,0),a.$highlightLineMarker=a.addMarker(d,"ace_active_line","background")}},this.onSelectionChange=function(a){var b=this.getSession();b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null;if(!this.selection.isEmpty()){var c=this.selection.getRange(),d=this.getSelectionStyle();b.$selectionMarker=b.addMarker(c,"ace_selection",d)}else this.$updateHighlightActiveLine();this.$highlightSelectedWord&&this.session.getMode().highlightSelection(this)},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.setBreakpoints(this.session.getBreakpoints())},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(){this.renderer.updateText()},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getCopyText=function(){var a="";return this.selection.isEmpty()||(a=this.session.getTextRange(this.getSelectionRange())),this._emit("copy",a),a},this.onCut=function(){if(this.$readOnly)return;var a=this.getSelectionRange();this._emit("cut",a),this.selection.isEmpty()||(this.session.remove(a),this.clearSelection())},this.insert=function(a){var b=this.session,c=b.getMode(),d=this.getCursorPosition();if(this.getBehavioursEnabled()){var e=c.transformAction(b.getState(d.row),"insertion",this,b,a);e&&(a=e.text)}a=a.replace("\t",this.session.getTabString());if(!this.selection.isEmpty())d=this.session.remove(this.getSelectionRange()),this.clearSelection();else if(this.session.getOverwrite()){var f=new m.fromPoints(d,d);f.end.column+=a.length,this.session.remove(f)}this.clearSelection();var g=d.column,h=b.getState(d.row),i=c.checkOutdent(h,b.getLine(d.row),a),j=b.getLine(d.row),k=c.getNextLineIndent(h,j.slice(0,d.column),b.getTabString()),l=b.insert(d,a);e&&e.selection&&(e.selection.length==2?this.selection.setSelectionRange(new m(d.row,g+e.selection[0],d.row,g+e.selection[1])):this.selection.setSelectionRange(new m(d.row+e.selection[0],e.selection[1],d.row+e.selection[2],e.selection[3])));var h=b.getState(d.row);if(b.getDocument().isNewLine(a)){this.moveCursorTo(d.row+1,0);var n=b.getTabSize(),o=Number.MAX_VALUE;for(var p=d.row+1;p<=l.row;++p){var q=0;j=b.getLine(p);for(var r=0;r<j.length;++r)if(j.charAt(r)=="\t")q+=n;else if(j.charAt(r)==" ")q+=1;else break;/[^\s]/.test(j)&&(o=Math.min(q,o))}for(var p=d.row+1;p<=l.row;++p){var s=o;j=b.getLine(p);for(var r=0;r<j.length&&s>0;++r)j.charAt(r)=="\t"?s-=n:j.charAt(r)==" "&&(s-=1);b.remove(new m(p,0,p,r))}b.indentRows(d.row+1,l.row,k)}i&&c.autoOutdent(h,b,d.row)},this.onTextInput=function(a,b){b&&this._emit("paste",a),this.keyBinding.onTextInput(a,b)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.$mouseHandler.setScrollSpeed(a)},this.getScrollSpeed=function(){return this.$mouseHandler.getScrollSpeed()},this.setDragDelay=function(a){this.$mouseHandler.setDragDelay(a)},this.getDragDelay=function(){return this.$mouseHandler.getDragDelay()},this.$selectionStyle="line",this.setSelectionStyle=function(a){if(this.$selectionStyle==a)return;this.$selectionStyle=a,this.onSelectionChange(),this._emit("changeSelectionStyle",{data:a})},this.getSelectionStyle=function(){return this.$selectionStyle},this.$highlightActiveLine=!0,this.setHighlightActiveLine=function(a){if(this.$highlightActiveLine==a)return;this.$highlightActiveLine=a,this.$updateHighlightActiveLine()},this.getHighlightActiveLine=function(){return this.$highlightActiveLine},this.$highlightSelectedWord=!0,this.setHighlightSelectedWord=function(a){if(this.$highlightSelectedWord==a)return;this.$highlightSelectedWord=a,a?this.session.getMode().highlightSelection(this):this.session.getMode().clearSelectionHighlight(this)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setShowInvisibles=function(a){if(this.getShowInvisibles()==a)return;this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.$readOnly=!1,this.setReadOnly=function(a){this.$readOnly=a},this.getReadOnly=function(){return this.$readOnly},this.$modeBehaviours=!0,this.setBehavioursEnabled=function(a){this.$modeBehaviours=a},this.getBehavioursEnabled=function(){return this.$modeBehaviours},this.setShowFoldWidgets=function(a){var b=this.renderer.$gutterLayer;if(b.getShowFoldWidgets()==a)return;this.renderer.$gutterLayer.setShowFoldWidgets(a),this.$showFoldWidgets=a,this.renderer.updateFull()},this.getShowFoldWidgets=function(){return this.renderer.$gutterLayer.getShowFoldWidgets()},this.remove=function(a){this.selection.isEmpty()&&(a=="left"?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var c=this.session,d=c.getState(b.start.row),e=c.getMode().transformAction(d,"deletion",this,c,b);e&&(b=e)}this.session.remove(b),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var a=this.getCursorPosition(),b=a.column;if(b===0)return;var c=this.session.getLine(a.row),d,e;b<c.length?(d=c.charAt(b)+c.charAt(b-1),e=new m(a.row,b-1,a.row,b+1)):(d=c.charAt(b-1)+c.charAt(b-2),e=new m(a.row,b-2,a.row,b)),this.session.replace(e,d)},this.toLowerCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toLowerCase()),this.selection.setSelectionRange(a)},this.toUpperCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toUpperCase()),this.selection.setSelectionRange(a)},this.indent=function(){var a=this.session,b=this.getSelectionRange();if(!(b.start.row<b.end.row||b.start.column<b.end.column)){var d;if(this.session.getUseSoftTabs()){var f=a.getTabSize(),g=this.getCursorPosition(),h=a.documentToScreenColumn(g.row,g.column),i=f-h%f;d=e.stringRepeat(" ",i)}else d="\t";return this.insert(d)}var c=this.$getSelectedRows();a.indentRows(c.first,c.last,"\t")},this.blockOutdent=function(){var a=this.session.getSelection();this.session.outdentRows(a.getRange())},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)},this.removeLines=function(){var a=this.$getSelectedRows(),b;a.first===0||a.last+1<this.session.getLength()?b=new m(a.first,0,a.last+1,0):b=new m(a.first-1,this.session.getLine(a.first-1).length,a.last,this.session.getLine(a.last).length),this.session.remove(b),this.clearSelection()},this.moveLinesDown=function(){this.$moveLines(function(a,b){return this.session.moveLinesDown(a,b)})},this.moveLinesUp=function(){this.$moveLines(function(a,b){return this.session.moveLinesUp(a,b)})},this.moveText=function(a,b){return this.$readOnly?null:this.session.moveText(a,b)},this.copyLinesUp=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b),0})},this.copyLinesDown=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b)})},this.$moveLines=function(a){var b=this.$getSelectedRows(),c=this.selection;if(!c.isMultiLine())var d=c.getRange(),e=c.isBackwards();var f=a.call(this,b.first,b.last);d?(d.start.row+=f,d.end.row+=f,c.setSelectionRange(d,e)):(c.setSelectionAnchor(b.last+f+1,0),c.$moveSelection(function(){c.moveCursorTo(b.first+f,0)}))},this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:a.start.row,last:a.end.row}},this.onCompositionStart=function(a){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$getPageDownRow=function(){return this.renderer.getScrollBottomRow()},this.$getPageUpRow=function(){var a=this.renderer.getScrollTopRow(),b=this.renderer.getScrollBottomRow();return a-(b-a)},this.selectPageDown=function(){var a=this.$getPageDownRow()+Math.floor(this.$getVisibleRowCount()/2);this.scrollPageDown();var b=this.getSelection(),c=this.session.documentToScreenPosition(b.getSelectionLead()),d=this.session.screenToDocumentPosition(a,c.column);b.selectTo(d.row,d.column)},this.selectPageUp=function(){var a=this.renderer.getScrollTopRow()-this.renderer.getScrollBottomRow(),b=this.$getPageUpRow()+Math.round(a/2);this.scrollPageUp();var c=this.getSelection(),d=this.session.documentToScreenPosition(c.getSelectionLead()),e=this.session.screenToDocumentPosition(b,d.column);c.selectTo(e.row,e.column)},this.gotoPageDown=function(){var a=this.$getPageDownRow(),b=this.getCursorPositionScreen().column;this.scrollToRow(a),this.getSelection().moveCursorToScreen(a,b)},this.gotoPageUp=function(){var a=this.$getPageUpRow(),b=this.getCursorPositionScreen().column;this.scrollToRow(a),this.getSelection().moveCursorToScreen(a,b)},this.scrollPageDown=function(){this.scrollToRow(this.$getPageDownRow())},this.scrollPageUp=function(){this.renderer.scrollToRow(this.$getPageUpRow())},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b){this.renderer.scrollToLine(a,b)},this.centerSelection=function(){var a=this.getSelectionRange(),b=Math.floor(a.start.row+(a.end.row-a.start.row)/2);this.renderer.scrollToLine(b,!0)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(){var a=this.getCursorPosition(),b=this.session.findMatchingBracket(a);b||(a.column+=1,b=this.session.findMatchingBracket(a)),b||(a.column-=2,b=this.session.findMatchingBracket(a)),b&&(this.clearSelection(),this.moveCursorTo(b.row,b.column))},this.gotoLine=function(a,b){this.selection.clearSelection(),this.session.unfold({row:a-1,column:b||0}),this.$blockScrolling+=1,this.moveCursorTo(a-1,b||0),this.$blockScrolling-=1,this.isRowFullyVisible(this.getCursorPosition().row)||this.scrollToLine(a,!0)},this.navigateTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.navigateUp=function(a){this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(-a,0)},this.navigateDown=function(a){this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(a,0)},this.navigateLeft=function(a){if(!this.selection.isEmpty()){var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}else{a=a||1;while(a--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(a){if(!this.selection.isEmpty()){var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}else{a=a||1;while(a--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(a,b){b&&this.$search.set(b);var c=this.$search.find(this.session);if(!c)return;this.$tryReplace(c,a),c!==null&&this.selection.setSelectionRange(c)},this.replaceAll=function(a,b){b&&this.$search.set(b);var c=this.$search.findAll(this.session);if(!c.length)return;var d=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0),this.$blockScrolling+=1;for(var e=c.length-1;e>=0;--e)this.$tryReplace(c[e],a);this.selection.setSelectionRange(d),this.$blockScrolling-=1},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a);return b=this.$search.replace(c,b),b!==null?(a.end=this.session.replace(a,b),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b){this.clearSelection(),b=b||{},b.needle=a,this.$search.set(b),this.$find()},this.findNext=function(a){a=a||{},typeof a.backwards=="undefined"&&(a.backwards=!1),this.$search.set(a),this.$find()},this.findPrevious=function(a){a=a||{},typeof a.backwards=="undefined"&&(a.backwards=!0),this.$search.set(a),this.$find()},this.$find=function(a){this.selection.isEmpty()||this.$search.set({needle:this.session.getTextRange(this.getSelectionRange())}),typeof a!="undefined"&&this.$search.set({backwards:a});var b=this.$search.find(this.session);b&&(this.session.unfold(b),this.selection.setSelectionRange(b))},this.undo=function(){this.session.getUndoManager().undo()},this.redo=function(){this.session.getUndoManager().redo()},this.destroy=function(){this.renderer.destroy()}})).call(q.prototype),b.Editor=q}),define("ace/lib/lang",["require","exports","module"],function(a,b,c){"use strict",b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){return(new Array(b+1)).join(a)};var d=/^\s\s*/,e=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(d,"")},b.stringTrimRight=function(a){return a.replace(e,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){var b=[];for(var c=0,d=a.length;c<d;c++)a[c]&&typeof a[c]=="object"?b[c]=this.copyObject(a[c]):b[c]=a[c];return b},b.deepCopy=function(a){if(typeof a!="object")return a;var b=a.constructor();for(var c in a)typeof a[c]=="object"?b[c]=this.deepCopy(a[c]):b[c]=a[c];return b},b.arrayToMap=function(a){var b={};for(var c=0;c<a.length;c++)b[a[c]]=1;return b},b.arrayRemove=function(a,b){for(var c=0;c<=a.length;c++)b===a[c]&&a.splice(c,1)},b.escapeRegExp=function(a){return a.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},b.deferredCall=function(a){var b=null,c=function(){b=null,a()},d=function(a){return d.cancel(),b=setTimeout(c,a||0),d};return d.schedule=d,d.call=function(){return this.cancel(),a(),d},d.cancel=function(){return clearTimeout(b),b=null,d},d}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom"],function(a,b,c){"use strict";var d=a("../lib/event"),e=a("../lib/useragent"),f=a("../lib/dom"),g=function(a,b){function l(){try{c.select()}catch(a){}}function m(a){if(!i){var d=a||c.value;if(d){d.charCodeAt(d.length-1)==g.charCodeAt(0)?(d=d.slice(0,-1),d&&b.onTextInput(d,j)):b.onTextInput(d,j);if(!v())return!1}}i=!1,j=!1,c.value=g,l()}function v(){return document.activeElement===c}var c=f.createElement("textarea");e.isTouchPad&&c.setAttribute("x-palm-disable-auto-cap",!0),c.style.left="-10000px",c.style.position="fixed",a.insertBefore(c,a.firstChild);var g=String.fromCharCode(0);m();var h=!1,i=!1,j=!1,k="",n=function(a){setTimeout(function(){h||m(a.data)},0)},o=function(a){if(e.isOldIE&&c.value.charCodeAt(0)>128)return;setTimeout(function(){h||m()},0)},p=function(a){h=!0,b.onCompositionStart(),e.isGecko||setTimeout(q,0)},q=function(){if(!h)return;b.onCompositionUpdate(c.value)},r=function(a){h=!1,b.onCompositionEnd()},s=function(a){i=!0;var d=b.getCopyText();d?c.value=d:a.preventDefault(),l(),setTimeout(function(){m()},0)},t=function(a){i=!0;var d=b.getCopyText();d?(c.value=d,b.onCut()):a.preventDefault(),l(),setTimeout(function(){m()},0)};d.addCommandKeyListener(c,b.onCommandKey.bind(b));if(e.isOldIE){var u={13:1,27:1};d.addListener(c,"keyup",function(a){h&&(!c.value||u[a.keyCode])&&setTimeout(r,0);if((c.value.charCodeAt(0)|0)<129)return;h?q():p()})}"onpropertychange"in c&&!("oninput"in c)?d.addListener(c,"propertychange",o):d.addListener(c,"input",n),d.addListener(c,"paste",function(a){j=!0,a.clipboardData&&a.clipboardData.getData?(m(a.clipboardData.getData("text/plain")),a.preventDefault()):o()}),"onbeforecopy"in c&&typeof clipboardData!="undefined"?(d.addListener(c,"beforecopy",function(a){var c=b.getCopyText();c?clipboardData.setData("Text",c):a.preventDefault()}),d.addListener(a,"keydown",function(a){if(a.ctrlKey&&a.keyCode==88){var c=b.getCopyText();c&&(clipboardData.setData("Text",c),b.onCut()),d.preventDefault(a)}})):(d.addListener(c,"copy",s),d.addListener(c,"cut",t)),d.addListener(c,"compositionstart",p),e.isGecko&&d.addListener(c,"text",q),e.isWebKit&&d.addListener(c,"keyup",q),d.addListener(c,"compositionend",r),d.addListener(c,"blur",function(){b.onBlur()}),d.addListener(c,"focus",function(){b.onFocus(),l()}),this.focus=function(){b.onFocus(),l(),c.focus()},this.blur=function(){c.blur()},this.isFocused=v,this.getElement=function(){return c},this.onContextMenu=function(a,b){a&&(k||(k=c.style.cssText),c.style.cssText="position:fixed; z-index:1000;left:"+(a.x-2)+"px; top:"+(a.y-2)+"px;"),b&&(c.value="")},this.onContextMenuClose=function(){setTimeout(function(){k&&(c.style.cssText=k,k=""),m()},0)}};b.TextInput=g}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event"],function(a,b,c){"use strict";var d=a("../lib/event"),e=a("./default_handlers").DefaultHandlers,f=a("./default_gutter_handler").GutterHandler,g=a("./mouse_event").MouseEvent,h=function(a){this.editor=a,new e(a),new f(a),d.addListener(a.container,"mousedown",function(b){return a.focus(),d.preventDefault(b)}),d.addListener(a.container,"selectstart",function(a){return d.preventDefault(a)});var b=a.renderer.getMouseEventTarget();d.addListener(b,"mousedown",this.onMouseEvent.bind(this,"mousedown")),d.addListener(b,"click",this.onMouseEvent.bind(this,"click")),d.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove")),d.addMultiMouseDownListener(b,0,2,500,this.onMouseEvent.bind(this,"dblclick")),d.addMultiMouseDownListener(b,0,3,600,this.onMouseEvent.bind(this,"tripleclick")),d.addMultiMouseDownListener(b,0,4,600,this.onMouseEvent.bind(this,"quadclick")),d.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"));var c=a.renderer.$gutter;d.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),d.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),d.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),d.addListener(c,"mousemove",this.onMouseMove.bind(this,"gutter"))};((function(){this.$scrollSpeed=1,this.setScrollSpeed=function(a){this.$scrollSpeed=a},this.getScrollSpeed=function(){return this.$scrollSpeed},this.onMouseEvent=function(a,b){this.editor._emit(a,new g(b,this.editor))},this.$dragDelay=250,this.setDragDelay=function(a){this.$dragDelay=a},this.getDragDelay=function(){return this.$dragDelay},this.onMouseMove=function(a,b){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!c||!c.length)return;this.editor._emit(a,new g(b,this.editor))},this.onMouseWheel=function(a,b){var c=new g(b,this.editor);c.speed=this.$scrollSpeed*2,c.wheelX=b.wheelX,c.wheelY=b.wheelY,this.editor._emit(a,c)}})).call(h.prototype),b.MouseHandler=h}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/event","ace/lib/dom","ace/lib/browser_focus"],function(a,b,c){function k(a){this.editor=a,this.$clickSelection=null,this.browserFocus=new f,a.setDefaultHandler("mousedown",this.onMouseDown.bind(this)),a.setDefaultHandler("dblclick",this.onDoubleClick.bind(this)),a.setDefaultHandler("tripleclick",this.onTripleClick.bind(this)),a.setDefaultHandler("quadclick",this.onQuadClick.bind(this)),a.setDefaultHandler("mousewheel",this.onScroll.bind(this))}function l(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}"use strict";var d=a("../lib/event"),e=a("../lib/dom"),f=a("../lib/browser_focus").BrowserFocus,g=0,h=1,i=2,j=5;((function(){this.onMouseDown=function(a){function C(b){a.getShiftKey()?m.selection.selectToPosition(b):n.$clickSelection||(m.moveCursorToPosition(b),m.selection.clearSelection(b.row,b.column)),q=h}var b=a.inSelection(),c=a.pageX,f=a.pageY,k=a.getDocumentPosition(),m=this.editor,n=this,o=m.getSelectionRange(),p=o.isEmpty(),q=g;if(b&&(!this.browserFocus.isFocused()||(new Date).getTime()-this.browserFocus.lastFocus<20||!m.isFocused())){m.focus();return}var r=a.getButton();if(r!==0){p&&m.moveCursorToPosition(k),r==2&&(m.textInput.onContextMenu({x:a.clientX,y:a.clientY},p),d.capture(m.container,function(){},m.textInput.onContextMenuClose));return}b||C(k);var s=c,t=f,u=(new Date).getTime(),v,w,x,y=function(a){s=d.getDocumentX(a),t=d.getDocumentY(a)},z=function(a){clearInterval(F),q==g?C(k):q==i&&A(a),n.$clickSelection=null,q=g},A=function(a){e.removeCssClass(m.container,"ace_dragging"),m.session.removeMarker(x),m.$mouseHandler.$clickSelection||v||(m.moveCursorToPosition(k),m.selection.clearSelection(k.row,k.column));if(!v)return;if(w.contains(v.row,v.column)){v=null;return}m.clearSelection();if(a&&(a.ctrlKey||a.altKey))var b=m.session,c=b.insert(v,b.getTextRange(w));else var c=m.moveText(w,v);if(!c){v=null;return}m.selection.setSelectionRange(c)},B=function(){if(q==g){var a=l(c,f,s,t),b=(new Date).getTime();if(a>j){q=h;var d=m.renderer.screenToTextCoordinates(s,t);d.row=Math.max(0,Math.min(d.row,m.session.getLength()-1)),C(d)}else if(b-u>m.getDragDelay()){q=i,w=m.getSelectionRange();var k=m.getSelectionStyle();x=m.session.addMarker(w,"ace_selection",k),m.clearSelection(),e.addCssClass(m.container,"ace_dragging")}}q==i?E():q==h&&D()},D=function(){var a,b=m.renderer.screenToTextCoordinates(s,t);b.row=Math.max(0,Math.min(b.row,m.session.getLength()-1)),n.$clickSelection?n.$clickSelection.contains(b.row,b.column)?m.selection.setSelectionRange(n.$clickSelection):(n.$clickSelection.compare(b.row,b.column)==-1?a=n.$clickSelection.end:a=n.$clickSelection.start,m.selection.setSelectionAnchor(a.row,a.column),m.selection.selectToPosition(b)):m.selection.selectToPosition(b),m.renderer.scrollCursorIntoView()},E=function(){v=m.renderer.screenToTextCoordinates(s,t),v.row=Math.max(0,Math.min(v.row,m.session.getLength()-1)),m.moveCursorToPosition(v)};d.capture(m.container,y,z);var F=setInterval(B,20);return a.preventDefault()},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;c.moveCursorToPosition(b),c.selection.selectWord(),this.$clickSelection=c.getSelectionRange()},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;c.moveCursorToPosition(b),c.selection.selectLine(),this.$clickSelection=c.getSelectionRange()},this.onQuadClick=function(a){var b=this.editor;b.selectAll(),this.$clickSelection=b.getSelectionRange()},this.onScroll=function(a){var b=this.editor;b.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed);if(b.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed))return a.preventDefault()}})).call(k.prototype),b.DefaultHandlers=k}),define("ace/lib/browser_focus",["require","exports","module","ace/lib/oop","ace/lib/event","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./oop"),e=a("./event"),f=a("./event_emitter").EventEmitter,g=function(a){a=a||window,this.lastFocus=(new Date).getTime(),this._isFocused=!0;var b=this;"onfocusin"in a.document?(e.addListener(a.document,"focusin",function(a){b._setFocused(!0)}),e.addListener(a.document,"focusout",function(a){b._setFocused(!!a.toElement)})):(e.addListener(a,"blur",function(a){b._setFocused(!1)}),e.addListener(a,"focus",function(a){b._setFocused(!0)}))};((function(){d.implement(this,f),this.isFocused=function(){return this._isFocused},this._setFocused=function(a){if(this._isFocused==a)return;a&&(this.lastFocus=(new Date).getTime()),this._isFocused=a,this._emit("changeFocus")}})).call(g.prototype),b.BrowserFocus=g}),define("ace/lib/event_emitter",["require","exports","module"],function(a,b,c){"use strict";var d={};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry=this._eventRegistry||{},this._defaultHandlers=this._defaultHandlers||{};var c=this._eventRegistry[a]||[],d=this._defaultHandlers[a];if(!c.length&&!d)return;b=b||{},b.type=a,b.stopPropagation||(b.stopPropagation=function(){this.propagationStopped=!0}),b.preventDefault||(b.preventDefault=function(){this.defaultPrevented=!0});for(var e=0;e<c.length;e++){c[e](b);if(b.propagationStopped)break}d&&!b.defaultPrevented&&d(b)},d.setDefaultHandler=function(a,b){this._defaultHandlers=this._defaultHandlers||{};if(this._defaultHandlers[a])throw new Error("The default handler for '"+a+"' is already set");this._defaultHandlers[a]=b},d.on=d.addEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!c)var c=this._eventRegistry[a]=[];c.indexOf(b)==-1&&c.push(b)},d.removeListener=d.removeEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!c)return;var d=c.indexOf(b);d!==-1&&c.splice(d,1)},d.removeAllListeners=function(a){this._eventRegistry&&(this._eventRegistry[a]=[])},b.EventEmitter=d}),define("ace/mouse/default_gutter_handler",["require","exports","module"],function(a,b,c){function d(a){a.setDefaultHandler("gutterclick",function(b){var c=b.getDocumentPosition().row,d=a.session.selection;d.moveCursorTo(c,0),d.selectLine()})}"use strict",b.GutterHandler=d}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event"],function(a,b,c){"use strict";var d=a("../lib/event"),e=b.MouseEvent=function(a,b){this.domEvent=a,this.editor=b,this.pageX=d.getDocumentX(a),this.pageY=d.getDocumentY(a),this.clientX=a.clientX,this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};((function(){this.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){if(this.$pos)return this.$pos;var a=d.getDocumentX(this.domEvent),b=d.getDocumentY(this.domEvent);return this.$pos=this.editor.renderer.screenToTextCoordinates(a,b),this.$pos.row=Math.max(0,Math.min(this.$pos.row,this.editor.session.getLength()-1)),this.$pos},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var a=this.editor;if(a.getReadOnly())this.$inSelection=!1;else{var b=a.getSelectionRange();if(b.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=b.contains(c.row,c.column)}}return this.$inSelection},this.getButton=function(){return d.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=function(){return this.domEvent.ctrlKey||this.domEvent.metaKey}})).call(e.prototype)}),define("ace/mouse/fold_handler",["require","exports","module"],function(a,b,c){function d(a){a.on("click",function(b){var c=b.getDocumentPosition(),d=a.session,e=d.getFoldAt(c.row,c.column,1);e&&(b.getAccelKey()?d.removeFold(e):d.expandFold(e),b.stop())}),a.on("gutterclick",function(b){if(b.domEvent.target.className.indexOf("ace_fold-widget")!=-1){var c=b.getDocumentPosition().row;a.session.onFoldWidgetClick(c,b.domEvent),b.stop()}})}"use strict",b.FoldHandler=d}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event","ace/commands/default_commands"],function(a,b,c){"use strict";var d=a("../lib/keys"),e=a("../lib/event");a("../commands/default_commands");var f=function(a){this.$editor=a,this.$data={},this.$handlers=[this]};((function(){this.setKeyboardHandler=function(a){if(this.$handlers[this.$handlers.length-1]==a)return;this.$data={},this.$handlers=a?[this,a]:[this]},this.addKeyboardHandler=function(a){this.removeKeyboardHandler(a),this.$handlers.push(a)},this.removeKeyboardHandler=function(a){var b=this.$handlers.indexOf(a);return b==-1?!1:(this.$handlers.splice(b,1),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(a,b,c,d){var f;for(var g=this.$handlers.length;g--;){f=this.$handlers[g].handleKeyboard(this.$data,a,b,c,d);if(f&&f.command)break}if(!f||!f.command)return!1;var h=!1,i=this.$editor.commands;return f.command!="null"?h=i.exec(f.command,this.$editor,f.args):h=!0,h&&d&&e.stopEvent(d),h},this.handleKeyboard=function(a,b,c){return{command:this.$editor.commands.findKeyCommand(b,c)}},this.onCommandKey=function(a,b,c){var e=d.keyCodeToString(c);this.$callKeyboardHandlers(b,e,c,a)},this.onTextInput=function(a,b){var c=!1;!b&&a.length==1&&(c=this.$callKeyboardHandlers(0,a)),c||this.$editor.commands.exec("insertstring",this.$editor,a)}})).call(f.prototype),b.KeyBinding=f}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang"],function(a,b,c){function e(a,b){return{win:a,mac:b}}"use strict";var d=a("../lib/lang");b.commands=[{name:"selectall",bindKey:e("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:e(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:e("Ctrl-L","Command-L"),exec:function(a){var b=parseInt(prompt("Enter line number:"),10);isNaN(b)||a.gotoLine(b)},readOnly:!0},{name:"fold",bindKey:e("Alt-L","Alt-L"),exec:function(a){a.session.toggleFold(!1)},readOnly:!0},{name:"unfold",bindKey:e("Alt-Shift-L","Alt-Shift-L"),exec:function(a){a.session.toggleFold(!0)},readOnly:!0},{name:"foldall",bindKey:e("Alt-0","Alt-0"),exec:function(a){a.session.foldAll()},readOnly:!0},{name:"unfoldall",bindKey:e("Alt-Shift-0","Alt-Shift-0"),exec:function(a){a.session.unfold()},readOnly:!0},{name:"findnext",bindKey:e("Ctrl-K","Command-G"),exec:function(a){a.findNext()},readOnly:!0},{name:"findprevious",bindKey:e("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},readOnly:!0},{name:"find",bindKey:e("Ctrl-F","Command-F"),exec:function(a){var b=prompt("Find:",a.getCopyText());a.find(b)},readOnly:!0},{name:"overwrite",bindKey:e("Insert","Insert"),exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:e("Ctrl-Shift-Home|Alt-Shift-Up","Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},readOnly:!0},{name:"gotostart",bindKey:e("Ctrl-Home|Ctrl-Up","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},readOnly:!0},{name:"selectup",bindKey:e("Shift-Up","Shift-Up"),exec:function(a){a.getSelection().selectUp()},readOnly:!0},{name:"golineup",bindKey:e("Up","Up|Ctrl-P"),exec:function(a,b){a.navigateUp(b.times)},readOnly:!0},{name:"selecttoend",bindKey:e("Ctrl-Shift-End|Alt-Shift-Down","Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},readOnly:!0},{name:"gotoend",bindKey:e("Ctrl-End|Ctrl-Down","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},readOnly:!0},{name:"selectdown",bindKey:e("Shift-Down","Shift-Down"),exec:function(a){a.getSelection().selectDown()},readOnly:!0},{name:"golinedown",bindKey:e("Down","Down|Ctrl-N"),exec:function(a,b){a.navigateDown(b.times)},readOnly:!0},{name:"selectwordleft",bindKey:e("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},readOnly:!0},{name:"gotowordleft",bindKey:e("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},readOnly:!0},{name:"selecttolinestart",bindKey:e("Alt-Shift-Left","Command-Shift-Left"),exec:function(a){a.getSelection().selectLineStart()},readOnly:!0},{name:"gotolinestart",bindKey:e("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},readOnly:!0},{name:"selectleft",bindKey:e("Shift-Left","Shift-Left"),exec:function(a){a.getSelection().selectLeft()},readOnly:!0},{name:"gotoleft",bindKey:e("Left","Left|Ctrl-B"),exec:function(a,b){a.navigateLeft(b.times)},readOnly:!0},{name:"selectwordright",bindKey:e("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},readOnly:!0},{name:"gotowordright",bindKey:e("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},readOnly:!0},{name:"selecttolineend",bindKey:e("Alt-Shift-Right","Command-Shift-Right"),exec:function(a){a.getSelection().selectLineEnd()},readOnly:!0},{name:"gotolineend",bindKey:e("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},readOnly:!0},{name:"selectright",bindKey:e("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},readOnly:!0},{name:"gotoright",bindKey:e("Right","Right|Ctrl-F"),exec:function(a,b){a.navigateRight(b.times)},readOnly:!0},{name:"selectpagedown",bindKey:e("Shift-PageDown","Shift-PageDown"),exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:e(null,"PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:e("PageDown","Option-PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:e("Shift-PageUp","Shift-PageUp"),exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:e(null,"PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:e("PageUp","Option-PageUp"),exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"selectlinestart",bindKey:e("Shift-Home","Shift-Home"),exec:function(a){a.getSelection().selectLineStart()},readOnly:!0},{name:"selectlineend",bindKey:e("Shift-End","Shift-End"),exec:function(a){a.getSelection().selectLineEnd()},readOnly:!0},{name:"togglerecording",bindKey:e("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording()},readOnly:!0},{name:"replaymacro",bindKey:e("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:e("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching()},readOnly:!0},{name:"removeline",bindKey:e("Ctrl-D","Command-D"),exec:function(a){a.removeLines()}},{name:"togglecomment",bindKey:e("Ctrl-7","Command-7"),exec:function(a){a.toggleCommentLines()}},{name:"replace",bindKey:e("Ctrl-R","Command-Option-F"),exec:function(a){var b=prompt("Find:",a.getCopyText());if(!b)return;var c=prompt("Replacement:");if(!c)return;a.replace(c,{needle:b})}},{name:"replaceall",bindKey:e("Ctrl-Shift-R","Command-Shift-Option-F"),exec:function(a){var b=prompt("Find:");if(!b)return;var c=prompt("Replacement:");if(!c)return;a.replaceAll(c,{needle:b})}},{name:"undo",bindKey:e("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:e("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:e("Ctrl-Alt-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()}},{name:"movelinesup",bindKey:e("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()}},{name:"copylinesdown",bindKey:e("Ctrl-Alt-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()}},{name:"movelinesdown",bindKey:e("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()}},{name:"del",bindKey:e("Delete","Delete|Ctrl-D"),exec:function(a){a.remove("right")}},{name:"backspace",bindKey:e("Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace","Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")}},{name:"removetolinestart",bindKey:e("Alt-Backspace","Option-Backspace"),exec:function(a){a.removeToLineStart()}},{name:"removetolineend",bindKey:e("Alt-Delete","Ctrl-K"),exec:function(a){a.removeToLineEnd()}},{name:"removewordleft",bindKey:e("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()}},{name:"removewordright",bindKey:e("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()}},{name:"outdent",bindKey:e("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()}},{name:"indent",bindKey:e("Tab","Tab"),exec:function(a){a.indent()}},{name:"insertstring",exec:function(a,b){a.insert(b)}},{name:"inserttext",exec:function(a,b){a.insert(d.stringRepeat(b.text||"",b.times||1))}},{name:"splitline",bindKey:e(null,"Ctrl-O"),exec:function(a){a.splitLine()}},{name:"transposeletters",bindKey:e("Ctrl-T","Ctrl-T"),exec:function(a){a.transposeLetters()}},{name:"touppercase",bindKey:e("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()}},{name:"tolowercase",bindKey:e("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()}}]}),define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/edit_session/folding","ace/edit_session/bracket_match"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./lib/event_emitter").EventEmitter,g=a("./selection").Selection,h=a("./mode/text").Mode,i=a("./range").Range,j=a("./document").Document,k=a("./background_tokenizer").BackgroundTokenizer,l=function(a,b){this.$modified=!0,this.$breakpoints=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$rowCache=[],this.$wrapData=[],this.$foldData=[],this.$undoSelect=!0,this.$foldData.toString=function(){var a="";return this.forEach(function(b){a+="\n"+b.toString()}),a},a instanceof j?this.setDocument(a):this.setDocument(new j(a)),this.selection=new g(this),b?this.setMode(b):this.setMode(new h)};((function(){function o(a){return a<4352?!1:a>=4352&&a<=4447||a>=4515&&a<=4519||a>=4602&&a<=4607||a>=9001&&a<=9002||a>=11904&&a<=11929||a>=11931&&a<=12019||a>=12032&&a<=12245||a>=12272&&a<=12283||a>=12288&&a<=12350||a>=12353&&a<=12438||a>=12441&&a<=12543||a>=12549&&a<=12589||a>=12593&&a<=12686||a>=12688&&a<=12730||a>=12736&&a<=12771||a>=12784&&a<=12830||a>=12832&&a<=12871||a>=12880&&a<=13054||a>=13056&&a<=19903||a>=19968&&a<=42124||a>=42128&&a<=42182||a>=43360&&a<=43388||a>=44032&&a<=55203||a>=55216&&a<=55238||a>=55243&&a<=55291||a>=63744&&a<=64255||a>=65040&&a<=65049||a>=65072&&a<=65106||a>=65108&&a<=65126||a>=65128&&a<=65131||a>=65281&&a<=65376||a>=65504&&a<=65510}d.implement(this,f),this.setDocument=function(a){if(this.doc)throw new Error("Document is already set");this.doc=a,a.on("change",this.onChange.bind(this)),this.on("changeFold",this.onChangeFold.bind(this)),this.bgTokenizer&&(this.bgTokenizer.setDocument(this.getDocument()),this.bgTokenizer.start(0))},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(a==0){this.$rowCache=[];return}var b=this.$rowCache;for(var c=0;c<b.length;c++)if(b[c].docRow>=a){b.splice(c,b.length);return}},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);!this.$fromUndo&&this.$undoManager&&!b.ignore&&(this.$deltasDoc.push(b),c&&c.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer.start(b.range.start.row),this._emit("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a,b){return this.bgTokenizer.getTokens(a,b)},this.getTokenAt=function(a,b){var c=this.bgTokenizer.getTokens(a,a)[0].tokens,d,e=0;if(b==null)f=c.length-1,e=this.getLine(a).length;else for(var f=0;f<c.length;f++){e+=c[f].value.length;if(e>=b)break}return d=c[f],d?(d.index=f,d.start=e-d.value.length,d):null},this.setUndoManager=function(a){this.$undoManager=a,this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b]}),b.$deltas=[]},this.$informUndoManager=e.deferredCall(this.$syncInformUndoManager)}},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?e.stringRepeat(" ",this.getTabSize()):"\t"},this.$useSoftTabs=!0,this.setUseSoftTabs=function(a){if(this.$useSoftTabs===a)return;this.$useSoftTabs=a},this.getUseSoftTabs=function(){return this.$useSoftTabs},this.$tabSize=4,this.setTabSize=function(a){if(isNaN(a)||this.$tabSize===a)return;this.$modified=!0,this.$tabSize=a,this._emit("changeTabSize")},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&a.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(a){if(this.$overwrite==a)return;this.$overwrite=a,this._emit("changeOverwrite")},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b<a.length;b++)this.$breakpoints[a[b]]=!0;this._emit("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit("changeBreakpoint",{})},this.setBreakpoint=function(a){this.$breakpoints[a]=!0,this._emit("changeBreakpoint",{})},this.clearBreakpoint=function(a){delete this.$breakpoints[a],this._emit("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.addMarker=function(a,b,c,d){var e=this.$markerId++,f={range:a,type:c||"line",renderer:typeof c=="function"?c:null,clazz:b,inFront:!!d};return d?(this.$frontMarkers[e]=f,this._emit("changeFrontMarker")):(this.$backMarkers[e]=f,this._emit("changeBackMarker")),e},this.removeMarker=function(a){var b=this.$frontMarkers[a]||this.$backMarkers[a];if(!b)return;var c=b.inFront?this.$frontMarkers:this.$backMarkers;b&&(delete c[a],this._emit(b.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(a){return a?this.$frontMarkers:this.$backMarkers},this.setAnnotations=function(a){this.$annotations={};for(var b=0;b<a.length;b++){var c=a[b],d=c.row;this.$annotations[d]?this.$annotations[d].push(c):this.$annotations[d]=[c]}this._emit("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||{}},this.clearAnnotations=function(){this.$annotations={},this._emit("changeAnnotation",{})},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r?\n)/m);b?this.$autoNewLine=b[1]:this.$autoNewLine="\n"},this.getWordRange=function(a,b){var c=this.getLine(a),d=!1;b>0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe));var e=d?this.tokenRe:this.nonTokenRe,f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}var g=b;while(g<c.length&&c.charAt(g).match(e))g++;return new i(a,f,a,g)},this.getAWordRange=function(a,b){var c=this.getWordRange(a,b),d=this.getLine(c.end.row);while(d.charAt(c.end.column).match(/[ \t]/))c.end.column+=1;return c},this.setNewLineMode=function(a){this.doc.setNewLineMode(a)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.$useWorker=!0,this.setUseWorker=function(a){if(this.$useWorker==a)return;this.$useWorker=a,this.$stopWorker(),a&&this.$startWorker()},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(a){var b=a.data;this.bgTokenizer.start(b.first),this._emit("tokenizerUpdate",a)},this.$mode=null,this.setMode=function(a){if(this.$mode===a)return;this.$mode=a,this.$stopWorker(),this.$useWorker&&this.$startWorker();var b=a.getTokenizer();if(b.addEventListener!==undefined){var c=this.onReloadTokenizer.bind(this);b.addEventListener("update",c)}if(!this.bgTokenizer){this.bgTokenizer=new k(b);var d=this;this.bgTokenizer.addEventListener("update",function(a){d._emit("tokenizerUpdate",a)})}else this.bgTokenizer.setTokenizer(b);this.bgTokenizer.setDocument(this.getDocument()),this.bgTokenizer.start(0),this.tokenRe=a.tokenRe,this.nonTokenRe=a.nonTokenRe,this.$setFolding(a.foldingRules),this._emit("changeMode")},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if(typeof Worker!="undefined"&&!a.noWorker)try{this.$worker=this.$mode.createWorker(this)}catch(b){console.log("Could not load worker"),console.log(b),this.$worker=null}else this.$worker=null},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(a){a=Math.round(Math.max(0,a));if(this.$scrollTop===a)return;this.$scrollTop=a,this._emit("changeScrollTop",a)},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(a){a=Math.round(Math.max(0,a));if(this.$scrollLeft===a)return;this.$scrollLeft=a,this._emit("changeScrollLeft",a)},this.getScrollLeft=function(){return this.$scrollLeft},this.getWidth=function(){return this.$computeWidth(),this.width},this.getScreenWidth=function(){return this.$computeWidth(),this.screenWidth},this.$computeWidth=function(a){if(this.$modified||a){this.$modified=!1;var b=this.doc.getAllLines(),c=0,d=0;for(var e=0;e<b.length;e++){var f=this.getFoldLine(e),g,h;g=b[e];if(f){var i=f.range.end;g=this.getFoldDisplayLine(f),e=i.row}h=g.length,c=Math.max(c,h),this.$useWrapMode||(d=Math.max(d,this.$getStringScreenWidth(g)[0]))}this.width=c,this.$useWrapMode?this.screenWidth=this.$wrapLimit:this.screenWidth=d}},this.getLine=function(a){return this.doc.getLine(a)},this.getLines=function(a,b){return this.doc.getLines(a,b)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(a){return this.doc.getTextRange(a)},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(!a.length)return;this.$fromUndo=!0;var c=null;for(var d=a.length-1;d!=-1;d--){var e=a[d];e.group=="doc"?(this.doc.revertDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!0,c)):e.deltas.forEach(function(a){this.addFolds(a.folds)},this)}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c},this.redoChanges=function(a,b){if(!a.length)return;this.$fromUndo=!0;var c=null;for(var d=0;d<a.length;d++){var e=a[d];e.group=="doc"&&(this.doc.applyDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!1,c))}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c},this.setUndoSelect=function(a){this.$undoSelect=a},this.$getUndoSelection=function(a,b,c){function d(a){var c=a.action=="insertText"||a.action=="insertLines";return b?!c:c}var e=a[0],f,g,h=!1;d(e)?(f=e.range.clone(),h=!0):(f=i.fromPoints(e.range.start,e.range.start),h=!1);for(var j=1;j<a.length;j++)e=a[j],d(e)?(g=e.range.start,f.compare(g.row,g.column)==-1&&f.setStart(e.range.start),g=e.range.end,f.compare(g.row,g.column)==1&&f.setEnd(e.range.end),h=!0):(g=e.range.start,f.compare(g.row,g.column)==-1&&(f=i.fromPoints(e.range.start,e.range.start)),h=!1);if(c!=null){var k=c.compareRange(f);k==1?f.setStart(c.start):k==-1&&f.setEnd(c.end)}return f},this.replace=function(a,b){return this.doc.replace(a,b)},this.moveText=function(a,b){var c=this.getTextRange(a);this.remove(a);var d=b.row,e=b.column;!a.isMultiLine()&&a.start.row==d&&a.end.column<e&&(e-=c.length);if(a.isMultiLine()&&a.end.row<d){var f=this.doc.$split(c);d-=f.length-1}var g=d+a.end.row-a.start.row,h=a.isMultiLine()?a.end.column:e+a.end.column-a.start.column,j=new i(d,e,g,h);return this.insert(j.start,c),j},this.indentRows=function(a,b,c){c=c.replace(/\t/g,this.getTabString());for(var d=a;d<=b;d++)this.insert({row:d,column:0},c)},this.outdentRows=function(a){var b=a.collapseRows(),c=new i(0,0,0,0),d=this.getTabSize();for(var e=b.start.row;e<=b.end.row;++e){var f=this.getLine(e);c.start.row=e,c.end.row=e;for(var g=0;g<d;++g)if(f.charAt(g)!=" ")break;g<d&&f.charAt(g)=="\t"?(c.start.column=g,c.end.column=g+1):(c.start.column=0,c.end.column=g),this.remove(c)}},this.moveLinesUp=function(a,b){if(a<=0)return 0;var c=this.doc.removeLines(a,b);return this.doc.insertLines(a-1,c),-1},this.moveLinesDown=function(a,b){if(b>=this.doc.getLength()-1)return 0;var c=this.doc.removeLines(a,b);return this.doc.insertLines(a+1,c),1},this.duplicateLines=function(a,b){var a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b),c=this.getLines(a,b);this.doc.insertLines(a,c);var d=b-a+1;return d},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipColumnToRow=function(a,b){return b<0?0:Math.min(this.doc.getLine(a).length,b)},this.$clipPositionToDocument=function(a,b){b=Math.max(0,b);if(a<0)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);var b=this.doc.getLength()-1;return a.end.row>b?(a.end.row=b,a.end.column=this.doc.getLine(b).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0);if(a){var b=this.getLength();this.$wrapData=[];for(var c=0;c<b;c++)this.$wrapData.push([]);this.$updateWrapData(0,b-1)}this._emit("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(a,b){if(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)this.$wrapLimitRange.min=a,this.$wrapLimitRange.max=b,this.$modified=!0,this._emit("changeWrapMode")},this.adjustWrapLimit=function(a){var b=this.$constrainWrapLimit(a);return b!=this.$wrapLimit&&b>0?(this.$wrapLimit=b,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(a){var b=this.$wrapLimitRange.min;b&&(a=Math.max(b,a));var c=this.$wrapLimitRange.max;return c&&(a=Math.min(c,a)),Math.max(1,a)},this.getWrapLimit=function(){return this.$wrapLimit},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var b=this.$useWrapMode,c,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;d.indexOf("Lines")!=-1?(d=="insertLines"?f=e+a.data.lines.length:f=e,c=a.data.lines?a.data.lines.length:f-e):c=f-e;if(c!=0)if(d.indexOf("remove")!=-1){b&&this.$wrapData.splice(e,c);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-c);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=h.row&&k.shiftRow(-c)}f=e}else{var n;if(b){n=[e,0];for(var o=0;o<c;o++)n.push([]);this.$wrapData.splice.apply(this.$wrapData,n)}var j=this.$foldData,k=this.getFoldLine(e),l=0;if(k){var p=k.range.compareInside(g.row,g.column);p==0?(k=k.split(g.row,g.column),k.shiftRow(c),k.addRemoveChars(f,0,h.column-g.column)):p==-1&&(k.addRemoveChars(e,0,h.column-g.column),k.shiftRow(c)),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=e&&k.shiftRow(c)}}else{c=Math.abs(a.data.range.start.column-a.data.range.end.column),d.indexOf("remove")!=-1&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),c=-c);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,c)}return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),b&&this.$updateWrapData(e,f),i},this.$updateWrapData=function(a,b){var c=this.doc.getAllLines(),d=this.getTabSize(),f=this.$wrapData,i=this.$wrapLimit,j,k,m=a;b=Math.min(b,c.length-1);while(m<=b){k=this.getFoldLine(m,k);if(!k)j=this.$getDisplayTokens(e.stringTrimRight(c[m])),f[m]=this.$computeWrapSplits(j,i,d),m++;else{j=[],k.walk(function(a,b,d,e){var f;if(a){f=this.$getDisplayTokens(a,j.length),f[0]=g;for(var i=1;i<f.length;i++)f[i]=h}else f=this.$getDisplayTokens(c[b].substring(e,d),j.length);j=j.concat(f)}.bind(this),k.end.row,c[k.end.row].length+1);while(j.length!=0&&j[j.length-1]>=l)j.pop();f[k.start.row]=this.$computeWrapSplits(j,i,d),m=k.end.row+1}}};var b=1,c=2,g=3,h=4,j=9,l=10,m=11,n=12;this.$computeWrapSplits=function(a,b){function i(b){var d=a.slice(e,b),g=d.length;d.join("").replace(/12/g,function(){g-=1}).replace(/2/g,function(){g-=1}),f+=g,c.push(f),e=b}if(a.length==0)return[];var c=[],d=a.length,e=0,f=0;while(d-e>b){var k=e+b;if(a[k]>=l){while(a[k]>=l)k++;i(k);continue}if(a[k]==g||a[k]==h){for(k;k!=e-1;k--)if(a[k]==g)break;if(k>e){i(k);continue}k=e+b;for(k;k<a.length;k++)if(a[k]!=h)break;if(k==a.length)break;i(k);continue}var m=Math.max(k-10,e-1);while(k>m&&a[k]<g)k--;while(k>m&&a[k]==j)k--;if(k>m){i(++k);continue}k=e+b,i(k)}return c},this.$getDisplayTokens=function(a,d){var e=[],f;d=d||0;for(var g=0;g<a.length;g++){var h=a.charCodeAt(g);if(h==9){f=this.getScreenTabSize(e.length+d),e.push(m);for(var i=1;i<f;i++)e.push(n)}else h==32?e.push(l):h>39&&h<48||h>57&&h<64?e.push(j):h>=4352&&o(h)?e.push(b,c):e.push(b)}return e},this.$getStringScreenWidth=function(a,b,c){if(b==0)return[0,0];b==null&&(b=c+a.length*Math.max(this.getTabSize(),2)),c=c||0;var d,e;for(e=0;e<a.length;e++){d=a.charCodeAt(e),d==9?c+=this.getScreenTabSize(c):d>=4352&&o(d)?c+=2:c+=1;if(c>b)break}return[c,e]},this.getRowLength=function(a){return!this.$useWrapMode||!this.$wrapData[a]?1:this.$wrapData[a].length+1},this.getRowHeight=function(a,b){return this.getRowLength(b)*a.lineHeight},this.getScreenLastRowColumn=function(a){return this.documentToScreenColumn(a,this.doc.getLine(a).length)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:undefined},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(a<0)return{row:0,column:0};var c,d=0,e=0,f,g=0,h=0,i=this.$rowCache;for(var j=0;j<i.length;j++)if(i[j].screenRow<a)g=i[j].screenRow,d=i[j].docRow;else break;var k=!i.length||j==i.length,l=this.getLength()-1,m=this.getNextFoldLine(d),n=m?m.start.row:Infinity;while(g<=a){h=this.getRowLength(d);if(g+h-1>=a||d>=l)break;g+=h,d++,d>n&&(d=m.end.row+1,m=this.getNextFoldLine(d,m),n=m?m.start.row:Infinity),k&&i.push({docRow:d,screenRow:g})}if(m&&m.start.row<=d)c=this.getFoldDisplayLine(m),d=m.start.row;else{if(g+h<=a||d>l)return{row:l,column:this.getLine(l).length};c=this.getLine(d),m=null}if(this.$useWrapMode){var o=this.$wrapData[d];o&&(f=o[a-g],a>g&&o.length&&(e=o[a-g-1]||o[o.length-1],c=c.substring(e)))}return e+=this.$getStringScreenWidth(c,b)[1],this.$useWrapMode?e>=f&&(e=f-1):e=Math.min(e,c.length),m?m.idxToPosition(e):{row:d,column:e}},this.documentToScreenPosition=function(a,b){if(typeof b=="undefined")var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d;if(this.$useWrapMode){d=this.$wrapData;if(a>d.length-1)return{row:this.getScreenLength(),column:d.length==0?0:d[d.length-1].length-1}}var e=0,f=null,g=null;g=this.getFoldAt(a,b,1),g&&(a=g.start.row,b=g.start.column);var h,i=0,j=this.$rowCache;for(var k=0;k<j.length;k++)if(j[k].docRow<a)e=j[k].screenRow,i=j[k].docRow;else break;var l=!j.length||k==j.length,m=this.getNextFoldLine(i),n=m?m.start.row:Infinity;while(i<a){if(i>=n){h=m.end.row+1;if(h>a)break;m=this.getNextFoldLine(h,m),n=m?m.start.row:Infinity}else h=i+1;e+=this.getRowLength(i),i=h,l&&j.push({docRow:i,screenRow:e})}var o="";m&&i>=n?(o=this.getFoldDisplayLine(m,a,b),f=m.start.row):(o=this.getLine(a).substring(0,b),f=a);if(this.$useWrapMode){var p=d[f],q=0;while(o.length>=p[q])e++,q++;o=o.substring(p[q-1]||0,o.length)}return{row:e,column:this.$getStringScreenWidth(o)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null;if(!this.$useWrapMode){a=this.getLength();var c=this.$foldData;for(var d=0;d<c.length;d++)b=c[d],a-=b.end.row-b.start.row}else{var e=this.$wrapData.length,f=0,d=0,b=this.$foldData[d++],g=b?b.start.row:Infinity;while(f<e)a+=this.$wrapData[f].length+1,f++,f>g&&(f=b.end.row+1,b=this.$foldData[d++],g=b?b.start.row:Infinity)}return a}})).call(l.prototype),a("./edit_session/folding").Folding.call(l.prototype),a("./edit_session/bracket_match").BracketMatch.call(l.prototype),b.EditSession=l}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./lib/event_emitter").EventEmitter,g=a("./range").Range,h=function(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.selectionLead=this.doc.createAnchor(0,0),this.selectionAnchor=this.doc.createAnchor(0,0);var b=this;this.selectionLead.on("change",function(a){b._emit("changeCursor"),b.$isEmpty||b._emit("changeSelection"),!b.$preventUpdateDesiredColumnOnChange&&a.old.column!=a.value.column&&b.$updateDesiredColumn()}),this.selectionAnchor.on("change",function(){b.$isEmpty||b._emit("changeSelection")})};((function(){d.implement(this,f),this.isEmpty=function(){return this.$isEmpty||this.selectionAnchor.row==this.selectionLead.row&&this.selectionAnchor.column==this.selectionLead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.selectionLead.getPosition()},this.setSelectionAnchor=function(a,b){this.selectionAnchor.setPosition(a,b),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.selectionAnchor.getPosition()},this.getSelectionLead=function(){return this.selectionLead.getPosition()},this.shiftSelection=function(a){if(this.$isEmpty){this.moveCursorTo(this.selectionLead.row,this.selectionLead.column+a);return}var b=this.getSelectionAnchor(),c=this.getSelectionLead(),d=this.isBackwards();(!d||b.column!==0)&&this.setSelectionAnchor(b.row,b.column+a),(d||c.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(c.row,c.column+a)})},this.isBackwards=function(){var a=this.selectionAnchor,b=this.selectionLead;return a.row>b.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.selectionAnchor,b=this.selectionLead;return this.isEmpty()?g.fromPoints(b,b):this.isBackwards()?g.fromPoints(b,a):g.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(a,this.doc.getLine(a).length),this.moveCursorTo(0,0)},this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.$updateDesiredColumn()},this.$updateDesiredColumn=function(){var a=this.getCursor();this.$desiredColumn=this.session.documentToScreenColumn(a.row,a.column)},this.$moveSelection=function(a){var b=this.selectionLead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.selectWord=function(){var a=this.getCursor(),b=this.session.getWordRange(a.row,a.column);this.setSelectionRange(b)},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.selectLine=function(){var a=this.selectionLead.row,b,c=this.session.getFoldLine(a);c?(a=c.start.row,b=c.end.row):b=a,this.setSelectionAnchor(a,0),this.$moveSelection(function(){this.moveCursorTo(b+1,0)})},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var a=this.selectionLead.getPosition(),b;if(b=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(b.start.row,b.start.column);else if(a.column==0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column-c,a.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a=this.selectionLead.getPosition(),b;if(b=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(b.end.row,b.end.column);else if(this.selectionLead.column==this.doc.getLine(this.selectionLead.row).length)this.selectionLead.row<this.doc.getLength()-1&&this.moveCursorTo(this.selectionLead.row+1,0);else{var c=this.session.getTabSize(),a=this.selectionLead;this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column,a.column+c).split(" ").length-1==c?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var a=this.selectionLead.row,b=this.selectionLead.column,c=this.session.documentToScreenRow(a,b),d=this.session.screenToDocumentPosition(c,0),e=this.session.getDisplayLine(a,null,d.row,d.column),f=e.match(/^\s*/);f[0].length==b?this.moveCursorTo(d.row,d.column):this.moveCursorTo(d.row,d.column+f[0].length)},this.moveCursorLineEnd=function(){var a=this.selectionLead,b=this.session.getDocumentLastRowColumnPosition(a.row,a.column);this.moveCursorTo(b.row,b.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorWordRight=function(){var a=this.selectionLead.row,b=this.selectionLead.column,c=this.doc.getLine(a),d=c.substring(b),e;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(a,b,1);if(f){this.moveCursorTo(f.end.row,f.end.column);return}if(e=this.session.nonTokenRe.exec(d))b+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,d=c.substring(b);if(b>=c.length){this.moveCursorTo(a,c.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}if(e=this.session.tokenRe.exec(d))b+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(a,b)},this.moveCursorWordLeft=function(){var a=this.selectionLead.row,b=this.selectionLead.column,c;if(c=this.session.getFoldAt(a,b,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var d=this.session.getFoldStringAt(a,b,-1);d==null&&(d=this.doc.getLine(a).substring(0,b));var f=e.stringReverse(d),g;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;if(g=this.session.nonTokenRe.exec(f))b-=this.session.nonTokenRe.lastIndex,f=f.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0;if(b<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}if(g=this.session.tokenRe.exec(f))b-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(a,b)},this.moveCursorBy=function(a,b){var c=this.session.documentToScreenPosition(this.selectionLead.row,this.selectionLead.column),d=b===0&&this.$desiredColumn||c.column,e=this.session.screenToDocumentPosition(c.row+a,d);this.moveCursorTo(e.row,e.column+b,b===0)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,b,c){var d=this.session.getFoldAt(a,b,1);d&&(a=d.start.row,b=d.start.column),this.$preventUpdateDesiredColumnOnChange=!0,this.selectionLead.setPosition(a,b),this.$preventUpdateDesiredColumnOnChange=!1,c||this.$updateDesiredColumn(this.selectionLead.column)},this.moveCursorToScreen=function(a,b,c){var d=this.session.screenToDocumentPosition(a,b);a=d.row,b=d.column,this.moveCursorTo(a,b,c)}})).call(h.prototype),b.Selection=h}),define("ace/range",["require","exports","module"],function(a,b,c){"use strict";var d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};((function(){this.isEequal=function(a){return this.start.row==a.start.row&&this.end.row==a.end.row&&this.start.column==a.start.column&&this.end.column==a.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return this.compare(a,b)==0},this.compareRange=function(a){var b,c=a.end,d=a.start;return b=this.compare(c.row,c.column),b==1?(b=this.compare(d.row,d.column),b==1?2:b==0?1:0):b==-1?-2:(b=this.compare(d.row,d.column),b==-1?-1:b==1?42:0)},this.comparePoint=function(a){return this.compare(a.row,a.column)},this.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){return this.compare(a,b)==0?this.isEnd(a,b)||this.isStart(a,b)?!1:!0:!1},this.insideStart=function(a,b){return this.compare(a,b)==0?this.isEnd(a,b)?!1:!0:!1},this.insideEnd=function(a,b){return this.compare(a,b)==0?this.isStart(a,b)?!1:!0:!1},this.compare=function(a,b){return!this.isMultiLine()&&a===this.start.row?b<this.start.column?-1:b>this.end.column?1:0:a<this.start.row?-1:a>this.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};if(this.start.row>b)var e={row:b+1,column:0};if(this.start.row<a)var e={row:a,column:0};if(this.end.row<a)var c={row:a,column:0};return d.fromPoints(e||this.start,c||this.end)},this.extend=function(a,b){var c=this.compare(a,b);if(c==0)return this;if(c==-1)var e={row:a,column:b};else var f={row:a,column:b};return d.fromPoints(e||this.start,f||this.end)},this.isEmpty=function(){return this.start.row==this.end.row&&this.start.column==this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return d.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},this.toScreenRange=function(a){var b=a.documentToScreenPosition(this.start),c=a.documentToScreenPosition(this.end);return new d(b.row,b.column,c.row,c.column)}})).call(d.prototype),d.fromPoints=function(a,b){return new d(a.row,a.column,b.row,b.column)},b.Range=d}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode"],function(a,b,c){"use strict";var d=a("../tokenizer").Tokenizer,e=a("./text_highlight_rules").TextHighlightRules,f=a("./behaviour").Behaviour,g=a("../unicode"),h=function(){this.$tokenizer=new d((new e).getRules()),this.$behaviour=new f};((function(){this.tokenRe=new RegExp("^["+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer},this.toggleCommentLines=function(a,b,c,d){},this.getNextLineIndent=function(a,b,c){return""},this.checkOutdent=function(a,b,c){return!1},this.autoOutdent=function(a,b,c){},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""},this.createWorker=function(a){return null},this.highlightSelection=function(a){var b=a.session;b.$selectionOccurrences||(b.$selectionOccurrences=[]),b.$selectionOccurrences.length&&this.clearSelectionHighlight(a);var c=a.getSelectionRange();if(c.isEmpty()||c.isMultiLine())return;var d=c.start.column-1,e=c.end.column+1,f=b.getLine(c.start.row),g=f.length,h=f.substring(Math.max(d,0),Math.min(e,g));if(d>=0&&/^[\w\d]/.test(h)||e<=g&&/[\w\d]$/.test(h))return;h=f.substring(c.start.column,c.end.column);if(!/^[\w\d]+$/.test(h))return;var i=a.getCursorPosition(),j={wrap:!0,wholeWord:!0,caseSensitive:!0,needle:h},k=a.$search.getOptions();a.$search.set(j);var l=a.$search.findAll(b);l.forEach(function(a){if(!a.contains(i.row,i.column)){var c=b.addMarker(a,"ace_selected_word","text");b.$selectionOccurrences.push(c)}}),a.$search.set(k)},this.clearSelectionHighlight=function(a){if(!a.session.$selectionOccurrences)return;a.session.$selectionOccurrences.forEach(function(b){a.session.removeMarker(b)}),a.session.$selectionOccurrences=[]},this.createModeDelegates=function(a){if(!this.$embeds)return;this.$modes={};for(var b=0;b<this.$embeds.length;b++)a[this.$embeds[b]]&&(this.$modes[this.$embeds[b]]=new a[this.$embeds[b]]);var c=["toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction"];for(var b=0;b<c.length;b++)(function(a){var d=c[b],e=a[d];a[c[b]]=function(){return this.$delegator(d,arguments,e)}})(this)},this.$delegator=function(a,b,c){var d=b[0];for(var e=0;e<this.$embeds.length;e++){if(!this.$modes[this.$embeds[e]])continue;var f=d.split(this.$embeds[e]);if(!f[0]&&f[1]){b[0]=f[1];var g=this.$modes[this.$embeds[e]];return g[a].apply(g,b)}}var h=c.apply(this,b);return c?h:undefined},this.transformAction=function(a,b,c,d,e){if(this.$behaviour){var f=this.$behaviour.getBehaviours();for(var g in f)if(f[g][b]){var h=f[g][b].apply(this,arguments);if(h)return h}}}})).call(h.prototype),b.Mode=h}),define("ace/tokenizer",["require","exports","module"],function(a,b,c){"use strict";var d=function(a,b){b=b?"g"+b:"g",this.rules=a,this.regExps={},this.matchMappings={};for(var c in this.rules){var d=this.rules[c],e=d,f=[],g=0,h=this.matchMappings[c]={};for(var i=0;i<e.length;i++){var j=(new RegExp("(?:("+e[i].regex+")|(.))")).exec("a").length-2,k=e[i].regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+g+1)});h[g]={rule:i,len:j},g+=j,f.push(k)}this.regExps[c]=new RegExp("(?:("+f.join(")|(")+")|(.))",b)}};((function(){this.getLineTokens=function(a,b){var c=b,d=this.rules[c],e=this.matchMappings[c],f=this.regExps[c];f.lastIndex=0;var g,h=[],i=0,j={type:null,value:""};while(g=f.exec(a)){var k="text",l=null,m=[g[0]];for(var n=0;n<g.length-2;n++)if(g[n+1]!==undefined){l=d[e[n].rule],e[n].len>1&&(m=g.slice(n+2,n+1+e[n].len)),typeof l.token=="function"?k=l.token.apply(this,m):k=l.token;var o=l.next;o&&o!==c&&(c=o,d=this.rules[c],e=this.matchMappings[c],i=f.lastIndex,f=this.regExps[c],f.lastIndex=i);break}if(m[0]){typeof k=="string"&&(m=[m.join("")],k=[k]);for(var n=0;n<m.length;n++)(!l||l.merge||k[n]==="text")&&j.type===k[n]?j.value+=m[n]:(j.type&&h.push(j),j={type:k[n],value:m[n]})}if(i==a.length)break;i=f.lastIndex}return j.type&&h.push(j),{tokens:h,state:c}}})).call(d.prototype),b.Tokenizer=d}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(a,b,c){"use strict";var d=a("../lib/lang"),e=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{token:"text",regex:".+"}]}};((function(){this.addRules=function(a,b){for(var c in a){var d=a[c];for(var e=0;e<d.length;e++){var f=d[e];f.next?f.next=b+f.next:f.next=b+c}this.$rules[b+c]=d}},this.getRules=function(){return this.$rules},this.embedRules=function(a,b,c,e){var f=(new a).getRules();if(e)for(var g=0;g<e.length;g++)e[g]=b+e[g];else{e=[];for(var h in f)e.push(b+h)}this.addRules(f,b);for(var g=0;g<e.length;g++)Array.prototype.unshift.apply(this.$rules[e[g]],d.deepCopy(c));this.$embeds||(this.$embeds=[]),this.$embeds.push(b)},this.getEmbeds=function(){return this.$embeds}})).call(e.prototype),b.TextHighlightRules=e}),define("ace/mode/behaviour",["require","exports","module"],function(a,b,c){"use strict";var d=function(){this.$behaviours={}};((function(){this.add=function(a,b,c){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[a]:this.$behaviours[a]={}}this.$behaviours[a][b]=c},this.addBehaviours=function(a){for(var b in a)for(var c in a[b])this.add(b,c,a[b][c])},this.remove=function(a){this.$behaviours&&this.$behaviours[a]&&delete this.$behaviours[a]},this.inherit=function(a,b){if(typeof a=="function")var c=(new a).getBehaviours(b);else var c=a.getBehaviours(b);this.addBehaviours(c)},this.getBehaviours=function(a){if(!a)return this.$behaviours;var b={};for(var c=0;c<a.length;c++)this.$behaviours[a[c]]&&(b[a[c]]=this.$behaviours[a[c]]);return b}})).call(d.prototype),b.Behaviour=d}),define("ace/unicode",["require","exports","module"],function(a,b,c){function d(a){var c=/\w{4}/g;for(var d in a)b.packages[d]=a[d].replace(c,"\\u$&")}"use strict",b.packages={},d({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=a("./range").Range,g=a("./anchor").Anchor,h=function(a){this.$lines=[],Array.isArray(a)?this.insertLines(0,a):a.length==0?this.$lines=[""]:this.insert({row:0,column:0},a)};((function(){d.implement(this,e),this.setValue=function(a){var b=this.getLength();this.remove(new f(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new g(this,a,b)},"aaa".split(/a/).length==0?this.$split=function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r\n|\r|\n)/m);b?this.$autoNewLine=b[1]:this.$autoNewLine="\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";case"auto":return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(a){if(this.$newLineMode===a)return;this.$newLineMode=a},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return a=="\r\n"||a=="\r"||a=="\n"},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.$lines[a.start.row].substring(a.start.column,a.end.column);var b=[];return b.push(this.$lines[a.start.row].substring(a.start.column)),b.push.apply(b,this.getLines(a.start.row+1,a.end.row-1)),b.push(this.$lines[a.end.row].substring(0,a.end.column)),b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();return a.row>=b&&(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length),a},this.insert=function(a,b){if(b.length==0)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=c.length==0?null:c.splice(c.length-1,1)[0];return a=this.insertInLine(a,d),e!==null&&(a=this.insertNewLine(a),a=this.insertLines(a.row,c),a=this.insertInLine(a,e||"")),a},this.insertLines=function(a,b){if(b.length==0)return{row:a,column:0};var c=[a,0];c.push.apply(c,b),this.$lines.splice.apply(this.$lines,c);var d=new f(a,0,a+b.length,0),e={action:"insertLines",range:d,lines:b};return this._emit("change",{data:e}),d.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};return this._emit("change",{data:d}),c},this.insertInLine=function(a,b){if(b.length==0)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};return this._emit("change",{data:e}),d},this.remove=function(a){a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end);if(a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=a.start.column==0?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this.removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b==c)return;var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};return this._emit("change",{data:i}),d.start},this.removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};return this._emit("change",{data:e}),d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._emit("change",{data:g})},this.replace=function(a,b){if(b.length==0&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;this.remove(a);if(b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.insertLines(d.start.row,c.lines):c.action=="insertText"?this.insert(d.start,c.text):c.action=="removeLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="removeText"&&this.remove(d)}},this.revertDeltas=function(a){for(var b=a.length-1;b>=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="insertText"?this.remove(d):c.action=="removeLines"?this.insertLines(d.start.row,c.lines):c.action=="removeText"&&this.insert(d.start,c.text)}}})).call(h.prototype),b.Document=h}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=b.Anchor=function(a,b,c){this.document=a,typeof c=="undefined"?this.setPosition(b.row,b.column):this.setPosition(b,c),this.$onChange=this.onChange.bind(this),a.on("change",this.$onChange)};((function(){d.implement(this,e),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(a){var b=a.data,c=b.range;if(c.start.row==c.end.row&&c.start.row!=this.row)return;if(c.start.row>this.row)return;if(c.start.row==this.row&&c.start.column>this.column)return;var d=this.row,e=this.column;b.action==="insertText"?c.start.row===d&&c.start.column<=e?c.start.row===c.end.row?e+=c.end.column-c.start.column:(e-=c.start.column,d+=c.end.row-c.start.row):c.start.row!==c.end.row&&c.start.row<d&&(d+=c.end.row-c.start.row):b.action==="insertLines"?c.start.row<=d&&(d+=c.end.row-c.start.row):b.action=="removeText"?c.start.row==d&&c.start.column<e?c.end.column>=e?e=c.start.column:e=Math.max(0,e-(c.end.column-c.start.column)):c.start.row!==c.end.row&&c.start.row<d?(c.end.row==d&&(e=Math.max(0,e-c.end.column)+c.start.column),d-=c.end.row-c.start.row):c.end.row==d&&(d-=c.end.row-c.start.row,e=Math.max(0,e-c.end.column)+c.start.column):b.action=="removeLines"&&c.start.row<=d&&(c.end.row<=d?d-=c.end.row-c.start.row:(d=c.start.row,e=0)),this.setPosition(d,e,!0)},this.setPosition=function(a,b,c){var d;c?d={row:a,column:b}:d=this.$clipPositionToDocument(a,b);if(this.row==d.row&&this.column==d.column)return;var e={row:this.row,column:this.column};this.row=d.row,this.column=d.column,this._emit("change",{old:e,value:d})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.$clipPositionToDocument=function(a,b){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),b<0&&(c.column=0),c}})).call(f.prototype)}),define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=function(a,b){this.running=!1,this.lines=[],this.currentLine=0,this.tokenizer=a;var c=this;this.$worker=function(){if(!c.running)return;var a=new Date,b=c.currentLine,d=c.doc,e=0,f=d.getLength();while(c.currentLine<f){c.lines[c.currentLine]=c.$tokenizeRows(c.currentLine,c.currentLine)[0],c.currentLine++,e+=1;if(e%5==0&&new Date-a>20){c.fireUpdateEvent(b,c.currentLine-1),c.running=setTimeout(c.$worker,20);return}}c.running=!1,c.fireUpdateEvent(b,f-1)}};((function(){d.implement(this,e),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._emit("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a,b){return this.$tokenizeRows(a,b)},this.getState=function(a){return this.$tokenizeRows(a,a)[0].state},this.$tokenizeRows=function(a,b){if(!this.doc||isNaN(a)||isNaN(b))return[{state:"start",tokens:[]}];var c=[],d="start",e=!1;a>0&&this.lines[a-1]?(d=this.lines[a-1].state,e=!0):a==0?(d="start",e=!0):this.lines.length>0&&(d=this.lines[this.lines.length-1].state);var f=this.doc.getLines(a,b);for(var g=a;g<=b;g++)if(!this.lines[g]){var h=this.tokenizer.getLineTokens(f[g-a]||"",d),d=h.state;c.push(h),e&&(this.lines[g]=h)}else{var h=this.lines[g];d=h.state,c.push(h)}return c}})).call(f.prototype),b.BackgroundTokenizer=f}),define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(a,b,c){function h(){this.getFoldAt=function(a,b,c){var d=this.getFoldLine(a);if(!d)return null;var e=d.folds;for(var f=0;f<e.length;f++){var g=e[f];if(g.range.contains(a,b)){if(c==1&&g.range.isEnd(a,b))continue;if(c==-1&&g.range.isStart(a,b))continue;return g}}},this.getFoldsInRange=function(a){a=a.clone();var b=a.start,c=a.end,d=this.$foldData,e=[];b.column+=1,c.column-=1;for(var f=0;f<d.length;f++){var g=d[f].range.compareRange(a);if(g==2)continue;if(g==-2)break;var h=d[f].folds;for(var i=0;i<h.length;i++){var j=h[i];g=j.range.compareRange(a);if(g==-2)break;if(g==2)continue;if(g==42)break;e.push(j)}}return e},this.getAllFolds=function(){function c(b){a.push(b);if(!b.subFolds)return;for(var d=0;d<b.subFolds.length;d++)c(b.subFolds[d])}var a=[],b=this.$foldData;for(var d=0;d<b.length;d++)for(var e=0;e<b[d].folds.length;e++)c(b[d].folds[e]);return a},this.getFoldStringAt=function(a,b,c,d){d=d||this.getFoldLine(a);if(!d)return null;var e={end:{column:0}},f,g;for(var h=0;h<d.folds.length;h++){g=d.folds[h];var i=g.range.compareEnd(a,b);if(i==-1){f=this.getLine(g.start.row).substring(e.end.column,g.start.column);break}if(i===0)return null;e=g}return f||(f=this.getLine(g.start.row).substring(e.end.column)),c==-1?f.substring(0,b-e.end.column):c==1?f.substring(b-e.end.column):f},this.getFoldLine=function(a,b){var c=this.$foldData,d=0;b&&(d=c.indexOf(b)),d==-1&&(d=0);for(d;d<c.length;d++){var e=c[d];if(e.start.row<=a&&e.end.row>=a)return e;if(e.end.row>a)return null}return null},this.getNextFoldLine=function(a,b){var c=this.$foldData,d=0;b&&(d=c.indexOf(b)),d==-1&&(d=0);for(d;d<c.length;d++){var e=c[d];if(e.end.row>=a)return e}return null},this.getFoldedRowCount=function(a,b){var c=this.$foldData,d=b-a+1;for(var e=0;e<c.length;e++){var f=c[e],g=f.end.row,h=f.start.row;if(g>=b){h<b&&(h>=a?d-=b-h:d=0);break}g>=a&&(h>=a?d-=g-h:d-=g-a+1)}return d},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),a},this.addFold=function(a,b){var c=this.$foldData,d=!1,g;a instanceof f?g=a:g=new f(b,a),this.$clipRangeToDocument(g.range);var h=g.start.row,i=g.start.column,j=g.end.row,k=g.end.column;if(g.placeholder.length<2)throw"Placeholder has to be at least 2 characters";if(h==j&&k-i<2)throw"The range has to be at least 2 characters width";var l=this.getFoldAt(h,i,1),m=this.getFoldAt(j,k,-1);if(l&&m==l)return l.addSubFold(g);if(l&&!l.range.isStart(h,i)||m&&!m.range.isEnd(j,k))throw"A fold can't intersect already existing fold"+g.range+l.range;var n=this.getFoldsInRange(g.range);n.length>0&&(this.removeFolds(n),g.subFolds=n);for(var o=0;o<c.length;o++){var p=c[o];if(j==p.start.row){p.addFold(g),d=!0;break}if(h==p.end.row){p.addFold(g),d=!0;if(!g.sameRow){var q=c[o+1];if(q&&q.start.row==j){p.merge(q);break}}break}if(j<=p.start.row)break}return d||(p=this.$addFoldLine(new e(this.$foldData,g))),this.$useWrapMode&&this.$updateWrapData(p.start.row,p.start.row),this.$modified=!0,this._emit("changeFold",{data:g}),g},this.addFolds=function(a){a.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(a){var b=a.foldLine,c=b.start.row,d=b.end.row,e=this.$foldData,f=b.folds;if(f.length==1)e.splice(e.indexOf(b),1);else if(b.range.isEnd(a.end.row,a.end.column))f.pop(),b.end.row=f[f.length-1].end.row,b.end.column=f[f.length-1].end.column;else if(b.range.isStart(a.start.row,a.start.column))f.shift(),b.start.row=f[0].start.row,b.start.column=f[0].start.column;else if(a.sameRow)f.splice(f.indexOf(a),1);else{var g=b.split(a.start.row,a.start.column);f=g.folds,f.shift(),g.start.row=f[0].start.row,g.start.column=f[0].start.column}this.$useWrapMode&&this.$updateWrapData(c,d),this.$modified=!0,this._emit("changeFold",{data:a})},this.removeFolds=function(a){var b=[];for(var c=0;c<a.length;c++)b.push(a[c]);b.forEach(function(a){this.removeFold(a)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(a){this.addFold(a)},this),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(a,b){var c,e;a==null?c=new d(0,0,this.getLength(),0):typeof a=="number"?c=new d(a,0,a,this.getLine(a).length):"row"in a?c=d.fromPoints(a,a):c=a,e=this.getFoldsInRange(c);if(b)this.removeFolds(e);else while(e.length)this.expandFolds(e),e=this.getFoldsInRange(c)},this.isRowFolded=function(a,b){return!!this.getFoldLine(a,b)},this.getRowFoldEnd=function(a,b){var c=this.getFoldLine(a,b);return c?c.end.row:a},this.getFoldDisplayLine=function(a,b,c,d,e){d==null&&(d=a.start.row,e=0),b==null&&(b=a.end.row,c=this.getLine(b).length);var f=this.doc,g="";return a.walk(function(a,b,c,h){if(b<d)return;if(b==d){if(c<e)return;h=Math.max(e,h)}a?g+=a:g+=f.getLine(b).substring(h,c)}.bind(this),b,c),g},this.getDisplayLine=function(a,b,c,d){var e=this.getFoldLine(a);if(!e){var f;return f=this.doc.getLine(a),f.substring(d||0,b||f.length)}return this.getFoldDisplayLine(e,a,b,c,d)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(b){var c=b.folds.map(function(a){return a.clone()});return new e(a,c)}),a},this.toggleFold=function(a){var b=this.selection,c=b.getRange(),d,e;if(c.isEmpty()){var f=c.start;d=this.getFoldAt(f.row,f.column);if(d){this.expandFold(d);return}(e=this.findMatchingBracket(f))?c.comparePoint(e)==1?c.end=e:(c.start=e,c.start.column++,c.end.column--):(e=this.findMatchingBracket({row:f.row,column:f.column+1}))?(c.comparePoint(e)==1?c.end=e:c.start=e,c.start.column++):c=this.getCommentFoldRange(f.row,f.column)||c}else{var g=this.getFoldsInRange(c);if(a&&g.length){this.expandFolds(g);return}g.length==1&&(d=g[0])}d||(d=this.getFoldAt(c.start.row,c.start.column));if(d&&d.range.toString()==c.toString()){this.expandFold(d);return}var h="...";if(!c.isMultiLine()){h=this.getTextRange(c);if(h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,c)},this.getCommentFoldRange=function(a,b){var c=new g(this,a,b),e=c.getCurrentToken();if(e&&/^comment|string/.test(e.type)){var f=new d,h=new RegExp(e.type.replace(/\..*/,"\\."));do e=c.stepBackward();while(e&&h.test(e.type));c.stepForward(),f.start.row=c.getCurrentTokenRow(),f.start.column=c.getCurrentTokenColumn()+2,c=new g(this,a,b);do e=c.stepForward();while(e&&h.test(e.type));return e=c.stepBackward(),f.end.row=c.getCurrentTokenRow(),f.end.column=c.getCurrentTokenColumn()+e.value.length,f}},this.foldAll=function(a,b){var c=this.foldWidgets;b=b||this.getLength();for(var d=a||0;d<b;d++){c[d]==null&&(c[d]=this.getFoldWidget(d));if(c[d]!="start")continue;var e=this.getFoldWidgetRange(d);if(e&&e.end.row<b)try{this.addFold("...",e)}catch(f){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle==a)return;this.$foldStyle=a,a=="manual"&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)},this.$setFolding=function(a){if(this.$foldMode==a)return;this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation");if(!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)},this.onFoldWidgetClick=function(a,b){var c=this.getFoldWidget(a),d=this.getLine(a),e=b.shiftKey,f=e||b.ctrlKey||b.altKey||b.metaKey,g;c=="end"?g=this.getFoldAt(a,0,-1):g=this.getFoldAt(a,d.length,1);if(g){f?this.removeFold(g):this.expandFold(g);return}var h=this.getFoldWidgetRange(a);if(h){if(!h.isMultiLine()){g=this.getFoldAt(h.start.row,h.start.column,1);if(g&&h.isEequal(g.range)){this.removeFold(g);return}}e||this.addFold("...",h),f&&this.foldAll(h.start.row+1,h.end.row)}else f&&this.foldAll(a+1,this.getLength()),b.target.className+=" invalid"},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(e===0)this.foldWidgets[d]=null;else if(b.action=="removeText"||b.action=="removeLines")this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}"use strict";var d=a("../range").Range,e=a("./fold_line").FoldLine,f=a("./fold").Fold,g=a("../token_iterator").TokenIterator;b.Folding=h}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(a,b,c){function e(a,b){this.foldData=a,Array.isArray(b)?this.folds=b:b=this.folds=[b];var c=b[b.length-1];this.range=new d(b[0].start.row,b[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}"use strict";var d=a("../range").Range;((function(){this.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(b){b.start.row+=a,b.end.row+=a})},this.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw"Can't add a fold to this FoldLine as it has no connection";this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw"Trying to add fold to FoldRow that doesn't have a matching row";a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var d=0,e=this.folds,f,g,h,i=!0;b==null&&(b=this.end.row,c=this.end.column);for(var j=0;j<e.length;j++){f=e[j],g=f.range.compareStart(b,c);if(g==-1){a(null,b,c,d,i);return}h=a(null,f.start.row,f.start.column,d,i),h=!h&&a(f.placeholder,f.start.row,f.start.column,d);if(h||g==0)return;i=!f.sameRow,d=f.end.column}a(null,b,c,d,i)},this.getNextFoldTo=function(a,b){var c,d;for(var e=0;e<this.folds.length;e++){c=this.folds[e],d=c.range.compareEnd(a,b);if(d==-1)return{fold:c,kind:"after"};if(d==0)return{fold:c,kind:"inside"}}return null},this.addRemoveChars=function(a,b,c){var d=this.getNextFoldTo(a,b),e,f;if(d){e=d.fold;if(d.kind=="inside"&&e.start.column!=b&&e.start.row!=a)throw"Moving characters inside of a fold should never be reached";if(e.start.row==a){f=this.folds;var g=f.indexOf(e);g==0&&(this.start.column+=c);for(g;g<f.length;g++){e=f[g],e.start.column+=c;if(!e.sameRow)return;e.end.column+=c}this.end.column+=c}}},this.split=function(a,b){var c=this.getNextFoldTo(a,b).fold,d=this.folds,f=this.foldData;if(!c)return null;var g=d.indexOf(c),h=d[g-1];this.end.row=h.end.row,this.end.column=h.end.column,d=d.splice(g,d.length-g);var i=new e(f,d);return f.splice(f.indexOf(this)+1,0,i),i},this.merge=function(a){var b=a.folds;for(var c=0;c<b.length;c++)this.addFold(b[c]);var d=this.foldData;d.splice(d.indexOf(a),1)},this.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(b){a.push(" "+b.toString())}),a.push("]"),a.join("\n")},this.idxToPosition=function(a){var b=0,c;for(var d=0;d<this.folds.length;d++){var c=this.folds[d];a-=c.start.column-b;if(a<0)return{row:c.start.row,column:c.start.column+a};a-=c.placeholder.length;if(a<0)return c.start;b=c.end.column}return{row:this.end.row,column:this.end.column+a}}})).call(e.prototype),b.FoldLine=e}),define("ace/edit_session/fold",["require","exports","module"],function(a,b,c){"use strict";var d=b.Fold=function(a,b){this.foldLine=null,this.placeholder=b,this.range=a,this.start=a.start,this.end=a.end,this.sameRow=a.start.row==a.end.row,this.subFolds=[]};((function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(a){this.foldLine=a,this.subFolds.forEach(function(b){b.setFoldLine(a)})},this.clone=function(){var a=this.range.clone(),b=new d(a,this.placeholder);return this.subFolds.forEach(function(a){b.subFolds.push(a.clone())}),b},this.addSubFold=function(a){if(this.range.isEequal(a))return this;if(!this.range.containsRange(a))throw"A fold can't intersect already existing fold"+a.range+this.range;var b=a.range.start.row,c=a.range.start.column;for(var d=0,e=-1;d<this.subFolds.length;d++){e=this.subFolds[d].range.compare(b,c);if(e!=1)break}var f=this.subFolds[d];if(e==0)return f.addSubFold(a);var b=a.range.end.row,c=a.range.end.column;for(var g=d,e=-1;g<this.subFolds.length;g++){e=this.subFolds[g].range.compare(b,c);if(e!=1)break}var h=this.subFolds[g];if(e==0)throw"A fold can't intersect already existing fold"+a.range+this.range;var i=this.subFolds.splice(d,g-d,a);return a.setFoldLine(this.foldLine),a}})).call(d.prototype)}),define("ace/token_iterator",["require","exports","module"],function(a,b,c){"use strict";var d=function(a,b,c){this.$session=a,this.$row=b,this.$rowTokens=a.getTokens(b,b)[0].tokens;var d=a.getTokenAt(b,c);this.$tokenIndex=d?d.index:-1};((function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){this.$row-=1;if(this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row,this.$row)[0].tokens,this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var a=this.$session.getLength();this.$tokenIndex+=1;while(this.$tokenIndex>=this.$rowTokens.length){this.$row+=1;if(this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row,this.$row)[0].tokens,this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(c!==undefined)return c;c=0;while(b>0)b-=1,c+=a[b].value.length;return c}})).call(d.prototype),b.TokenIterator=d}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator"],function(a,b,c){function e(){this.findMatchingBracket=function(a){if(a.column==0)return null;var b=this.getLine(a.row).charAt(a.column-1);if(b=="")return null;var c=b.match(/([\(\[\{])|([\)\]\}])/);return c?c[1]?this.$findClosingBracket(c[1],a):this.$findOpeningBracket(c[2],a):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(a,b){var c=this.$brackets[a],e=1,f=new d(this,b.row,b.column),g=f.getCurrentToken();if(!g)return null;var h=new RegExp("(\\.?"+g.type.replace(".","|").replace("rparen","lparen|rparen")+")+"),i=b.column-f.getCurrentTokenColumn()-2,j=g.value;for(;;){while(i>=0){var k=j.charAt(i);if(k==c){e-=1;if(e==0)return{row:f.getCurrentTokenRow(),column:i+f.getCurrentTokenColumn()}}else k==a&&(e+=1);i-=1}do g=f.stepBackward();while(g&&!h.test(g.type));if(g==null)break;j=g.value,i=j.length-1}return null},this.$findClosingBracket=function(a,b){var c=this.$brackets[a],e=1,f=new d(this,b.row,b.column),g=f.getCurrentToken();if(!g)return null;var h=new RegExp("(\\.?"+g.type.replace(".","|").replace("lparen","lparen|rparen")+")+"),i=b.column-f.getCurrentTokenColumn();for(;;){var j=g.value,k=j.length;while(i<k){var l=j.charAt(i);if(l==c){e-=1;if(e==0)return{row:f.getCurrentTokenRow(),column:i+f.getCurrentTokenColumn()}}else l==a&&(e+=1);i+=1}do g=f.stepForward();while(g&&!h.test(g.type));if(g==null)break;i=0}return null}}"use strict";var d=a("../token_iterator").TokenIterator;b.BracketMatch=e}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b,c){"use strict";var d=a("./lib/lang"),e=a("./lib/oop"),f=a("./range").Range,g=function(){this.$options={needle:"",backwards:!1,wrap:!1,caseSensitive:!1,wholeWord:!1,scope:g.ALL,regExp:!1}};g.ALL=1,g.SELECTION=2,function(){this.set=function(a){return e.mixin(this.$options,a),this},this.getOptions=function(){return d.copyObject(this.$options)},this.find=function(a){if(!this.$options.needle)return null;if(this.$options.backwards)var b=this.$backwardMatchIterator(a);else b=this.$forwardMatchIterator(a);var c=null;return b.forEach(function(a){return c=a,!0}),c},this.findAll=function(a){var b=this.$options;if(!b.needle)return[];if(b.backwards)var c=this.$backwardMatchIterator(a);else c=this.$forwardMatchIterator(a);var d=!b.start&&b.wrap&&b.scope==g.ALL;d&&(b.start={row:0,column:0});var e=[];return c.forEach(function(a){e.push(a)}),d&&(b.start=null),e},this.replace=function(a,b){var c=this.$assembleRegExp(),d=c.exec(a);return d&&d[0].length==a.length?this.$options.regExp?a.replace(c,b):b:null},this.$forwardMatchIterator=function(a){var b=this.$assembleRegExp(),c=this;return{forEach:function(d){c.$forwardLineIterator(a).forEach(function(a,e,f){e&&(a=a.substring(e));var g=[];a.replace(b,function(a){var b=arguments[arguments.length-2];return g.push({str:a,offset:e+b}),a});for(var h=0;h<g.length;h++){var i=g[h],j=c.$rangeFromMatch(f,i.offset,i.str.length);if(d(j))return!0}})}}},this.$backwardMatchIterator=function(a){var b=this.$assembleRegExp(),c=this;return{forEach:function(d){c.$backwardLineIterator(a).forEach(function(a,e,f){e&&(a=a.substring(e));var g=[];a.replace(b,function(a,b){return g.push({str:a,offset:e+b}),a});for(var h=g.length-1;h>=0;h--){var i=g[h],j=c.$rangeFromMatch(f,i.offset,i.str.length);if(d(j))return!0}})}}},this.$rangeFromMatch=function(a,b,c){return new f(a,b,a,b+c)},this.$assembleRegExp=function(){if(this.$options.regExp)var a=this.$options.needle;else a=d.escapeRegExp(this.$options.needle);this.$options.wholeWord&&(a="\\b"+a+"\\b");var b="g";this.$options.caseSensitive||(b+="i");var c=new RegExp(a,b);return c},this.$forwardLineIterator=function(a){function k(e){var f=a.getLine(e);return b&&e==c.end.row&&(f=f.substring(0,c.end.column)),j&&e==d.row&&(f=f.substring(0,d.column)),f}var b=this.$options.scope==g.SELECTION,c=this.$options.range||a.getSelection().getRange(),d=this.$options.start||c[b?"start":"end"],e=b?c.start.row:0,f=b?c.start.column:0,h=b?c.end.row:a.getLength()-1,i=this.$options.wrap,j=!1;return{forEach:function(a){var b=d.row,c=k(b),g=d.column,l=!1;j=!1;while(!a(c,g,b)){if(l)return;b++,g=0;if(b>h)if(i)b=e,g=f,j=!0;else return;b==d.row&&(l=!0),c=k(b)}}}},this.$backwardLineIterator=function(a){var b=this.$options.scope==g.SELECTION,c=this.$options.range||a.getSelection().getRange(),d=this.$options.start||c[b?"end":"start"],e=b?c.start.row:0,f=b?c.start.column:0,h=b?c.end.row:a.getLength()-1,i=this.$options.wrap;return{forEach:function(g){var j=d.row,k=a.getLine(j).substring(0,d.column),l=0,m=!1,n=!1;while(!g(k,l,j)){if(m)return;j--,l=0;if(j<e)if(i)j=h,n=!0;else return;j==d.row&&(m=!0),k=a.getLine(j),b&&(j==e?l=f:j==h&&(k=k.substring(0,c.end.column))),n&&j==d.row&&(l=d.column)}}}}}.call(g.prototype),b.Search=g}),define("ace/commands/command_manager",["require","exports","module","ace/lib/keys"],function(a,b,c){"use strict";var d=a("../lib/keys"),e=function(a,b){if(typeof a!="string")throw new TypeError("'platform' argument must be either 'mac' or 'win'");this.platform=a,this.commands={},this.commmandKeyBinding={},b&&b.forEach(this.addCommand,this)};((function(){function a(a,c,e){var f,g=0,h=b(a);for(var i=0,j=h.length;i<j;i++)d.KEY_MODS[h[i]]?g|=d.KEY_MODS[h[i]]:f=h[i]||"-";return{key:f,hashId:g}}function b(a,b){return a.toLowerCase().trim().split(new RegExp("[\\s ]*\\-[\\s ]*","g"),999)}this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a){var b=typeof a=="string"?a:a.name;a=this.commands[b],delete this.commands[b];var c=this.commmandKeyBinding;for(var d in c)for(var e in c[d])c[d][e]==a&&delete c[d][e]},this.addCommands=function(a){Object.keys(a).forEach(function(b){var c=a[b];if(typeof c=="string")return this.bindKey(c,b);typeof c=="function"&&(c={exec:c}),c.name||(c.name=b),this.addCommand(c)},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(b){this.removeCommand(a[b])},this)},this.bindKey=function(b,c){if(!b)return;var d=this.commmandKeyBinding;b.split("|").forEach(function(b){var e=a(b,c),f=e.hashId;(d[f]||(d[f]={}))[e.key]=c})},this.bindKeys=function(a){Object.keys(a).forEach(function(b){this.bindKey(b,a[b])},this)},this._buildKeyHash=function(a){var b=a.bindKey;if(!b)return;var c=typeof b=="string"?b:b[this.platform];this.bindKey(c,a)},this.findKeyCommand=function c(a,b){typeof b=="number"&&(b=d.keyCodeToString(b));var c=this.commmandKeyBinding;return c[a]&&c[a][b.toLowerCase()]},this.exec=function(a,b,c){return typeof a=="string"&&(a=this.commands[a]),a?b&&b.$readOnly&&!a.readOnly?!1:(a.exec(b,c||{}),!0):!1},this.toggleRecording=function(){if(this.$inReplay)return;return this.recording?(this.macro.pop(),this.exec=this.normal_exec,this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.oldMacro=this.macro,this.macro=[],this.normal_exec=this.exec,this.exec=function(a,b,c){return this.macro.push([a,c]),this.normal_exec(a,b,c)},this.recording=!0)},this.replay=function(a){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording();try{this.$inReplay=!0,this.macro.forEach(function(b){typeof b=="string"?this.exec(b,a):this.exec(b[0],a,b[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(a){return a.map(function(a){return typeof a[0]!="string"&&(a[0]=a[0].name),a[1]||(a=a[0]),a})}})).call(e.prototype),b.CommandManager=e}),define("ace/undomanager",["require","exports","module"],function(a,b,c){"use strict";var d=function(){this.reset()};((function(){this.execute=function(a){var b=a.args[0];this.$doc=a.args[1],this.$undoStack.push(b),this.$redoStack=[]},this.undo=function(a){var b=this.$undoStack.pop(),c=null;return b&&(c=this.$doc.undoChanges(b,a),this.$redoStack.push(b)),c},this.redo=function(a){var b=this.$redoStack.pop(),c=null;return b&&(c=this.$doc.redoChanges(b,a),this.$undoStack.push(b)),c},this.reset=function(){this.$undoStack=[],this.$redoStack=[]},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0}})).call(d.prototype),b.UndoManager=d}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/lib/event_emitter","text!ace/css/editor.css"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./lib/event"),g=a("./lib/useragent"),h=a("./layer/gutter").Gutter,i=a("./layer/marker").Marker,j=a("./layer/text").Text,k=a("./layer/cursor").Cursor,l=a("./scrollbar").ScrollBar,m=a("./renderloop").RenderLoop,n=a("./lib/event_emitter").EventEmitter,o=a("text!./css/editor.css");e.importCssString(o,"ace_editor");var p=function(a,b){var c=this;this.container=a,e.addCssClass(a,"ace_editor"),this.setTheme(b),this.$gutter=e.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=e.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=e.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onResize.bind(this,!0)),this.$markerBack=new i(this.content);var d=this.$textLayer=new j(this.content);this.canvas=d.element,this.$markerFront=new i(this.content),this.characterWidth=d.getCharacterWidth(),this.lineHeight=d.getLineHeight(),this.$cursorLayer=new k(this.content),this.$cursorPadding=8,this.$horizScroll=!0,this.$horizScrollAlwaysVisible=!0,this.scrollBar=new l(a),this.scrollBar.addEventListener("scroll",function(a){c.session.setScrollTop(a.data)}),this.scrollTop=0,this.scrollLeft=0,f.addListener(this.scroller,"scroll",function(){c.session.setScrollLeft(c.scroller.scrollLeft)}),this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){c.characterWidth=d.getCharacterWidth(),c.lineHeight=d.getLineHeight(),c.$updatePrintMargin(),c.onResize(!0),c.$loop.schedule(c.CHANGE_FULL)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:1,characterWidth:1,minHeight:1,maxHeight:1,offset:0,height:1},this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.setPadding(4),this.$updatePrintMargin()};((function(){this.showGutter=!0,this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,d.implement(this,n),this.setSession=function(a){this.session=a,this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(a,b){b===undefined&&(b=Infinity),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:a,lastRow:b},this.$loop.schedule(this.CHANGE_LINES)},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(){this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.onResize=function(a){var b=this.CHANGE_SIZE,c=this.$size,d=e.getInnerHeight(this.container);if(a||c.height!=d)c.height=d,this.scroller.style.height=d+"px",c.scrollerHeight=this.scroller.clientHeight,this.scrollBar.setHeight(c.scrollerHeight),this.session&&(this.session.setScrollTop(this.getScrollTop()),b|=this.CHANGE_FULL);var f=e.getInnerWidth(this.container);if(a||c.width!=f){c.width=f;var g=this.showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=g+"px",c.scrollerWidth=Math.max(0,f-g-this.scrollBar.getWidth()),this.scroller.style.width=c.scrollerWidth+"px";if(this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)b|=this.CHANGE_FULL}this.$loop.schedule(b)},this.adjustWrapLimit=function(){var a=this.$size.scrollerWidth-this.$padding*2,b=Math.floor(a/this.characterWidth);return this.session.adjustWrapLimit(b)},this.setShowInvisibles=function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)},this.getShowInvisibles=function(){return this.$textLayer.showInvisibles},this.$showPrintMargin=!0,this.setShowPrintMargin=function(a){this.$showPrintMargin=a,this.$updatePrintMargin()},this.getShowPrintMargin=function(){return this.$showPrintMargin},this.$printMarginColumn=80,this.setPrintMarginColumn=function(a){this.$printMarginColumn=a,this.$updatePrintMargin()},this.getPrintMarginColumn=function(){return this.$printMarginColumn},this.getShowGutter=function(){return this.showGutter},this.setShowGutter=function(a){if(this.showGutter===a)return;this.$gutter.style.display=a?"block":"none",this.showGutter=a,this.onResize(!0)},this.$updatePrintMargin=function(){var a;if(!this.$showPrintMargin&&!this.$printMarginEl)return;this.$printMarginEl||(a=e.createElement("div"),a.className="ace_print_margin_layer",this.$printMarginEl=e.createElement("div"),this.$printMarginEl.className="ace_print_margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.$textLayer.element));var b=this.$printMarginEl.style;b.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",b.visibility=this.$showPrintMargin?"visible":"hidden"},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.moveTextAreaToCursor=function(a){if(g.isIE)return;if(this.layerConfig.lastRow===0)return;var b=this.$cursorLayer.getPixelPosition();if(!b)return;var c=this.content.getBoundingClientRect(),d=this.layerConfig.offset;a.style.left=c.left+b.left+"px",a.style.top=c.top+b.top-this.scrollTop+d+"px"},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var a=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+a},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(a){this.$padding=a,this.$textLayer.setPadding(a),this.$cursorLayer.setPadding(a),this.$markerFront.setPadding(a),this.$markerBack.setPadding(a),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.getHScrollBarAlwaysVisible=function(){return this.$horizScrollAlwaysVisible},this.setHScrollBarAlwaysVisible=function(a){this.$horizScrollAlwaysVisible!=a&&(this.$horizScrollAlwaysVisible=a,(!this.$horizScrollAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL))},this.$updateScrollBar=function(){this.scrollBar.setInnerHeight(this.layerConfig.maxHeight),this.scrollBar.setScrollTop(this.scrollTop)},this.$renderChanges=function(a){if(!a||!this.session)return;(a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL)&&this.$computeLayerConfig();if(a&this.CHANGE_FULL){this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$updateScrollBar();return}if(a&this.CHANGE_SCROLL){a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$updateScrollBar();return}a&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_LINES?(this.$updateLines(),this.$updateScrollBar(),this.showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_GUTTER&&this.showGutter&&this.$gutterLayer.update(this.layerConfig),a&this.CHANGE_CURSOR&&this.$cursorLayer.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),a&this.CHANGE_SIZE&&this.$updateScrollBar(),a&this.CHANGE_H_SCROLL&&(this.scroller.scrollLeft=this.scrollLeft)},this.$computeLayerConfig=function(){var a=this.session,b=this.scrollTop%this.lineHeight,c=this.$size.scrollerHeight+this.lineHeight,d=this.$getLongestLine(),e=this.$horizScrollAlwaysVisible||this.$size.scrollerWidth-d<0,f=this.$horizScroll!==e;this.$horizScroll=e,f&&(this.scroller.style.overflowX=e?"scroll":"hidden");var g=this.session.getScreenLength()*this.lineHeight;this.session.setScrollTop(Math.max(0,Math.min(this.scrollTop,g-this.$size.scrollerHeight)));var h=Math.ceil(c/this.lineHeight)-1,i=Math.max(0,Math.round((this.scrollTop-b)/this.lineHeight)),j=i+h,k,l,m={lineHeight:this.lineHeight};i=a.screenToDocumentRow(i,0);var n=a.getFoldLine(i);n&&(i=n.start.row),k=a.documentToScreenRow(i,0),l=a.getRowHeight(m,i),j=Math.min(a.screenToDocumentRow(j,0),a.getLength()-1),c=this.$size.scrollerHeight+a.getRowHeight(m,j)+l,b=this.scrollTop-k*this.lineHeight,this.layerConfig={width:d,padding:this.$padding,firstRow:i,firstRowScreen:k,lastRow:j,lineHeight:this.lineHeight,characterWidth:this.characterWidth,minHeight:c,maxHeight:g,offset:b,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-b+"px",this.content.style.marginTop=-b+"px",this.content.style.width=d+2*this.$padding+"px",this.content.style.height=c+"px",f&&this.onResize(!0)},this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;if(c.width!=this.$getLongestLine())return this.$textLayer.update(c);if(a>c.lastRow+1)return;if(b<c.firstRow)return;if(b===Infinity){this.showGutter&&this.$gutterLayer.update(c),this.$textLayer.update(c);return}this.$textLayer.updateLines(c,a,b)},this.$getLongestLine=function(){var a=this.session.getScreenWidth();return this.$textLayer.showInvisibles&&(a+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(a*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(a,b){this.$gutterLayer.addGutterDecoration(a,b),this.$loop.schedule(this.CHANGE_GUTTER)},this.removeGutterDecoration=function(a,b){this.$gutterLayer.removeGutterDecoration(a,b),this.$loop.schedule(this.CHANGE_GUTTER)},this.setBreakpoints=function(a){this.$gutterLayer.setBreakpoints(a),this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(a){this.$gutterLayer.setAnnotations(a),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollCursorIntoView=function(){if(this.$size.scrollerHeight===0)return;var a=this.$cursorLayer.getPixelPosition(),b=a.left,c=a.top;this.scrollTop>c&&this.session.setScrollTop(c),this.scrollTop+this.$size.scrollerHeight<c+this.lineHeight&&this.session.setScrollTop(c+this.lineHeight-this.$size.scrollerHeight);var d=this.scrollLeft;d>b&&(b<this.$padding+2*this.layerConfig.characterWidth&&(b=0),this.session.setScrollLeft(b)),d+this.$size.scrollerWidth<b+this.characterWidth&&this.session.setScrollLeft(Math.round(b+this.characterWidth-this.$size.scrollerWidth))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollTop()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(a){this.session.setScrollTop(a*this.lineHeight)},this.scrollToLine=function(a,b){var c=this.$cursorLayer.getPixelPosition({row:a,column:0}),d=c.top;b&&(d-=this.$size.scrollerHeight/2),this.session.setScrollTop(d)},this.scrollToY=function(a){this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)},this.scrollToX=function(a){a<=this.$padding&&(a=0),this.scrollLeft!==a&&(this.$loop.schedule(this.CHANGE_H_SCROLL),this.scrollLeft=a)},this.scrollBy=function(a,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),a&&this.session.setScrollLeft(this.session.getScrollLeft()+a)},this.isScrollableBy=function(a,b){if(b<0&&this.session.getScrollTop()>0)return!0;if(b>0&&this.session.getScrollTop()+this.$size.scrollerHeight<this.layerConfig.maxHeight)return!0},this.screenToTextCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=Math.round((a+this.scrollLeft-c.left-this.$padding-e.getPageScrollLeft())/this.characterWidth),f=Math.floor((b+this.scrollTop-c.top-e.getPageScrollTop())/this.lineHeight);return this.session.screenToDocumentPosition(f,Math.max(d,0))},this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),e=this.$padding+Math.round(d.column*this.characterWidth),f=d.row*this.lineHeight;return{pageX:c.left+e-this.scrollLeft,pageY:c.top+f-this.scrollTop}},this.visualizeFocus=function(){e.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){e.removeCssClass(this.container,"ace_focus")},this.showComposition=function(a){this.$composition||(this.$composition=e.createElement("div"),this.$composition.className="ace_composition",this.content.appendChild(this.$composition)),this.$composition.innerHTML="&#160;";var b=this.$cursorLayer.getPixelPosition(),c=this.$composition.style;c.top=b.top+"px",c.left=b.left+this.$padding+"px",c.height=this.lineHeight+"px",this.hideCursor()},this.setCompositionText=function(a){e.setInnerText(this.$composition,a)},this.hideComposition=function(){this.showCursor();if(!this.$composition)return;var a=this.$composition.style;a.top="-10000px",a.left="-10000px"},this.setTheme=function(b){function d(a){e.importCssString(a.cssText,a.cssClass,c.container.ownerDocument),c.$theme&&e.removeCssClass(c.container,c.$theme),c.$theme=a?a.cssClass:null,c.$theme&&e.addCssClass(c.container,c.$theme),a&&a.isDark?e.addCssClass(c.container,"ace_dark"):e.removeCssClass(c.container,"ace_dark"),c.$size&&(c.$size.width=0,c.onResize())}var c=this;this.$themeValue=b,!b||typeof b=="string"?(b=b||"ace/theme/textmate",a([b],function(a){d(a)})):d(b)},this.getTheme=function(){return this.$themeValue},this.setStyle=function(a){e.addCssClass(this.container,a)},this.unsetStyle=function(a){e.removeCssClass(this.container,a)},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}})).call(p.prototype),b.VirtualRenderer=p}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/dom"),e=a("../lib/oop"),f=a("../lib/event_emitter").EventEmitter,g=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$breakpoints=[],this.$annotations=[],this.$decorations=[]};((function(){e.implement(this,f),this.setSession=function(a){this.session=a},this.addGutterDecoration=function(a,b){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" ace_"+b},this.removeGutterDecoration=function(a,b){this.$decorations[a]=this.$decorations[a].replace(" ace_"+b,"")},this.setBreakpoints=function(a){this.$breakpoints=a.concat()},this.setAnnotations=function(a){this.$annotations=[];for(var b in a)if(a.hasOwnProperty(b)){var c=a[b];if(!c)continue;var d=this.$annotations[b]={text:[]};for(var e=0;e<c.length;e++){var f=c[e],g=f.text.replace(/"/g,"&quot;").replace(/'/g,"&#8217;").replace(/</,"&lt;");d.text.indexOf(g)===-1&&d.text.push(g);var h=f.type;h=="error"?d.className="ace_error":h=="warning"&&d.className!="ace_error"?d.className="ace_warning":h=="info"&&!d.className&&(d.className="ace_info")}}},this.update=function(a){this.$config=a;var b={className:"",text:[]},c=[],e=a.firstRow,f=a.lastRow,g=this.session.getNextFoldLine(e),h=g?g.start.row:Infinity,i=this.$showFoldWidgets&&this.session.foldWidgets;for(;;){e>h&&(e=g.end.row+1,g=this.session.getNextFoldLine(e,g),h=g?g.start.row:Infinity);if(e>f)break;var j=this.$annotations[e]||b;c.push("<div class='ace_gutter-cell",this.$decorations[e]||"",this.$breakpoints[e]?" ace_breakpoint ":" ",j.className,"' title='",j.text.join("\n"),"' style='height:",a.lineHeight,"px;'>",e+1);if(i){var k=i[e];k==null&&(k=i[e]=this.session.getFoldWidget(e)),k&&c.push("<span class='ace_fold-widget ",k,k=="start"&&e==h&&e<g.end.row?" closed":" open","'></span>")}var l=this.session.getRowLength(e)-1;while(l--)c.push("</div><div class='ace_gutter-cell' style='height:",a.lineHeight,"px'>¦");c.push("</div>"),e++}this.element=d.setInnerHtml(this.element,c.join("")),this.element.style.height=a.minHeight+"px";var m=this.element.offsetWidth;m!==this.gutterWidth&&(this.gutterWidth=m,this._emit("changeGutterWidth",m))},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(a){a?d.addCssClass(this.element,"ace_folding-enabled"):d.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=a},this.getShowFoldWidgets=function(){return this.$showFoldWidgets}})).call(g.prototype),b.Gutter=g}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b,c){"use strict";var d=a("../range").Range,e=a("../lib/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};((function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(!a)return;this.config=a;var b=[];for(var c in this.markers){var d=this.markers[c],f=d.range.clipRows(a.firstRow,a.lastRow);if(f.isEmpty())continue;f=f.toScreenRange(this.session);if(d.renderer){var g=this.$getTop(f.start.row,a),h=Math.round(this.$padding+f.start.column*a.characterWidth);d.renderer(b,f,h,g,a)}else f.isMultiLine()?d.type=="text"?this.drawTextMarker(b,f,d.clazz,a):this.drawMultiLineMarker(b,f,d.clazz,a,d.type):this.drawSingleLineMarker(b,f,d.clazz,a,null,d.type)}this.element=e.setInnerHtml(this.element,b.join(""))},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,c,e){var f=b.start.row,g=new d(f,b.start.column,f,this.session.getScreenLastRowColumn(f));this.drawSingleLineMarker(a,g,c,e,1,"text"),f=b.end.row,g=new d(f,0,f,b.end.column),this.drawSingleLineMarker(a,g,c,e,0,"text");for(f=b.start.row+1;f<b.end.row;f++)g.start.row=f,g.end.row=f,g.end.column=this.session.getScreenLastRowColumn(f),this.drawSingleLineMarker(a,g,c,e,1,"text")},this.drawMultiLineMarker=function(a,b,c,d,e){var f=e==="background"?0:this.$padding,g=d.width+2*this.$padding-f,h=d.lineHeight,i=Math.round(g-b.start.column*d.characterWidth),j=this.$getTop(b.start.row,d),k=Math.round(f+b.start.column*d.characterWidth);a.push("<div class='",c,"' style='","height:",h,"px;","width:",i,"px;","top:",j,"px;","left:",k,"px;'></div>"),j=this.$getTop(b.end.row,d),i=Math.round(b.end.column*d.characterWidth),a.push("<div class='",c,"' style='","height:",h,"px;","width:",i,"px;","top:",j,"px;","left:",f,"px;'></div>"),h=(b.end.row-b.start.row-1)*d.lineHeight;if(h<0)return;j=this.$getTop(b.start.row+1,d),a.push("<div class='",c,"' style='","height:",h,"px;","width:",g,"px;","top:",j,"px;","left:",f,"px;'></div>")},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=f==="background"?0:this.$padding,h=d.lineHeight;if(f==="background")var i=d.width;else i=Math.round((b.end.column+(e||0)-b.start.column)*d.characterWidth);var j=this.$getTop(b.start.row,d),k=Math.round(g+b.start.column*d.characterWidth);a.push("<div class='",c,"' style='","height:",h,"px;","width:",i,"px;","top:",j,"px;","left:",k,"px;'></div>")}})).call(f.prototype),b.Marker=f}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang"),g=a("../lib/useragent"),h=a("../lib/event_emitter").EventEmitter,i=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$characterSize=this.$measureSizes()||{width:0,height:0},this.$pollSizeChanges()};((function(){d.implement(this,h),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$characterSize.height||1},this.getCharacterWidth=function(){return this.$characterSize.width||1},this.checkForSizeChanges=function(){var a=this.$measureSizes();a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)&&(this.$characterSize=a,this._emit("changeCharacterSize",{data:a}))},this.$pollSizeChanges=function(){var a=this;this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=function(){var a=1e3;if(!this.$measureNode){var b=this.$measureNode=e.createElement("div"),c=b.style;c.width=c.height="auto",c.left=c.top=-a*40+"px",c.visibility="hidden",c.position="absolute",c.overflow="visible",c.whiteSpace="nowrap",b.innerHTML=f.stringRepeat("Xy",a);if(this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(b);else{var d=this.element.parentNode;while(!e.hasCssClass(d,"ace_editor"))d=d.parentNode;d.appendChild(b)}}var c=this.$measureNode.style,g=e.computedStyle(this.element);for(var h in this.$fontStyles)c[h]=g[h];var i={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(a*2)};return i.width==0&&i.height==0?null:i},this.setSession=function(a){this.session=a},this.showInvisibles=!1,this.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,!0)},this.$tabStrings=[],this.$computeTabString=function(){var a=this.session.getTabSize(),b=this.$tabStrings=[0];for(var c=1;c<a+1;c++)this.showInvisibles?b.push("<span class='ace_invisible'>"+this.TAB_CHAR+(new Array(c)).join("&#160;")+"</span>"):b.push((new Array(c+1)).join("&#160;"))},this.updateLines=function(a,b,c){this.$computeTabString(),(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;var d=Math.max(b,a.firstRow),f=Math.min(c,a.lastRow),g=this.element.childNodes,h=0;for(var i=a.firstRow;i<d;i++){var j=this.session.getFoldLine(i);if(j){if(j.containsRow(d)){d=j.start.row;break}i=j.end.row}h++}for(var k=d;k<=f;k++){var l=g[h++];if(!l)continue;var m=[],n=this.session.getTokens(k,k);this.$renderLine(m,k,n[0].tokens,!this.$useLineGroups()),l=e.setInnerHtml(l,m.join("")),k=this.session.getRowFoldEnd(k)}},this.scrollLines=function(a){this.$computeTabString();var b=this.config;this.config=a;if(!b||b.lastRow<a.firstRow)return this.update(a);if(a.lastRow<b.firstRow)return this.update(a);var c=this.element;if(b.firstRow<a.firstRow)for(var d=this.session.getFoldedRowCount(b.firstRow,a.firstRow-1);d>0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRow<b.firstRow){var e=this.$renderLinesFragment(a,a.firstRow,b.firstRow-1);c.firstChild?c.insertBefore(e,c.firstChild):c.appendChild(e)}if(a.lastRow>b.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){var d=this.element.ownerDocument.createDocumentFragment(),f=b,g=this.session.getNextFoldLine(f),h=g?g.start.row:Infinity;for(;;){f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:Infinity);if(f>c)break;var i=e.createElement("div"),j=[],k=this.session.getTokens(f,f);k.length==1&&this.$renderLine(j,f,k[0].tokens,!1),i.innerHTML=j.join("");if(this.$useLineGroups())i.className="ace_line_group",d.appendChild(i);else{var l=i.childNodes;while(l.length)d.appendChild(l[0])}f++}return d},this.update=function(a){this.$computeTabString(),this.config=a;var b=[],c=a.firstRow,d=a.lastRow,f=c,g=this.session.getNextFoldLine(f),h=g?g.start.row:Infinity;for(;;){f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:Infinity);if(f>d)break;this.$useLineGroups()&&b.push("<div class='ace_line_group'>");var i=this.session.getTokens(f,f);i.length==1&&this.$renderLine(b,f,i[0].tokens,!1),this.$useLineGroups()&&b.push("</div>"),f++}this.element=e.setInnerHtml(this.element,b.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var e=this,f=/\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,h=function(a,c,d,f,h){if(a.charCodeAt(0)==32)return(new Array(a.length+1)).join("&#160;");if(a=="\t"){var i=e.session.getScreenTabSize(b+f);return b+=i-1,e.$tabStrings[i]}if(a=="&")return g.isOldGecko?"&":"&amp;";if(a=="<")return"&lt;";if(a==" "){var j=e.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",k=e.showInvisibles?e.SPACE_CHAR:"";return b+=1,"<span class='"+j+"' style='width:"+e.config.characterWidth*2+"px'>"+k+"</span>"}if(a.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)){if(e.showInvisibles){var k=(new Array(a.length+1)).join(e.SPACE_CHAR);return"<span class='ace_invisible'>"+k+"</span>"}return"&#160;"}return b+=1,"<span class='ace_cjk' style='width:"+e.config.characterWidth*2+"px'>"+a+"</span>"},i=d.replace(f,h);if(!this.$textToken[c.type]){var j="ace_"+c.type.replace(/\./g," ace_"),k="";c.type=="fold"&&(k=" style='width:"+c.value.length*this.config.characterWidth+"px;' "),a.push("<span class='",j,"'",k,">",i,"</span>")}else a.push(i);return b+d.length},this.$renderLineCore=function(a,b,c,d,e){var f=0,g=0,h,i=0,j=this;!d||d.length==0?h=Number.MAX_VALUE:h=d[0],e||a.push("<div class='ace_line' style='height:",this.config.lineHeight,"px","'>");for(var k=0;k<c.length;k++){var l=c[k],m=l.value;if(f+m.length<h)i=j.$renderToken(a,i,l,m),f+=m.length;else{while(f+m.length>=h)i=j.$renderToken(a,i,l,m.substring(0,h-f)),m=m.substring(h-f),f=h,e||a.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px","'>"),g++,i=0,h=d[g]||Number.MAX_VALUE;m.length!=0&&(f+=m.length,i=j.$renderToken(a,i,l,m))}}this.showInvisibles&&(b!==this.session.getLength()-1?a.push("<span class='ace_invisible'>"+this.EOL_CHAR+"</span>"):a.push("<span class='ace_invisible'>"+this.EOF_CHAR+"</span>")),e||a.push("</div>")},this.$renderLine=function(a,b,c,d){if(!this.session.isRowFolded(b)){var e=this.session.getRowSplitData(b);this.$renderLineCore(a,b,c,e,d)}else this.$renderFoldLine(a,b,c,d)},this.$renderFoldLine=function(a,b,c,d){function h(a,b,c){var d=0,e=0;while(e+a[d].value.length<b){e+=a[d].value.length,d++;if(d==a.length)return}if(e!=b){var f=a[d].value.substring(b-e);f.length>c-b&&(f=f.substring(0,c-b)),g.push({type:a[d].type,value:f}),e=b+f.length,d+=1}while(e<c){var f=a[d].value;f.length+e>c&&(f=f.substring(0,c-e)),g.push({type:a[d].type,value:f}),e+=f.length,d+=1}}var e=this.session,f=e.getFoldLine(b),g=[];f.walk(function(a,b,d,e,f){a?g.push({type:"fold",value:a}):(f&&(c=this.session.getTokens(b,b)[0].tokens),c.length!=0&&h(c,e,d))}.bind(this),f.end.row,this.session.getLine(f.end.row).length);var i=this.session.$useWrapMode?this.session.$wrapData[b]:null;this.$renderLineCore(a,b,g,i,d)},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}})).call(i.prototype),b.Text=i}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict";var d=a("../lib/dom"),e=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.cursor=d.createElement("div"),this.cursor.className="ace_cursor ace_hidden",this.element.appendChild(this.cursor),this.isVisible=!1};((function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.cursor,"ace_hidden"),clearInterval(this.blinkId)},this.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.cursor,"ace_hidden"),this.cursor.style.visibility="visible",this.restartTimer()},this.restartTimer=function(){clearInterval(this.blinkId);if(!this.isVisible)return;var a=this.cursor;this.blinkId=setInterval(function(){a.style.visibility="hidden",setTimeout(function(){a.style.visibility="visible"},400)},1e3)},this.getPixelPosition=function(a,b){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=Math.round(this.$padding+c.column*this.config.characterWidth),e=(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a,this.pixelPos=this.getPixelPosition(null,!0),this.cursor.style.left=this.pixelPos.left+"px",this.cursor.style.top=this.pixelPos.top+"px",this.cursor.style.width=a.characterWidth+"px",this.cursor.style.height=a.lineHeight+"px";var b=this.session.getOverwrite();b!=this.overwrite&&(this.overwrite=b,b?d.addCssClass(this.cursor,"ace_overwrite"):d.removeCssClass(this.cursor,"ace_overwrite")),this.restartTimer()},this.destroy=function(){clearInterval(this.blinkId)}})).call(e.prototype),b.Cursor=e}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./lib/event"),g=a("./lib/event_emitter").EventEmitter,h=function(a){this.element=e.createElement("div"),this.element.className="ace_sb",this.inner=e.createElement("div"),this.element.appendChild(this.inner),a.appendChild(this.element),this.width=e.scrollbarWidth(a.ownerDocument),this.element.style.width=(this.width||15)+5+"px",f.addListener(this.element,"scroll",this.onScroll.bind(this))};((function(){d.implement(this,g),this.onScroll=function(){this._emit("scroll",{data:this.element.scrollTop})},this.getWidth=function(){return this.width},this.setHeight=function(a){this.element.style.height=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setScrollTop=function(a){this.element.scrollTop=a}})).call(h.prototype),b.ScrollBar=h}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(a,b,c){"use strict";var d=a("./lib/event"),e=function(a,b){this.onRender=a,this.pending=!1,this.changes=0,this.window=b||window};((function(){this.schedule=function(a){this.changes=this.changes|a;if(!this.pending){this.pending=!0;var b=this;d.nextTick(function(){b.pending=!1;var a;while(a=b.changes)b.changes=0,b.onRender(a)},this.window)}}})).call(e.prototype),b.RenderLoop=e}),define("text!ace/css/editor.css",[],"@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);\n\n\n.ace_editor {\n position: absolute;\n overflow: hidden;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Droid Sans Mono', 'Consolas', monospace;\n font-size: 12px;\n}\n\n.ace_scroller {\n position: absolute;\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n cursor: text;\n}\n\n/* setting pointer-events: auto; on node under the mouse, which changes during scroll,\n will break mouse wheel scrolling in Safari */\n.ace_content * {\n pointer-events: none;\n}\n\n.ace_composition {\n position: absolute;\n background: #555;\n color: #DDD;\n z-index: 4;\n}\n\n.ace_gutter .ace_layer {\n position: relative;\n min-width: 54px;\n text-align: right;\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n height: 100%;\n width: auto;\n cursor: default;\n}\n\n.ace_gutter-cell {\n padding-left: 19px;\n padding-right: 6px;\n}\n\n.ace_gutter-cell.ace_error {\n background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B\");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning {\n background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B\");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info {\n background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_editor .ace_sb {\n position: absolute;\n overflow-x: hidden;\n overflow-y: scroll;\n right: 0;\n}\n\n.ace_editor .ace_sb div {\n position: absolute;\n width: 1px;\n left: 0;\n}\n\n.ace_editor .ace_print_margin_layer {\n z-index: 0;\n position: absolute;\n overflow: hidden;\n margin: 0;\n left: 0;\n height: 100%;\n width: 100%;\n}\n\n.ace_editor .ace_print_margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_editor textarea {\n position: fixed;\n z-index: 0;\n width: 10px;\n height: 30px;\n opacity: 0;\n background: transparent;\n appearance: none;\n -moz-appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n white-space: nowrap;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n}\n\n.ace_text-layer {\n color: black;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n}\n\n.ace_cursor.ace_hidden {\n opacity: 0.2;\n}\n\n.ace_line {\n white-space: nowrap;\n}\n\n.ace_marker-layer .ace_step {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 4;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_active_line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected_word {\n position: absolute;\n z-index: 6;\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n \n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image: \n url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\n url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n -moz-border-radius: 2px;\n -webkit-border-radius: 2px;\n border-radius: 2px;\n \n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image: \n url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\n url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n}\n\n.ace_dragging .ace_content {\n cursor: move;\n}\n\n.ace_folding-enabled .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n\n margin: 0 -12px 1px 1px;\n display: inline-block;\n height: 14px;\n width: 11px;\n vertical-align: text-bottom;\n \n background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");\n background-repeat: no-repeat;\n background-position: center 5px;\n\n border-radius: 3px;\n}\n\n.ace_fold-widget.end {\n background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");\n}\n\n.ace_fold-widget.closed {\n background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n -moz-box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n -webkit-box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.7);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n background-position: center 4px;\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n -moz-box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n -webkit-box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n box-shadow:inset 0 1px 1px rgba(255, 255, 255);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n\n.ace_fold-widget.invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n"),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict",b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #0000A2;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+(function() {
+
+var ACE_NAMESPACE = "ace";
+
+var global = (function() {
+ return this;
+})();
+
+
+if (!ACE_NAMESPACE && typeof requirejs !== "undefined")
+ return;
+
+
+var _define = function(module, deps, payload) {
+ if (typeof module !== 'string') {
+ if (_define.original)
+ _define.original.apply(window, arguments);
+ else {
+ console.error('dropping module because define wasn\'t a string.');
+ console.trace();
+ }
+ return;
+ }
+
+ if (arguments.length == 2)
+ payload = deps;
+
+ if (!_define.modules)
+ _define.modules = {};
+
+ _define.modules[module] = payload;
+};
+var _require = function(parentId, module, callback) {
+ if (Object.prototype.toString.call(module) === "[object Array]") {
+ var params = [];
+ for (var i = 0, l = module.length; i < l; ++i) {
+ var dep = lookup(parentId, module[i]);
+ if (!dep && _require.original)
+ return _require.original.apply(window, arguments);
+ params.push(dep);
+ }
+ if (callback) {
+ callback.apply(null, params);
+ }
+ }
+ else if (typeof module === 'string') {
+ var payload = lookup(parentId, module);
+ if (!payload && _require.original)
+ return _require.original.apply(window, arguments);
+
+ if (callback) {
+ callback();
+ }
+
+ return payload;
+ }
+ else {
+ if (_require.original)
+ return _require.original.apply(window, arguments);
+ }
+};
+
+var normalizeModule = function(parentId, moduleName) {
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ }
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = base + "/" + moduleName;
+
+ while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+var lookup = function(parentId, moduleName) {
+
+ moduleName = normalizeModule(parentId, moduleName);
+
+ var module = _define.modules[moduleName];
+ if (!module) {
+ return null;
+ }
+
+ if (typeof module === 'function') {
+ var exports = {};
+ var mod = {
+ id: moduleName,
+ uri: '',
+ exports: exports,
+ packaged: true
+ };
+
+ var req = function(module, callback) {
+ return _require(moduleName, module, callback);
+ };
+
+ var returnValue = module(req, exports, mod);
+ exports = returnValue || mod.exports;
+ _define.modules[moduleName] = exports;
+ return exports;
+ }
+
+ return module;
+};
+
+function exportAce(ns) {
+ var require = function(module, callback) {
+ return _require("", module, callback);
+ };
+
+ var root = global;
+ if (ns) {
+ if (!global[ns])
+ global[ns] = {};
+ root = global[ns];
+ }
+
+ if (!root.define || !root.define.packaged) {
+ _define.original = root.define;
+ root.define = _define;
+ root.define.packaged = true;
+ }
+
+ if (!root.require || !root.require.packaged) {
+ _require.original = root.require;
+ root.require = require;
+ root.require.packaged = true;
+ }
+}
+
+exportAce(ACE_NAMESPACE);
+
+})();
+
+ace.define('ace/ace', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/lib/dom', 'ace/lib/event', 'ace/editor', 'ace/edit_session', 'ace/undomanager', 'ace/virtual_renderer', 'ace/multi_select', 'ace/worker/worker_client', 'ace/keyboard/hash_handler', 'ace/placeholder', 'ace/mode/folding/fold_mode', 'ace/config'], function(require, exports, module) {
+
+
+require("./lib/fixoldbrowsers");
+
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+
+var Editor = require("./editor").Editor;
+var EditSession = require("./edit_session").EditSession;
+var UndoManager = require("./undomanager").UndoManager;
+var Renderer = require("./virtual_renderer").VirtualRenderer;
+var MultiSelect = require("./multi_select").MultiSelect;
+require("./worker/worker_client");
+require("./keyboard/hash_handler");
+require("./placeholder");
+require("./mode/folding/fold_mode");
+exports.config = require("./config");
+exports.require = require;
+exports.edit = function(el) {
+ if (typeof(el) == "string") {
+ var _id = el;
+ var el = document.getElementById(_id);
+ if (!el)
+ throw "ace.edit can't find div #" + _id;
+ }
+
+ if (el.env && el.env.editor instanceof Editor)
+ return el.env.editor;
+
+ var doc = exports.createEditSession(dom.getInnerText(el));
+ el.innerHTML = '';
+
+ var editor = new Editor(new Renderer(el));
+ new MultiSelect(editor);
+ editor.setSession(doc);
+
+ var env = {
+ document: doc,
+ editor: editor,
+ onResize: editor.resize.bind(editor)
+ };
+ event.addListener(window, "resize", env.onResize);
+ el.env = editor.env = env;
+ return editor;
+};
+
+
+exports.createEditSession = function(text, mode) {
+ var doc = new EditSession(text, doc);
+ doc.setUndoManager(new UndoManager());
+ return doc;
+}
+exports.EditSession = EditSession;
+exports.UndoManager = UndoManager;
+});
+
+ace.define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
+
+
+require("./regexp");
+require("./es5-shim");
+
+});
+
+ace.define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+ var real = {
+ exec: RegExp.prototype.exec,
+ test: RegExp.prototype.test,
+ match: String.prototype.match,
+ replace: String.prototype.replace,
+ split: String.prototype.split
+ },
+ compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
+ compliantLastIndexIncrement = function () {
+ var x = /^/g;
+ real.test.call(x, "");
+ return !x.lastIndex;
+ }();
+
+ if (compliantLastIndexIncrement && compliantExecNpcg)
+ return;
+ RegExp.prototype.exec = function (str) {
+ var match = real.exec.apply(this, arguments),
+ name, r2;
+ if ( typeof(str) == 'string' && match) {
+ if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
+ r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
+ real.replace.call(str.slice(match.index), r2, function () {
+ for (var i = 1; i < arguments.length - 2; i++) {
+ if (arguments[i] === undefined)
+ match[i] = undefined;
+ }
+ });
+ }
+ if (this._xregexp && this._xregexp.captureNames) {
+ for (var i = 1; i < match.length; i++) {
+ name = this._xregexp.captureNames[i - 1];
+ if (name)
+ match[name] = match[i];
+ }
+ }
+ if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ }
+ return match;
+ };
+ if (!compliantLastIndexIncrement) {
+ RegExp.prototype.test = function (str) {
+ var match = real.exec.call(this, str);
+ if (match && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ return !!match;
+ };
+ }
+
+ function getNativeFlags (regex) {
+ return (regex.global ? "g" : "") +
+ (regex.ignoreCase ? "i" : "") +
+ (regex.multiline ? "m" : "") +
+ (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
+ (regex.sticky ? "y" : "");
+ }
+
+ function indexOf (array, item, from) {
+ if (Array.prototype.indexOf) // Use the native array method if available
+ return array.indexOf(item, from);
+ for (var i = from || 0; i < array.length; i++) {
+ if (array[i] === item)
+ return i;
+ }
+ return -1;
+ }
+
+});
+
+ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function")
+ throw new TypeError(); // TODO message
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var F = function(){};
+ F.prototype = target.prototype;
+ var self = new F;
+
+ var result = target.apply(
+ self,
+ args.concat(slice.call(arguments))
+ );
+ if (result !== null && Object(result) === result)
+ return result;
+ return self;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return toString(obj) == "[object Array]";
+ };
+}
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var self = toObject(this),
+ thisp = arguments[1],
+ i = 0,
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, self);
+ }
+ i++;
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, self);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ result = [],
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, self))
+ result.push(self[i]);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, self))
+ return false;
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, self))
+ return true;
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+ if (!length && arguments.length == 1)
+ throw new TypeError(); // TODO message
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length)
+ throw new TypeError(); // TODO message
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self)
+ result = fun.call(void 0, result, self[i], i, self);
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+ if (!length && arguments.length == 1)
+ throw new TypeError(); // TODO message
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0)
+ throw new TypeError(); // TODO message
+ } while (true);
+ }
+
+ do {
+ if (i in this)
+ result = fun.call(void 0, result, self[i], i, self);
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+
+ if (!length)
+ return -1;
+
+ var i = 0;
+ if (arguments.length > 1)
+ i = toInteger(arguments[1]);
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+
+ if (!length)
+ return -1;
+ var i = length - 1;
+ if (arguments.length > 1)
+ i = Math.min(i, toInteger(arguments[1]));
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i])
+ return i;
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null})
+ hasDontEnumBug = false;
+
+ Object.keys = function keys(object) {
+
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError("Object.keys called on a non-object");
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+
+ return keys;
+ };
+
+}
+if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
+ Date.prototype.toISOString = function toISOString() {
+ var result, length, value, year;
+ if (!isFinite(this))
+ throw new RangeError;
+ result = [this.getUTCMonth() + 1, this.getUTCDate(),
+ this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
+ year = this.getUTCFullYear();
+ year = (year < 0 ? '-' : (year > 9999 ? '+' : '')) + ('00000' + Math.abs(year)).slice(0 <= year && year <= 9999 ? -4 : -6);
+
+ length = result.length;
+ while (length--) {
+ value = result[length];
+ if (value < 10)
+ result[length] = "0" + value;
+ }
+ return year + "-" + result.slice(0, 2).join("-") + "T" + result.slice(2).join(":") + "." +
+ ("000" + this.getUTCMilliseconds()).slice(-3) + "Z";
+ }
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+if (!Date.prototype.toJSON) {
+ Date.prototype.toJSON = function toJSON(key) {
+ if (typeof this.toISOString != "function")
+ throw new TypeError(); // TODO message
+ return this.toISOString();
+ };
+}
+if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
+ Date = (function(NativeDate) {
+ var Date = function Date(Y, M, D, h, m, s, ms) {
+ var length = arguments.length;
+ if (this instanceof NativeDate) {
+ var date = length == 1 && String(Y) === Y ? // isString(Y)
+ new NativeDate(Date.parse(Y)) :
+ length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
+ length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
+ length >= 5 ? new NativeDate(Y, M, D, h, m) :
+ length >= 4 ? new NativeDate(Y, M, D, h) :
+ length >= 3 ? new NativeDate(Y, M, D) :
+ length >= 2 ? new NativeDate(Y, M) :
+ length >= 1 ? new NativeDate(Y) :
+ new NativeDate();
+ date.constructor = Date;
+ return date;
+ }
+ return NativeDate.apply(this, arguments);
+ };
+ var isoDateExpression = new RegExp("^" +
+ "(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + 6-digit extended year
+ "(?:-(\\d{2})" + // optional month capture
+ "(?:-(\\d{2})" + // optional day capture
+ "(?:" + // capture hours:minutes:seconds.milliseconds
+ "T(\\d{2})" + // hours capture
+ ":(\\d{2})" + // minutes capture
+ "(?:" + // optional :seconds.milliseconds
+ ":(\\d{2})" + // seconds capture
+ "(?:\\.(\\d{3}))?" + // milliseconds capture
+ ")?" +
+ "(?:" + // capture UTC offset component
+ "Z|" + // UTC capture
+ "(?:" + // offset specifier +/-hours:minutes
+ "([-+])" + // sign capture
+ "(\\d{2})" + // hours offset capture
+ ":(\\d{2})" + // minutes offset capture
+ ")" +
+ ")?)?)?)?" +
+ "$");
+ for (var key in NativeDate)
+ Date[key] = NativeDate[key];
+ Date.now = NativeDate.now;
+ Date.UTC = NativeDate.UTC;
+ Date.prototype = NativeDate.prototype;
+ Date.prototype.constructor = Date;
+ Date.parse = function parse(string) {
+ var match = isoDateExpression.exec(string);
+ if (match) {
+ match.shift(); // kill match[0], the full match
+ for (var i = 1; i < 7; i++) {
+ match[i] = +(match[i] || (i < 3 ? 1 : 0));
+ if (i == 1)
+ match[i]--;
+ }
+ var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
+ var offset = 0;
+ if (sign) {
+ if (hourOffset > 23 || minuteOffset > 59)
+ return NaN;
+ offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == "+" ? -1 : 1);
+ }
+ var year = +match[0];
+ if (0 <= year && year <= 99) {
+ match[0] = year + 400;
+ return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
+ }
+ return NativeDate.UTC.apply(this, match) + offset;
+ }
+ return NativeDate.parse.apply(this, arguments);
+ };
+
+ return Date;
+ })(Date);
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+var toInteger = function (n) {
+ n = +n;
+ if (n !== n) // isNaN
+ n = 0;
+ else if (n !== 0 && n !== (1/0) && n !== -(1/0))
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ return n;
+};
+
+var prepareString = "a"[0] != "a",
+ toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError(); // TODO message
+ }
+ if (prepareString && typeof o == "string" && o) {
+ return o.split("");
+ }
+ return Object(o);
+ };
+});
+
+ace.define('ace/lib/dom', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+var XHTML_NS = "http://www.w3.org/1999/xhtml";
+
+exports.createElement = function(tag, ns) {
+ return document.createElementNS ?
+ document.createElementNS(ns || XHTML_NS, tag) :
+ document.createElement(tag);
+};
+
+exports.setText = function(elem, text) {
+ if (elem.innerText !== undefined) {
+ elem.innerText = text;
+ }
+ if (elem.textContent !== undefined) {
+ elem.textContent = text;
+ }
+};
+
+exports.hasCssClass = function(el, name) {
+ var classes = el.className.split(/\s+/g);
+ return classes.indexOf(name) !== -1;
+};
+exports.addCssClass = function(el, name) {
+ if (!exports.hasCssClass(el, name)) {
+ el.className += " " + name;
+ }
+};
+exports.removeCssClass = function(el, name) {
+ var classes = el.className.split(/\s+/g);
+ while (true) {
+ var index = classes.indexOf(name);
+ if (index == -1) {
+ break;
+ }
+ classes.splice(index, 1);
+ }
+ el.className = classes.join(" ");
+};
+
+exports.toggleCssClass = function(el, name) {
+ var classes = el.className.split(/\s+/g), add = true;
+ while (true) {
+ var index = classes.indexOf(name);
+ if (index == -1) {
+ break;
+ }
+ add = false;
+ classes.splice(index, 1);
+ }
+ if(add)
+ classes.push(name);
+
+ el.className = classes.join(" ");
+ return add;
+};
+exports.setCssClass = function(node, className, include) {
+ if (include) {
+ exports.addCssClass(node, className);
+ } else {
+ exports.removeCssClass(node, className);
+ }
+};
+
+exports.hasCssString = function(id, doc) {
+ var index = 0, sheets;
+ doc = doc || document;
+
+ if (doc.createStyleSheet && (sheets = doc.styleSheets)) {
+ while (index < sheets.length)
+ if (sheets[index++].owningElement.id === id) return true;
+ } else if ((sheets = doc.getElementsByTagName("style"))) {
+ while (index < sheets.length)
+ if (sheets[index++].id === id) return true;
+ }
+
+ return false;
+};
+
+exports.importCssString = function importCssString(cssText, id, doc) {
+ doc = doc || document;
+ if (id && exports.hasCssString(id, doc))
+ return null;
+
+ var style;
+
+ if (doc.createStyleSheet) {
+ style = doc.createStyleSheet();
+ style.cssText = cssText;
+ if (id)
+ style.owningElement.id = id;
+ } else {
+ style = doc.createElementNS
+ ? doc.createElementNS(XHTML_NS, "style")
+ : doc.createElement("style");
+
+ style.appendChild(doc.createTextNode(cssText));
+ if (id)
+ style.id = id;
+
+ var head = doc.getElementsByTagName("head")[0] || doc.documentElement;
+ head.appendChild(style);
+ }
+};
+
+exports.importCssStylsheet = function(uri, doc) {
+ if (doc.createStyleSheet) {
+ doc.createStyleSheet(uri);
+ } else {
+ var link = exports.createElement('link');
+ link.rel = 'stylesheet';
+ link.href = uri;
+
+ var head = doc.getElementsByTagName("head")[0] || doc.documentElement;
+ head.appendChild(link);
+ }
+};
+
+exports.getInnerWidth = function(element) {
+ return (
+ parseInt(exports.computedStyle(element, "paddingLeft"), 10) +
+ parseInt(exports.computedStyle(element, "paddingRight"), 10) +
+ element.clientWidth
+ );
+};
+
+exports.getInnerHeight = function(element) {
+ return (
+ parseInt(exports.computedStyle(element, "paddingTop"), 10) +
+ parseInt(exports.computedStyle(element, "paddingBottom"), 10) +
+ element.clientHeight
+ );
+};
+
+if (window.pageYOffset !== undefined) {
+ exports.getPageScrollTop = function() {
+ return window.pageYOffset;
+ };
+
+ exports.getPageScrollLeft = function() {
+ return window.pageXOffset;
+ };
+}
+else {
+ exports.getPageScrollTop = function() {
+ return document.body.scrollTop;
+ };
+
+ exports.getPageScrollLeft = function() {
+ return document.body.scrollLeft;
+ };
+}
+
+if (window.getComputedStyle)
+ exports.computedStyle = function(element, style) {
+ if (style)
+ return (window.getComputedStyle(element, "") || {})[style] || "";
+ return window.getComputedStyle(element, "") || {};
+ };
+else
+ exports.computedStyle = function(element, style) {
+ if (style)
+ return element.currentStyle[style];
+ return element.currentStyle;
+ };
+
+exports.scrollbarWidth = function(document) {
+
+ var inner = exports.createElement("p");
+ inner.style.width = "100%";
+ inner.style.minWidth = "0px";
+ inner.style.height = "200px";
+
+ var outer = exports.createElement("div");
+ var style = outer.style;
+
+ style.position = "absolute";
+ style.left = "-10000px";
+ style.overflow = "hidden";
+ style.width = "200px";
+ style.minWidth = "0px";
+ style.height = "150px";
+
+ outer.appendChild(inner);
+
+ var body = document.body || document.documentElement;
+ body.appendChild(outer);
+
+ var noScrollbar = inner.offsetWidth;
+
+ style.overflow = "scroll";
+ var withScrollbar = inner.offsetWidth;
+
+ if (noScrollbar == withScrollbar) {
+ withScrollbar = outer.clientWidth;
+ }
+
+ body.removeChild(outer);
+
+ return noScrollbar-withScrollbar;
+};
+exports.setInnerHtml = function(el, innerHtml) {
+ var element = el.cloneNode(false);//document.createElement("div");
+ element.innerHTML = innerHtml;
+ el.parentNode.replaceChild(element, el);
+ return element;
+};
+
+exports.setInnerText = function(el, innerText) {
+ var document = el.ownerDocument;
+ if (document.body && "textContent" in document.body)
+ el.textContent = innerText;
+ else
+ el.innerText = innerText;
+
+};
+
+exports.getInnerText = function(el) {
+ var document = el.ownerDocument;
+ if (document.body && "textContent" in document.body)
+ return el.textContent;
+ else
+ return el.innerText || el.textContent || "";
+};
+
+exports.getParentWindow = function(document) {
+ return document.defaultView || document.parentWindow;
+};
+
+});
+
+ace.define('ace/lib/event', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/useragent', 'ace/lib/dom'], function(require, exports, module) {
+
+
+var keys = require("./keys");
+var useragent = require("./useragent");
+var dom = require("./dom");
+
+exports.addListener = function(elem, type, callback) {
+ if (elem.addEventListener) {
+ return elem.addEventListener(type, callback, false);
+ }
+ if (elem.attachEvent) {
+ var wrapper = function() {
+ callback(window.event);
+ };
+ callback._wrapper = wrapper;
+ elem.attachEvent("on" + type, wrapper);
+ }
+};
+
+exports.removeListener = function(elem, type, callback) {
+ if (elem.removeEventListener) {
+ return elem.removeEventListener(type, callback, false);
+ }
+ if (elem.detachEvent) {
+ elem.detachEvent("on" + type, callback._wrapper || callback);
+ }
+};
+exports.stopEvent = function(e) {
+ exports.stopPropagation(e);
+ exports.preventDefault(e);
+ return false;
+};
+
+exports.stopPropagation = function(e) {
+ if (e.stopPropagation)
+ e.stopPropagation();
+ else
+ e.cancelBubble = true;
+};
+
+exports.preventDefault = function(e) {
+ if (e.preventDefault)
+ e.preventDefault();
+ else
+ e.returnValue = false;
+};
+exports.getButton = function(e) {
+ if (e.type == "dblclick")
+ return 0;
+ if (e.type == "contextmenu" || (e.ctrlKey && useragent.isMac))
+ return 2;
+ if (e.preventDefault) {
+ return e.button;
+ }
+ else {
+ return {1:0, 2:2, 4:1}[e.button];
+ }
+};
+
+if (document.documentElement.setCapture) {
+ exports.capture = function(el, eventHandler, releaseCaptureHandler) {
+ var called = false;
+ function onReleaseCapture(e) {
+ eventHandler(e);
+
+ if (!called) {
+ called = true;
+ releaseCaptureHandler(e);
+ }
+
+ exports.removeListener(el, "mousemove", eventHandler);
+ exports.removeListener(el, "mouseup", onReleaseCapture);
+ exports.removeListener(el, "losecapture", onReleaseCapture);
+
+ el.releaseCapture();
+ }
+
+ exports.addListener(el, "mousemove", eventHandler);
+ exports.addListener(el, "mouseup", onReleaseCapture);
+ exports.addListener(el, "losecapture", onReleaseCapture);
+ el.setCapture();
+ };
+}
+else {
+ exports.capture = function(el, eventHandler, releaseCaptureHandler) {
+ function onMouseUp(e) {
+ eventHandler && eventHandler(e);
+ releaseCaptureHandler && releaseCaptureHandler(e);
+
+ document.removeEventListener("mousemove", eventHandler, true);
+ document.removeEventListener("mouseup", onMouseUp, true);
+
+ e.stopPropagation();
+ }
+
+ document.addEventListener("mousemove", eventHandler, true);
+ document.addEventListener("mouseup", onMouseUp, true);
+ };
+}
+
+exports.addMouseWheelListener = function(el, callback) {
+ var factor = 8;
+ var listener = function(e) {
+ if (e.wheelDelta !== undefined) {
+ if (e.wheelDeltaX !== undefined) {
+ e.wheelX = -e.wheelDeltaX / factor;
+ e.wheelY = -e.wheelDeltaY / factor;
+ } else {
+ e.wheelX = 0;
+ e.wheelY = -e.wheelDelta / factor;
+ }
+ }
+ else {
+ if (e.axis && e.axis == e.HORIZONTAL_AXIS) {
+ e.wheelX = (e.detail || 0) * 5;
+ e.wheelY = 0;
+ } else {
+ e.wheelX = 0;
+ e.wheelY = (e.detail || 0) * 5;
+ }
+ }
+ callback(e);
+ };
+ exports.addListener(el, "DOMMouseScroll", listener);
+ exports.addListener(el, "mousewheel", listener);
+};
+
+exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) {
+ var clicks = 0;
+ var startX, startY, timer;
+ var eventNames = {
+ 2: "dblclick",
+ 3: "tripleclick",
+ 4: "quadclick"
+ };
+
+ exports.addListener(el, "mousedown", function(e) {
+ if (exports.getButton(e) != 0) {
+ clicks = 0;
+ } else {
+ var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;
+
+ if (!timer || isNewClick)
+ clicks = 0;
+
+ clicks += 1;
+
+ if (timer)
+ clearTimeout(timer)
+ timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
+ }
+ if (clicks == 1) {
+ startX = e.clientX;
+ startY = e.clientY;
+ }
+
+ eventHandler[callbackName]("mousedown", e);
+
+ if (clicks > 4)
+ clicks = 0;
+ else if (clicks > 1)
+ return eventHandler[callbackName](eventNames[clicks], e);
+ });
+
+ if (useragent.isOldIE) {
+ exports.addListener(el, "dblclick", function(e) {
+ clicks = 2;
+ if (timer)
+ clearTimeout(timer);
+ timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
+ eventHandler[callbackName]("mousedown", e);
+ eventHandler[callbackName](eventNames[clicks], e);
+ });
+ }
+};
+
+function normalizeCommandKeys(callback, e, keyCode) {
+ var hashId = 0;
+ if ((useragent.isOpera && !("KeyboardEvent" in window)) && useragent.isMac) {
+ hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0)
+ | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
+ } else {
+ hashId = 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0)
+ | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
+ }
+
+ if (keyCode in keys.MODIFIER_KEYS) {
+ switch (keys.MODIFIER_KEYS[keyCode]) {
+ case "Alt":
+ hashId = 2;
+ break;
+ case "Shift":
+ hashId = 4;
+ break;
+ case "Ctrl":
+ hashId = 1;
+ break;
+ default:
+ hashId = 8;
+ break;
+ }
+ keyCode = 0;
+ }
+
+ if (hashId & 8 && (keyCode == 91 || keyCode == 93)) {
+ keyCode = 0;
+ }
+ if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {
+ return false;
+ }
+ return callback(e, hashId, keyCode);
+}
+
+exports.addCommandKeyListener = function(el, callback) {
+ var addListener = exports.addListener;
+ if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) {
+ var lastKeyDownKeyCode = null;
+ addListener(el, "keydown", function(e) {
+ lastKeyDownKeyCode = e.keyCode;
+ });
+ addListener(el, "keypress", function(e) {
+ return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);
+ });
+ } else {
+ var lastDown = null;
+
+ addListener(el, "keydown", function(e) {
+ lastDown = e.keyIdentifier || e.keyCode;
+ return normalizeCommandKeys(callback, e, e.keyCode);
+ });
+ }
+};
+
+if (window.postMessage && !useragent.isOldIE) {
+ var postMessageId = 1;
+ exports.nextTick = function(callback, win) {
+ win = win || window;
+ var messageName = "zero-timeout-message-" + postMessageId;
+ exports.addListener(win, "message", function listener(e) {
+ if (e.data == messageName) {
+ exports.stopPropagation(e);
+ exports.removeListener(win, "message", listener);
+ callback();
+ }
+ });
+ win.postMessage(messageName, "*");
+ };
+}
+
+
+exports.nextFrame = window.requestAnimationFrame ||
+ window.oRequestAnimationFrame ||
+ window.msRequestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.webkitRequestAnimationFrame;
+
+if (exports.nextFrame)
+ exports.nextFrame = exports.nextFrame.bind(window);
+else
+ exports.nextFrame = function(callback) {
+ setTimeout(callback, 17);
+ };
+});
+
+ace.define('ace/lib/keys', ['require', 'exports', 'module' , 'ace/lib/oop'], function(require, exports, module) {
+
+
+var oop = require("./oop");
+var Keys = (function() {
+ var ret = {
+ MODIFIER_KEYS: {
+ 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'
+ },
+
+ KEY_MODS: {
+ "ctrl": 1, "alt": 2, "option" : 2,
+ "shift": 4, "meta": 8, "command": 8
+ },
+
+ FUNCTION_KEYS : {
+ 8 : "Backspace",
+ 9 : "Tab",
+ 13 : "Return",
+ 19 : "Pause",
+ 27 : "Esc",
+ 32 : "Space",
+ 33 : "PageUp",
+ 34 : "PageDown",
+ 35 : "End",
+ 36 : "Home",
+ 37 : "Left",
+ 38 : "Up",
+ 39 : "Right",
+ 40 : "Down",
+ 44 : "Print",
+ 45 : "Insert",
+ 46 : "Delete",
+ 96 : "Numpad0",
+ 97 : "Numpad1",
+ 98 : "Numpad2",
+ 99 : "Numpad3",
+ 100: "Numpad4",
+ 101: "Numpad5",
+ 102: "Numpad6",
+ 103: "Numpad7",
+ 104: "Numpad8",
+ 105: "Numpad9",
+ 112: "F1",
+ 113: "F2",
+ 114: "F3",
+ 115: "F4",
+ 116: "F5",
+ 117: "F6",
+ 118: "F7",
+ 119: "F8",
+ 120: "F9",
+ 121: "F10",
+ 122: "F11",
+ 123: "F12",
+ 144: "Numlock",
+ 145: "Scrolllock"
+ },
+
+ PRINTABLE_KEYS: {
+ 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',
+ 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',
+ 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',
+ 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
+ 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
+ 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
+ 188: ',', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',
+ 221: ']', 222: '\''
+ }
+ };
+ for (var i in ret.FUNCTION_KEYS) {
+ var name = ret.FUNCTION_KEYS[i].toLowerCase();
+ ret[name] = parseInt(i, 10);
+ }
+ oop.mixin(ret, ret.MODIFIER_KEYS);
+ oop.mixin(ret, ret.PRINTABLE_KEYS);
+ oop.mixin(ret, ret.FUNCTION_KEYS);
+ ret.enter = ret["return"];
+ ret.escape = ret.esc;
+ ret.del = ret["delete"];
+ ret[173] = '-';
+
+ return ret;
+})();
+oop.mixin(exports, Keys);
+
+exports.keyCodeToString = function(keyCode) {
+ return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase();
+}
+
+});
+
+ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.inherits = (function() {
+ var tempCtor = function() {};
+ return function(ctor, superCtor) {
+ tempCtor.prototype = superCtor.prototype;
+ ctor.super_ = superCtor.prototype;
+ ctor.prototype = new tempCtor();
+ ctor.prototype.constructor = ctor;
+ };
+}());
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define('ace/lib/useragent', ['require', 'exports', 'module' ], function(require, exports, module) {
+exports.OS = {
+ LINUX: "LINUX",
+ MAC: "MAC",
+ WINDOWS: "WINDOWS"
+};
+exports.getOS = function() {
+ if (exports.isMac) {
+ return exports.OS.MAC;
+ } else if (exports.isLinux) {
+ return exports.OS.LINUX;
+ } else {
+ return exports.OS.WINDOWS;
+ }
+};
+if (typeof navigator != "object")
+ return;
+
+var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
+var ua = navigator.userAgent;
+exports.isWin = (os == "win");
+exports.isMac = (os == "mac");
+exports.isLinux = (os == "linux");
+exports.isIE =
+ (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
+ && parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
+
+exports.isOldIE = exports.isIE && exports.isIE < 9;
+exports.isGecko = exports.isMozilla = window.controllers && window.navigator.product === "Gecko";
+exports.isOldGecko = exports.isGecko && parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1], 10) < 4;
+exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
+exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
+
+exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
+
+exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
+
+exports.isIPad = ua.indexOf("iPad") >= 0;
+
+exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
+
+});
+
+ace.define('ace/editor', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/useragent', 'ace/keyboard/textinput', 'ace/mouse/mouse_handler', 'ace/mouse/fold_handler', 'ace/keyboard/keybinding', 'ace/edit_session', 'ace/search', 'ace/range', 'ace/lib/event_emitter', 'ace/commands/command_manager', 'ace/commands/default_commands'], function(require, exports, module) {
+
+
+require("./lib/fixoldbrowsers");
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var useragent = require("./lib/useragent");
+var TextInput = require("./keyboard/textinput").TextInput;
+var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
+var FoldHandler = require("./mouse/fold_handler").FoldHandler;
+var KeyBinding = require("./keyboard/keybinding").KeyBinding;
+var EditSession = require("./edit_session").EditSession;
+var Search = require("./search").Search;
+var Range = require("./range").Range;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var CommandManager = require("./commands/command_manager").CommandManager;
+var defaultCommands = require("./commands/default_commands").commands;
+var Editor = function(renderer, session) {
+ var container = renderer.getContainerElement();
+ this.container = container;
+ this.renderer = renderer;
+
+ this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
+ this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
+ this.renderer.textarea = this.textInput.getElement();
+ this.keyBinding = new KeyBinding(this);
+ this.$mouseHandler = new MouseHandler(this);
+ new FoldHandler(this);
+
+ this.$blockScrolling = 0;
+ this.$search = new Search().set({
+ wrap: true
+ });
+
+ this.setSession(session || new EditSession(""));
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+ this.setKeyboardHandler = function(keyboardHandler) {
+ this.keyBinding.setKeyboardHandler(keyboardHandler);
+ };
+ this.getKeyboardHandler = function() {
+ return this.keyBinding.getKeyboardHandler();
+ };
+ this.setSession = function(session) {
+ if (this.session == session)
+ return;
+
+ if (this.session) {
+ var oldSession = this.session;
+ this.session.removeEventListener("change", this.$onDocumentChange);
+ this.session.removeEventListener("changeMode", this.$onChangeMode);
+ this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
+ this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
+ this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
+ this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
+ this.session.removeEventListener("onChangeFold", this.$onChangeFold);
+ this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
+ this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
+ this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
+ this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
+ this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
+ this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
+ this.session.removeEventListener("changeLeftTop", this.$onScrollLeftChange);
+
+ var selection = this.session.getSelection();
+ selection.removeEventListener("changeCursor", this.$onCursorChange);
+ selection.removeEventListener("changeSelection", this.$onSelectionChange);
+ }
+
+ this.session = session;
+
+ this.$onDocumentChange = this.onDocumentChange.bind(this);
+ session.addEventListener("change", this.$onDocumentChange);
+ this.renderer.setSession(session);
+
+ this.$onChangeMode = this.onChangeMode.bind(this);
+ session.addEventListener("changeMode", this.$onChangeMode);
+
+ this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
+ session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
+
+ this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
+ session.addEventListener("changeTabSize", this.$onChangeTabSize);
+
+ this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
+ session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
+
+ this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
+ session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
+
+ this.$onChangeFold = this.onChangeFold.bind(this);
+ session.addEventListener("changeFold", this.$onChangeFold);
+
+ this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
+ this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
+
+ this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
+ this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
+
+ this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
+ this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
+
+ this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
+ this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
+
+ this.$onCursorChange = this.onCursorChange.bind(this);
+ this.session.addEventListener("changeOverwrite", this.$onCursorChange);
+
+ this.$onScrollTopChange = this.onScrollTopChange.bind(this);
+ this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
+
+ this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
+ this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
+
+ this.selection = session.getSelection();
+ this.selection.addEventListener("changeCursor", this.$onCursorChange);
+
+ this.$onSelectionChange = this.onSelectionChange.bind(this);
+ this.selection.addEventListener("changeSelection", this.$onSelectionChange);
+
+ this.onChangeMode();
+
+ this.$blockScrolling += 1;
+ this.onCursorChange();
+ this.$blockScrolling -= 1;
+
+ this.onScrollTopChange();
+ this.onScrollLeftChange();
+ this.onSelectionChange();
+ this.onChangeFrontMarker();
+ this.onChangeBackMarker();
+ this.onChangeBreakpoint();
+ this.onChangeAnnotation();
+ this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
+ this.renderer.updateFull();
+
+ this._emit("changeSession", {
+ session: session,
+ oldSession: oldSession
+ });
+ };
+ this.getSession = function() {
+ return this.session;
+ };
+ this.setValue = function(val, cursorPos) {
+ this.session.doc.setValue(val);
+
+ if (!cursorPos)
+ this.selectAll();
+ else if (cursorPos == 1)
+ this.navigateFileEnd();
+ else if (cursorPos == -1)
+ this.navigateFileStart();
+
+ return val;
+ };
+ this.getValue = function() {
+ return this.session.getValue();
+ };
+ this.getSelection = function() {
+ return this.selection;
+ };
+ this.resize = function(force) {
+ this.renderer.onResize(force);
+ };
+ this.setTheme = function(theme) {
+ this.renderer.setTheme(theme);
+ };
+ this.getTheme = function() {
+ return this.renderer.getTheme();
+ };
+ this.setStyle = function(style) {
+ this.renderer.setStyle(style);
+ };
+ this.unsetStyle = function(style) {
+ this.renderer.unsetStyle(style);
+ };
+ this.setFontSize = function(size) {
+ this.container.style.fontSize = size;
+ this.renderer.updateFontSize();
+ };
+
+ this.$highlightBrackets = function() {
+ if (this.session.$bracketHighlight) {
+ this.session.removeMarker(this.session.$bracketHighlight);
+ this.session.$bracketHighlight = null;
+ }
+
+ if (this.$highlightPending) {
+ return;
+ }
+ var self = this;
+ this.$highlightPending = true;
+ setTimeout(function() {
+ self.$highlightPending = false;
+
+ var pos = self.session.findMatchingBracket(self.getCursorPosition());
+ if (pos) {
+ var range = new Range(pos.row, pos.column, pos.row, pos.column+1);
+ self.session.$bracketHighlight = self.session.addMarker(range, "ace_bracket", "text");
+ }
+ }, 50);
+ };
+ this.focus = function() {
+ var _self = this;
+ setTimeout(function() {
+ _self.textInput.focus();
+ });
+ this.textInput.focus();
+ };
+ this.isFocused = function() {
+ return this.textInput.isFocused();
+ };
+ this.blur = function() {
+ this.textInput.blur();
+ };
+ this.onFocus = function() {
+ if (this.$isFocused)
+ return;
+ this.$isFocused = true;
+ this.renderer.showCursor();
+ this.renderer.visualizeFocus();
+ this._emit("focus");
+ };
+ this.onBlur = function() {
+ if (!this.$isFocused)
+ return;
+ this.$isFocused = false;
+ this.renderer.hideCursor();
+ this.renderer.visualizeBlur();
+ this._emit("blur");
+ };
+
+ this.$cursorChange = function() {
+ this.renderer.updateCursor();
+ };
+ this.onDocumentChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+ var lastRow;
+
+ if (range.start.row == range.end.row && delta.action != "insertLines" && delta.action != "removeLines")
+ lastRow = range.end.row;
+ else
+ lastRow = Infinity;
+ this.renderer.updateLines(range.start.row, lastRow);
+
+ this._emit("change", e);
+ this.$cursorChange();
+ };
+
+ this.onTokenizerUpdate = function(e) {
+ var rows = e.data;
+ this.renderer.updateLines(rows.first, rows.last);
+ };
+
+
+ this.onScrollTopChange = function() {
+ this.renderer.scrollToY(this.session.getScrollTop());
+ };
+
+ this.onScrollLeftChange = function() {
+ this.renderer.scrollToX(this.session.getScrollLeft());
+ };
+ this.onCursorChange = function() {
+ this.$cursorChange();
+
+ if (!this.$blockScrolling) {
+ this.renderer.scrollCursorIntoView();
+ }
+
+ this.$highlightBrackets();
+ this.$updateHighlightActiveLine();
+ this._emit("changeSelection");
+ };
+
+ this.$updateHighlightActiveLine = function() {
+ var session = this.getSession();
+
+ var highlight;
+ if (this.$highlightActiveLine) {
+ if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
+ highlight = this.getCursorPosition();
+ }
+
+ if (session.$highlightLineMarker && !highlight) {
+ session.removeMarker(session.$highlightLineMarker.id);
+ session.$highlightLineMarker = null;
+ } else if (!session.$highlightLineMarker && highlight) {
+ session.$highlightLineMarker = session.highlightLines(highlight.row, highlight.row, "ace_active-line");
+ } else if (highlight) {
+ session.$highlightLineMarker.start.row = highlight.row;
+ session.$highlightLineMarker.end.row = highlight.row;
+ session._emit("changeBackMarker");
+ }
+ };
+
+ this.onSelectionChange = function(e) {
+ var session = this.session;
+
+ if (session.$selectionMarker) {
+ session.removeMarker(session.$selectionMarker);
+ }
+ session.$selectionMarker = null;
+
+ if (!this.selection.isEmpty()) {
+ var range = this.selection.getRange();
+ var style = this.getSelectionStyle();
+ session.$selectionMarker = session.addMarker(range, "ace_selection", style);
+ } else {
+ this.$updateHighlightActiveLine();
+ }
+
+ var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()
+ this.session.highlight(re);
+
+ this._emit("changeSelection");
+ };
+
+ this.$getSelectionHighLightRegexp = function() {
+ var session = this.session;
+
+ var selection = this.getSelectionRange();
+ if (selection.isEmpty() || selection.isMultiLine())
+ return;
+
+ var startOuter = selection.start.column - 1;
+ var endOuter = selection.end.column + 1;
+ var line = session.getLine(selection.start.row);
+ var lineCols = line.length;
+ var needle = line.substring(Math.max(startOuter, 0),
+ Math.min(endOuter, lineCols));
+ if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
+ (endOuter <= lineCols && /[\w\d]$/.test(needle)))
+ return;
+
+ needle = line.substring(selection.start.column, selection.end.column);
+ if (!/^[\w\d]+$/.test(needle))
+ return;
+
+ var re = this.$search.$assembleRegExp({
+ wholeWord: true,
+ caseSensitive: true,
+ needle: needle
+ });
+
+ return re;
+ };
+
+
+ this.onChangeFrontMarker = function() {
+ this.renderer.updateFrontMarkers();
+ };
+
+ this.onChangeBackMarker = function() {
+ this.renderer.updateBackMarkers();
+ };
+
+
+ this.onChangeBreakpoint = function() {
+ this.renderer.updateBreakpoints();
+ };
+
+ this.onChangeAnnotation = function() {
+ this.renderer.setAnnotations(this.session.getAnnotations());
+ };
+
+
+ this.onChangeMode = function() {
+ this.renderer.updateText();
+ };
+
+
+ this.onChangeWrapLimit = function() {
+ this.renderer.updateFull();
+ };
+
+ this.onChangeWrapMode = function() {
+ this.renderer.onResize(true);
+ };
+
+
+ this.onChangeFold = function() {
+ this.$updateHighlightActiveLine();
+ this.renderer.updateFull();
+ };
+
+ this.getCopyText = function() {
+ var text = "";
+ if (!this.selection.isEmpty())
+ text = this.session.getTextRange(this.getSelectionRange());
+
+ this._emit("copy", text);
+ return text;
+ };
+ this.onCopy = function() {
+ this.commands.exec("copy", this);
+ };
+ this.onCut = function() {
+ this.commands.exec("cut", this);
+ };
+ this.onPaste = function(text) {
+ if (this.$readOnly)
+ return;
+ this._emit("paste", text);
+ this.insert(text);
+ };
+
+
+ this.execCommand = function(command, args) {
+ this.commands.exec(command, this, args);
+ };
+ this.insert = function(text) {
+ var session = this.session;
+ var mode = session.getMode();
+ var cursor = this.getCursorPosition();
+
+ if (this.getBehavioursEnabled()) {
+ var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
+ if (transform)
+ text = transform.text;
+ }
+
+ text = text.replace("\t", this.session.getTabString());
+ if (!this.selection.isEmpty()) {
+ cursor = this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ }
+ else if (this.session.getOverwrite()) {
+ var range = new Range.fromPoints(cursor, cursor);
+ range.end.column += text.length;
+ this.session.remove(range);
+ }
+
+ this.clearSelection();
+
+ var start = cursor.column;
+ var lineState = session.getState(cursor.row);
+ var line = session.getLine(cursor.row);
+ var shouldOutdent = mode.checkOutdent(lineState, line, text);
+ var end = session.insert(cursor, text);
+
+ if (transform && transform.selection) {
+ if (transform.selection.length == 2) { // Transform relative to the current column
+ this.selection.setSelectionRange(
+ new Range(cursor.row, start + transform.selection[0],
+ cursor.row, start + transform.selection[1]));
+ } else { // Transform relative to the current row.
+ this.selection.setSelectionRange(
+ new Range(cursor.row + transform.selection[0],
+ transform.selection[1],
+ cursor.row + transform.selection[2],
+ transform.selection[3]));
+ }
+ }
+ if (session.getDocument().isNewLine(text)) {
+ var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());
+
+ this.moveCursorTo(cursor.row+1, 0);
+
+ var size = session.getTabSize();
+ var minIndent = Number.MAX_VALUE;
+
+ for (var row = cursor.row + 1; row <= end.row; ++row) {
+ var indent = 0;
+
+ line = session.getLine(row);
+ for (var i = 0; i < line.length; ++i)
+ if (line.charAt(i) == '\t')
+ indent += size;
+ else if (line.charAt(i) == ' ')
+ indent += 1;
+ else
+ break;
+ if (/[^\s]/.test(line))
+ minIndent = Math.min(indent, minIndent);
+ }
+
+ for (var row = cursor.row + 1; row <= end.row; ++row) {
+ var outdent = minIndent;
+
+ line = session.getLine(row);
+ for (var i = 0; i < line.length && outdent > 0; ++i)
+ if (line.charAt(i) == '\t')
+ outdent -= size;
+ else if (line.charAt(i) == ' ')
+ outdent -= 1;
+ session.remove(new Range(row, 0, row, i));
+ }
+ session.indentRows(cursor.row + 1, end.row, lineIndent);
+ }
+ if (shouldOutdent)
+ mode.autoOutdent(lineState, session, cursor.row);
+ };
+
+ this.onTextInput = function(text) {
+ this.keyBinding.onTextInput(text);
+ };
+
+ this.onCommandKey = function(e, hashId, keyCode) {
+ this.keyBinding.onCommandKey(e, hashId, keyCode);
+ };
+ this.setOverwrite = function(overwrite) {
+ this.session.setOverwrite(overwrite);
+ };
+ this.getOverwrite = function() {
+ return this.session.getOverwrite();
+ };
+ this.toggleOverwrite = function() {
+ this.session.toggleOverwrite();
+ };
+ this.setScrollSpeed = function(speed) {
+ this.$mouseHandler.setScrollSpeed(speed);
+ };
+ this.getScrollSpeed = function() {
+ return this.$mouseHandler.getScrollSpeed();
+ };
+ this.setDragDelay = function(dragDelay) {
+ this.$mouseHandler.setDragDelay(dragDelay);
+ };
+ this.getDragDelay = function() {
+ return this.$mouseHandler.getDragDelay();
+ };
+
+ this.$selectionStyle = "line";
+ this.setSelectionStyle = function(style) {
+ if (this.$selectionStyle == style) return;
+
+ this.$selectionStyle = style;
+ this.onSelectionChange();
+ this._emit("changeSelectionStyle", {data: style});
+ };
+ this.getSelectionStyle = function() {
+ return this.$selectionStyle;
+ };
+
+ this.$highlightActiveLine = true;
+ this.setHighlightActiveLine = function(shouldHighlight) {
+ if (this.$highlightActiveLine == shouldHighlight)
+ return;
+
+ this.$highlightActiveLine = shouldHighlight;
+ this.$updateHighlightActiveLine();
+ };
+ this.getHighlightActiveLine = function() {
+ return this.$highlightActiveLine;
+ };
+
+ this.$highlightGutterLine = true;
+ this.setHighlightGutterLine = function(shouldHighlight) {
+ if (this.$highlightGutterLine == shouldHighlight)
+ return;
+
+ this.renderer.setHighlightGutterLine(shouldHighlight);
+ this.$highlightGutterLine = shouldHighlight;
+ };
+
+ this.getHighlightGutterLine = function() {
+ return this.$highlightGutterLine;
+ };
+
+ this.$highlightSelectedWord = true;
+ this.setHighlightSelectedWord = function(shouldHighlight) {
+ if (this.$highlightSelectedWord == shouldHighlight)
+ return;
+
+ this.$highlightSelectedWord = shouldHighlight;
+ this.$onSelectionChange();
+ };
+ this.getHighlightSelectedWord = function() {
+ return this.$highlightSelectedWord;
+ };
+
+ this.setAnimatedScroll = function(shouldAnimate){
+ this.renderer.setAnimatedScroll(shouldAnimate);
+ };
+
+ this.getAnimatedScroll = function(){
+ return this.renderer.getAnimatedScroll();
+ };
+ this.setShowInvisibles = function(showInvisibles) {
+ this.renderer.setShowInvisibles(showInvisibles);
+ };
+ this.getShowInvisibles = function() {
+ return this.renderer.getShowInvisibles();
+ };
+
+ this.setDisplayIndentGuides = function(display) {
+ this.renderer.setDisplayIndentGuides(display);
+ };
+
+ this.getDisplayIndentGuides = function() {
+ return this.renderer.getDisplayIndentGuides();
+ };
+ this.setShowPrintMargin = function(showPrintMargin) {
+ this.renderer.setShowPrintMargin(showPrintMargin);
+ };
+ this.getShowPrintMargin = function() {
+ return this.renderer.getShowPrintMargin();
+ };
+ this.setPrintMarginColumn = function(showPrintMargin) {
+ this.renderer.setPrintMarginColumn(showPrintMargin);
+ };
+ this.getPrintMarginColumn = function() {
+ return this.renderer.getPrintMarginColumn();
+ };
+
+ this.$readOnly = false;
+ this.setReadOnly = function(readOnly) {
+ this.$readOnly = readOnly;
+ };
+ this.getReadOnly = function() {
+ return this.$readOnly;
+ };
+
+ this.$modeBehaviours = true;
+ this.setBehavioursEnabled = function (enabled) {
+ this.$modeBehaviours = enabled;
+ };
+ this.getBehavioursEnabled = function () {
+ return this.$modeBehaviours;
+ };
+
+ this.$modeWrapBehaviours = true;
+ this.setWrapBehavioursEnabled = function (enabled) {
+ this.$modeWrapBehaviours = enabled;
+ };
+ this.getWrapBehavioursEnabled = function () {
+ return this.$modeWrapBehaviours;
+ };
+ this.setShowFoldWidgets = function(show) {
+ var gutter = this.renderer.$gutterLayer;
+ if (gutter.getShowFoldWidgets() == show)
+ return;
+
+ this.renderer.$gutterLayer.setShowFoldWidgets(show);
+ this.$showFoldWidgets = show;
+ this.renderer.updateFull();
+ };
+ this.getShowFoldWidgets = function() {
+ return this.renderer.$gutterLayer.getShowFoldWidgets();
+ };
+
+ this.setFadeFoldWidgets = function(show) {
+ this.renderer.setFadeFoldWidgets(show);
+ };
+
+ this.getFadeFoldWidgets = function() {
+ return this.renderer.getFadeFoldWidgets();
+ };
+ this.remove = function(dir) {
+ if (this.selection.isEmpty()){
+ if (dir == "left")
+ this.selection.selectLeft();
+ else
+ this.selection.selectRight();
+ }
+
+ var range = this.getSelectionRange();
+ if (this.getBehavioursEnabled()) {
+ var session = this.session;
+ var state = session.getState(range.start.row);
+ var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
+ if (new_range)
+ range = new_range;
+ }
+
+ this.session.remove(range);
+ this.clearSelection();
+ };
+ this.removeWordRight = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectWordRight();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+ this.removeWordLeft = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectWordLeft();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+ this.removeToLineStart = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectLineStart();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+ this.removeToLineEnd = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectLineEnd();
+
+ var range = this.getSelectionRange();
+ if (range.start.column == range.end.column && range.start.row == range.end.row) {
+ range.end.column = 0;
+ range.end.row++;
+ }
+
+ this.session.remove(range);
+ this.clearSelection();
+ };
+ this.splitLine = function() {
+ if (!this.selection.isEmpty()) {
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ }
+
+ var cursor = this.getCursorPosition();
+ this.insert("\n");
+ this.moveCursorToPosition(cursor);
+ };
+ this.transposeLetters = function() {
+ if (!this.selection.isEmpty()) {
+ return;
+ }
+
+ var cursor = this.getCursorPosition();
+ var column = cursor.column;
+ if (column === 0)
+ return;
+
+ var line = this.session.getLine(cursor.row);
+ var swap, range;
+ if (column < line.length) {
+ swap = line.charAt(column) + line.charAt(column-1);
+ range = new Range(cursor.row, column-1, cursor.row, column+1);
+ }
+ else {
+ swap = line.charAt(column-1) + line.charAt(column-2);
+ range = new Range(cursor.row, column-2, cursor.row, column);
+ }
+ this.session.replace(range, swap);
+ };
+ this.toLowerCase = function() {
+ var originalRange = this.getSelectionRange();
+ if (this.selection.isEmpty()) {
+ this.selection.selectWord();
+ }
+
+ var range = this.getSelectionRange();
+ var text = this.session.getTextRange(range);
+ this.session.replace(range, text.toLowerCase());
+ this.selection.setSelectionRange(originalRange);
+ };
+ this.toUpperCase = function() {
+ var originalRange = this.getSelectionRange();
+ if (this.selection.isEmpty()) {
+ this.selection.selectWord();
+ }
+
+ var range = this.getSelectionRange();
+ var text = this.session.getTextRange(range);
+ this.session.replace(range, text.toUpperCase());
+ this.selection.setSelectionRange(originalRange);
+ };
+ this.indent = function() {
+ var session = this.session;
+ var range = this.getSelectionRange();
+
+ if (range.start.row < range.end.row || range.start.column < range.end.column) {
+ var rows = this.$getSelectedRows();
+ session.indentRows(rows.first, rows.last, "\t");
+ } else {
+ var indentString;
+
+ if (this.session.getUseSoftTabs()) {
+ var size = session.getTabSize(),
+ position = this.getCursorPosition(),
+ column = session.documentToScreenColumn(position.row, position.column),
+ count = (size - column % size);
+
+ indentString = lang.stringRepeat(" ", count);
+ } else
+ indentString = "\t";
+ return this.insert(indentString);
+ }
+ };
+ this.blockOutdent = function() {
+ var selection = this.session.getSelection();
+ this.session.outdentRows(selection.getRange());
+ };
+ this.sortLines = function() {
+ var rows = this.$getSelectedRows();
+ var session = this.session;
+
+ var lines = [];
+ for (i = rows.first; i <= rows.last; i++)
+ lines.push(session.getLine(i));
+
+ lines.sort(function(a, b) {
+ if (a.toLowerCase() < b.toLowerCase()) return -1;
+ if (a.toLowerCase() > b.toLowerCase()) return 1;
+ return 0;
+ });
+
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i = rows.first; i <= rows.last; i++) {
+ var line = session.getLine(i);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = line.length;
+ session.replace(deleteRange, lines[i-rows.first]);
+ }
+ };
+ this.toggleCommentLines = function() {
+ var state = this.session.getState(this.getCursorPosition().row);
+ var rows = this.$getSelectedRows();
+ this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
+ };
+ this.getNumberAt = function( row, column ) {
+ var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g
+ _numberRx.lastIndex = 0
+
+ var s = this.session.getLine(row)
+ while(_numberRx.lastIndex < column - 1 ){
+ var m = _numberRx.exec(s)
+ if(m.index <= column && m.index+m[0].length >= column){
+ var number = {
+ value: m[0],
+ start: m.index,
+ end: m.index+m[0].length
+
+ }
+ return number
+ }
+ }
+ return null;
+ };
+ this.modifyNumber = function(amount) {
+ var row = this.selection.getCursor().row;
+ var column = this.selection.getCursor().column;
+ var charRange = new Range(row, column-1, row, column);
+
+ var c = this.session.getTextRange(charRange);
+ if (!isNaN(parseFloat(c)) && isFinite(c)) {
+ var nr = this.getNumberAt(row, column);
+ if (nr) {
+ var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end;
+ var decimals = nr.start + nr.value.length - fp;
+
+ var t = parseFloat(nr.value);
+ t *= Math.pow(10, decimals);
+
+
+ if(fp !== nr.end && column < fp){
+ amount *= Math.pow(10, nr.end - column - 1);
+ } else {
+ amount *= Math.pow(10, nr.end - column);
+ }
+
+ t += amount;
+ t /= Math.pow(10, decimals);
+ var nnr = t.toFixed(decimals);
+ var replaceRange = new Range(row, nr.start, row, nr.end);
+ this.session.replace(replaceRange, nnr);
+ this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));
+
+ }
+ }
+ };
+ this.removeLines = function() {
+ var rows = this.$getSelectedRows();
+ var range;
+ if (rows.first === 0 || rows.last+1 < this.session.getLength())
+ range = new Range(rows.first, 0, rows.last+1, 0);
+ else
+ range = new Range(
+ rows.first-1, this.session.getLine(rows.first-1).length,
+ rows.last, this.session.getLine(rows.last).length
+ );
+ this.session.remove(range);
+ this.clearSelection();
+ };
+
+ this.duplicateSelection = function() {
+ var sel = this.selection;
+ var doc = this.session;
+ var range = sel.getRange();
+ if (range.isEmpty()) {
+ var row = range.start.row;
+ doc.duplicateLines(row, row);
+ } else {
+ var reverse = sel.isBackwards()
+ var point = sel.isBackwards() ? range.start : range.end;
+ var endPoint = doc.insert(point, doc.getTextRange(range), false);
+ range.start = point;
+ range.end = endPoint;
+
+ sel.setSelectionRange(range, reverse)
+ }
+ };
+ this.moveLinesDown = function() {
+ this.$moveLines(function(firstRow, lastRow) {
+ return this.session.moveLinesDown(firstRow, lastRow);
+ });
+ };
+ this.moveLinesUp = function() {
+ this.$moveLines(function(firstRow, lastRow) {
+ return this.session.moveLinesUp(firstRow, lastRow);
+ });
+ };
+ this.moveText = function(range, toPosition) {
+ if (this.$readOnly)
+ return null;
+
+ return this.session.moveText(range, toPosition);
+ };
+ this.copyLinesUp = function() {
+ this.$moveLines(function(firstRow, lastRow) {
+ this.session.duplicateLines(firstRow, lastRow);
+ return 0;
+ });
+ };
+ this.copyLinesDown = function() {
+ this.$moveLines(function(firstRow, lastRow) {
+ return this.session.duplicateLines(firstRow, lastRow);
+ });
+ };
+ this.$moveLines = function(mover) {
+ var rows = this.$getSelectedRows();
+ var selection = this.selection;
+ if (!selection.isMultiLine()) {
+ var range = selection.getRange();
+ var reverse = selection.isBackwards();
+ }
+
+ var linesMoved = mover.call(this, rows.first, rows.last);
+
+ if (range) {
+ range.start.row += linesMoved;
+ range.end.row += linesMoved;
+ selection.setSelectionRange(range, reverse);
+ }
+ else {
+ selection.setSelectionAnchor(rows.last+linesMoved+1, 0);
+ selection.$moveSelection(function() {
+ selection.moveCursorTo(rows.first+linesMoved, 0);
+ });
+ }
+ };
+ this.$getSelectedRows = function() {
+ var range = this.getSelectionRange().collapseRows();
+
+ return {
+ first: range.start.row,
+ last: range.end.row
+ };
+ };
+
+ this.onCompositionStart = function(text) {
+ this.renderer.showComposition(this.getCursorPosition());
+ };
+
+ this.onCompositionUpdate = function(text) {
+ this.renderer.setCompositionText(text);
+ };
+
+ this.onCompositionEnd = function() {
+ this.renderer.hideComposition();
+ };
+ this.getFirstVisibleRow = function() {
+ return this.renderer.getFirstVisibleRow();
+ };
+ this.getLastVisibleRow = function() {
+ return this.renderer.getLastVisibleRow();
+ };
+ this.isRowVisible = function(row) {
+ return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());
+ };
+ this.isRowFullyVisible = function(row) {
+ return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());
+ };
+ this.$getVisibleRowCount = function() {
+ return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;
+ };
+
+ this.$moveByPage = function(dir, select) {
+ var renderer = this.renderer;
+ var config = this.renderer.layerConfig;
+ var rows = dir * Math.floor(config.height / config.lineHeight);
+
+ this.$blockScrolling++;
+ if (select == true) {
+ this.selection.$moveSelection(function(){
+ this.moveCursorBy(rows, 0);
+ });
+ } else if (select == false) {
+ this.selection.moveCursorBy(rows, 0);
+ this.selection.clearSelection();
+ }
+ this.$blockScrolling--;
+
+ var scrollTop = renderer.scrollTop;
+
+ renderer.scrollBy(0, rows * config.lineHeight);
+ if (select != null)
+ renderer.scrollCursorIntoView(null, 0.5);
+
+ renderer.animateScrolling(scrollTop);
+ };
+ this.selectPageDown = function() {
+ this.$moveByPage(1, true);
+ };
+ this.selectPageUp = function() {
+ this.$moveByPage(-1, true);
+ };
+ this.gotoPageDown = function() {
+ this.$moveByPage(1, false);
+ };
+ this.gotoPageUp = function() {
+ this.$moveByPage(-1, false);
+ };
+ this.scrollPageDown = function() {
+ this.$moveByPage(1);
+ };
+ this.scrollPageUp = function() {
+ this.$moveByPage(-1);
+ };
+ this.scrollToRow = function(row) {
+ this.renderer.scrollToRow(row);
+ };
+ this.scrollToLine = function(line, center, animate, callback) {
+ this.renderer.scrollToLine(line, center, animate, callback);
+ };
+ this.centerSelection = function() {
+ var range = this.getSelectionRange();
+ var pos = {
+ row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),
+ column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)
+ }
+ this.renderer.alignCursor(pos, 0.5);
+ };
+ this.getCursorPosition = function() {
+ return this.selection.getCursor();
+ };
+ this.getCursorPositionScreen = function() {
+ return this.session.documentToScreenPosition(this.getCursorPosition());
+ };
+ this.getSelectionRange = function() {
+ return this.selection.getRange();
+ };
+ this.selectAll = function() {
+ this.$blockScrolling += 1;
+ this.selection.selectAll();
+ this.$blockScrolling -= 1;
+ };
+ this.clearSelection = function() {
+ this.selection.clearSelection();
+ };
+ this.moveCursorTo = function(row, column) {
+ this.selection.moveCursorTo(row, column);
+ };
+ this.moveCursorToPosition = function(pos) {
+ this.selection.moveCursorToPosition(pos);
+ };
+ this.jumpToMatching = function(select) {
+ var cursor = this.getCursorPosition();
+
+ var range = this.session.getBracketRange(cursor);
+ if (!range) {
+ range = this.find({
+ needle: /[{}()\[\]]/g,
+ preventScroll:true,
+ start: {row: cursor.row, column: cursor.column - 1}
+ });
+ if (!range)
+ return;
+ var pos = range.start;
+ if (pos.row == cursor.row && Math.abs(pos.column - cursor.column) < 2)
+ range = this.session.getBracketRange(pos);
+ }
+
+ pos = range && range.cursor || pos;
+ if (pos) {
+ if (select) {
+ if (range && range.isEqual(this.getSelectionRange()))
+ this.clearSelection();
+ else
+ this.selection.selectTo(pos.row, pos.column);
+ } else {
+ this.clearSelection();
+ this.moveCursorTo(pos.row, pos.column);
+ }
+ }
+ };
+ this.gotoLine = function(lineNumber, column, animate) {
+ this.selection.clearSelection();
+ this.session.unfold({row: lineNumber - 1, column: column || 0});
+
+ this.$blockScrolling += 1;
+ this.moveCursorTo(lineNumber - 1, column || 0);
+ this.$blockScrolling -= 1;
+
+ if (!this.isRowFullyVisible(lineNumber - 1))
+ this.scrollToLine(lineNumber - 1, true, animate);
+ };
+ this.navigateTo = function(row, column) {
+ this.clearSelection();
+ this.moveCursorTo(row, column);
+ };
+ this.navigateUp = function(times) {
+ this.selection.clearSelection();
+ times = times || 1;
+ this.selection.moveCursorBy(-times, 0);
+ };
+ this.navigateDown = function(times) {
+ this.selection.clearSelection();
+ times = times || 1;
+ this.selection.moveCursorBy(times, 0);
+ };
+ this.navigateLeft = function(times) {
+ if (!this.selection.isEmpty()) {
+ var selectionStart = this.getSelectionRange().start;
+ this.moveCursorToPosition(selectionStart);
+ }
+ else {
+ times = times || 1;
+ while (times--) {
+ this.selection.moveCursorLeft();
+ }
+ }
+ this.clearSelection();
+ };
+ this.navigateRight = function(times) {
+ if (!this.selection.isEmpty()) {
+ var selectionEnd = this.getSelectionRange().end;
+ this.moveCursorToPosition(selectionEnd);
+ }
+ else {
+ times = times || 1;
+ while (times--) {
+ this.selection.moveCursorRight();
+ }
+ }
+ this.clearSelection();
+ };
+ this.navigateLineStart = function() {
+ this.selection.moveCursorLineStart();
+ this.clearSelection();
+ };
+ this.navigateLineEnd = function() {
+ this.selection.moveCursorLineEnd();
+ this.clearSelection();
+ };
+ this.navigateFileEnd = function() {
+ var scrollTop = this.renderer.scrollTop;
+ this.selection.moveCursorFileEnd();
+ this.clearSelection();
+ this.renderer.animateScrolling(scrollTop);
+ };
+ this.navigateFileStart = function() {
+ var scrollTop = this.renderer.scrollTop;
+ this.selection.moveCursorFileStart();
+ this.clearSelection();
+ this.renderer.animateScrolling(scrollTop);
+ };
+ this.navigateWordRight = function() {
+ this.selection.moveCursorWordRight();
+ this.clearSelection();
+ };
+ this.navigateWordLeft = function() {
+ this.selection.moveCursorWordLeft();
+ this.clearSelection();
+ };
+ this.replace = function(replacement, options) {
+ if (options)
+ this.$search.set(options);
+
+ var range = this.$search.find(this.session);
+ var replaced = 0;
+ if (!range)
+ return replaced;
+
+ if (this.$tryReplace(range, replacement)) {
+ replaced = 1;
+ }
+ if (range !== null) {
+ this.selection.setSelectionRange(range);
+ this.renderer.scrollSelectionIntoView(range.start, range.end);
+ }
+
+ return replaced;
+ };
+ this.replaceAll = function(replacement, options) {
+ if (options) {
+ this.$search.set(options);
+ }
+
+ var ranges = this.$search.findAll(this.session);
+ var replaced = 0;
+ if (!ranges.length)
+ return replaced;
+
+ this.$blockScrolling += 1;
+
+ var selection = this.getSelectionRange();
+ this.clearSelection();
+ this.selection.moveCursorTo(0, 0);
+
+ for (var i = ranges.length - 1; i >= 0; --i) {
+ if(this.$tryReplace(ranges[i], replacement)) {
+ replaced++;
+ }
+ }
+
+ this.selection.setSelectionRange(selection);
+ this.$blockScrolling -= 1;
+
+ return replaced;
+ };
+
+ this.$tryReplace = function(range, replacement) {
+ var input = this.session.getTextRange(range);
+ replacement = this.$search.replace(input, replacement);
+ if (replacement !== null) {
+ range.end = this.session.replace(range, replacement);
+ return range;
+ } else {
+ return null;
+ }
+ };
+ this.getLastSearchOptions = function() {
+ return this.$search.getOptions();
+ };
+ this.find = function(needle, options, animate) {
+ if (!options)
+ options = {};
+
+ if (typeof needle == "string" || needle instanceof RegExp)
+ options.needle = needle;
+ else if (typeof needle == "object")
+ oop.mixin(options, needle);
+
+ var range = this.selection.getRange();
+ if (options.needle == null) {
+ needle = this.session.getTextRange(range)
+ || this.$search.$options.needle;
+ if (!needle) {
+ range = this.session.getWordRange(range.start.row, range.start.column);
+ needle = this.session.getTextRange(range);
+ }
+ this.$search.set({needle: needle});
+ }
+
+ this.$search.set(options);
+ if (!options.start)
+ this.$search.set({start: range});
+
+ var newRange = this.$search.find(this.session);
+ if (options.preventScroll)
+ return newRange;
+ if (newRange) {
+ this.revealRange(newRange, animate);
+ return newRange;
+ }
+ if (options.backwards)
+ range.start = range.end;
+ else
+ range.end = range.start;
+ this.selection.setRange(range);
+ };
+ this.findNext = function(options, animate) {
+ this.find({skipCurrent: true, backwards: false}, options, animate);
+ };
+ this.findPrevious = function(options, animate) {
+ this.find(options, {skipCurrent: true, backwards: true}, animate);
+ };
+
+ this.revealRange = function(range, animate) {
+ this.$blockScrolling += 1;
+ this.session.unfold(range);
+ this.selection.setSelectionRange(range);
+ this.$blockScrolling -= 1;
+
+ var scrollTop = this.renderer.scrollTop;
+ this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
+ if (animate != false)
+ this.renderer.animateScrolling(scrollTop);
+ };
+ this.undo = function() {
+ this.$blockScrolling++;
+ this.session.getUndoManager().undo();
+ this.$blockScrolling--;
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ };
+ this.redo = function() {
+ this.$blockScrolling++;
+ this.session.getUndoManager().redo();
+ this.$blockScrolling--;
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ };
+ this.destroy = function() {
+ this.renderer.destroy();
+ };
+
+}).call(Editor.prototype);
+
+
+exports.Editor = Editor;
+});
+
+ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ return new Array(count + 1).join(string);
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+ return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+ return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+ var copy = {};
+ for (var key in obj) {
+ copy[key] = obj[key];
+ }
+ return copy;
+};
+
+exports.copyArray = function(array){
+ var copy = [];
+ for (var i=0, l=array.length; i<l; i++) {
+ if (array[i] && typeof array[i] == "object")
+ copy[i] = this.copyObject( array[i] );
+ else
+ copy[i] = array[i];
+ }
+ return copy;
+};
+
+exports.deepCopy = function (obj) {
+ if (typeof obj != "object") {
+ return obj;
+ }
+
+ var copy = obj.constructor();
+ for (var key in obj) {
+ if (typeof obj[key] == "object") {
+ copy[key] = this.deepCopy(obj[key]);
+ } else {
+ copy[key] = obj[key];
+ }
+ }
+ return copy;
+};
+
+exports.arrayToMap = function(arr) {
+ var map = {};
+ for (var i=0; i<arr.length; i++) {
+ map[arr[i]] = 1;
+ }
+ return map;
+
+};
+
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
+exports.arrayRemove = function(array, value) {
+ for (var i = 0; i <= array.length; i++) {
+ if (value === array[i]) {
+ array.splice(i, 1);
+ }
+ }
+};
+
+exports.escapeRegExp = function(str) {
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
+exports.deferredCall = function(fcn) {
+
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var deferred = function(timeout) {
+ deferred.cancel();
+ timer = setTimeout(callback, timeout || 0);
+ return deferred;
+ };
+
+ deferred.schedule = deferred;
+
+ deferred.call = function() {
+ this.cancel();
+ fcn();
+ return deferred;
+ };
+
+ deferred.cancel = function() {
+ clearTimeout(timer);
+ timer = null;
+ return deferred;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = _self;
+ _self.schedule = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || 0);
+ };
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define('ace/keyboard/textinput', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/lib/dom', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+
+var TextInput = function(parentNode, host) {
+ var text = dom.createElement("textarea");
+ text.className = "ace_text-input";
+ if (useragent.isTouchPad)
+ text.setAttribute("x-palm-disable-auto-cap", true);
+
+ text.wrap = "off";
+ text.autocorrect = "off";
+ text.autocapitalize = "off";
+ text.spellcheck = false;
+
+ text.style.top = "-2em";
+ parentNode.insertBefore(text, parentNode.firstChild);
+
+ var PLACEHOLDER = "\x01\x01";
+
+ var cut = false;
+ var copied = false;
+ var pasted = false;
+ var inCompostion = false;
+ var tempStyle = '';
+ var isSelectionEmpty = true;
+ var isFocused = document.activeElement === text;
+ event.addListener(text, "blur", function() {
+ host.onBlur();
+ isFocused = false;
+ });
+ event.addListener(text, "focus", function() {
+ isFocused = true;
+ host.onFocus();
+ resetSelection();
+ });
+ this.focus = function() { text.focus(); };
+ this.blur = function() { text.blur(); };
+ this.isFocused = function() {
+ return isFocused;
+ };
+ var syncSelection = lang.delayedCall(function() {
+ isFocused && resetSelection(isSelectionEmpty);
+ });
+ var syncValue = lang.delayedCall(function() {
+ if (!inCompostion) {
+ text.value = PLACEHOLDER;
+ isFocused && resetSelection();
+ }
+ });
+
+ function resetSelection(isEmpty) {
+ if (inCompostion)
+ return;
+ var selectionStart = isEmpty ? 2 : 1;
+ var selectionEnd = 2;
+ try {
+ text.setSelectionRange(selectionStart, selectionEnd);
+ } catch(e){}
+ }
+
+ function resetValue() {
+ if (inCompostion)
+ return;
+ text.value = PLACEHOLDER;
+ if (useragent.isWebKit)
+ syncValue.schedule();
+ }
+
+ useragent.isWebKit || host.addEventListener('changeSelection', function() {
+ if (host.selection.isEmpty() != isSelectionEmpty) {
+ isSelectionEmpty = !isSelectionEmpty;
+ syncSelection.schedule();
+ }
+ });
+
+ resetValue();
+ if (isFocused)
+ host.onFocus();
+
+
+ var isAllSelected = function(text) {
+ return text.selectionStart === 0 && text.selectionEnd === text.value.length;
+ };
+ if (!text.setSelectionRange && text.createTextRange) {
+ text.setSelectionRange = function(selectionStart, selectionEnd) {
+ var range = this.createTextRange();
+ range.collapse(true);
+ range.moveStart('character', selectionStart);
+ range.moveEnd('character', selectionEnd);
+ range.select();
+ };
+ isAllSelected = function(text) {
+ try {
+ var range = text.ownerDocument.selection.createRange();
+ }catch(e) {}
+ if (!range || range.parentElement() != text) return false;
+ return range.text == text.value;
+ }
+ }
+ if (useragent.isOldIE) {
+ var inPropertyChange = false;
+ var onPropertyChange = function(e){
+ if (inPropertyChange)
+ return;
+ var data = text.value;
+ if (inCompostion || !data || data == PLACEHOLDER)
+ return;
+ if (e && data == PLACEHOLDER[0])
+ return syncProperty.schedule();
+
+ sendText(data);
+ inPropertyChange = true;
+ resetValue();
+ inPropertyChange = false;
+ };
+ var syncProperty = lang.delayedCall(onPropertyChange);
+ event.addListener(text, "propertychange", onPropertyChange);
+
+ var keytable = { 13:1, 27:1 };
+ event.addListener(text, "keyup", function (e) {
+ if (inCompostion && (!text.value || keytable[e.keyCode]))
+ setTimeout(onCompositionEnd, 0);
+ if ((text.value.charCodeAt(0)||0) < 129) {
+ return;
+ }
+ inCompostion ? onCompositionUpdate() : onCompositionStart();
+ });
+ }
+
+ var onSelect = function(e) {
+ if (cut) {
+ cut = false;
+ return;
+ }
+ if (copied) {
+ copied = false;
+ return;
+ }
+ if (isAllSelected(text)) {
+ host.selectAll();
+ resetSelection();
+ }
+ };
+
+ var sendText = function(data) {
+ if (pasted) {
+ resetSelection();
+ if (data)
+ host.onPaste(data);
+ pasted = false;
+ } else if (data == PLACEHOLDER[0]) {
+ host.execCommand("del", {source: "ace"});
+ } else {
+ if (data.substring(0, 2) == PLACEHOLDER)
+ data = data.substr(2);
+ else if (data[0] == PLACEHOLDER[0])
+ data = data.substr(1);
+ else if (data[data.length - 1] == PLACEHOLDER[0])
+ data = data.slice(0, -1);
+ if (data[data.length - 1] == PLACEHOLDER[0])
+ data = data.slice(0, -1);
+
+ if (data)
+ host.onTextInput(data);
+ }
+ };
+ var onInput = function(e) {
+ if (inCompostion)
+ return;
+ var data = text.value;
+ resetValue();
+
+ sendText(data);
+ };
+
+ var onCut = function(e) {
+ var data = host.getCopyText();
+ if (!data) {
+ event.preventDefault(e);
+ return;
+ }
+
+ var clipboardData = e.clipboardData || window.clipboardData;
+
+ if (clipboardData) {
+ var supported = clipboardData.setData("Text", data);
+ if (supported) {
+ host.onCut();
+ event.preventDefault(e);
+ }
+ }
+
+ if (!supported) {
+ cut = true;
+ text.value = data;
+ text.select();
+ setTimeout(function(){
+ cut = false;
+ resetValue();
+ resetSelection();
+ host.onCut();
+ });
+ }
+ };
+
+ var onCopy = function(e) {
+ var data = host.getCopyText();
+ if (!data) {
+ event.preventDefault(e);
+ return;
+ }
+
+ var clipboardData = e.clipboardData || window.clipboardData;
+ if (clipboardData) {
+ var supported = clipboardData.setData("Text", data);
+ if (supported) {
+ host.onCopy();
+ event.preventDefault(e);
+ }
+ }
+ if (!supported) {
+ copied = true;
+ text.value = data;
+ text.select();
+ setTimeout(function(){
+ copied = false;
+ resetValue();
+ resetSelection();
+ host.onCopy();
+ });
+ }
+ };
+
+ var onPaste = function(e) {
+ var clipboardData = e.clipboardData || window.clipboardData;
+
+ if (clipboardData) {
+ var data = clipboardData.getData("Text");
+ if (data)
+ host.onPaste(data);
+ if (useragent.isIE)
+ setTimeout(resetSelection);
+ event.preventDefault(e);
+ }
+ else {
+ text.value = "";
+ pasted = true;
+ }
+ };
+
+ event.addCommandKeyListener(text, host.onCommandKey.bind(host));
+
+ event.addListener(text, "select", onSelect);
+
+ event.addListener(text, "input", onInput);
+
+ event.addListener(text, "cut", onCut);
+ event.addListener(text, "copy", onCopy);
+ event.addListener(text, "paste", onPaste);
+ if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)){
+ event.addListener(parentNode, "keydown", function(e) {
+ if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)
+ return;
+
+ switch (e.keyCode) {
+ case 67:
+ onCopy(e);
+ break;
+ case 86:
+ onPaste(e);
+ break;
+ case 88:
+ onCut(e);
+ break;
+ }
+ });
+ }
+ var onCompositionStart = function(e) {
+ inCompostion = true;
+ host.onCompositionStart();
+ setTimeout(onCompositionUpdate, 0);
+ };
+
+ var onCompositionUpdate = function() {
+ if (!inCompostion) return;
+ host.onCompositionUpdate(text.value);
+ };
+
+ var onCompositionEnd = function(e) {
+ inCompostion = false;
+ host.onCompositionEnd();
+ };
+
+
+ event.addListener(text, "compositionstart", onCompositionStart);
+ if (useragent.isGecko)
+ event.addListener(text, "text", onCompositionUpdate);
+ else
+ event.addListener(text, "keyup", onCompositionUpdate);
+ event.addListener(text, "compositionend", onCompositionEnd);
+ this.getElement = function() {
+ return text;
+ };
+
+ this.onContextMenu = function(e) {
+ if (!tempStyle)
+ tempStyle = text.style.cssText;
+
+ text.style.cssText = "z-index:100000;" + (useragent.isIE ? "opacity:0.1;" : "");
+
+ resetSelection(host.selection.isEmpty());
+ host._emit("nativecontextmenu", {target: host});
+ var rect = host.container.getBoundingClientRect();
+ var move = function(e) {
+ text.style.left = e.clientX - rect.left - 2 + "px";
+ text.style.top = e.clientY - rect.top - 2 + "px";
+ };
+ move(e);
+
+ if (e.type != "mousedown")
+ return;
+
+ if (host.renderer.$keepTextAreaAtCursor)
+ host.renderer.$keepTextAreaAtCursor = null;
+ if (useragent.isWin)
+ event.capture(host.container, move, onContextMenuClose);
+ };
+
+ this.onContextMenuClose = onContextMenuClose;
+ function onContextMenuClose() {
+ setTimeout(function () {
+ if (tempStyle) {
+ text.style.cssText = tempStyle;
+ tempStyle = '';
+ }
+ if (host.renderer.$keepTextAreaAtCursor == null) {
+ host.renderer.$keepTextAreaAtCursor = true;
+ host.renderer.$moveTextAreaToCursor();
+ }
+ }, 0);
+ }
+ if (!useragent.isGecko) {
+ event.addListener(text, "contextmenu", function(e) {
+ host.textInput.onContextMenu(e);
+ onContextMenuClose();
+ });
+ }
+};
+
+exports.TextInput = TextInput;
+});
+
+ace.define('ace/mouse/mouse_handler', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/mouse/default_handlers', 'ace/mouse/default_gutter_handler', 'ace/mouse/mouse_event', 'ace/mouse/dragdrop'], function(require, exports, module) {
+
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var DefaultHandlers = require("./default_handlers").DefaultHandlers;
+var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler;
+var MouseEvent = require("./mouse_event").MouseEvent;
+var DragdropHandler = require("./dragdrop").DragdropHandler;
+
+var MouseHandler = function(editor) {
+ this.editor = editor;
+
+ new DefaultHandlers(this);
+ new DefaultGutterHandler(this);
+ new DragdropHandler(this);
+
+ event.addListener(editor.container, "mousedown", function(e) {
+ editor.focus();
+ return event.preventDefault(e);
+ });
+
+ var mouseTarget = editor.renderer.getMouseEventTarget();
+ event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
+ event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
+ event.addMultiMouseDownListener(mouseTarget, [300, 300, 250], this, "onMouseEvent");
+ event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
+
+ var gutterEl = editor.renderer.$gutter;
+ event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"));
+ event.addListener(gutterEl, "click", this.onMouseEvent.bind(this, "gutterclick"));
+ event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"));
+ event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove"));
+};
+
+(function() {
+
+ this.$scrollSpeed = 1;
+ this.setScrollSpeed = function(speed) {
+ this.$scrollSpeed = speed;
+ };
+
+ this.getScrollSpeed = function() {
+ return this.$scrollSpeed;
+ };
+
+ this.onMouseEvent = function(name, e) {
+ this.editor._emit(name, new MouseEvent(e, this.editor));
+ };
+
+ this.$dragDelay = 250;
+ this.setDragDelay = function(dragDelay) {
+ this.$dragDelay = dragDelay;
+ };
+
+ this.getDragDelay = function() {
+ return this.$dragDelay;
+ };
+
+ this.onMouseMove = function(name, e) {
+ var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
+ if (!listeners || !listeners.length)
+ return;
+
+ this.editor._emit(name, new MouseEvent(e, this.editor));
+ };
+
+ this.onMouseWheel = function(name, e) {
+ var mouseEvent = new MouseEvent(e, this.editor);
+ mouseEvent.speed = this.$scrollSpeed * 2;
+ mouseEvent.wheelX = e.wheelX;
+ mouseEvent.wheelY = e.wheelY;
+
+ this.editor._emit(name, mouseEvent);
+ };
+
+ this.setState = function(state) {
+ this.state = state;
+ };
+
+ this.captureMouse = function(ev, state) {
+ if (state)
+ this.setState(state);
+
+ this.x = ev.x;
+ this.y = ev.y;
+
+ this.isMousePressed = true;
+ var renderer = this.editor.renderer;
+ if (renderer.$keepTextAreaAtCursor)
+ renderer.$keepTextAreaAtCursor = null;
+
+ var self = this;
+ var onMouseMove = function(e) {
+ self.x = e.clientX;
+ self.y = e.clientY;
+ };
+
+ var onCaptureEnd = function(e) {
+ clearInterval(timerId);
+ self[self.state + "End"] && self[self.state + "End"](e);
+ self.$clickSelection = null;
+ if (renderer.$keepTextAreaAtCursor == null) {
+ renderer.$keepTextAreaAtCursor = true;
+ renderer.$moveTextAreaToCursor();
+ }
+ self.isMousePressed = false;
+ };
+
+ var onCaptureInterval = function() {
+ self[self.state] && self[self.state]();
+ }
+
+ if (useragent.isOldIE && ev.domEvent.type == "dblclick") {
+ setTimeout(function() {
+ onCaptureInterval();
+ onCaptureEnd(ev.domEvent);
+ });
+ return;
+ }
+
+ event.capture(this.editor.container, onMouseMove, onCaptureEnd);
+ var timerId = setInterval(onCaptureInterval, 20);
+ };
+}).call(MouseHandler.prototype);
+
+exports.MouseHandler = MouseHandler;
+});
+
+ace.define('ace/mouse/default_handlers', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/useragent'], function(require, exports, module) {
+
+
+var dom = require("../lib/dom");
+var useragent = require("../lib/useragent");
+
+var DRAG_OFFSET = 5; // pixels
+
+function DefaultHandlers(mouseHandler) {
+ mouseHandler.$clickSelection = null;
+
+ var editor = mouseHandler.editor;
+ editor.setDefaultHandler("mousedown", this.onMouseDown.bind(mouseHandler));
+ editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler));
+ editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler));
+ editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler));
+ editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler));
+
+ var exports = ["select", "startSelect", "drag", "dragEnd", "dragWait",
+ "dragWaitEnd", "startDrag", "focusWait"];
+
+ exports.forEach(function(x) {
+ mouseHandler[x] = this[x];
+ }, this);
+
+ mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, "getLineRange");
+ mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, "getWordRange");
+
+ mouseHandler.$focusWaitTimout = 250;
+}
+
+(function() {
+
+ this.onMouseDown = function(ev) {
+ var inSelection = ev.inSelection();
+ var pos = ev.getDocumentPosition();
+ this.mousedownEvent = ev;
+ var editor = this.editor;
+
+ var button = ev.getButton();
+ if (button !== 0) {
+ var selectionRange = editor.getSelectionRange();
+ var selectionEmpty = selectionRange.isEmpty();
+
+ if (selectionEmpty) {
+ editor.moveCursorToPosition(pos);
+ editor.selection.clearSelection();
+ }
+ editor.textInput.onContextMenu(ev.domEvent);
+ return; // stopping event here breaks contextmenu on ff mac
+ }
+ if (inSelection && !editor.isFocused()) {
+ editor.focus();
+ if (this.$focusWaitTimout && !this.$clickSelection) {
+ this.setState("focusWait");
+ this.captureMouse(ev);
+ return ev.preventDefault();
+ }
+ }
+
+ if (!inSelection || this.$clickSelection || ev.getShiftKey()) {
+ this.startSelect(pos);
+ } else if (inSelection) {
+ this.mousedownEvent.time = (new Date()).getTime();
+ this.setState("dragWait");
+ }
+
+ this.captureMouse(ev);
+ return ev.preventDefault();
+ };
+
+ this.startSelect = function(pos) {
+ pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);
+ if (this.mousedownEvent.getShiftKey()) {
+ this.editor.selection.selectToPosition(pos);
+ }
+ else if (!this.$clickSelection) {
+ this.editor.moveCursorToPosition(pos);
+ this.editor.selection.clearSelection();
+ }
+ this.setState("select");
+ };
+
+ this.select = function() {
+ var anchor, editor = this.editor;
+ var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
+
+ if (this.$clickSelection) {
+ var cmp = this.$clickSelection.comparePoint(cursor);
+
+ if (cmp == -1) {
+ anchor = this.$clickSelection.end;
+ } else if (cmp == 1) {
+ anchor = this.$clickSelection.start;
+ } else {
+ var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);
+ cursor = orientedRange.cursor;
+ anchor = orientedRange.anchor;
+ }
+ editor.selection.setSelectionAnchor(anchor.row, anchor.column);
+ }
+ editor.selection.selectToPosition(cursor);
+
+ editor.renderer.scrollCursorIntoView();
+ };
+
+ this.extendSelectionBy = function(unitName) {
+ var anchor, editor = this.editor;
+ var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
+ var range = editor.selection[unitName](cursor.row, cursor.column);
+
+ if (this.$clickSelection) {
+ var cmpStart = this.$clickSelection.comparePoint(range.start);
+ var cmpEnd = this.$clickSelection.comparePoint(range.end);
+
+ if (cmpStart == -1 && cmpEnd <= 0) {
+ anchor = this.$clickSelection.end;
+ if (range.end.row != cursor.row || range.end.column != cursor.column)
+ cursor = range.start;
+ } else if (cmpEnd == 1 && cmpStart >= 0) {
+ anchor = this.$clickSelection.start;
+ if (range.start.row != cursor.row || range.start.column != cursor.column)
+ cursor = range.end;
+ } else if (cmpStart == -1 && cmpEnd == 1) {
+ cursor = range.end;
+ anchor = range.start;
+ } else {
+ var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);
+ cursor = orientedRange.cursor;
+ anchor = orientedRange.anchor;
+ }
+ editor.selection.setSelectionAnchor(anchor.row, anchor.column);
+ }
+ editor.selection.selectToPosition(cursor);
+
+ editor.renderer.scrollCursorIntoView();
+ };
+
+ this.startDrag = function() {
+ var editor = this.editor;
+ this.setState("drag");
+ this.dragRange = editor.getSelectionRange();
+ var style = editor.getSelectionStyle();
+ this.dragSelectionMarker = editor.session.addMarker(this.dragRange, "ace_selection", style);
+ editor.clearSelection();
+ dom.addCssClass(editor.container, "ace_dragging");
+ if (!this.$dragKeybinding) {
+ this.$dragKeybinding = {
+ handleKeyboard: function(data, hashId, keyString, keyCode) {
+ if (keyString == "esc")
+ return {command: this.command};
+ },
+ command: {
+ exec: function(editor) {
+ var self = editor.$mouseHandler;
+ self.dragCursor = null;
+ self.dragEnd();
+ self.startSelect();
+ }
+ }
+ }
+ }
+
+ editor.keyBinding.addKeyboardHandler(this.$dragKeybinding);
+ };
+
+ this.focusWait = function() {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ var time = (new Date()).getTime();
+
+ if (distance > DRAG_OFFSET ||time - this.mousedownEvent.time > this.$focusWaitTimout)
+ this.startSelect();
+ };
+
+ this.dragWait = function(e) {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ var time = (new Date()).getTime();
+ var editor = this.editor;
+
+ if (distance > DRAG_OFFSET) {
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ } else if (time - this.mousedownEvent.time > editor.getDragDelay()) {
+ this.startDrag();
+ }
+ };
+
+ this.dragWaitEnd = function(e) {
+ this.mousedownEvent.domEvent = e;
+ this.startSelect();
+ };
+
+ this.drag = function() {
+ var editor = this.editor;
+ this.dragCursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
+ editor.moveCursorToPosition(this.dragCursor);
+ editor.renderer.scrollCursorIntoView();
+ };
+
+ this.dragEnd = function(e) {
+ var editor = this.editor;
+ var dragCursor = this.dragCursor;
+ var dragRange = this.dragRange;
+ dom.removeCssClass(editor.container, "ace_dragging");
+ editor.session.removeMarker(this.dragSelectionMarker);
+ editor.keyBinding.removeKeyboardHandler(this.$dragKeybinding);
+
+ if (!dragCursor)
+ return;
+
+ editor.clearSelection();
+ if (e && (e.ctrlKey || e.altKey)) {
+ var session = editor.session;
+ var newRange = dragRange;
+ newRange.end = session.insert(dragCursor, session.getTextRange(dragRange));
+ newRange.start = dragCursor;
+ } else if (dragRange.contains(dragCursor.row, dragCursor.column)) {
+ return;
+ } else {
+ var newRange = editor.moveText(dragRange, dragCursor);
+ }
+
+ if (!newRange)
+ return;
+
+ editor.selection.setSelectionRange(newRange);
+ };
+
+ this.onDoubleClick = function(ev) {
+ var pos = ev.getDocumentPosition();
+ var editor = this.editor;
+ var session = editor.session;
+
+ var range = session.getBracketRange(pos);
+ if (range) {
+ if (range.isEmpty()) {
+ range.start.column--;
+ range.end.column++;
+ }
+ this.$clickSelection = range;
+ this.setState("select");
+ return;
+ }
+
+ this.$clickSelection = editor.selection.getWordRange(pos.row, pos.column);
+ this.setState("selectByWords");
+ };
+
+ this.onTripleClick = function(ev) {
+ var pos = ev.getDocumentPosition();
+ var editor = this.editor;
+
+ this.setState("selectByLines");
+ this.$clickSelection = editor.selection.getLineRange(pos.row);
+ };
+
+ this.onQuadClick = function(ev) {
+ var editor = this.editor;
+
+ editor.selectAll();
+ this.$clickSelection = editor.getSelectionRange();
+ this.setState("null");
+ };
+
+ this.onMouseWheel = function(ev) {
+ if (ev.getShiftKey() || ev.getAccelKey()){
+ return;
+ }
+ var editor = this.editor;
+ var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+ if (isScrolable) {
+ this.$passScrollEvent = false;
+ } else {
+ if (this.$passScrollEvent)
+ return;
+
+ if (!this.$scrollStopTimeout) {
+ var self = this;
+ this.$scrollStopTimeout = setTimeout(function() {
+ self.$passScrollEvent = true;
+ self.$scrollStopTimeout = null;
+ }, 200);
+ }
+ }
+
+ editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+ return ev.preventDefault();
+ };
+
+}).call(DefaultHandlers.prototype);
+
+exports.DefaultHandlers = DefaultHandlers;
+
+function calcDistance(ax, ay, bx, by) {
+ return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
+}
+
+function calcRangeOrientation(range, cursor) {
+ if (range.start.row == range.end.row)
+ var cmp = 2 * cursor.column - range.start.column - range.end.column;
+ else
+ var cmp = 2 * cursor.row - range.start.row - range.end.row;
+
+ if (cmp < 0)
+ return {cursor: range.start, anchor: range.end};
+ else
+ return {cursor: range.end, anchor: range.start};
+}
+
+});
+
+ace.define('ace/mouse/default_gutter_handler', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/event'], function(require, exports, module) {
+
+var dom = require("../lib/dom");
+var event = require("../lib/event");
+
+function GutterHandler(mouseHandler) {
+ var editor = mouseHandler.editor;
+ var gutter = editor.renderer.$gutterLayer;
+
+ mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) {
+ if (!editor.isFocused())
+ return;
+ var gutterRegion = gutter.getRegion(e);
+
+ if (gutterRegion)
+ return;
+
+ var row = e.getDocumentPosition().row;
+ var selection = editor.session.selection;
+
+ if (e.getShiftKey())
+ selection.selectTo(row, 0);
+ else {
+ if (e.domEvent.detail == 2) {
+ editor.selectAll();
+ return e.preventDefault();
+ }
+ mouseHandler.$clickSelection = editor.selection.getLineRange(row);
+ }
+ mouseHandler.captureMouse(e, "selectByLines");
+ return e.preventDefault();
+ });
+
+
+ var tooltipTimeout, mouseEvent, tooltip, tooltipAnnotation;
+ function createTooltip() {
+ tooltip = dom.createElement("div");
+ tooltip.className = "ace_gutter-tooltip";
+ tooltip.style.maxWidth = "500px";
+ tooltip.style.display = "none";
+ editor.container.appendChild(tooltip);
+ }
+
+ function showTooltip() {
+ if (!tooltip) {
+ createTooltip();
+ }
+ var row = mouseEvent.getDocumentPosition().row;
+ var annotation = gutter.$annotations[row];
+ if (!annotation)
+ return hideTooltip();
+
+ var maxRow = editor.session.getLength();
+ if (row == maxRow) {
+ var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;
+ var pos = mouseEvent.$pos;
+ if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))
+ return hideTooltip();
+ }
+
+ if (tooltipAnnotation == annotation)
+ return;
+ tooltipAnnotation = annotation.text.join("<br/>");
+
+ tooltip.style.display = "block";
+ tooltip.innerHTML = tooltipAnnotation;
+ editor.on("mousewheel", hideTooltip);
+
+ moveTooltip(mouseEvent);
+ }
+
+ function hideTooltip() {
+ if (tooltipTimeout)
+ tooltipTimeout = clearTimeout(tooltipTimeout);
+ if (tooltipAnnotation) {
+ tooltip.style.display = "none";
+ tooltipAnnotation = null;
+ editor.removeEventListener("mousewheel", hideTooltip);
+ }
+ }
+
+ function moveTooltip(e) {
+ var rect = editor.renderer.$gutter.getBoundingClientRect();
+ tooltip.style.left = e.x - rect.left + 15 + "px";
+ if (e.y + 3 * editor.renderer.lineHeight + 15 < rect.bottom) {
+ tooltip.style.bottom = "";
+ tooltip.style.top = e.y - rect.top + 15 + "px";
+ } else {
+ tooltip.style.top = "";
+ tooltip.style.bottom = rect.bottom - e.y + 5 + "px";
+ }
+ }
+
+ mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) {
+ var target = e.domEvent.target || e.domEvent.srcElement;
+ if (dom.hasCssClass(target, "ace_fold-widget"))
+ return hideTooltip();
+
+ if (tooltipAnnotation)
+ moveTooltip(e);
+
+ mouseEvent = e;
+ if (tooltipTimeout)
+ return;
+ tooltipTimeout = setTimeout(function() {
+ tooltipTimeout = null;
+ if (mouseEvent && !mouseHandler.isMousePressed)
+ showTooltip();
+ else
+ hideTooltip();
+ }, 50);
+ });
+
+ event.addListener(editor.renderer.$gutter, "mouseout", function(e) {
+ mouseEvent = null;
+ if (!tooltipAnnotation || tooltipTimeout)
+ return;
+
+ tooltipTimeout = setTimeout(function() {
+ tooltipTimeout = null;
+ hideTooltip();
+ }, 50);
+ });
+
+}
+
+exports.GutterHandler = GutterHandler;
+
+});
+
+ace.define('ace/mouse/mouse_event', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent'], function(require, exports, module) {
+
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
+ this.domEvent = domEvent;
+ this.editor = editor;
+
+ this.x = this.clientX = domEvent.clientX;
+ this.y = this.clientY = domEvent.clientY;
+
+ this.$pos = null;
+ this.$inSelection = null;
+
+ this.propagationStopped = false;
+ this.defaultPrevented = false;
+};
+
+(function() {
+
+ this.stopPropagation = function() {
+ event.stopPropagation(this.domEvent);
+ this.propagationStopped = true;
+ };
+
+ this.preventDefault = function() {
+ event.preventDefault(this.domEvent);
+ this.defaultPrevented = true;
+ };
+
+ this.stop = function() {
+ this.stopPropagation();
+ this.preventDefault();
+ };
+ this.getDocumentPosition = function() {
+ if (this.$pos)
+ return this.$pos;
+
+ this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);
+ return this.$pos;
+ };
+ this.inSelection = function() {
+ if (this.$inSelection !== null)
+ return this.$inSelection;
+
+ var editor = this.editor;
+
+ if (editor.getReadOnly()) {
+ this.$inSelection = false;
+ }
+ else {
+ var selectionRange = editor.getSelectionRange();
+ if (selectionRange.isEmpty())
+ this.$inSelection = false;
+ else {
+ var pos = this.getDocumentPosition();
+ this.$inSelection = selectionRange.contains(pos.row, pos.column);
+ }
+ }
+ return this.$inSelection;
+ };
+ this.getButton = function() {
+ return event.getButton(this.domEvent);
+ };
+ this.getShiftKey = function() {
+ return this.domEvent.shiftKey;
+ };
+
+ this.getAccelKey = useragent.isMac
+ ? function() { return this.domEvent.metaKey; }
+ : function() { return this.domEvent.ctrlKey; };
+
+}).call(MouseEvent.prototype);
+
+});
+
+ace.define('ace/mouse/dragdrop', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
+
+
+var event = require("../lib/event");
+
+var DragdropHandler = function(mouseHandler) {
+ var editor = mouseHandler.editor;
+ var dragSelectionMarker, x, y;
+ var timerId, range, isBackwards;
+ var dragCursor, counter = 0;
+
+ var mouseTarget = editor.container;
+ event.addListener(mouseTarget, "dragenter", function(e) {
+ counter++;
+ if (!dragSelectionMarker) {
+ range = editor.getSelectionRange();
+ isBackwards = editor.selection.isBackwards();
+ var style = editor.getSelectionStyle();
+ dragSelectionMarker = editor.session.addMarker(range, "ace_selection", style);
+ editor.clearSelection();
+ clearInterval(timerId);
+ timerId = setInterval(onDragInterval, 20);
+ }
+ return event.preventDefault(e);
+ });
+
+ event.addListener(mouseTarget, "dragover", function(e) {
+ x = e.clientX;
+ y = e.clientY;
+ return event.preventDefault(e);
+ });
+
+ var onDragInterval = function() {
+ dragCursor = editor.renderer.screenToTextCoordinates(x, y);
+ editor.moveCursorToPosition(dragCursor);
+ editor.renderer.scrollCursorIntoView();
+ };
+
+ event.addListener(mouseTarget, "dragleave", function(e) {
+ counter--;
+ if (counter > 0)
+ return;
+ console.log(e.type, counter,e.target);
+ clearInterval(timerId);
+ editor.session.removeMarker(dragSelectionMarker);
+ dragSelectionMarker = null;
+ editor.selection.setSelectionRange(range, isBackwards);
+ return event.preventDefault(e);
+ });
+
+ event.addListener(mouseTarget, "drop", function(e) {
+ console.log(e.type, counter,e.target);
+ counter = 0;
+ clearInterval(timerId);
+ editor.session.removeMarker(dragSelectionMarker);
+ dragSelectionMarker = null;
+
+ range.end = editor.session.insert(dragCursor, e.dataTransfer.getData('Text'));
+ range.start = dragCursor;
+ editor.focus();
+ editor.selection.setSelectionRange(range);
+ return event.preventDefault(e);
+ });
+
+};
+
+exports.DragdropHandler = DragdropHandler;
+});
+
+ace.define('ace/mouse/fold_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function FoldHandler(editor) {
+
+ editor.on("click", function(e) {
+ var position = e.getDocumentPosition();
+ var session = editor.session;
+ var fold = session.getFoldAt(position.row, position.column, 1);
+ if (fold) {
+ if (e.getAccelKey())
+ session.removeFold(fold);
+ else
+ session.expandFold(fold);
+
+ e.stop();
+ }
+ });
+
+ editor.on("guttermousedown", function(e) {
+ var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);
+
+ if (gutterRegion == "foldWidgets") {
+ var row = e.getDocumentPosition().row;
+ var session = editor.session;
+ if (session.foldWidgets && session.foldWidgets[row])
+ editor.session.onFoldWidgetClick(row, e);
+ e.stop();
+ }
+ });
+
+ editor.on("gutterdblclick", function(e) {
+ var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);
+
+ if (gutterRegion == "foldWidgets") {
+ var row = e.getDocumentPosition().row;
+ var session = editor.session;
+ var fw = session.foldWidgets;
+ if (!fw || fw[row])
+ return;
+
+ var i = row - 1, firstRange;
+ while (i >= 0) {
+ var c = fw[i];
+ if (c == null)
+ c = fw[i] = session.getFoldWidget();
+
+ if (c == "start") {
+ var range = session.getFoldWidgetRange(i);
+ if (!firstRange)
+ firstRange = range;
+ if (range && range.end.row >= row)
+ break;
+ }
+ i--;
+ }
+ if (i == -1)
+ range = firstRange;
+
+ if (range) {
+ var row = range.start.row;
+ var fold = session.getFoldAt(row, session.getLine(row).length, 1);
+
+ if (fold) {
+ session.removeFold(fold);
+ } else {
+ session.addFold("...", range);
+ editor.renderer.scrollCursorIntoView({row: range.start.row, column: 0});
+ }
+ }
+ e.stop();
+ }
+ });
+}
+
+exports.FoldHandler = FoldHandler;
+
+});
+
+ace.define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/event'], function(require, exports, module) {
+
+
+var keyUtil = require("../lib/keys");
+var event = require("../lib/event");
+
+var KeyBinding = function(editor) {
+ this.$editor = editor;
+ this.$data = { };
+ this.$handlers = [];
+ this.setDefaultHandler(editor.commands);
+};
+
+(function() {
+ this.setDefaultHandler = function(kb) {
+ this.removeKeyboardHandler(this.$defaultHandler);
+ this.$defaultHandler = kb;
+ this.addKeyboardHandler(kb, 0);
+ this.$data = {editor: this.$editor};
+ };
+
+ this.setKeyboardHandler = function(kb) {
+ if (this.$handlers[this.$handlers.length - 1] == kb)
+ return;
+
+ while (this.$handlers[1])
+ this.removeKeyboardHandler(this.$handlers[1]);
+
+ this.addKeyboardHandler(kb, 1);
+ };
+
+ this.addKeyboardHandler = function(kb, pos) {
+ if (!kb)
+ return;
+ var i = this.$handlers.indexOf(kb);
+ if (i != -1)
+ this.$handlers.splice(i, 1);
+
+ if (pos == undefined)
+ this.$handlers.push(kb);
+ else
+ this.$handlers.splice(pos, 0, kb);
+
+ if (i == -1 && kb.attach)
+ kb.attach(this.$editor);
+ };
+
+ this.removeKeyboardHandler = function(kb) {
+ var i = this.$handlers.indexOf(kb);
+ if (i == -1)
+ return false;
+ this.$handlers.splice(i, 1);
+ kb.detach && kb.detach(this.$editor);
+ return true;
+ };
+
+ this.getKeyboardHandler = function() {
+ return this.$handlers[this.$handlers.length - 1];
+ };
+
+ this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
+ var toExecute;
+ var success = false;
+ var commands = this.$editor.commands;
+
+ for (var i = this.$handlers.length; i--;) {
+ toExecute = this.$handlers[i].handleKeyboard(
+ this.$data, hashId, keyString, keyCode, e
+ );
+ if (!toExecute || !toExecute.command)
+ continue;
+ if (toExecute.command == "null") {
+ success = toExecute.passEvent != true;
+ } else {
+ success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);
+ }
+ if (success && e && hashId != -1)
+ event.stopEvent(e);
+ if (success)
+ break;
+ }
+ return success;
+ };
+
+ this.onCommandKey = function(e, hashId, keyCode) {
+ var keyString = keyUtil.keyCodeToString(keyCode);
+ this.$callKeyboardHandlers(hashId, keyString, keyCode, e);
+ };
+
+ this.onTextInput = function(text) {
+ var success = this.$callKeyboardHandlers(-1, text);
+ if (!success)
+ this.$editor.commands.exec("insertstring", this.$editor, text);
+ };
+
+}).call(KeyBinding.prototype);
+
+exports.KeyBinding = KeyBinding;
+});
+
+ace.define('ace/edit_session', ['require', 'exports', 'module' , 'ace/config', 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/net', 'ace/lib/event_emitter', 'ace/selection', 'ace/mode/text', 'ace/range', 'ace/document', 'ace/background_tokenizer', 'ace/search_highlight', 'ace/edit_session/folding', 'ace/edit_session/bracket_match'], function(require, exports, module) {
+
+
+var config = require("./config");
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var net = require("./lib/net");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Selection = require("./selection").Selection;
+var TextMode = require("./mode/text").Mode;
+var Range = require("./range").Range;
+var Document = require("./document").Document;
+var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+
+var EditSession = function(text, mode) {
+ this.$breakpoints = [];
+ this.$decorations = [];
+ this.$frontMarkers = {};
+ this.$backMarkers = {};
+ this.$markerId = 1;
+ this.$undoSelect = true;
+
+ this.$foldData = [];
+ this.$foldData.toString = function() {
+ var str = "";
+ this.forEach(function(foldLine) {
+ str += "\n" + foldLine.toString();
+ });
+ return str;
+ }
+ this.on("changeFold", this.onChangeFold.bind(this));
+ this.$onChange = this.onChange.bind(this);
+
+ if (typeof text != "object" || !text.getLine)
+ text = new Document(text);
+
+ this.setDocument(text);
+
+ this.selection = new Selection(this);
+ this.setMode(mode);
+};
+
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setDocument = function(doc) {
+ if (this.doc)
+ this.doc.removeListener("change", this.$onChange);
+
+ this.doc = doc;
+ doc.on("change", this.$onChange);
+
+ if (this.bgTokenizer)
+ this.bgTokenizer.setDocument(this.getDocument());
+
+ this.resetCaches();
+ };
+ this.getDocument = function() {
+ return this.doc;
+ };
+ this.$resetRowCache = function(docRow) {
+ if (!docRow) {
+ this.$docRowCache = [];
+ this.$screenRowCache = [];
+ return;
+ }
+
+ var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
+ var l = this.$docRowCache.length;
+ this.$docRowCache.splice(i, l);
+ this.$screenRowCache.splice(i, l);
+
+ };
+
+ this.$getRowCacheIndex = function(cacheArray, val) {
+ var low = 0;
+ var hi = cacheArray.length - 1;
+
+ while (low <= hi) {
+ var mid = (low + hi) >> 1;
+ var c = cacheArray[mid];
+
+ if (val > c)
+ low = mid + 1;
+ else if (val < c)
+ hi = mid - 1;
+ else
+ return mid;
+ }
+
+ return low -1;
+ };
+
+ this.resetCaches = function() {
+ this.$modified = true;
+ this.$wrapData = [];
+ this.$rowLengthCache = [];
+ this.$resetRowCache(0);
+ if (this.bgTokenizer)
+ this.bgTokenizer.start(0);
+ };
+
+ this.onChangeFold = function(e) {
+ var fold = e.data;
+ this.$resetRowCache(fold.start.row);
+ };
+
+ this.onChange = function(e) {
+ var delta = e.data;
+ this.$modified = true;
+
+ this.$resetRowCache(delta.range.start.row);
+
+ var removedFolds = this.$updateInternalDataOnChange(e);
+ if (!this.$fromUndo && this.$undoManager && !delta.ignore) {
+ this.$deltasDoc.push(delta);
+ if (removedFolds && removedFolds.length != 0) {
+ this.$deltasFold.push({
+ action: "removeFolds",
+ folds: removedFolds
+ });
+ }
+
+ this.$informUndoManager.schedule();
+ }
+
+ this.bgTokenizer.$updateOnChange(delta);
+ this._emit("change", e);
+ };
+ this.setValue = function(text) {
+ this.doc.setValue(text);
+ this.selection.moveCursorTo(0, 0);
+ this.selection.clearSelection();
+
+ this.$resetRowCache(0);
+ this.$deltas = [];
+ this.$deltasDoc = [];
+ this.$deltasFold = [];
+ this.getUndoManager().reset();
+ };
+ this.getValue =
+ this.toString = function() {
+ return this.doc.getValue();
+ };
+ this.getSelection = function() {
+ return this.selection;
+ };
+ this.getState = function(row) {
+ return this.bgTokenizer.getState(row);
+ };
+ this.getTokens = function(row) {
+ return this.bgTokenizer.getTokens(row);
+ };
+ this.getTokenAt = function(row, column) {
+ var tokens = this.bgTokenizer.getTokens(row);
+ var token, c = 0;
+ if (column == null) {
+ i = tokens.length - 1;
+ c = this.getLine(row).length;
+ } else {
+ for (var i = 0; i < tokens.length; i++) {
+ c += tokens[i].value.length;
+ if (c >= column)
+ break;
+ }
+ }
+ token = tokens[i];
+ if (!token)
+ return null;
+ token.index = i;
+ token.start = c - token.value.length;
+ return token;
+ };
+ this.setUndoManager = function(undoManager) {
+ this.$undoManager = undoManager;
+ this.$deltas = [];
+ this.$deltasDoc = [];
+ this.$deltasFold = [];
+
+ if (this.$informUndoManager)
+ this.$informUndoManager.cancel();
+
+ if (undoManager) {
+ var self = this;
+
+ this.$syncInformUndoManager = function() {
+ self.$informUndoManager.cancel();
+
+ if (self.$deltasFold.length) {
+ self.$deltas.push({
+ group: "fold",
+ deltas: self.$deltasFold
+ });
+ self.$deltasFold = [];
+ }
+
+ if (self.$deltasDoc.length) {
+ self.$deltas.push({
+ group: "doc",
+ deltas: self.$deltasDoc
+ });
+ self.$deltasDoc = [];
+ }
+
+ if (self.$deltas.length > 0) {
+ undoManager.execute({
+ action: "aceupdate",
+ args: [self.$deltas, self]
+ });
+ }
+
+ self.$deltas = [];
+ }
+ this.$informUndoManager =
+ lang.deferredCall(this.$syncInformUndoManager);
+ }
+ };
+
+ this.$defaultUndoManager = {
+ undo: function() {},
+ redo: function() {},
+ reset: function() {}
+ };
+ this.getUndoManager = function() {
+ return this.$undoManager || this.$defaultUndoManager;
+ };
+ this.getTabString = function() {
+ if (this.getUseSoftTabs()) {
+ return lang.stringRepeat(" ", this.getTabSize());
+ } else {
+ return "\t";
+ }
+ };
+
+ this.$useSoftTabs = true;
+ this.setUseSoftTabs = function(useSoftTabs) {
+ if (this.$useSoftTabs === useSoftTabs) return;
+
+ this.$useSoftTabs = useSoftTabs;
+ };
+ this.getUseSoftTabs = function() {
+ return this.$useSoftTabs;
+ };
+
+ this.$tabSize = 4;
+ this.setTabSize = function(tabSize) {
+ if (isNaN(tabSize) || this.$tabSize === tabSize) return;
+
+ this.$modified = true;
+ this.$rowLengthCache = [];
+ this.$tabSize = tabSize;
+ this._emit("changeTabSize");
+ };
+ this.getTabSize = function() {
+ return this.$tabSize;
+ };
+ this.isTabStop = function(position) {
+ return this.$useSoftTabs && (position.column % this.$tabSize == 0);
+ };
+
+ this.$overwrite = false;
+ this.setOverwrite = function(overwrite) {
+ if (this.$overwrite == overwrite) return;
+
+ this.$overwrite = overwrite;
+ this._emit("changeOverwrite");
+ };
+ this.getOverwrite = function() {
+ return this.$overwrite;
+ };
+ this.toggleOverwrite = function() {
+ this.setOverwrite(!this.$overwrite);
+ };
+ this.addGutterDecoration = function(row, className) {
+ if (!this.$decorations[row])
+ this.$decorations[row] = "";
+ this.$decorations[row] += " " + className;
+ this._emit("changeBreakpoint", {});
+ };
+ this.removeGutterDecoration = function(row, className) {
+ this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, "");
+ this._emit("changeBreakpoint", {});
+ };
+ this.getBreakpoints = function() {
+ return this.$breakpoints;
+ };
+ this.setBreakpoints = function(rows) {
+ this.$breakpoints = [];
+ for (var i=0; i<rows.length; i++) {
+ this.$breakpoints[rows[i]] = "ace_breakpoint";
+ }
+ this._emit("changeBreakpoint", {});
+ };
+ this.clearBreakpoints = function() {
+ this.$breakpoints = [];
+ this._emit("changeBreakpoint", {});
+ };
+ this.setBreakpoint = function(row, className) {
+ if (className === undefined)
+ className = "ace_breakpoint";
+ if (className)
+ this.$breakpoints[row] = className;
+ else
+ delete this.$breakpoints[row];
+ this._emit("changeBreakpoint", {});
+ };
+ this.clearBreakpoint = function(row) {
+ delete this.$breakpoints[row];
+ this._emit("changeBreakpoint", {});
+ };
+ this.addMarker = function(range, clazz, type, inFront) {
+ var id = this.$markerId++;
+
+ var marker = {
+ range : range,
+ type : type || "line",
+ renderer: typeof type == "function" ? type : null,
+ clazz : clazz,
+ inFront: !!inFront,
+ id: id
+ }
+
+ if (inFront) {
+ this.$frontMarkers[id] = marker;
+ this._emit("changeFrontMarker")
+ } else {
+ this.$backMarkers[id] = marker;
+ this._emit("changeBackMarker")
+ }
+
+ return id;
+ };
+ this.addDynamicMarker = function(marker, inFront) {
+ if (!marker.update)
+ return;
+ var id = this.$markerId++;
+ marker.id = id;
+ marker.inFront = !!inFront;
+
+ if (inFront) {
+ this.$frontMarkers[id] = marker;
+ this._emit("changeFrontMarker")
+ } else {
+ this.$backMarkers[id] = marker;
+ this._emit("changeBackMarker")
+ }
+
+ return marker;
+ };
+ this.removeMarker = function(markerId) {
+ var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];
+ if (!marker)
+ return;
+
+ var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;
+ if (marker) {
+ delete (markers[markerId]);
+ this._emit(marker.inFront ? "changeFrontMarker" : "changeBackMarker");
+ }
+ };
+ this.getMarkers = function(inFront) {
+ return inFront ? this.$frontMarkers : this.$backMarkers;
+ };
+
+ this.highlight = function(re) {
+ if (!this.$searchHighlight) {
+ var highlight = new SearchHighlight(null, "ace_selected-word", "text");
+ this.$searchHighlight = this.addDynamicMarker(highlight);
+ }
+ this.$searchHighlight.setRegexp(re);
+ }
+ this.highlightLines = function(startRow, endRow, clazz, inFront) {
+ if (typeof endRow != "number") {
+ clazz = endRow;
+ endRow = startRow;
+ }
+ if (!clazz)
+ clazz = "ace_step";
+
+ var range = new Range(startRow, 0, endRow, Infinity);
+
+ var id = this.addMarker(range, clazz, "fullLine", inFront);
+ range.id = id;
+ return range;
+ };
+ this.setAnnotations = function(annotations) {
+ this.$annotations = annotations;
+ this._emit("changeAnnotation", {});
+ };
+ this.getAnnotations = function() {
+ return this.$annotations || [];
+ };
+ this.clearAnnotations = function() {
+ this.$annotations = {};
+ this._emit("changeAnnotation", {});
+ };
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r?\n)/m);
+ if (match) {
+ this.$autoNewLine = match[1];
+ } else {
+ this.$autoNewLine = "\n";
+ }
+ };
+ this.getWordRange = function(row, column) {
+ var line = this.getLine(row);
+
+ var inToken = false;
+ if (column > 0)
+ inToken = !!line.charAt(column - 1).match(this.tokenRe);
+
+ if (!inToken)
+ inToken = !!line.charAt(column).match(this.tokenRe);
+
+ if (inToken)
+ var re = this.tokenRe;
+ else if (/^\s+$/.test(line.slice(column-1, column+1)))
+ var re = /\s/;
+ else
+ var re = this.nonTokenRe;
+
+ var start = column;
+ if (start > 0) {
+ do {
+ start--;
+ }
+ while (start >= 0 && line.charAt(start).match(re));
+ start++;
+ }
+
+ var end = column;
+ while (end < line.length && line.charAt(end).match(re)) {
+ end++;
+ }
+
+ return new Range(row, start, row, end);
+ };
+ this.getAWordRange = function(row, column) {
+ var wordRange = this.getWordRange(row, column);
+ var line = this.getLine(wordRange.end.row);
+
+ while (line.charAt(wordRange.end.column).match(/[ \t]/)) {
+ wordRange.end.column += 1;
+ }
+ return wordRange;
+ };
+ this.setNewLineMode = function(newLineMode) {
+ this.doc.setNewLineMode(newLineMode);
+ };
+ this.getNewLineMode = function() {
+ return this.doc.getNewLineMode();
+ };
+
+ this.$useWorker = true;
+ this.setUseWorker = function(useWorker) {
+ if (this.$useWorker == useWorker)
+ return;
+
+ this.$useWorker = useWorker;
+
+ this.$stopWorker();
+ if (useWorker)
+ this.$startWorker();
+ };
+ this.getUseWorker = function() {
+ return this.$useWorker;
+ };
+ this.onReloadTokenizer = function(e) {
+ var rows = e.data;
+ this.bgTokenizer.start(rows.first);
+ this._emit("tokenizerUpdate", e);
+ };
+
+ this.$modes = {};
+ this._loadMode = function(mode, callback) {
+ if (!this.$modes["null"])
+ this.$modes["null"] = this.$modes["ace/mode/text"] = new TextMode();
+
+ if (this.$modes[mode])
+ return callback(this.$modes[mode]);
+
+ var _self = this;
+ var module;
+ try {
+ module = require(mode);
+ } catch (e) {};
+ if (module && module.Mode)
+ return done(module);
+ if (!this.$mode)
+ this.$setModePlaceholder();
+
+ fetch(mode, function() {
+ require([mode], done);
+ });
+
+ function done(module) {
+ if (_self.$modes[mode])
+ return callback(_self.$modes[mode]);
+
+ _self.$modes[mode] = new module.Mode();
+ _self.$modes[mode].$id = mode;
+ _self._emit("loadmode", {
+ name: mode,
+ mode: _self.$modes[mode]
+ });
+ callback(_self.$modes[mode]);
+ }
+
+ function fetch(name, callback) {
+ if (!config.get("packaged"))
+ return callback();
+
+ net.loadScript(config.moduleUrl(name, "mode"), callback);
+ }
+ };
+
+ this.$setModePlaceholder = function() {
+ this.$mode = this.$modes["null"];
+ var tokenizer = this.$mode.getTokenizer();
+
+ if (!this.bgTokenizer) {
+ this.bgTokenizer = new BackgroundTokenizer(tokenizer);
+ var _self = this;
+ this.bgTokenizer.addEventListener("update", function(e) {
+ _self._emit("tokenizerUpdate", e);
+ });
+ } else {
+ this.bgTokenizer.setTokenizer(tokenizer);
+ }
+ this.bgTokenizer.setDocument(this.getDocument());
+
+ this.tokenRe = this.$mode.tokenRe;
+ this.nonTokenRe = this.$mode.nonTokenRe;
+ };
+ this.$mode = null;
+ this.$modeId = null;
+ this.setMode = function(mode) {
+ mode = mode || "null";
+ if (typeof mode === "string") {
+ if (this.$modeId == mode)
+ return;
+
+ this.$modeId = mode;
+ var _self = this;
+ this._loadMode(mode, function(module) {
+ if (_self.$modeId !== mode)
+ return;
+
+ _self.setMode(module);
+ });
+ return;
+ }
+
+ if (this.$mode === mode) return;
+ this.$mode = mode;
+ this.$modeId = mode.$id;
+
+ this.$stopWorker();
+
+ if (this.$useWorker)
+ this.$startWorker();
+
+ var tokenizer = mode.getTokenizer();
+
+ if(tokenizer.addEventListener !== undefined) {
+ var onReloadTokenizer = this.onReloadTokenizer.bind(this);
+ tokenizer.addEventListener("update", onReloadTokenizer);
+ }
+
+ if (!this.bgTokenizer) {
+ this.bgTokenizer = new BackgroundTokenizer(tokenizer);
+ var _self = this;
+ this.bgTokenizer.addEventListener("update", function(e) {
+ _self._emit("tokenizerUpdate", e);
+ });
+ } else {
+ this.bgTokenizer.setTokenizer(tokenizer);
+ }
+
+ this.bgTokenizer.setDocument(this.getDocument());
+ this.bgTokenizer.start(0);
+
+ this.tokenRe = mode.tokenRe;
+ this.nonTokenRe = mode.nonTokenRe;
+
+ this.$setFolding(mode.foldingRules);
+
+ this._emit("changeMode");
+ };
+
+
+ this.$stopWorker = function() {
+ if (this.$worker)
+ this.$worker.terminate();
+
+ this.$worker = null;
+ };
+
+
+ this.$startWorker = function() {
+ if (typeof Worker !== "undefined" && !require.noWorker) {
+ try {
+ this.$worker = this.$mode.createWorker(this);
+ } catch (e) {
+ console.log("Could not load worker");
+ console.log(e);
+ this.$worker = null;
+ }
+ }
+ else
+ this.$worker = null;
+ };
+ this.getMode = function() {
+ return this.$mode;
+ };
+
+ this.$scrollTop = 0;
+ this.setScrollTop = function(scrollTop) {
+ scrollTop = Math.round(Math.max(0, scrollTop));
+ if (this.$scrollTop === scrollTop)
+ return;
+
+ this.$scrollTop = scrollTop;
+ this._emit("changeScrollTop", scrollTop);
+ };
+ this.getScrollTop = function() {
+ return this.$scrollTop;
+ };
+
+ this.$scrollLeft = 0;
+ this.setScrollLeft = function(scrollLeft) {
+ scrollLeft = Math.round(Math.max(0, scrollLeft));
+ if (this.$scrollLeft === scrollLeft)
+ return;
+
+ this.$scrollLeft = scrollLeft;
+ this._emit("changeScrollLeft", scrollLeft);
+ };
+ this.getScrollLeft = function() {
+ return this.$scrollLeft;
+ };
+ this.getScreenWidth = function() {
+ this.$computeWidth();
+ return this.screenWidth;
+ };
+
+ this.$computeWidth = function(force) {
+ if (this.$modified || force) {
+ this.$modified = false;
+
+ if (this.$useWrapMode)
+ return this.screenWidth = this.$wrapLimit;
+
+ var lines = this.doc.getAllLines();
+ var cache = this.$rowLengthCache;
+ var longestScreenLine = 0;
+ var foldIndex = 0;
+ var foldLine = this.$foldData[foldIndex];
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+ var len = lines.length;
+
+ for (var i = 0; i < len; i++) {
+ if (i > foldStart) {
+ i = foldLine.end.row + 1;
+ if (i >= len)
+ break;
+ foldLine = this.$foldData[foldIndex++];
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+
+ if (cache[i] == null)
+ cache[i] = this.$getStringScreenWidth(lines[i])[0];
+
+ if (cache[i] > longestScreenLine)
+ longestScreenLine = cache[i];
+ }
+ this.screenWidth = longestScreenLine;
+ }
+ };
+ this.getLine = function(row) {
+ return this.doc.getLine(row);
+ };
+ this.getLines = function(firstRow, lastRow) {
+ return this.doc.getLines(firstRow, lastRow);
+ };
+ this.getLength = function() {
+ return this.doc.getLength();
+ };
+ this.getTextRange = function(range) {
+ return this.doc.getTextRange(range || this.selection.getRange());
+ };
+ this.insert = function(position, text) {
+ return this.doc.insert(position, text);
+ };
+ this.remove = function(range) {
+ return this.doc.remove(range);
+ };
+ this.undoChanges = function(deltas, dontSelect) {
+ if (!deltas.length)
+ return;
+
+ this.$fromUndo = true;
+ var lastUndoRange = null;
+ for (var i = deltas.length - 1; i != -1; i--) {
+ var delta = deltas[i];
+ if (delta.group == "doc") {
+ this.doc.revertDeltas(delta.deltas);
+ lastUndoRange =
+ this.$getUndoSelection(delta.deltas, true, lastUndoRange);
+ } else {
+ delta.deltas.forEach(function(foldDelta) {
+ this.addFolds(foldDelta.folds);
+ }, this);
+ }
+ }
+ this.$fromUndo = false;
+ lastUndoRange &&
+ this.$undoSelect &&
+ !dontSelect &&
+ this.selection.setSelectionRange(lastUndoRange);
+ return lastUndoRange;
+ };
+ this.redoChanges = function(deltas, dontSelect) {
+ if (!deltas.length)
+ return;
+
+ this.$fromUndo = true;
+ var lastUndoRange = null;
+ for (var i = 0; i < deltas.length; i++) {
+ var delta = deltas[i];
+ if (delta.group == "doc") {
+ this.doc.applyDeltas(delta.deltas);
+ lastUndoRange =
+ this.$getUndoSelection(delta.deltas, false, lastUndoRange);
+ }
+ }
+ this.$fromUndo = false;
+ lastUndoRange &&
+ this.$undoSelect &&
+ !dontSelect &&
+ this.selection.setSelectionRange(lastUndoRange);
+ return lastUndoRange;
+ };
+ this.setUndoSelect = function(enable) {
+ this.$undoSelect = enable;
+ };
+
+ this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {
+ function isInsert(delta) {
+ var insert =
+ delta.action == "insertText" || delta.action == "insertLines";
+ return isUndo ? !insert : insert;
+ }
+
+ var delta = deltas[0];
+ var range, point;
+ var lastDeltaIsInsert = false;
+ if (isInsert(delta)) {
+ range = delta.range.clone();
+ lastDeltaIsInsert = true;
+ } else {
+ range = Range.fromPoints(delta.range.start, delta.range.start);
+ lastDeltaIsInsert = false;
+ }
+
+ for (var i = 1; i < deltas.length; i++) {
+ delta = deltas[i];
+ if (isInsert(delta)) {
+ point = delta.range.start;
+ if (range.compare(point.row, point.column) == -1) {
+ range.setStart(delta.range.start);
+ }
+ point = delta.range.end;
+ if (range.compare(point.row, point.column) == 1) {
+ range.setEnd(delta.range.end);
+ }
+ lastDeltaIsInsert = true;
+ } else {
+ point = delta.range.start;
+ if (range.compare(point.row, point.column) == -1) {
+ range =
+ Range.fromPoints(delta.range.start, delta.range.start);
+ }
+ lastDeltaIsInsert = false;
+ }
+ }
+ if (lastUndoRange != null) {
+ var cmp = lastUndoRange.compareRange(range);
+ if (cmp == 1) {
+ range.setStart(lastUndoRange.start);
+ } else if (cmp == -1) {
+ range.setEnd(lastUndoRange.end);
+ }
+ }
+
+ return range;
+ };
+ this.replace = function(range, text) {
+ return this.doc.replace(range, text);
+ };
+ this.moveText = function(fromRange, toPosition) {
+ var text = this.getTextRange(fromRange);
+ this.remove(fromRange);
+
+ var toRow = toPosition.row;
+ var toColumn = toPosition.column;
+ if (!fromRange.isMultiLine() && fromRange.start.row == toRow &&
+ fromRange.end.column < toColumn)
+ toColumn -= text.length;
+
+ if (fromRange.isMultiLine() && fromRange.end.row < toRow) {
+ var lines = this.doc.$split(text);
+ toRow -= lines.length - 1;
+ }
+
+ var endRow = toRow + fromRange.end.row - fromRange.start.row;
+ var endColumn = fromRange.isMultiLine() ?
+ fromRange.end.column :
+ toColumn + fromRange.end.column - fromRange.start.column;
+
+ var toRange = new Range(toRow, toColumn, endRow, endColumn);
+
+ this.insert(toRange.start, text);
+
+ return toRange;
+ };
+ this.indentRows = function(startRow, endRow, indentString) {
+ indentString = indentString.replace(/\t/g, this.getTabString());
+ for (var row=startRow; row<=endRow; row++)
+ this.insert({row: row, column:0}, indentString);
+ };
+ this.outdentRows = function (range) {
+ var rowRange = range.collapseRows();
+ var deleteRange = new Range(0, 0, 0, 0);
+ var size = this.getTabSize();
+
+ for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {
+ var line = this.getLine(i);
+
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ for (var j = 0; j < size; ++j)
+ if (line.charAt(j) != ' ')
+ break;
+ if (j < size && line.charAt(j) == '\t') {
+ deleteRange.start.column = j;
+ deleteRange.end.column = j + 1;
+ } else {
+ deleteRange.start.column = 0;
+ deleteRange.end.column = j;
+ }
+ this.remove(deleteRange);
+ }
+ };
+ this.moveLinesUp = function(firstRow, lastRow) {
+ if (firstRow <= 0) return 0;
+
+ var removed = this.doc.removeLines(firstRow, lastRow);
+ this.doc.insertLines(firstRow - 1, removed);
+ return -1;
+ };
+ this.moveLinesDown = function(firstRow, lastRow) {
+ if (lastRow >= this.doc.getLength()-1) return 0;
+
+ var removed = this.doc.removeLines(firstRow, lastRow);
+ this.doc.insertLines(firstRow+1, removed);
+ return 1;
+ };
+ this.duplicateLines = function(firstRow, lastRow) {
+ var firstRow = this.$clipRowToDocument(firstRow);
+ var lastRow = this.$clipRowToDocument(lastRow);
+
+ var lines = this.getLines(firstRow, lastRow);
+ this.doc.insertLines(firstRow, lines);
+
+ var addedRows = lastRow - firstRow + 1;
+ return addedRows;
+ };
+
+
+ this.$clipRowToDocument = function(row) {
+ return Math.max(0, Math.min(row, this.doc.getLength()-1));
+ };
+
+ this.$clipColumnToRow = function(row, column) {
+ if (column < 0)
+ return 0;
+ return Math.min(this.doc.getLine(row).length, column);
+ };
+
+
+ this.$clipPositionToDocument = function(row, column) {
+ column = Math.max(0, column);
+
+ if (row < 0) {
+ row = 0;
+ column = 0;
+ } else {
+ var len = this.doc.getLength();
+ if (row >= len) {
+ row = len - 1;
+ column = this.doc.getLine(len-1).length;
+ } else {
+ column = Math.min(this.doc.getLine(row).length, column);
+ }
+ }
+
+ return {
+ row: row,
+ column: column
+ };
+ };
+
+ this.$clipRangeToDocument = function(range) {
+ if (range.start.row < 0) {
+ range.start.row = 0;
+ range.start.column = 0;
+ } else {
+ range.start.column = this.$clipColumnToRow(
+ range.start.row,
+ range.start.column
+ );
+ }
+
+ var len = this.doc.getLength() - 1;
+ if (range.end.row > len) {
+ range.end.row = len;
+ range.end.column = this.doc.getLine(len).length;
+ } else {
+ range.end.column = this.$clipColumnToRow(
+ range.end.row,
+ range.end.column
+ );
+ }
+ return range;
+ };
+ this.$wrapLimit = 80;
+ this.$useWrapMode = false;
+ this.$wrapLimitRange = {
+ min : null,
+ max : null
+ };
+ this.setUseWrapMode = function(useWrapMode) {
+ if (useWrapMode != this.$useWrapMode) {
+ this.$useWrapMode = useWrapMode;
+ this.$modified = true;
+ this.$resetRowCache(0);
+ if (useWrapMode) {
+ var len = this.getLength();
+ this.$wrapData = [];
+ for (var i = 0; i < len; i++) {
+ this.$wrapData.push([]);
+ }
+ this.$updateWrapData(0, len - 1);
+ }
+
+ this._emit("changeWrapMode");
+ }
+ };
+ this.getUseWrapMode = function() {
+ return this.$useWrapMode;
+ };
+ this.setWrapLimitRange = function(min, max) {
+ if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
+ this.$wrapLimitRange.min = min;
+ this.$wrapLimitRange.max = max;
+ this.$modified = true;
+ this._emit("changeWrapMode");
+ }
+ };
+ this.adjustWrapLimit = function(desiredLimit) {
+ var wrapLimit = this.$constrainWrapLimit(desiredLimit);
+ if (wrapLimit != this.$wrapLimit && wrapLimit > 0) {
+ this.$wrapLimit = wrapLimit;
+ this.$modified = true;
+ if (this.$useWrapMode) {
+ this.$updateWrapData(0, this.getLength() - 1);
+ this.$resetRowCache(0);
+ this._emit("changeWrapLimit");
+ }
+ return true;
+ }
+ return false;
+ };
+
+ this.$constrainWrapLimit = function(wrapLimit) {
+ var min = this.$wrapLimitRange.min;
+ if (min)
+ wrapLimit = Math.max(min, wrapLimit);
+
+ var max = this.$wrapLimitRange.max;
+ if (max)
+ wrapLimit = Math.min(max, wrapLimit);
+ return Math.max(1, wrapLimit);
+ };
+ this.getWrapLimit = function() {
+ return this.$wrapLimit;
+ };
+ this.getWrapLimitRange = function() {
+ return {
+ min : this.$wrapLimitRange.min,
+ max : this.$wrapLimitRange.max
+ };
+ };
+
+ this.$updateInternalDataOnChange = function(e) {
+ var useWrapMode = this.$useWrapMode;
+ var len;
+ var action = e.data.action;
+ var firstRow = e.data.range.start.row;
+ var lastRow = e.data.range.end.row;
+ var start = e.data.range.start;
+ var end = e.data.range.end;
+ var removedFolds = null;
+
+ if (action.indexOf("Lines") != -1) {
+ if (action == "insertLines") {
+ lastRow = firstRow + (e.data.lines.length);
+ } else {
+ lastRow = firstRow;
+ }
+ len = e.data.lines ? e.data.lines.length : lastRow - firstRow;
+ } else {
+ len = lastRow - firstRow;
+ }
+
+ if (len != 0) {
+ if (action.indexOf("remove") != -1) {
+ this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len);
+
+ var foldLines = this.$foldData;
+ removedFolds = this.getFoldsInRange(e.data.range);
+ this.removeFolds(removedFolds);
+
+ var foldLine = this.getFoldLine(end.row);
+ var idx = 0;
+ if (foldLine) {
+ foldLine.addRemoveChars(end.row, end.column, start.column - end.column);
+ foldLine.shiftRow(-len);
+
+ var foldLineBefore = this.getFoldLine(firstRow);
+ if (foldLineBefore && foldLineBefore !== foldLine) {
+ foldLineBefore.merge(foldLine);
+ foldLine = foldLineBefore;
+ }
+ idx = foldLines.indexOf(foldLine) + 1;
+ }
+
+ for (idx; idx < foldLines.length; idx++) {
+ var foldLine = foldLines[idx];
+ if (foldLine.start.row >= end.row) {
+ foldLine.shiftRow(-len);
+ }
+ }
+
+ lastRow = firstRow;
+ } else {
+ var args;
+ if (useWrapMode) {
+ args = [firstRow, 0];
+ for (var i = 0; i < len; i++) args.push([]);
+ this.$wrapData.splice.apply(this.$wrapData, args);
+ } else {
+ args = Array(len);
+ args.unshift(firstRow, 0);
+ this.$rowLengthCache.splice.apply(this.$rowLengthCache, args);
+ }
+ var foldLines = this.$foldData;
+ var foldLine = this.getFoldLine(firstRow);
+ var idx = 0;
+ if (foldLine) {
+ var cmp = foldLine.range.compareInside(start.row, start.column)
+ if (cmp == 0) {
+ foldLine = foldLine.split(start.row, start.column);
+ foldLine.shiftRow(len);
+ foldLine.addRemoveChars(
+ lastRow, 0, end.column - start.column);
+ } else
+ if (cmp == -1) {
+ foldLine.addRemoveChars(firstRow, 0, end.column - start.column);
+ foldLine.shiftRow(len);
+ }
+ idx = foldLines.indexOf(foldLine) + 1;
+ }
+
+ for (idx; idx < foldLines.length; idx++) {
+ var foldLine = foldLines[idx];
+ if (foldLine.start.row >= firstRow) {
+ foldLine.shiftRow(len);
+ }
+ }
+ }
+ } else {
+ len = Math.abs(e.data.range.start.column - e.data.range.end.column);
+ if (action.indexOf("remove") != -1) {
+ removedFolds = this.getFoldsInRange(e.data.range);
+ this.removeFolds(removedFolds);
+
+ len = -len;
+ }
+ var foldLine = this.getFoldLine(firstRow);
+ if (foldLine) {
+ foldLine.addRemoveChars(firstRow, start.column, len);
+ }
+ }
+
+ if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {
+ console.error("doc.getLength() and $wrapData.length have to be the same!");
+ }
+
+ if (useWrapMode)
+ this.$updateWrapData(firstRow, lastRow);
+ else
+ this.$updateRowLengthCache(firstRow, lastRow);
+
+ return removedFolds;
+ };
+
+ this.$updateRowLengthCache = function(firstRow, lastRow, b) {
+ this.$rowLengthCache[firstRow] = null;
+ this.$rowLengthCache[lastRow] = null;
+ };
+
+ this.$updateWrapData = function(firstRow, lastRow) {
+ var lines = this.doc.getAllLines();
+ var tabSize = this.getTabSize();
+ var wrapData = this.$wrapData;
+ var wrapLimit = this.$wrapLimit;
+ var tokens;
+ var foldLine;
+
+ var row = firstRow;
+ lastRow = Math.min(lastRow, lines.length - 1);
+ while (row <= lastRow) {
+ foldLine = this.getFoldLine(row, foldLine);
+ if (!foldLine) {
+ tokens = this.$getDisplayTokens(lang.stringTrimRight(lines[row]));
+ wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+ row ++;
+ } else {
+ tokens = [];
+ foldLine.walk(function(placeholder, row, column, lastColumn) {
+ var walkTokens;
+ if (placeholder != null) {
+ walkTokens = this.$getDisplayTokens(
+ placeholder, tokens.length);
+ walkTokens[0] = PLACEHOLDER_START;
+ for (var i = 1; i < walkTokens.length; i++) {
+ walkTokens[i] = PLACEHOLDER_BODY;
+ }
+ } else {
+ walkTokens = this.$getDisplayTokens(
+ lines[row].substring(lastColumn, column),
+ tokens.length);
+ }
+ tokens = tokens.concat(walkTokens);
+ }.bind(this),
+ foldLine.end.row,
+ lines[foldLine.end.row].length + 1
+ );
+ while (tokens.length != 0 && tokens[tokens.length - 1] >= SPACE)
+ tokens.pop();
+
+ wrapData[foldLine.start.row]
+ = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+ row = foldLine.end.row + 1;
+ }
+ }
+ };
+ var CHAR = 1,
+ CHAR_EXT = 2,
+ PLACEHOLDER_START = 3,
+ PLACEHOLDER_BODY = 4,
+ PUNCTUATION = 9,
+ SPACE = 10,
+ TAB = 11,
+ TAB_SPACE = 12;
+
+
+ this.$computeWrapSplits = function(tokens, wrapLimit) {
+ if (tokens.length == 0) {
+ return [];
+ }
+
+ var splits = [];
+ var displayLength = tokens.length;
+ var lastSplit = 0, lastDocSplit = 0;
+
+ function addSplit(screenPos) {
+ var displayed = tokens.slice(lastSplit, screenPos);
+ var len = displayed.length;
+ displayed.join("").
+ replace(/12/g, function() {
+ len -= 1;
+ }).
+ replace(/2/g, function() {
+ len -= 1;
+ });
+
+ lastDocSplit += len;
+ splits.push(lastDocSplit);
+ lastSplit = screenPos;
+ }
+
+ while (displayLength - lastSplit > wrapLimit) {
+ var split = lastSplit + wrapLimit;
+ if (tokens[split] >= SPACE) {
+ while (tokens[split] >= SPACE) {
+ split ++;
+ }
+ addSplit(split);
+ continue;
+ }
+ if (tokens[split] == PLACEHOLDER_START
+ || tokens[split] == PLACEHOLDER_BODY)
+ {
+ for (split; split != lastSplit - 1; split--) {
+ if (tokens[split] == PLACEHOLDER_START) {
+ break;
+ }
+ }
+ if (split > lastSplit) {
+ addSplit(split);
+ continue;
+ }
+ split = lastSplit + wrapLimit;
+ for (split; split < tokens.length; split++) {
+ if (tokens[split] != PLACEHOLDER_BODY)
+ {
+ break;
+ }
+ }
+ if (split == tokens.length) {
+ break; // Breaks the while-loop.
+ }
+ addSplit(split);
+ continue;
+ }
+ var minSplit = Math.max(split - 10, lastSplit - 1);
+ while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+ split --;
+ }
+ while (split > minSplit && tokens[split] == PUNCTUATION) {
+ split --;
+ }
+ if (split > minSplit) {
+ addSplit(++split);
+ continue;
+ }
+ split = lastSplit + wrapLimit;
+ addSplit(split);
+ }
+ return splits;
+ };
+ this.$getDisplayTokens = function(str, offset) {
+ var arr = [];
+ var tabSize;
+ offset = offset || 0;
+
+ for (var i = 0; i < str.length; i++) {
+ var c = str.charCodeAt(i);
+ if (c == 9) {
+ tabSize = this.getScreenTabSize(arr.length + offset);
+ arr.push(TAB);
+ for (var n = 1; n < tabSize; n++) {
+ arr.push(TAB_SPACE);
+ }
+ }
+ else if (c == 32) {
+ arr.push(SPACE);
+ } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {
+ arr.push(PUNCTUATION);
+ }
+ else if (c >= 0x1100 && isFullWidth(c)) {
+ arr.push(CHAR, CHAR_EXT);
+ } else {
+ arr.push(CHAR);
+ }
+ }
+ return arr;
+ };
+ this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
+ if (maxScreenColumn == 0)
+ return [0, 0];
+ if (maxScreenColumn == null)
+ maxScreenColumn = Infinity;
+ screenColumn = screenColumn || 0;
+
+ var c, column;
+ for (column = 0; column < str.length; column++) {
+ c = str.charCodeAt(column);
+ if (c == 9) {
+ screenColumn += this.getScreenTabSize(screenColumn);
+ }
+ else if (c >= 0x1100 && isFullWidth(c)) {
+ screenColumn += 2;
+ } else {
+ screenColumn += 1;
+ }
+ if (screenColumn > maxScreenColumn) {
+ break;
+ }
+ }
+
+ return [screenColumn, column];
+ };
+ this.getRowLength = function(row) {
+ if (!this.$useWrapMode || !this.$wrapData[row]) {
+ return 1;
+ } else {
+ return this.$wrapData[row].length + 1;
+ }
+ };
+ this.getScreenLastRowColumn = function(screenRow) {
+ var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
+ return this.documentToScreenColumn(pos.row, pos.column);
+ };
+ this.getDocumentLastRowColumn = function(docRow, docColumn) {
+ var screenRow = this.documentToScreenRow(docRow, docColumn);
+ return this.getScreenLastRowColumn(screenRow);
+ };
+ this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {
+ var screenRow = this.documentToScreenRow(docRow, docColumn);
+ return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);
+ };
+ this.getRowSplitData = function(row) {
+ if (!this.$useWrapMode) {
+ return undefined;
+ } else {
+ return this.$wrapData[row];
+ }
+ };
+ this.getScreenTabSize = function(screenColumn) {
+ return this.$tabSize - screenColumn % this.$tabSize;
+ };
+
+
+ this.screenToDocumentRow = function(screenRow, screenColumn) {
+ return this.screenToDocumentPosition(screenRow, screenColumn).row;
+ };
+
+
+ this.screenToDocumentColumn = function(screenRow, screenColumn) {
+ return this.screenToDocumentPosition(screenRow, screenColumn).column;
+ };
+ this.screenToDocumentPosition = function(screenRow, screenColumn) {
+ if (screenRow < 0)
+ return {row: 0, column: 0};
+
+ var line;
+ var docRow = 0;
+ var docColumn = 0;
+ var column;
+ var row = 0;
+ var rowLength = 0;
+
+ var rowCache = this.$screenRowCache;
+ var i = this.$getRowCacheIndex(rowCache, screenRow);
+ var l = rowCache.length;
+ if (l && i >= 0) {
+ var row = rowCache[i];
+ var docRow = this.$docRowCache[i];
+ var doCache = screenRow > rowCache[l - 1];
+ } else {
+ var doCache = !l;
+ }
+
+ var maxRow = this.getLength() - 1;
+ var foldLine = this.getNextFoldLine(docRow);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (row <= screenRow) {
+ rowLength = this.getRowLength(docRow);
+ if (row + rowLength - 1 >= screenRow || docRow >= maxRow) {
+ break;
+ } else {
+ row += rowLength;
+ docRow++;
+ if (docRow > foldStart) {
+ docRow = foldLine.end.row+1;
+ foldLine = this.getNextFoldLine(docRow, foldLine);
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+ }
+
+ if (doCache) {
+ this.$docRowCache.push(docRow);
+ this.$screenRowCache.push(row);
+ }
+ }
+
+ if (foldLine && foldLine.start.row <= docRow) {
+ line = this.getFoldDisplayLine(foldLine);
+ docRow = foldLine.start.row;
+ } else if (row + rowLength <= screenRow || docRow > maxRow) {
+ return {
+ row: maxRow,
+ column: this.getLine(maxRow).length
+ }
+ } else {
+ line = this.getLine(docRow);
+ foldLine = null;
+ }
+
+ if (this.$useWrapMode) {
+ var splits = this.$wrapData[docRow];
+ if (splits) {
+ column = splits[screenRow - row];
+ if(screenRow > row && splits.length) {
+ docColumn = splits[screenRow - row - 1] || splits[splits.length - 1];
+ line = line.substring(docColumn);
+ }
+ }
+ }
+
+ docColumn += this.$getStringScreenWidth(line, screenColumn)[1];
+ if (this.$useWrapMode && docColumn >= column)
+ docColumn = column - 1;
+
+ if (foldLine)
+ return foldLine.idxToPosition(docColumn);
+
+ return {row: docRow, column: docColumn};
+ };
+ this.documentToScreenPosition = function(docRow, docColumn) {
+ if (typeof docColumn === "undefined")
+ var pos = this.$clipPositionToDocument(docRow.row, docRow.column);
+ else
+ pos = this.$clipPositionToDocument(docRow, docColumn);
+
+ docRow = pos.row;
+ docColumn = pos.column;
+
+ var screenRow = 0;
+ var foldStartRow = null;
+ var fold = null;
+ fold = this.getFoldAt(docRow, docColumn, 1);
+ if (fold) {
+ docRow = fold.start.row;
+ docColumn = fold.start.column;
+ }
+
+ var rowEnd, row = 0;
+
+
+ var rowCache = this.$docRowCache;
+ var i = this.$getRowCacheIndex(rowCache, docRow);
+ var l = rowCache.length;
+ if (l && i >= 0) {
+ var row = rowCache[i];
+ var screenRow = this.$screenRowCache[i];
+ var doCache = docRow > rowCache[l - 1];
+ } else {
+ var doCache = !l;
+ }
+
+ var foldLine = this.getNextFoldLine(row);
+ var foldStart = foldLine ?foldLine.start.row :Infinity;
+
+ while (row < docRow) {
+ if (row >= foldStart) {
+ rowEnd = foldLine.end.row + 1;
+ if (rowEnd > docRow)
+ break;
+ foldLine = this.getNextFoldLine(rowEnd, foldLine);
+ foldStart = foldLine ?foldLine.start.row :Infinity;
+ }
+ else {
+ rowEnd = row + 1;
+ }
+
+ screenRow += this.getRowLength(row);
+ row = rowEnd;
+
+ if (doCache) {
+ this.$docRowCache.push(row);
+ this.$screenRowCache.push(screenRow);
+ }
+ }
+ var textLine = "";
+ if (foldLine && row >= foldStart) {
+ textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);
+ foldStartRow = foldLine.start.row;
+ } else {
+ textLine = this.getLine(docRow).substring(0, docColumn);
+ foldStartRow = docRow;
+ }
+ if (this.$useWrapMode) {
+ var wrapRow = this.$wrapData[foldStartRow];
+ var screenRowOffset = 0;
+ while (textLine.length >= wrapRow[screenRowOffset]) {
+ screenRow ++;
+ screenRowOffset++;
+ }
+ textLine = textLine.substring(
+ wrapRow[screenRowOffset - 1] || 0, textLine.length
+ );
+ }
+
+ return {
+ row: screenRow,
+ column: this.$getStringScreenWidth(textLine)[0]
+ };
+ };
+ this.documentToScreenColumn = function(row, docColumn) {
+ return this.documentToScreenPosition(row, docColumn).column;
+ };
+ this.documentToScreenRow = function(docRow, docColumn) {
+ return this.documentToScreenPosition(docRow, docColumn).row;
+ };
+ this.getScreenLength = function() {
+ var screenRows = 0;
+ var fold = null;
+ if (!this.$useWrapMode) {
+ screenRows = this.getLength();
+ var foldData = this.$foldData;
+ for (var i = 0; i < foldData.length; i++) {
+ fold = foldData[i];
+ screenRows -= fold.end.row - fold.start.row;
+ }
+ } else {
+ var lastRow = this.$wrapData.length;
+ var row = 0, i = 0;
+ var fold = this.$foldData[i++];
+ var foldStart = fold ? fold.start.row :Infinity;
+
+ while (row < lastRow) {
+ screenRows += this.$wrapData[row].length + 1;
+ row ++;
+ if (row > foldStart) {
+ row = fold.end.row+1;
+ fold = this.$foldData[i++];
+ foldStart = fold ?fold.start.row :Infinity;
+ }
+ }
+ }
+
+ return screenRows;
+ }
+ function isFullWidth(c) {
+ if (c < 0x1100)
+ return false;
+ return c >= 0x1100 && c <= 0x115F ||
+ c >= 0x11A3 && c <= 0x11A7 ||
+ c >= 0x11FA && c <= 0x11FF ||
+ c >= 0x2329 && c <= 0x232A ||
+ c >= 0x2E80 && c <= 0x2E99 ||
+ c >= 0x2E9B && c <= 0x2EF3 ||
+ c >= 0x2F00 && c <= 0x2FD5 ||
+ c >= 0x2FF0 && c <= 0x2FFB ||
+ c >= 0x3000 && c <= 0x303E ||
+ c >= 0x3041 && c <= 0x3096 ||
+ c >= 0x3099 && c <= 0x30FF ||
+ c >= 0x3105 && c <= 0x312D ||
+ c >= 0x3131 && c <= 0x318E ||
+ c >= 0x3190 && c <= 0x31BA ||
+ c >= 0x31C0 && c <= 0x31E3 ||
+ c >= 0x31F0 && c <= 0x321E ||
+ c >= 0x3220 && c <= 0x3247 ||
+ c >= 0x3250 && c <= 0x32FE ||
+ c >= 0x3300 && c <= 0x4DBF ||
+ c >= 0x4E00 && c <= 0xA48C ||
+ c >= 0xA490 && c <= 0xA4C6 ||
+ c >= 0xA960 && c <= 0xA97C ||
+ c >= 0xAC00 && c <= 0xD7A3 ||
+ c >= 0xD7B0 && c <= 0xD7C6 ||
+ c >= 0xD7CB && c <= 0xD7FB ||
+ c >= 0xF900 && c <= 0xFAFF ||
+ c >= 0xFE10 && c <= 0xFE19 ||
+ c >= 0xFE30 && c <= 0xFE52 ||
+ c >= 0xFE54 && c <= 0xFE66 ||
+ c >= 0xFE68 && c <= 0xFE6B ||
+ c >= 0xFF01 && c <= 0xFF60 ||
+ c >= 0xFFE0 && c <= 0xFFE6;
+ };
+
+}).call(EditSession.prototype);
+
+require("./edit_session/folding").Folding.call(EditSession.prototype);
+require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype);
+
+exports.EditSession = EditSession;
+});
+
+ace.define('ace/config', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
+"no use strict";
+
+var lang = require("./lib/lang");
+
+var global = (function() {
+ return this;
+})();
+
+var options = {
+ packaged: false,
+ workerPath: null,
+ modePath: null,
+ themePath: null,
+ basePath: "",
+ suffix: ".js",
+ $moduleUrls: {}
+};
+
+exports.get = function(key) {
+ if (!options.hasOwnProperty(key))
+ throw new Error("Unknown config key: " + key);
+
+ return options[key];
+};
+
+exports.set = function(key, value) {
+ if (!options.hasOwnProperty(key))
+ throw new Error("Unknown config key: " + key);
+
+ options[key] = value;
+};
+
+exports.all = function() {
+ return lang.copyObject(options);
+};
+
+exports.moduleUrl = function(name, component) {
+ if (options.$moduleUrls[name])
+ return options.$moduleUrls[name];
+
+ var parts = name.split("/");
+ component = component || parts[parts.length - 2] || "";
+ var base = parts[parts.length - 1].replace(component, "").replace(/(^[\-_])|([\-_]$)/, "");
+
+ if (!base && parts.length > 1)
+ base = parts[parts.length - 2];
+ var path = options[component + "Path"];
+ if (path == null)
+ path = options.basePath;
+ if (path && path.slice(-1) != "/")
+ path += "/";
+ return path + component + "-" + base + this.get("suffix");
+};
+
+exports.setModuleUrl = function(name, subst) {
+ return options.$moduleUrls[name] = subst;
+};
+
+exports.init = function() {
+ options.packaged = require.packaged || module.packaged || (global.define && define.packaged);
+
+ if (!global.document)
+ return "";
+
+ var scriptOptions = {};
+ var scriptUrl = "";
+
+ var scripts = document.getElementsByTagName("script");
+ for (var i=0; i<scripts.length; i++) {
+ var script = scripts[i];
+
+ var src = script.src || script.getAttribute("src");
+ if (!src)
+ continue;
+
+ var attributes = script.attributes;
+ for (var j=0, l=attributes.length; j < l; j++) {
+ var attr = attributes[j];
+ if (attr.name.indexOf("data-ace-") === 0) {
+ scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/, ""))] = attr.value;
+ }
+ }
+
+ var m = src.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);
+ if (m)
+ scriptUrl = m[1];
+ }
+
+ if (scriptUrl) {
+ scriptOptions.base = scriptOptions.base || scriptUrl;
+ scriptOptions.packaged = true;
+ }
+
+ scriptOptions.workerPath = scriptOptions.workerPath || scriptOptions.base;
+ scriptOptions.modePath = scriptOptions.modePath || scriptOptions.base;
+ scriptOptions.themePath = scriptOptions.themePath || scriptOptions.base;
+ delete scriptOptions.base;
+
+ for (var key in scriptOptions)
+ if (typeof scriptOptions[key] !== "undefined")
+ exports.set(key, scriptOptions[key]);
+};
+
+function deHyphenate(str) {
+ return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });
+}
+
+});
+ace.define('ace/lib/net', ['require', 'exports', 'module' , 'ace/lib/useragent'], function(require, exports, module) {
+
+
+var useragent = require("./useragent");
+
+exports.get = function (url, callback) {
+ var xhr = exports.createXhr();
+ xhr.open('GET', url, true);
+ xhr.onreadystatechange = function (evt) {
+ if (xhr.readyState === 4) {
+ callback(xhr.responseText);
+ }
+ };
+ xhr.send(null);
+};
+
+var progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
+
+exports.createXhr = function() {
+ var xhr, i, progId;
+ if (typeof XMLHttpRequest !== "undefined") {
+ return new XMLHttpRequest();
+ } else {
+ for (i = 0; i < 3; i++) {
+ progId = progIds[i];
+ try {
+ xhr = new ActiveXObject(progId);
+ } catch (e) {}
+
+ if (xhr) {
+ progIds = [progId]; // so faster next time
+ break;
+ }
+ }
+ }
+
+ if (!xhr) {
+ throw new Error("createXhr(): XMLHttpRequest not available");
+ }
+
+ return xhr;
+};
+
+exports.loadScript = function(path, callback) {
+ var head = document.getElementsByTagName('head')[0];
+ var s = document.createElement('script');
+
+ s.src = path;
+ head.appendChild(s);
+
+ if (useragent.isOldIE)
+ s.onreadystatechange = function () {
+ this.readyState == 'loaded' && callback();
+ };
+ else
+ s.onload = callback;
+};
+
+});
+
+ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+var EventEmitter = {};
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+ this._eventRegistry = this._eventRegistry || {};
+ this._defaultHandlers = this._defaultHandlers || {};
+
+ var listeners = this._eventRegistry[eventName] || [];
+ var defaultHandler = this._defaultHandlers[eventName];
+ if (!listeners.length && !defaultHandler)
+ return;
+
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
+
+ if (!e.stopPropagation) {
+ e.stopPropagation = function() {
+ this.propagationStopped = true;
+ };
+ }
+
+ if (!e.preventDefault) {
+ e.preventDefault = function() {
+ this.defaultPrevented = true;
+ };
+ }
+
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e);
+};
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ this._defaultHandlers = this._defaultHandlers || {};
+
+ if (this._defaultHandlers[eventName])
+ throw new Error("The default handler for '" + eventName + "' is already set");
+
+ this._defaultHandlers[eventName] = callback;
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners.push(callback);
+};
+
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ return;
+
+ var index = listeners.indexOf(callback);
+ if (index !== -1)
+ listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+ace.define('ace/selection', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Selection = function(session) {
+ this.session = session;
+ this.doc = session.getDocument();
+
+ this.clearSelection();
+ this.lead = this.selectionLead = this.doc.createAnchor(0, 0);
+ this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0);
+
+ var self = this;
+ this.lead.on("change", function(e) {
+ self._emit("changeCursor");
+ if (!self.$isEmpty)
+ self._emit("changeSelection");
+ if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)
+ self.$desiredColumn = null;
+ });
+
+ this.selectionAnchor.on("change", function() {
+ if (!self.$isEmpty)
+ self._emit("changeSelection");
+ });
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.isEmpty = function() {
+ return (this.$isEmpty || (
+ this.anchor.row == this.lead.row &&
+ this.anchor.column == this.lead.column
+ ));
+ };
+ this.isMultiLine = function() {
+ if (this.isEmpty()) {
+ return false;
+ }
+
+ return this.getRange().isMultiLine();
+ };
+ this.getCursor = function() {
+ return this.lead.getPosition();
+ };
+ this.setSelectionAnchor = function(row, column) {
+ this.anchor.setPosition(row, column);
+
+ if (this.$isEmpty) {
+ this.$isEmpty = false;
+ this._emit("changeSelection");
+ }
+ };
+ this.getSelectionAnchor = function() {
+ if (this.$isEmpty)
+ return this.getSelectionLead()
+ else
+ return this.anchor.getPosition();
+ };
+ this.getSelectionLead = function() {
+ return this.lead.getPosition();
+ };
+ this.shiftSelection = function(columns) {
+ if (this.$isEmpty) {
+ this.moveCursorTo(this.lead.row, this.lead.column + columns);
+ return;
+ };
+
+ var anchor = this.getSelectionAnchor();
+ var lead = this.getSelectionLead();
+
+ var isBackwards = this.isBackwards();
+
+ if (!isBackwards || anchor.column !== 0)
+ this.setSelectionAnchor(anchor.row, anchor.column + columns);
+
+ if (isBackwards || lead.column !== 0) {
+ this.$moveSelection(function() {
+ this.moveCursorTo(lead.row, lead.column + columns);
+ });
+ }
+ };
+ this.isBackwards = function() {
+ var anchor = this.anchor;
+ var lead = this.lead;
+ return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));
+ };
+ this.getRange = function() {
+ var anchor = this.anchor;
+ var lead = this.lead;
+
+ if (this.isEmpty())
+ return Range.fromPoints(lead, lead);
+
+ if (this.isBackwards()) {
+ return Range.fromPoints(lead, anchor);
+ }
+ else {
+ return Range.fromPoints(anchor, lead);
+ }
+ };
+ this.clearSelection = function() {
+ if (!this.$isEmpty) {
+ this.$isEmpty = true;
+ this._emit("changeSelection");
+ }
+ };
+ this.selectAll = function() {
+ var lastRow = this.doc.getLength() - 1;
+ this.setSelectionAnchor(0, 0);
+ this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length);
+ };
+ this.setRange =
+ this.setSelectionRange = function(range, reverse) {
+ if (reverse) {
+ this.setSelectionAnchor(range.end.row, range.end.column);
+ this.selectTo(range.start.row, range.start.column);
+ } else {
+ this.setSelectionAnchor(range.start.row, range.start.column);
+ this.selectTo(range.end.row, range.end.column);
+ }
+ this.$desiredColumn = null;
+ };
+
+ this.$moveSelection = function(mover) {
+ var lead = this.lead;
+ if (this.$isEmpty)
+ this.setSelectionAnchor(lead.row, lead.column);
+
+ mover.call(this);
+ };
+ this.selectTo = function(row, column) {
+ this.$moveSelection(function() {
+ this.moveCursorTo(row, column);
+ });
+ };
+ this.selectToPosition = function(pos) {
+ this.$moveSelection(function() {
+ this.moveCursorToPosition(pos);
+ });
+ };
+ this.selectUp = function() {
+ this.$moveSelection(this.moveCursorUp);
+ };
+ this.selectDown = function() {
+ this.$moveSelection(this.moveCursorDown);
+ };
+ this.selectRight = function() {
+ this.$moveSelection(this.moveCursorRight);
+ };
+ this.selectLeft = function() {
+ this.$moveSelection(this.moveCursorLeft);
+ };
+ this.selectLineStart = function() {
+ this.$moveSelection(this.moveCursorLineStart);
+ };
+ this.selectLineEnd = function() {
+ this.$moveSelection(this.moveCursorLineEnd);
+ };
+ this.selectFileEnd = function() {
+ this.$moveSelection(this.moveCursorFileEnd);
+ };
+ this.selectFileStart = function() {
+ this.$moveSelection(this.moveCursorFileStart);
+ };
+ this.selectWordRight = function() {
+ this.$moveSelection(this.moveCursorWordRight);
+ };
+ this.selectWordLeft = function() {
+ this.$moveSelection(this.moveCursorWordLeft);
+ };
+ this.getWordRange = function(row, column) {
+ if (typeof column == "undefined") {
+ var cursor = row || this.lead;
+ row = cursor.row;
+ column = cursor.column;
+ }
+ return this.session.getWordRange(row, column);
+ };
+ this.selectWord = function() {
+ this.setSelectionRange(this.getWordRange());
+ };
+ this.selectAWord = function() {
+ var cursor = this.getCursor();
+ var range = this.session.getAWordRange(cursor.row, cursor.column);
+ this.setSelectionRange(range);
+ };
+
+ this.getLineRange = function(row, excludeLastChar) {
+ var rowStart = typeof row == "number" ? row : this.lead.row;
+ var rowEnd;
+
+ var foldLine = this.session.getFoldLine(rowStart);
+ if (foldLine) {
+ rowStart = foldLine.start.row;
+ rowEnd = foldLine.end.row;
+ } else {
+ rowEnd = rowStart;
+ }
+ if (excludeLastChar)
+ return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);
+ else
+ return new Range(rowStart, 0, rowEnd + 1, 0);
+ };
+ this.selectLine = function() {
+ this.setSelectionRange(this.getLineRange());
+ };
+ this.moveCursorUp = function() {
+ this.moveCursorBy(-1, 0);
+ };
+ this.moveCursorDown = function() {
+ this.moveCursorBy(1, 0);
+ };
+ this.moveCursorLeft = function() {
+ var cursor = this.lead.getPosition(),
+ fold;
+
+ if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {
+ this.moveCursorTo(fold.start.row, fold.start.column);
+ } else if (cursor.column == 0) {
+ if (cursor.row > 0) {
+ this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);
+ }
+ }
+ else {
+ var tabSize = this.session.getTabSize();
+ if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize)
+ this.moveCursorBy(0, -tabSize);
+ else
+ this.moveCursorBy(0, -1);
+ }
+ };
+ this.moveCursorRight = function() {
+ var cursor = this.lead.getPosition(),
+ fold;
+ if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {
+ this.moveCursorTo(fold.end.row, fold.end.column);
+ }
+ else if (this.lead.column == this.doc.getLine(this.lead.row).length) {
+ if (this.lead.row < this.doc.getLength() - 1) {
+ this.moveCursorTo(this.lead.row + 1, 0);
+ }
+ }
+ else {
+ var tabSize = this.session.getTabSize();
+ var cursor = this.lead;
+ if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize)
+ this.moveCursorBy(0, tabSize);
+ else
+ this.moveCursorBy(0, 1);
+ }
+ };
+ this.moveCursorLineStart = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+ var screenRow = this.session.documentToScreenRow(row, column);
+ var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);
+ var beforeCursor = this.session.getDisplayLine(
+ row, null, firstColumnPosition.row,
+ firstColumnPosition.column
+ );
+
+ var leadingSpace = beforeCursor.match(/^\s*/);
+ if (leadingSpace[0].length == column) {
+ this.moveCursorTo(
+ firstColumnPosition.row, firstColumnPosition.column
+ );
+ }
+ else {
+ this.moveCursorTo(
+ firstColumnPosition.row,
+ firstColumnPosition.column + leadingSpace[0].length
+ );
+ }
+ };
+ this.moveCursorLineEnd = function() {
+ var lead = this.lead;
+ var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);
+ if (this.lead.column == lineEnd.column) {
+ var line = this.session.getLine(lineEnd.row);
+ if (lineEnd.column == line.length) {
+ var textEnd = line.search(/\s+$/);
+ if (textEnd > 0)
+ lineEnd.column = textEnd;
+ }
+ }
+
+ this.moveCursorTo(lineEnd.row, lineEnd.column);
+ };
+ this.moveCursorFileEnd = function() {
+ var row = this.doc.getLength() - 1;
+ var column = this.doc.getLine(row).length;
+ this.moveCursorTo(row, column);
+ };
+ this.moveCursorFileStart = function() {
+ this.moveCursorTo(0, 0);
+ };
+ this.moveCursorLongWordRight = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+ var line = this.doc.getLine(row);
+ var rightOfCursor = line.substring(column);
+
+ var match;
+ this.session.nonTokenRe.lastIndex = 0;
+ this.session.tokenRe.lastIndex = 0;
+ var fold = this.session.getFoldAt(row, column, 1);
+ if (fold) {
+ this.moveCursorTo(fold.end.row, fold.end.column);
+ return;
+ }
+ if (match = this.session.nonTokenRe.exec(rightOfCursor)) {
+ column += this.session.nonTokenRe.lastIndex;
+ this.session.nonTokenRe.lastIndex = 0;
+ rightOfCursor = line.substring(column);
+ }
+ if (column >= line.length) {
+ this.moveCursorTo(row, line.length);
+ this.moveCursorRight();
+ if (row < this.doc.getLength() - 1)
+ this.moveCursorWordRight();
+ return;
+ }
+ if (match = this.session.tokenRe.exec(rightOfCursor)) {
+ column += this.session.tokenRe.lastIndex;
+ this.session.tokenRe.lastIndex = 0;
+ }
+
+ this.moveCursorTo(row, column);
+ };
+ this.moveCursorLongWordLeft = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+ var fold;
+ if (fold = this.session.getFoldAt(row, column, -1)) {
+ this.moveCursorTo(fold.start.row, fold.start.column);
+ return;
+ }
+
+ var str = this.session.getFoldStringAt(row, column, -1);
+ if (str == null) {
+ str = this.doc.getLine(row).substring(0, column)
+ }
+
+ var leftOfCursor = lang.stringReverse(str);
+ var match;
+ this.session.nonTokenRe.lastIndex = 0;
+ this.session.tokenRe.lastIndex = 0;
+ if (match = this.session.nonTokenRe.exec(leftOfCursor)) {
+ column -= this.session.nonTokenRe.lastIndex;
+ leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);
+ this.session.nonTokenRe.lastIndex = 0;
+ }
+ if (column <= 0) {
+ this.moveCursorTo(row, 0);
+ this.moveCursorLeft();
+ if (row > 0)
+ this.moveCursorWordLeft();
+ return;
+ }
+ if (match = this.session.tokenRe.exec(leftOfCursor)) {
+ column -= this.session.tokenRe.lastIndex;
+ this.session.tokenRe.lastIndex = 0;
+ }
+
+ this.moveCursorTo(row, column);
+ };
+
+ this.$shortWordEndIndex = function(rightOfCursor) {
+ var match, index = 0, ch;
+ var whitespaceRe = /\s/;
+ var tokenRe = this.session.tokenRe;
+
+ tokenRe.lastIndex = 0;
+ if (match = this.session.tokenRe.exec(rightOfCursor)) {
+ index = this.session.tokenRe.lastIndex;
+ } else {
+ while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))
+ index ++;
+
+ if (index <= 1) {
+ tokenRe.lastIndex = 0;
+ while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {
+ tokenRe.lastIndex = 0;
+ index ++;
+ if (whitespaceRe.test(ch)) {
+ if (index > 2) {
+ index--
+ break;
+ } else {
+ while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))
+ index ++;
+ if (index > 2)
+ break
+ }
+ }
+ }
+ }
+ }
+ tokenRe.lastIndex = 0;
+
+ return index;
+ };
+
+ this.moveCursorShortWordRight = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+ var line = this.doc.getLine(row);
+ var rightOfCursor = line.substring(column);
+
+ var fold = this.session.getFoldAt(row, column, 1);
+ if (fold)
+ return this.moveCursorTo(fold.end.row, fold.end.column);
+
+ if (column == line.length) {
+ var l = this.doc.getLength();
+ do {
+ row++;
+ rightOfCursor = this.doc.getLine(row)
+ } while (row < l && /^\s*$/.test(rightOfCursor))
+
+ if (!/^\s+/.test(rightOfCursor))
+ rightOfCursor = ""
+ column = 0;
+ }
+
+ var index = this.$shortWordEndIndex(rightOfCursor);
+
+ this.moveCursorTo(row, column + index);
+ };
+
+ this.moveCursorShortWordLeft = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+
+ var fold;
+ if (fold = this.session.getFoldAt(row, column, -1))
+ return this.moveCursorTo(fold.start.row, fold.start.column);
+
+ var line = this.session.getLine(row).substring(0, column);
+ if (column == 0) {
+ do {
+ row--;
+ line = this.doc.getLine(row);
+ } while (row > 0 && /^\s*$/.test(line))
+
+ column = line.length;
+ if (!/\s+$/.test(line))
+ line = ""
+ }
+
+ var leftOfCursor = lang.stringReverse(line);
+ var index = this.$shortWordEndIndex(leftOfCursor);
+
+ return this.moveCursorTo(row, column - index);
+ };
+
+ this.moveCursorWordRight = function() {
+ if (this.session.$selectLongWords)
+ this.moveCursorLongWordRight();
+ else
+ this.moveCursorShortWordRight();
+ };
+
+ this.moveCursorWordLeft = function() {
+ if (this.session.$selectLongWords)
+ this.moveCursorLongWordLeft();
+ else
+ this.moveCursorShortWordLeft();
+ };
+ this.moveCursorBy = function(rows, chars) {
+ var screenPos = this.session.documentToScreenPosition(
+ this.lead.row,
+ this.lead.column
+ );
+
+ if (chars === 0) {
+ if (this.$desiredColumn)
+ screenPos.column = this.$desiredColumn;
+ else
+ this.$desiredColumn = screenPos.column;
+ }
+
+ var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column);
+ this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);
+ };
+ this.moveCursorToPosition = function(position) {
+ this.moveCursorTo(position.row, position.column);
+ };
+ this.moveCursorTo = function(row, column, keepDesiredColumn) {
+ var fold = this.session.getFoldAt(row, column, 1);
+ if (fold) {
+ row = fold.start.row;
+ column = fold.start.column;
+ }
+
+ this.$keepDesiredColumnOnChange = true;
+ this.lead.setPosition(row, column);
+ this.$keepDesiredColumnOnChange = false;
+
+ if (!keepDesiredColumn)
+ this.$desiredColumn = null;
+ };
+ this.moveCursorToScreen = function(row, column, keepDesiredColumn) {
+ var pos = this.session.screenToDocumentPosition(row, column);
+ this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);
+ };
+ this.detach = function() {
+ this.lead.detach();
+ this.anchor.detach();
+ this.session = this.doc = null;
+ }
+
+ this.fromOrientedRange = function(range) {
+ this.setSelectionRange(range, range.cursor == range.start);
+ this.$desiredColumn = range.desiredColumn || this.$desiredColumn;
+ }
+
+ this.toOrientedRange = function(range) {
+ var r = this.getRange();
+ if (range) {
+ range.start.column = r.start.column;
+ range.start.row = r.start.row;
+ range.end.column = r.end.column;
+ range.end.row = r.end.row;
+ } else {
+ range = r;
+ }
+
+ range.cursor = this.isBackwards() ? range.start : range.end;
+ range.desiredColumn = this.$desiredColumn;
+ return range;
+ }
+
+}).call(Selection.prototype);
+
+exports.Selection = Selection;
+});
+
+ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
+
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
+};
+
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row == range.start.row &&
+ this.end.row == range.end.row &&
+ this.start.column == range.start.column &&
+ this.end.column == range.end.column
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
+ };
+
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
+
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
+ } else {
+ return 0;
+ }
+ }
+ };
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
+ };
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
+ }
+ };
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
+ }
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
+ }
+
+ if (row < this.start.row)
+ return -1;
+
+ if (row > this.end.row)
+ return 1;
+
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
+
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
+
+ return 0;
+ };
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow) {
+ var end = {
+ row: lastRow+1,
+ column: 0
+ };
+ }
+
+ if (this.start.row > lastRow) {
+ var start = {
+ row: lastRow+1,
+ column: 0
+ };
+ }
+
+ if (this.start.row < firstRow) {
+ var start = {
+ row: firstRow,
+ column: 0
+ };
+ }
+
+ if (this.end.row < firstRow) {
+ var end = {
+ row: firstRow,
+ column: 0
+ };
+ }
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
+
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+
+ this.isEmpty = function() {
+ return (this.start.row == this.end.row && this.start.column == this.end.column);
+ };
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
+ };
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
+ };
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
+ };
+ this.toScreenRange = function(session) {
+ var screenPosStart =
+ session.documentToScreenPosition(this.start);
+ var screenPosEnd =
+ session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+
+exports.Range = Range;
+});
+
+ace.define('ace/mode/text', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/behaviour', 'ace/unicode'], function(require, exports, module) {
+
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var Behaviour = require("./behaviour").Behaviour;
+var unicode = require("../unicode");
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
+ this.$behaviour = new Behaviour();
+};
+
+(function() {
+
+ this.tokenRe = new RegExp("^["
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\\$_]+", "g"
+ );
+
+ this.nonTokenRe = new RegExp("^(?:[^"
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\\$_]|\s])+", "g"
+ );
+
+ this.getTokenizer = function() {
+ return this.$tokenizer;
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return "";
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.createModeDelegates = function (mapping) {
+ if (!this.$embeds) {
+ return;
+ }
+ this.$modes = {};
+ for (var i = 0; i < this.$embeds.length; i++) {
+ if (mapping[this.$embeds[i]]) {
+ this.$modes[this.$embeds[i]] = new mapping[this.$embeds[i]]();
+ }
+ }
+
+ var delegations = ['toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction'];
+
+ for (var i = 0; i < delegations.length; i++) {
+ (function(scope) {
+ var functionName = delegations[i];
+ var defaultHandler = scope[functionName];
+ scope[delegations[i]] = function() {
+ return this.$delegator(functionName, arguments, defaultHandler);
+ }
+ } (this));
+ }
+ }
+
+ this.$delegator = function(method, args, defaultHandler) {
+ var state = args[0];
+
+ for (var i = 0; i < this.$embeds.length; i++) {
+ if (!this.$modes[this.$embeds[i]]) continue;
+
+ var split = state.split(this.$embeds[i]);
+ if (!split[0] && split[1]) {
+ args[0] = split[1];
+ var mode = this.$modes[this.$embeds[i]];
+ return mode[method].apply(mode, args);
+ }
+ }
+ var ret = defaultHandler.apply(this, args);
+ return defaultHandler ? ret : undefined;
+ };
+
+ this.transformAction = function(state, action, editor, session, param) {
+ if (this.$behaviour) {
+ var behaviours = this.$behaviour.getBehaviours();
+ for (var key in behaviours) {
+ if (behaviours[key][action]) {
+ var ret = behaviours[key][action].apply(this, arguments);
+ if (ret) {
+ return ret;
+ }
+ }
+ }
+ }
+ }
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/tokenizer', ['require', 'exports', 'module' ], function(require, exports, module) {
+var Tokenizer = function(rules, flag) {
+ flag = flag ? "g" + flag : "g";
+ this.rules = rules;
+
+ this.regExps = {};
+ this.matchMappings = {};
+ for ( var key in this.rules) {
+ var rule = this.rules[key];
+ var state = rule;
+ var ruleRegExps = [];
+ var matchTotal = 0;
+ var mapping = this.matchMappings[key] = {};
+
+ for ( var i = 0; i < state.length; i++) {
+
+ if (state[i].regex instanceof RegExp)
+ state[i].regex = state[i].regex.toString().slice(1, -1);
+ var matchcount = new RegExp("(?:(" + state[i].regex + ")|(.))").exec("a").length - 2;
+ var adjustedregex = state[i].regex.replace(/\\([0-9]+)/g, function (match, digit) {
+ return "\\" + (parseInt(digit, 10) + matchTotal + 1);
+ });
+
+ if (matchcount > 1 && state[i].token.length !== matchcount-1)
+ throw new Error("For " + state[i].regex + " the matching groups (" +(matchcount-1) + ") and length of the token array (" + state[i].token.length + ") don't match (rule #" + i + " of state " + key + ")");
+
+ mapping[matchTotal] = {
+ rule: i,
+ len: matchcount
+ };
+ matchTotal += matchcount;
+
+ ruleRegExps.push(adjustedregex);
+ }
+
+ this.regExps[key] = new RegExp("(?:(" + ruleRegExps.join(")|(") + ")|(.))", flag);
+ }
+};
+
+(function() {
+ this.getLineTokens = function(line, startState) {
+ var currentState = startState || "start";
+ var state = this.rules[currentState];
+ var mapping = this.matchMappings[currentState];
+ var re = this.regExps[currentState];
+ re.lastIndex = 0;
+
+ var match, tokens = [];
+
+ var lastIndex = 0;
+
+ var token = {
+ type: null,
+ value: ""
+ };
+
+ while (match = re.exec(line)) {
+ var type = "text";
+ var rule = null;
+ var value = [match[0]];
+
+ for (var i = 0; i < match.length-2; i++) {
+ if (match[i + 1] === undefined)
+ continue;
+
+ rule = state[mapping[i].rule];
+
+ if (mapping[i].len > 1)
+ value = match.slice(i+2, i+1+mapping[i].len);
+ if (typeof rule.token == "function")
+ type = rule.token.apply(this, value);
+ else
+ type = rule.token;
+
+ if (rule.next) {
+ currentState = rule.next;
+ state = this.rules[currentState];
+ mapping = this.matchMappings[currentState];
+ lastIndex = re.lastIndex;
+
+ re = this.regExps[currentState];
+
+ if (re === undefined) {
+ throw new Error("You indicated a state of " + rule.next + " to go to, but it doesn't exist!");
+ }
+
+ re.lastIndex = lastIndex;
+ }
+ break;
+ }
+
+ if (value[0]) {
+ if (typeof type == "string") {
+ value = [value.join("")];
+ type = [type];
+ }
+ for (var i = 0; i < value.length; i++) {
+ if (!value[i])
+ continue;
+
+ if ((!rule || rule.merge !== false) && token.type === type[i]) {
+ token.value += value[i];
+ } else {
+ if (token.type)
+ tokens.push(token);
+
+ token = {
+ type: type[i],
+ value: value[i]
+ };
+ }
+ }
+ }
+
+ if (lastIndex == line.length)
+ break;
+
+ lastIndex = re.lastIndex;
+ }
+
+ if (token.type)
+ tokens.push(token);
+
+ return {
+ tokens : tokens,
+ state : currentState
+ };
+ };
+
+}).call(Tokenizer.prototype);
+
+exports.Tokenizer = Tokenizer;
+});
+
+ace.define('ace/mode/text_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
+
+
+var lang = require("../lib/lang");
+
+var TextHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [{
+ token : "empty_line",
+ regex : '^$'
+ }, {
+ token : "text",
+ regex : ".+"
+ }]
+ };
+};
+
+(function() {
+
+ this.addRules = function(rules, prefix) {
+ for (var key in rules) {
+ var state = rules[key];
+ for (var i=0; i<state.length; i++) {
+ var rule = state[i];
+ if (rule.next) {
+ rule.next = prefix + rule.next;
+ }
+ }
+ this.$rules[prefix + key] = state;
+ }
+ };
+
+ this.getRules = function() {
+ return this.$rules;
+ };
+
+ this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {
+ var embedRules = new HighlightRules().getRules();
+ if (states) {
+ for (var i = 0; i < states.length; i++)
+ states[i] = prefix + states[i];
+ } else {
+ states = [];
+ for (var key in embedRules)
+ states.push(prefix + key);
+ }
+
+ this.addRules(embedRules, prefix);
+
+ if (escapeRules) {
+ var addRules = Array.prototype[append ? "push" : "unshift"];
+ for (var i = 0; i < states.length; i++)
+ addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));
+ }
+
+ if (!this.$embeds)
+ this.$embeds = [];
+ this.$embeds.push(prefix);
+ }
+
+ this.getEmbeds = function() {
+ return this.$embeds;
+ }
+
+ this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {
+ var keywords = Object.create(null);
+ Object.keys(map).forEach(function(className) {
+ var a = map[className];
+ if (ignoreCase)
+ a = a.toLowerCase();
+ var list = a.split(splitChar || "|");
+ for (var i = list.length; i--; )
+ keywords[list[i]] = className;
+ });
+ map = null;
+ return ignoreCase
+ ? function(value) {return keywords[value.toLowerCase()] || defaultToken }
+ : function(value) {return keywords[value] || defaultToken };
+ }
+
+ this.getKeywords = function() {
+ return this.$keywords;
+ };
+
+}).call(TextHighlightRules.prototype);
+
+exports.TextHighlightRules = TextHighlightRules;
+});
+
+ace.define('ace/mode/behaviour', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+var Behaviour = function() {
+ this.$behaviours = {};
+};
+
+(function () {
+
+ this.add = function (name, action, callback) {
+ switch (undefined) {
+ case this.$behaviours:
+ this.$behaviours = {};
+ case this.$behaviours[name]:
+ this.$behaviours[name] = {};
+ }
+ this.$behaviours[name][action] = callback;
+ }
+
+ this.addBehaviours = function (behaviours) {
+ for (var key in behaviours) {
+ for (var action in behaviours[key]) {
+ this.add(key, action, behaviours[key][action]);
+ }
+ }
+ }
+
+ this.remove = function (name) {
+ if (this.$behaviours && this.$behaviours[name]) {
+ delete this.$behaviours[name];
+ }
+ }
+
+ this.inherit = function (mode, filter) {
+ if (typeof mode === "function") {
+ var behaviours = new mode().getBehaviours(filter);
+ } else {
+ var behaviours = mode.getBehaviours(filter);
+ }
+ this.addBehaviours(behaviours);
+ }
+
+ this.getBehaviours = function (filter) {
+ if (!filter) {
+ return this.$behaviours;
+ } else {
+ var ret = {}
+ for (var i = 0; i < filter.length; i++) {
+ if (this.$behaviours[filter[i]]) {
+ ret[filter[i]] = this.$behaviours[filter[i]];
+ }
+ }
+ return ret;
+ }
+ }
+
+}).call(Behaviour.prototype);
+
+exports.Behaviour = Behaviour;
+});
+ace.define('ace/unicode', ['require', 'exports', 'module' ], function(require, exports, module) {
+exports.packages = {};
+
+addUnicodePackage({
+ L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
+ Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",
+ Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",
+ Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",
+ Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",
+ Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
+ M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",
+ Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",
+ Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",
+ Me: "0488048906DE20DD-20E020E2-20E4A670-A672",
+ N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
+ Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
+ Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",
+ No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",
+ P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",
+ Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",
+ Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",
+ Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",
+ Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",
+ Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21",
+ Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F",
+ Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",
+ S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",
+ Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",
+ Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",
+ Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",
+ So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",
+ Z: "002000A01680180E2000-200A20282029202F205F3000",
+ Zs: "002000A01680180E2000-200A202F205F3000",
+ Zl: "2028",
+ Zp: "2029",
+ C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
+ Cc: "0000-001F007F-009F",
+ Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",
+ Co: "E000-F8FF",
+ Cs: "D800-DFFF",
+ Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"
+});
+
+function addUnicodePackage (pack) {
+ var codePoint = /\w{4}/g;
+ for (var name in pack)
+ exports.packages[name] = pack[name].replace(codePoint, "\\u$&");
+};
+
+});
+
+ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(text) {
+ this.$lines = [];
+ if (text.length == 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this.insertLines(0, text);
+ } else {
+ this.insert({row: 0, column:0}, text);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength();
+ this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+ this.insert({row: 0, column:0}, text);
+ };
+ this.getValue = function() {
+ return this.getAllLines().join(this.getNewLineCharacter());
+ };
+ this.createAnchor = function(row, column) {
+ return new Anchor(this, row, column);
+ };
+ if ("aaa".split(/a/).length == 0)
+ this.$split = function(text) {
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
+ }
+ else
+ this.$split = function(text) {
+ return text.split(/\r\n|\r|\n/);
+ };
+
+
+
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
+ if (match) {
+ this.$autoNewLine = match[1];
+ } else {
+ this.$autoNewLine = "\n";
+ }
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+
+ case "unix":
+ return "\n";
+
+ default:
+ return this.$autoNewLine;
+ }
+ };
+
+ this.$autoNewLine = "\n";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ };
+ this.getNewLineMode = function() {
+ return this.$newLineMode;
+ };
+ this.isNewLine = function(text) {
+ return (text == "\r\n" || text == "\r" || text == "\n");
+ };
+ this.getLine = function(row) {
+ return this.$lines[row] || "";
+ };
+ this.getLines = function(firstRow, lastRow) {
+ return this.$lines.slice(firstRow, lastRow + 1);
+ };
+ this.getAllLines = function() {
+ return this.getLines(0, this.getLength());
+ };
+ this.getLength = function() {
+ return this.$lines.length;
+ };
+ this.getTextRange = function(range) {
+ if (range.start.row == range.end.row) {
+ return this.$lines[range.start.row].substring(range.start.column,
+ range.end.column);
+ }
+ else {
+ var lines = this.getLines(range.start.row+1, range.end.row-1);
+ lines.unshift((this.$lines[range.start.row] || "").substring(range.start.column));
+ lines.push((this.$lines[range.end.row] || "").substring(0, range.end.column));
+ return lines.join(this.getNewLineCharacter());
+ }
+ };
+
+ this.$clipPosition = function(position) {
+ var length = this.getLength();
+ if (position.row >= length) {
+ position.row = Math.max(0, length - 1);
+ position.column = this.getLine(length-1).length;
+ }
+ return position;
+ };
+ this.insert = function(position, text) {
+ if (!text || text.length === 0)
+ return position;
+
+ position = this.$clipPosition(position);
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ var lines = this.$split(text);
+ var firstLine = lines.splice(0, 1)[0];
+ var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+ position = this.insertInLine(position, firstLine);
+ if (lastLine !== null) {
+ position = this.insertNewLine(position); // terminate first line
+ position = this.insertLines(position.row, lines);
+ position = this.insertInLine(position, lastLine || "");
+ }
+ return position;
+ };
+ this.insertLines = function(row, lines) {
+ if (lines.length == 0)
+ return {row: row, column: 0};
+ if (lines.length > 0xFFFF) {
+ var end = this.insertLines(row, lines.slice(0xFFFF));
+ lines = lines.slice(0, 0xFFFF);
+ }
+
+ var args = [row, 0];
+ args.push.apply(args, lines);
+ this.$lines.splice.apply(this.$lines, args);
+
+ var range = new Range(row, 0, row + lines.length, 0);
+ var delta = {
+ action: "insertLines",
+ range: range,
+ lines: lines
+ };
+ this._emit("change", { data: delta });
+ return end || range.end;
+ };
+ this.insertNewLine = function(position) {
+ position = this.$clipPosition(position);
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column);
+ this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+ var end = {
+ row : position.row + 1,
+ column : 0
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: this.getNewLineCharacter()
+ };
+ this._emit("change", { data: delta });
+
+ return end;
+ };
+ this.insertInLine = function(position, text) {
+ if (text.length == 0)
+ return position;
+
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column) + text
+ + line.substring(position.column);
+
+ var end = {
+ row : position.row,
+ column : position.column + text.length
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: text
+ };
+ this._emit("change", { data: delta });
+
+ return end;
+ };
+ this.remove = function(range) {
+ range.start = this.$clipPosition(range.start);
+ range.end = this.$clipPosition(range.end);
+
+ if (range.isEmpty())
+ return range.start;
+
+ var firstRow = range.start.row;
+ var lastRow = range.end.row;
+
+ if (range.isMultiLine()) {
+ var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+ var lastFullRow = lastRow - 1;
+
+ if (range.end.column > 0)
+ this.removeInLine(lastRow, 0, range.end.column);
+
+ if (lastFullRow >= firstFullRow)
+ this.removeLines(firstFullRow, lastFullRow);
+
+ if (firstFullRow != firstRow) {
+ this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+ this.removeNewLine(range.start.row);
+ }
+ }
+ else {
+ this.removeInLine(firstRow, range.start.column, range.end.column);
+ }
+ return range.start;
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ if (startColumn == endColumn)
+ return;
+
+ var range = new Range(row, startColumn, row, endColumn);
+ var line = this.getLine(row);
+ var removed = line.substring(startColumn, endColumn);
+ var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+ this.$lines.splice(row, 1, newLine);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: removed
+ };
+ this._emit("change", { data: delta });
+ return range.start;
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ var range = new Range(firstRow, 0, lastRow + 1, 0);
+ var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+ var delta = {
+ action: "removeLines",
+ range: range,
+ nl: this.getNewLineCharacter(),
+ lines: removed
+ };
+ this._emit("change", { data: delta });
+ return removed;
+ };
+ this.removeNewLine = function(row) {
+ var firstLine = this.getLine(row);
+ var secondLine = this.getLine(row+1);
+
+ var range = new Range(row, firstLine.length, row+1, 0);
+ var line = firstLine + secondLine;
+
+ this.$lines.splice(row, 2, line);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: this.getNewLineCharacter()
+ };
+ this._emit("change", { data: delta });
+ };
+ this.replace = function(range, text) {
+ if (text.length == 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ if (text) {
+ var end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ var delta = deltas[i];
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "insertText")
+ this.insert(range.start, delta.text);
+ else if (delta.action == "removeLines")
+ this.removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "removeText")
+ this.remove(range);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ var delta = deltas[i];
+
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "insertText")
+ this.remove(range);
+ else if (delta.action == "removeLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "removeText")
+ this.insert(range.start, delta.text);
+ }
+ };
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length;
+
+ return index + newlineLength * i + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.document = doc;
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+
+ this.$onChange = this.onChange.bind(this);
+ doc.on("change", this.$onChange);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+
+ this.getDocument = function() {
+ return this.document;
+ };
+
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
+
+ if (range.start.row > this.row)
+ return;
+
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
+
+ var row = this.row;
+ var column = this.column;
+
+ if (delta.action === "insertText") {
+ if (range.start.row === row && range.start.column <= column) {
+ if (range.start.row === range.end.row) {
+ column += range.end.column - range.start.column;
+ }
+ else {
+ column -= range.start.column;
+ row += range.end.row - range.start.row;
+ }
+ }
+ else if (range.start.row !== range.end.row && range.start.row < row) {
+ row += range.end.row - range.start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (range.start.row <= row) {
+ row += range.end.row - range.start.row;
+ }
+ }
+ else if (delta.action == "removeText") {
+ if (range.start.row == row && range.start.column < column) {
+ if (range.end.column >= column)
+ column = range.start.column;
+ else
+ column = Math.max(0, column - (range.end.column - range.start.column));
+
+ } else if (range.start.row !== range.end.row && range.start.row < row) {
+ if (range.end.row == row) {
+ column = Math.max(0, column - range.end.column) + range.start.column;
+ }
+ row -= (range.end.row - range.start.row);
+ }
+ else if (range.end.row == row) {
+ row -= range.end.row - range.start.row;
+ column = Math.max(0, column - range.end.column) + range.start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (range.start.row <= row) {
+ if (range.end.row <= row)
+ row -= range.end.row - range.start.row;
+ else {
+ row = range.start.row;
+ column = 0;
+ }
+ }
+ }
+
+ this.setPosition(row, column, true);
+ };
+
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ }
+ else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+
+ if (this.row == pos.row && this.column == pos.column)
+ return;
+
+ var old = {
+ row: this.row,
+ column: this.column
+ };
+
+ this.row = pos.row;
+ this.column = pos.column;
+ this._emit("change", {
+ old: old,
+ value: pos
+ });
+ };
+
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
+ };
+
+}).call(Anchor.prototype);
+
+});
+
+ace.define('ace/background_tokenizer', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var MAX_LINE_LENGTH = 5000;
+
+var BackgroundTokenizer = function(tokenizer, editor) {
+ this.running = false;
+ this.lines = [];
+ this.states = [];
+ this.currentLine = 0;
+ this.tokenizer = tokenizer;
+
+ var self = this;
+
+ this.$worker = function() {
+ if (!self.running) { return; }
+
+ var workerStart = new Date();
+ var startLine = self.currentLine;
+ var doc = self.doc;
+
+ var processedLines = 0;
+
+ var len = doc.getLength();
+ while (self.currentLine < len) {
+ self.$tokenizeRow(self.currentLine);
+ while (self.lines[self.currentLine])
+ self.currentLine++;
+ processedLines ++;
+ if ((processedLines % 5 == 0) && (new Date() - workerStart) > 20) {
+ self.fireUpdateEvent(startLine, self.currentLine-1);
+ self.running = setTimeout(self.$worker, 20);
+ return;
+ }
+ }
+
+ self.running = false;
+
+ self.fireUpdateEvent(startLine, len - 1);
+ };
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+ this.setTokenizer = function(tokenizer) {
+ this.tokenizer = tokenizer;
+ this.lines = [];
+ this.states = [];
+
+ this.start(0);
+ };
+ this.setDocument = function(doc) {
+ this.doc = doc;
+ this.lines = [];
+ this.states = [];
+
+ this.stop();
+ };
+ this.fireUpdateEvent = function(firstRow, lastRow) {
+ var data = {
+ first: firstRow,
+ last: lastRow
+ };
+ this._emit("update", {data: data});
+ };
+ this.start = function(startRow) {
+ this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());
+ this.lines.splice(this.currentLine, this.lines.length);
+ this.states.splice(this.currentLine, this.states.length);
+
+ this.stop();
+ this.running = setTimeout(this.$worker, 700);
+ };
+
+ this.$updateOnChange = function(delta) {
+ var range = delta.range;
+ var startRow = range.start.row;
+ var len = range.end.row - startRow;
+
+ if (len === 0) {
+ this.lines[startRow] = null;
+ } else if (delta.action == "removeText" || delta.action == "removeLines") {
+ this.lines.splice(startRow, len + 1, null);
+ this.states.splice(startRow, len + 1, null);
+ } else {
+ var args = Array(len + 1);
+ args.unshift(startRow, 1);
+ this.lines.splice.apply(this.lines, args);
+ this.states.splice.apply(this.states, args);
+ }
+
+ this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());
+
+ this.stop();
+ this.running = setTimeout(this.$worker, 700);
+ };
+ this.stop = function() {
+ if (this.running)
+ clearTimeout(this.running);
+ this.running = false;
+ };
+ this.getTokens = function(row) {
+ return this.lines[row] || this.$tokenizeRow(row);
+ };
+ this.getState = function(row) {
+ if (this.currentLine == row)
+ this.$tokenizeRow(row);
+ return this.states[row] || "start";
+ };
+
+ this.$tokenizeRow = function(row) {
+ var line = this.doc.getLine(row);
+ var state = this.states[row - 1];
+
+ if (line.length > MAX_LINE_LENGTH) {
+ var overflow = {value: line.substr(MAX_LINE_LENGTH), type: "text"};
+ line = line.slice(0, MAX_LINE_LENGTH);
+ }
+ var data = this.tokenizer.getLineTokens(line, state);
+ if (overflow) {
+ data.tokens.push(overflow);
+ data.state = "start";
+ }
+
+ if (this.states[row] !== data.state) {
+ this.states[row] = data.state;
+ this.lines[row + 1] = null;
+ if (this.currentLine > row + 1)
+ this.currentLine = row + 1;
+ } else if (this.currentLine == row) {
+ this.currentLine = row + 1;
+ }
+
+ return this.lines[row] = data.tokens;
+ };
+
+}).call(BackgroundTokenizer.prototype);
+
+exports.BackgroundTokenizer = BackgroundTokenizer;
+});
+
+ace.define('ace/search_highlight', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/range'], function(require, exports, module) {
+
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+
+var SearchHighlight = function(regExp, clazz, type) {
+ this.setRegexp(regExp);
+ this.clazz = clazz;
+ this.type = type || "text";
+};
+
+(function() {
+ this.MAX_RANGES = 500;
+
+ this.setRegexp = function(regExp) {
+ if (this.regExp+"" == regExp+"")
+ return;
+ this.regExp = regExp;
+ this.cache = [];
+ };
+
+ this.update = function(html, markerLayer, session, config) {
+ if (!this.regExp)
+ return;
+ var start = config.firstRow, end = config.lastRow;
+
+ for (var i = start; i <= end; i++) {
+ var ranges = this.cache[i];
+ if (ranges == null) {
+ ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);
+ if (ranges.length > this.MAX_RANGES)
+ ranges = ranges.slice(0, this.MAX_RANGES);
+ ranges = ranges.map(function(match) {
+ return new Range(i, match.offset, i, match.offset + match.length);
+ });
+ this.cache[i] = ranges.length ? ranges : "";
+ }
+
+ for (var j = ranges.length; j --; ) {
+ markerLayer.drawSingleLineMarker(
+ html, ranges[j].toScreenRange(session), this.clazz, config,
+ null, this.type
+ );
+ }
+ }
+ };
+
+}).call(SearchHighlight.prototype);
+
+exports.SearchHighlight = SearchHighlight;
+});
+
+ace.define('ace/edit_session/folding', ['require', 'exports', 'module' , 'ace/range', 'ace/edit_session/fold_line', 'ace/edit_session/fold', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+var FoldLine = require("./fold_line").FoldLine;
+var Fold = require("./fold").Fold;
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+function Folding() {
+ this.getFoldAt = function(row, column, side) {
+ var foldLine = this.getFoldLine(row);
+ if (!foldLine)
+ return null;
+
+ var folds = foldLine.folds;
+ for (var i = 0; i < folds.length; i++) {
+ var fold = folds[i];
+ if (fold.range.contains(row, column)) {
+ if (side == 1 && fold.range.isEnd(row, column)) {
+ continue;
+ } else if (side == -1 && fold.range.isStart(row, column)) {
+ continue;
+ }
+ return fold;
+ }
+ }
+ };
+ this.getFoldsInRange = function(range) {
+ range = range.clone();
+ var start = range.start;
+ var end = range.end;
+ var foldLines = this.$foldData;
+ var foundFolds = [];
+
+ start.column += 1;
+ end.column -= 1;
+
+ for (var i = 0; i < foldLines.length; i++) {
+ var cmp = foldLines[i].range.compareRange(range);
+ if (cmp == 2) {
+ continue;
+ }
+ else if (cmp == -2) {
+ break;
+ }
+
+ var folds = foldLines[i].folds;
+ for (var j = 0; j < folds.length; j++) {
+ var fold = folds[j];
+ cmp = fold.range.compareRange(range);
+ if (cmp == -2) {
+ break;
+ } else if (cmp == 2) {
+ continue;
+ } else
+ if (cmp == 42) {
+ break;
+ }
+ foundFolds.push(fold);
+ }
+ }
+ return foundFolds;
+ };
+ this.getAllFolds = function() {
+ var folds = [];
+ var foldLines = this.$foldData;
+
+ function addFold(fold) {
+ folds.push(fold);
+ if (!fold.subFolds)
+ return;
+
+ for (var i = 0; i < fold.subFolds.length; i++)
+ addFold(fold.subFolds[i]);
+ }
+
+ for (var i = 0; i < foldLines.length; i++)
+ for (var j = 0; j < foldLines[i].folds.length; j++)
+ addFold(foldLines[i].folds[j]);
+
+ return folds;
+ };
+ this.getFoldStringAt = function(row, column, trim, foldLine) {
+ foldLine = foldLine || this.getFoldLine(row);
+ if (!foldLine)
+ return null;
+
+ var lastFold = {
+ end: { column: 0 }
+ };
+ var str, fold;
+ for (var i = 0; i < foldLine.folds.length; i++) {
+ fold = foldLine.folds[i];
+ var cmp = fold.range.compareEnd(row, column);
+ if (cmp == -1) {
+ str = this
+ .getLine(fold.start.row)
+ .substring(lastFold.end.column, fold.start.column);
+ break;
+ }
+ else if (cmp === 0) {
+ return null;
+ }
+ lastFold = fold;
+ }
+ if (!str)
+ str = this.getLine(fold.start.row).substring(lastFold.end.column);
+
+ if (trim == -1)
+ return str.substring(0, column - lastFold.end.column);
+ else if (trim == 1)
+ return str.substring(column - lastFold.end.column);
+ else
+ return str;
+ };
+
+ this.getFoldLine = function(docRow, startFoldLine) {
+ var foldData = this.$foldData;
+ var i = 0;
+ if (startFoldLine)
+ i = foldData.indexOf(startFoldLine);
+ if (i == -1)
+ i = 0;
+ for (i; i < foldData.length; i++) {
+ var foldLine = foldData[i];
+ if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {
+ return foldLine;
+ } else if (foldLine.end.row > docRow) {
+ return null;
+ }
+ }
+ return null;
+ };
+ this.getNextFoldLine = function(docRow, startFoldLine) {
+ var foldData = this.$foldData;
+ var i = 0;
+ if (startFoldLine)
+ i = foldData.indexOf(startFoldLine);
+ if (i == -1)
+ i = 0;
+ for (i; i < foldData.length; i++) {
+ var foldLine = foldData[i];
+ if (foldLine.end.row >= docRow) {
+ return foldLine;
+ }
+ }
+ return null;
+ };
+
+ this.getFoldedRowCount = function(first, last) {
+ var foldData = this.$foldData, rowCount = last-first+1;
+ for (var i = 0; i < foldData.length; i++) {
+ var foldLine = foldData[i],
+ end = foldLine.end.row,
+ start = foldLine.start.row;
+ if (end >= last) {
+ if(start < last) {
+ if(start >= first)
+ rowCount -= last-start;
+ else
+ rowCount = 0;//in one fold
+ }
+ break;
+ } else if(end >= first){
+ if (start >= first) //fold inside range
+ rowCount -= end-start;
+ else
+ rowCount -= end-first+1;
+ }
+ }
+ return rowCount;
+ };
+
+ this.$addFoldLine = function(foldLine) {
+ this.$foldData.push(foldLine);
+ this.$foldData.sort(function(a, b) {
+ return a.start.row - b.start.row;
+ });
+ return foldLine;
+ };
+ this.addFold = function(placeholder, range) {
+ var foldData = this.$foldData;
+ var added = false;
+ var fold;
+
+ if (placeholder instanceof Fold)
+ fold = placeholder;
+ else
+ fold = new Fold(range, placeholder);
+
+ this.$clipRangeToDocument(fold.range);
+
+ var startRow = fold.start.row;
+ var startColumn = fold.start.column;
+ var endRow = fold.end.row;
+ var endColumn = fold.end.column;
+ if (startRow == endRow && endColumn - startColumn < 2)
+ throw "The range has to be at least 2 characters width";
+
+ var startFold = this.getFoldAt(startRow, startColumn, 1);
+ var endFold = this.getFoldAt(endRow, endColumn, -1);
+ if (startFold && endFold == startFold)
+ return startFold.addSubFold(fold);
+
+ if (
+ (startFold && !startFold.range.isStart(startRow, startColumn))
+ || (endFold && !endFold.range.isEnd(endRow, endColumn))
+ ) {
+ throw "A fold can't intersect already existing fold" + fold.range + startFold.range;
+ }
+ var folds = this.getFoldsInRange(fold.range);
+ if (folds.length > 0) {
+ this.removeFolds(folds);
+ fold.subFolds = folds;
+ }
+
+ for (var i = 0; i < foldData.length; i++) {
+ var foldLine = foldData[i];
+ if (endRow == foldLine.start.row) {
+ foldLine.addFold(fold);
+ added = true;
+ break;
+ }
+ else if (startRow == foldLine.end.row) {
+ foldLine.addFold(fold);
+ added = true;
+ if (!fold.sameRow) {
+ var foldLineNext = foldData[i + 1];
+ if (foldLineNext && foldLineNext.start.row == endRow) {
+ foldLine.merge(foldLineNext);
+ break;
+ }
+ }
+ break;
+ }
+ else if (endRow <= foldLine.start.row) {
+ break;
+ }
+ }
+
+ if (!added)
+ foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));
+
+ if (this.$useWrapMode)
+ this.$updateWrapData(foldLine.start.row, foldLine.start.row);
+ else
+ this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);
+ this.$modified = true;
+ this._emit("changeFold", { data: fold });
+
+ return fold;
+ };
+
+ this.addFolds = function(folds) {
+ folds.forEach(function(fold) {
+ this.addFold(fold);
+ }, this);
+ };
+
+ this.removeFold = function(fold) {
+ var foldLine = fold.foldLine;
+ var startRow = foldLine.start.row;
+ var endRow = foldLine.end.row;
+
+ var foldLines = this.$foldData;
+ var folds = foldLine.folds;
+ if (folds.length == 1) {
+ foldLines.splice(foldLines.indexOf(foldLine), 1);
+ } else
+ if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {
+ folds.pop();
+ foldLine.end.row = folds[folds.length - 1].end.row;
+ foldLine.end.column = folds[folds.length - 1].end.column;
+ } else
+ if (foldLine.range.isStart(fold.start.row, fold.start.column)) {
+ folds.shift();
+ foldLine.start.row = folds[0].start.row;
+ foldLine.start.column = folds[0].start.column;
+ } else
+ if (fold.sameRow) {
+ folds.splice(folds.indexOf(fold), 1);
+ } else
+ {
+ var newFoldLine = foldLine.split(fold.start.row, fold.start.column);
+ folds = newFoldLine.folds;
+ folds.shift();
+ newFoldLine.start.row = folds[0].start.row;
+ newFoldLine.start.column = folds[0].start.column;
+ }
+
+ if (this.$useWrapMode)
+ this.$updateWrapData(startRow, endRow);
+ else
+ this.$updateRowLengthCache(startRow, endRow);
+ this.$modified = true;
+ this._emit("changeFold", { data: fold });
+ };
+
+ this.removeFolds = function(folds) {
+ var cloneFolds = [];
+ for (var i = 0; i < folds.length; i++) {
+ cloneFolds.push(folds[i]);
+ }
+
+ cloneFolds.forEach(function(fold) {
+ this.removeFold(fold);
+ }, this);
+ this.$modified = true;
+ };
+
+ this.expandFold = function(fold) {
+ this.removeFold(fold);
+ fold.subFolds.forEach(function(fold) {
+ this.addFold(fold);
+ }, this);
+ fold.subFolds = [];
+ };
+
+ this.expandFolds = function(folds) {
+ folds.forEach(function(fold) {
+ this.expandFold(fold);
+ }, this);
+ };
+
+ this.unfold = function(location, expandInner) {
+ var range, folds;
+ if (location == null)
+ range = new Range(0, 0, this.getLength(), 0);
+ else if (typeof location == "number")
+ range = new Range(location, 0, location, this.getLine(location).length);
+ else if ("row" in location)
+ range = Range.fromPoints(location, location);
+ else
+ range = location;
+
+ folds = this.getFoldsInRange(range);
+ if (expandInner) {
+ this.removeFolds(folds);
+ } else {
+ while (folds.length) {
+ this.expandFolds(folds);
+ folds = this.getFoldsInRange(range);
+ }
+ }
+ };
+ this.isRowFolded = function(docRow, startFoldRow) {
+ return !!this.getFoldLine(docRow, startFoldRow);
+ };
+
+ this.getRowFoldEnd = function(docRow, startFoldRow) {
+ var foldLine = this.getFoldLine(docRow, startFoldRow);
+ return foldLine ? foldLine.end.row : docRow;
+ };
+
+ this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {
+ if (startRow == null) {
+ startRow = foldLine.start.row;
+ startColumn = 0;
+ }
+
+ if (endRow == null) {
+ endRow = foldLine.end.row;
+ endColumn = this.getLine(endRow).length;
+ }
+ var doc = this.doc;
+ var textLine = "";
+
+ foldLine.walk(function(placeholder, row, column, lastColumn) {
+ if (row < startRow) {
+ return;
+ } else if (row == startRow) {
+ if (column < startColumn) {
+ return;
+ }
+ lastColumn = Math.max(startColumn, lastColumn);
+ }
+ if (placeholder != null) {
+ textLine += placeholder;
+ } else {
+ textLine += doc.getLine(row).substring(lastColumn, column);
+ }
+ }.bind(this), endRow, endColumn);
+ return textLine;
+ };
+
+ this.getDisplayLine = function(row, endColumn, startRow, startColumn) {
+ var foldLine = this.getFoldLine(row);
+
+ if (!foldLine) {
+ var line;
+ line = this.doc.getLine(row);
+ return line.substring(startColumn || 0, endColumn || line.length);
+ } else {
+ return this.getFoldDisplayLine(
+ foldLine, row, endColumn, startRow, startColumn);
+ }
+ };
+
+ this.$cloneFoldData = function() {
+ var fd = [];
+ fd = this.$foldData.map(function(foldLine) {
+ var folds = foldLine.folds.map(function(fold) {
+ return fold.clone();
+ });
+ return new FoldLine(fd, folds);
+ });
+
+ return fd;
+ };
+
+ this.toggleFold = function(tryToUnfold) {
+ var selection = this.selection;
+ var range = selection.getRange();
+ var fold;
+ var bracketPos;
+
+ if (range.isEmpty()) {
+ var cursor = range.start;
+ fold = this.getFoldAt(cursor.row, cursor.column);
+
+ if (fold) {
+ this.expandFold(fold);
+ return;
+ }
+ else if (bracketPos = this.findMatchingBracket(cursor)) {
+ if (range.comparePoint(bracketPos) == 1) {
+ range.end = bracketPos;
+ }
+ else {
+ range.start = bracketPos;
+ range.start.column++;
+ range.end.column--;
+ }
+ }
+ else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {
+ if (range.comparePoint(bracketPos) == 1)
+ range.end = bracketPos;
+ else
+ range.start = bracketPos;
+
+ range.start.column++;
+ }
+ else {
+ range = this.getCommentFoldRange(cursor.row, cursor.column) || range;
+ }
+ } else {
+ var folds = this.getFoldsInRange(range);
+ if (tryToUnfold && folds.length) {
+ this.expandFolds(folds);
+ return;
+ }
+ else if (folds.length == 1 ) {
+ fold = folds[0];
+ }
+ }
+
+ if (!fold)
+ fold = this.getFoldAt(range.start.row, range.start.column);
+
+ if (fold && fold.range.toString() == range.toString()) {
+ this.expandFold(fold);
+ return;
+ }
+
+ var placeholder = "...";
+ if (!range.isMultiLine()) {
+ placeholder = this.getTextRange(range);
+ if(placeholder.length < 4)
+ return;
+ placeholder = placeholder.trim().substring(0, 2) + "..";
+ }
+
+ this.addFold(placeholder, range);
+ };
+
+ this.getCommentFoldRange = function(row, column, dir) {
+ var iterator = new TokenIterator(this, row, column);
+ var token = iterator.getCurrentToken();
+ if (token && /^comment|string/.test(token.type)) {
+ var range = new Range();
+ var re = new RegExp(token.type.replace(/\..*/, "\\."));
+ if (dir != 1) {
+ do {
+ token = iterator.stepBackward();
+ } while(token && re.test(token.type));
+ iterator.stepForward();
+ }
+
+ range.start.row = iterator.getCurrentTokenRow();
+ range.start.column = iterator.getCurrentTokenColumn() + 2;
+
+ iterator = new TokenIterator(this, row, column);
+
+ if (dir != -1) {
+ do {
+ token = iterator.stepForward();
+ } while(token && re.test(token.type));
+ token = iterator.stepBackward();
+ } else
+ token = iterator.getCurrentToken();
+
+ range.end.row = iterator.getCurrentTokenRow();
+ range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2;
+ return range;
+ }
+ };
+
+ this.foldAll = function(startRow, endRow) {
+ var foldWidgets = this.foldWidgets;
+ endRow = endRow || this.getLength();
+ for (var row = startRow || 0; row < endRow; row++) {
+ if (foldWidgets[row] == null)
+ foldWidgets[row] = this.getFoldWidget(row);
+ if (foldWidgets[row] != "start")
+ continue;
+
+ var range = this.getFoldWidgetRange(row);
+ if (range && range.end.row <= endRow) try {
+ this.addFold("...", range);
+ } catch(e) {}
+ }
+ };
+
+ this.$foldStyles = {
+ "manual": 1,
+ "markbegin": 1,
+ "markbeginend": 1
+ };
+ this.$foldStyle = "markbegin";
+ this.setFoldStyle = function(style) {
+ if (!this.$foldStyles[style])
+ throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]");
+
+ if (this.$foldStyle == style)
+ return;
+
+ this.$foldStyle = style;
+
+ if (style == "manual")
+ this.unfold();
+ var mode = this.$foldMode;
+ this.$setFolding(null);
+ this.$setFolding(mode);
+ };
+ this.$setFolding = function(foldMode) {
+ if (this.$foldMode == foldMode)
+ return;
+
+ this.$foldMode = foldMode;
+
+ this.removeListener('change', this.$updateFoldWidgets);
+ this._emit("changeAnnotation");
+
+ if (!foldMode || this.$foldStyle == "manual") {
+ this.foldWidgets = null;
+ return;
+ }
+
+ this.foldWidgets = [];
+ this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);
+ this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);
+
+ this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);
+ this.on('change', this.$updateFoldWidgets);
+
+ };
+
+ this.onFoldWidgetClick = function(row, e) {
+ e = e.domEvent;
+ var type = this.getFoldWidget(row);
+ var line = this.getLine(row);
+ var onlySubfolds = e.shiftKey;
+ var addSubfolds = onlySubfolds || e.ctrlKey || e.altKey || e.metaKey;
+ var fold;
+
+ if (type == "end")
+ fold = this.getFoldAt(row, 0, -1);
+ else
+ fold = this.getFoldAt(row, line.length, 1);
+
+ if (fold) {
+ if (addSubfolds)
+ this.removeFold(fold);
+ else
+ this.expandFold(fold);
+ return;
+ }
+
+ var range = this.getFoldWidgetRange(row);
+ if (range) {
+ if (!range.isMultiLine()) {
+ fold = this.getFoldAt(range.start.row, range.start.column, 1);
+ if (fold && range.isEqual(fold.range)) {
+ this.removeFold(fold);
+ return;
+ }
+ }
+
+ if (!onlySubfolds)
+ this.addFold("...", range);
+
+ if (addSubfolds)
+ this.foldAll(range.start.row + 1, range.end.row);
+ } else {
+ if (addSubfolds)
+ this.foldAll(row + 1, this.getLength());
+ (e.target || e.srcElement).className += " ace_invalid"
+ }
+ };
+
+ this.updateFoldWidgets = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+ var firstRow = range.start.row;
+ var len = range.end.row - firstRow;
+
+ if (len === 0) {
+ this.foldWidgets[firstRow] = null;
+ } else if (delta.action == "removeText" || delta.action == "removeLines") {
+ this.foldWidgets.splice(firstRow, len + 1, null);
+ } else {
+ var args = Array(len + 1);
+ args.unshift(firstRow, 1);
+ this.foldWidgets.splice.apply(this.foldWidgets, args);
+ }
+ };
+
+}
+
+exports.Folding = Folding;
+
+});
+
+ace.define('ace/edit_session/fold_line', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+function FoldLine(foldData, folds) {
+ this.foldData = foldData;
+ if (Array.isArray(folds)) {
+ this.folds = folds;
+ } else {
+ folds = this.folds = [ folds ];
+ }
+
+ var last = folds[folds.length - 1]
+ this.range = new Range(folds[0].start.row, folds[0].start.column,
+ last.end.row, last.end.column);
+ this.start = this.range.start;
+ this.end = this.range.end;
+
+ this.folds.forEach(function(fold) {
+ fold.setFoldLine(this);
+ }, this);
+}
+
+(function() {
+ this.shiftRow = function(shift) {
+ this.start.row += shift;
+ this.end.row += shift;
+ this.folds.forEach(function(fold) {
+ fold.start.row += shift;
+ fold.end.row += shift;
+ });
+ }
+
+ this.addFold = function(fold) {
+ if (fold.sameRow) {
+ if (fold.start.row < this.startRow || fold.endRow > this.endRow) {
+ throw "Can't add a fold to this FoldLine as it has no connection";
+ }
+ this.folds.push(fold);
+ this.folds.sort(function(a, b) {
+ return -a.range.compareEnd(b.start.row, b.start.column);
+ });
+ if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {
+ this.end.row = fold.end.row;
+ this.end.column = fold.end.column;
+ } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {
+ this.start.row = fold.start.row;
+ this.start.column = fold.start.column;
+ }
+ } else if (fold.start.row == this.end.row) {
+ this.folds.push(fold);
+ this.end.row = fold.end.row;
+ this.end.column = fold.end.column;
+ } else if (fold.end.row == this.start.row) {
+ this.folds.unshift(fold);
+ this.start.row = fold.start.row;
+ this.start.column = fold.start.column;
+ } else {
+ throw "Trying to add fold to FoldRow that doesn't have a matching row";
+ }
+ fold.foldLine = this;
+ }
+
+ this.containsRow = function(row) {
+ return row >= this.start.row && row <= this.end.row;
+ }
+
+ this.walk = function(callback, endRow, endColumn) {
+ var lastEnd = 0,
+ folds = this.folds,
+ fold,
+ comp, stop, isNewRow = true;
+
+ if (endRow == null) {
+ endRow = this.end.row;
+ endColumn = this.end.column;
+ }
+
+ for (var i = 0; i < folds.length; i++) {
+ fold = folds[i];
+
+ comp = fold.range.compareStart(endRow, endColumn);
+ if (comp == -1) {
+ callback(null, endRow, endColumn, lastEnd, isNewRow);
+ return;
+ }
+
+ stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);
+ stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);
+ if (stop || comp == 0) {
+ return;
+ }
+ isNewRow = !fold.sameRow;
+ lastEnd = fold.end.column;
+ }
+ callback(null, endRow, endColumn, lastEnd, isNewRow);
+ }
+
+ this.getNextFoldTo = function(row, column) {
+ var fold, cmp;
+ for (var i = 0; i < this.folds.length; i++) {
+ fold = this.folds[i];
+ cmp = fold.range.compareEnd(row, column);
+ if (cmp == -1) {
+ return {
+ fold: fold,
+ kind: "after"
+ };
+ } else if (cmp == 0) {
+ return {
+ fold: fold,
+ kind: "inside"
+ }
+ }
+ }
+ return null;
+ }
+
+ this.addRemoveChars = function(row, column, len) {
+ var ret = this.getNextFoldTo(row, column),
+ fold, folds;
+ if (ret) {
+ fold = ret.fold;
+ if (ret.kind == "inside"
+ && fold.start.column != column
+ && fold.start.row != row)
+ {
+ window.console && window.console.log(row, column, fold);
+ } else if (fold.start.row == row) {
+ folds = this.folds;
+ var i = folds.indexOf(fold);
+ if (i == 0) {
+ this.start.column += len;
+ }
+ for (i; i < folds.length; i++) {
+ fold = folds[i];
+ fold.start.column += len;
+ if (!fold.sameRow) {
+ return;
+ }
+ fold.end.column += len;
+ }
+ this.end.column += len;
+ }
+ }
+ }
+
+ this.split = function(row, column) {
+ var fold = this.getNextFoldTo(row, column).fold,
+ folds = this.folds;
+ var foldData = this.foldData;
+
+ if (!fold) {
+ return null;
+ }
+ var i = folds.indexOf(fold);
+ var foldBefore = folds[i - 1];
+ this.end.row = foldBefore.end.row;
+ this.end.column = foldBefore.end.column;
+ folds = folds.splice(i, folds.length - i);
+
+ var newFoldLine = new FoldLine(foldData, folds);
+ foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);
+ return newFoldLine;
+ }
+
+ this.merge = function(foldLineNext) {
+ var folds = foldLineNext.folds;
+ for (var i = 0; i < folds.length; i++) {
+ this.addFold(folds[i]);
+ }
+ var foldData = this.foldData;
+ foldData.splice(foldData.indexOf(foldLineNext), 1);
+ }
+
+ this.toString = function() {
+ var ret = [this.range.toString() + ": [" ];
+
+ this.folds.forEach(function(fold) {
+ ret.push(" " + fold.toString());
+ });
+ ret.push("]")
+ return ret.join("\n");
+ }
+
+ this.idxToPosition = function(idx) {
+ var lastFoldEndColumn = 0;
+ var fold;
+
+ for (var i = 0; i < this.folds.length; i++) {
+ var fold = this.folds[i];
+
+ idx -= fold.start.column - lastFoldEndColumn;
+ if (idx < 0) {
+ return {
+ row: fold.start.row,
+ column: fold.start.column + idx
+ };
+ }
+
+ idx -= fold.placeholder.length;
+ if (idx < 0) {
+ return fold.start;
+ }
+
+ lastFoldEndColumn = fold.end.column;
+ }
+
+ return {
+ row: this.end.row,
+ column: this.end.column + idx
+ };
+ }
+}).call(FoldLine.prototype);
+
+exports.FoldLine = FoldLine;
+});
+
+ace.define('ace/edit_session/fold', ['require', 'exports', 'module' ], function(require, exports, module) {
+var Fold = exports.Fold = function(range, placeholder) {
+ this.foldLine = null;
+ this.placeholder = placeholder;
+ this.range = range;
+ this.start = range.start;
+ this.end = range.end;
+
+ this.sameRow = range.start.row == range.end.row;
+ this.subFolds = [];
+};
+
+(function() {
+
+ this.toString = function() {
+ return '"' + this.placeholder + '" ' + this.range.toString();
+ };
+
+ this.setFoldLine = function(foldLine) {
+ this.foldLine = foldLine;
+ this.subFolds.forEach(function(fold) {
+ fold.setFoldLine(foldLine);
+ });
+ };
+
+ this.clone = function() {
+ var range = this.range.clone();
+ var fold = new Fold(range, this.placeholder);
+ this.subFolds.forEach(function(subFold) {
+ fold.subFolds.push(subFold.clone());
+ });
+ return fold;
+ };
+
+ this.addSubFold = function(fold) {
+ if (this.range.isEqual(fold))
+ return this;
+
+ if (!this.range.containsRange(fold))
+ throw "A fold can't intersect already existing fold" + fold.range + this.range;
+
+ var row = fold.range.start.row, column = fold.range.start.column;
+ for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {
+ cmp = this.subFolds[i].range.compare(row, column);
+ if (cmp != 1)
+ break;
+ }
+ var afterStart = this.subFolds[i];
+
+ if (cmp == 0)
+ return afterStart.addSubFold(fold);
+ var row = fold.range.end.row, column = fold.range.end.column;
+ for (var j = i, cmp = -1; j < this.subFolds.length; j++) {
+ cmp = this.subFolds[j].range.compare(row, column);
+ if (cmp != 1)
+ break;
+ }
+ var afterEnd = this.subFolds[j];
+
+ if (cmp == 0)
+ throw "A fold can't intersect already existing fold" + fold.range + this.range;
+
+ var consumedFolds = this.subFolds.splice(i, j - i, fold);
+ fold.setFoldLine(this.foldLine);
+
+ return fold;
+ };
+
+}).call(Fold.prototype);
+
+});
+
+ace.define('ace/token_iterator', ['require', 'exports', 'module' ], function(require, exports, module) {
+var TokenIterator = function(session, initialRow, initialColumn) {
+ this.$session = session;
+ this.$row = initialRow;
+ this.$rowTokens = session.getTokens(initialRow);
+
+ var token = session.getTokenAt(initialRow, initialColumn);
+ this.$tokenIndex = token ? token.index : -1;
+};
+
+(function() {
+ this.stepBackward = function() {
+ this.$tokenIndex -= 1;
+
+ while (this.$tokenIndex < 0) {
+ this.$row -= 1;
+ if (this.$row < 0) {
+ this.$row = 0;
+ return null;
+ }
+
+ this.$rowTokens = this.$session.getTokens(this.$row);
+ this.$tokenIndex = this.$rowTokens.length - 1;
+ }
+
+ return this.$rowTokens[this.$tokenIndex];
+ };
+ this.stepForward = function() {
+ var rowCount = this.$session.getLength();
+ this.$tokenIndex += 1;
+
+ while (this.$tokenIndex >= this.$rowTokens.length) {
+ this.$row += 1;
+ if (this.$row >= rowCount) {
+ this.$row = rowCount - 1;
+ return null;
+ }
+
+ this.$rowTokens = this.$session.getTokens(this.$row);
+ this.$tokenIndex = 0;
+ }
+
+ return this.$rowTokens[this.$tokenIndex];
+ };
+ this.getCurrentToken = function () {
+ return this.$rowTokens[this.$tokenIndex];
+ };
+ this.getCurrentTokenRow = function () {
+ return this.$row;
+ };
+ this.getCurrentTokenColumn = function() {
+ var rowTokens = this.$rowTokens;
+ var tokenIndex = this.$tokenIndex;
+ var column = rowTokens[tokenIndex].start;
+ if (column !== undefined)
+ return column;
+
+ column = 0;
+ while (tokenIndex > 0) {
+ tokenIndex -= 1;
+ column += rowTokens[tokenIndex].value.length;
+ }
+
+ return column;
+ };
+
+}).call(TokenIterator.prototype);
+
+exports.TokenIterator = TokenIterator;
+});
+
+ace.define('ace/edit_session/bracket_match', ['require', 'exports', 'module' , 'ace/token_iterator', 'ace/range'], function(require, exports, module) {
+
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+
+
+function BracketMatch() {
+
+ this.findMatchingBracket = function(position, char) {
+ if (position.column == 0) return null;
+
+ var charBeforeCursor = char || this.getLine(position.row).charAt(position.column-1);
+ if (charBeforeCursor == "") return null;
+
+ var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/);
+ if (!match)
+ return null;
+
+ if (match[1])
+ return this.$findClosingBracket(match[1], position);
+ else
+ return this.$findOpeningBracket(match[2], position);
+ };
+
+ this.getBracketRange = function(pos) {
+ var line = this.getLine(pos.row);
+ var before = true, range;
+
+ var chr = line.charAt(pos.column-1);
+ var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/);
+ if (!match) {
+ chr = line.charAt(pos.column);
+ pos = {row: pos.row, column: pos.column + 1};
+ match = chr && chr.match(/([\(\[\{])|([\)\]\}])/);
+ before = false;
+ }
+ if (!match)
+ return null;
+
+ if (match[1]) {
+ var bracketPos = this.$findClosingBracket(match[1], pos);
+ if (!bracketPos)
+ return null;
+ range = Range.fromPoints(pos, bracketPos);
+ if (!before) {
+ range.end.column++;
+ range.start.column--;
+ }
+ range.cursor = range.end;
+ } else {
+ var bracketPos = this.$findOpeningBracket(match[2], pos);
+ if (!bracketPos)
+ return null;
+ range = Range.fromPoints(bracketPos, pos);
+ if (!before) {
+ range.start.column++;
+ range.end.column--;
+ }
+ range.cursor = range.start;
+ }
+
+ return range;
+ };
+
+ this.$brackets = {
+ ")": "(",
+ "(": ")",
+ "]": "[",
+ "[": "]",
+ "{": "}",
+ "}": "{"
+ };
+
+ this.$findOpeningBracket = function(bracket, position, typeRe) {
+ var openBracket = this.$brackets[bracket];
+ var depth = 1;
+
+ var iterator = new TokenIterator(this, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ if (!token)
+ token = iterator.stepForward();
+ if (!token)
+ return;
+
+ if (!typeRe){
+ typeRe = new RegExp(
+ "(\\.?" +
+ token.type.replace(".", "\\.").replace("rparen", ".paren")
+ + ")+"
+ );
+ }
+ var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;
+ var value = token.value;
+
+ while (true) {
+
+ while (valueIndex >= 0) {
+ var chr = value.charAt(valueIndex);
+ if (chr == openBracket) {
+ depth -= 1;
+ if (depth == 0) {
+ return {row: iterator.getCurrentTokenRow(),
+ column: valueIndex + iterator.getCurrentTokenColumn()};
+ }
+ }
+ else if (chr == bracket) {
+ depth += 1;
+ }
+ valueIndex -= 1;
+ }
+ do {
+ token = iterator.stepBackward();
+ } while (token && !typeRe.test(token.type));
+
+ if (token == null)
+ break;
+
+ value = token.value;
+ valueIndex = value.length - 1;
+ }
+
+ return null;
+ };
+
+ this.$findClosingBracket = function(bracket, position, typeRe) {
+ var closingBracket = this.$brackets[bracket];
+ var depth = 1;
+
+ var iterator = new TokenIterator(this, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ if (!token)
+ token = iterator.stepForward();
+ if (!token)
+ return;
+
+ if (!typeRe){
+ typeRe = new RegExp(
+ "(\\.?" +
+ token.type.replace(".", "\\.").replace("lparen", ".paren")
+ + ")+"
+ );
+ }
+ var valueIndex = position.column - iterator.getCurrentTokenColumn();
+
+ while (true) {
+
+ var value = token.value;
+ var valueLength = value.length;
+ while (valueIndex < valueLength) {
+ var chr = value.charAt(valueIndex);
+ if (chr == closingBracket) {
+ depth -= 1;
+ if (depth == 0) {
+ return {row: iterator.getCurrentTokenRow(),
+ column: valueIndex + iterator.getCurrentTokenColumn()};
+ }
+ }
+ else if (chr == bracket) {
+ depth += 1;
+ }
+ valueIndex += 1;
+ }
+ do {
+ token = iterator.stepForward();
+ } while (token && !typeRe.test(token.type));
+
+ if (token == null)
+ break;
+
+ valueIndex = 0;
+ }
+
+ return null;
+ };
+}
+exports.BracketMatch = BracketMatch;
+
+});
+
+ace.define('ace/search', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/range'], function(require, exports, module) {
+
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+
+var Search = function() {
+ this.$options = {};
+};
+
+(function() {
+ this.set = function(options) {
+ oop.mixin(this.$options, options);
+ return this;
+ };
+ this.getOptions = function() {
+ return lang.copyObject(this.$options);
+ };
+ this.setOptions = function(options) {
+ this.$options = options;
+ };
+ this.find = function(session) {
+ var iterator = this.$matchIterator(session, this.$options);
+
+ if (!iterator)
+ return false;
+
+ var firstRange = null;
+ iterator.forEach(function(range, row, offset) {
+ if (!range.start) {
+ var column = range.offset + (offset || 0);
+ firstRange = new Range(row, column, row, column+range.length);
+ } else
+ firstRange = range;
+ return true;
+ });
+
+ return firstRange;
+ };
+ this.findAll = function(session) {
+ var options = this.$options;
+ if (!options.needle)
+ return [];
+ this.$assembleRegExp(options);
+
+ var range = options.range;
+ var lines = range
+ ? session.getLines(range.start.row, range.end.row)
+ : session.doc.getAllLines();
+
+ var ranges = [];
+ var re = options.re;
+ if (options.$isMultiLine) {
+ var len = re.length;
+ var maxRow = lines.length - len;
+ for (var row = re.offset || 0; row <= maxRow; row++) {
+ for (var j = 0; j < len; j++)
+ if (lines[row + j].search(re[j]) == -1)
+ break;
+
+ var startLine = lines[row];
+ var line = lines[row + len - 1];
+ var startIndex = startLine.match(re[0])[0].length;
+ var endIndex = line.match(re[len - 1])[0].length;
+
+ ranges.push(new Range(
+ row, startLine.length - startIndex,
+ row + len - 1, endIndex
+ ));
+ }
+ } else {
+ for (var i = 0; i < lines.length; i++) {
+ var matches = lang.getMatchOffsets(lines[i], re);
+ for (var j = 0; j < matches.length; j++) {
+ var match = matches[j];
+ ranges.push(new Range(i, match.offset, i, match.offset + match.length));
+ }
+ }
+ }
+
+ if (range) {
+ var startColumn = range.start.column;
+ var endColumn = range.start.column;
+ var i = 0, j = ranges.length - 1;
+ while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row)
+ i++;
+
+ while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row)
+ j--;
+ return ranges.slice(i, j + 1);
+ }
+
+ return ranges;
+ };
+ this.replace = function(input, replacement) {
+ var options = this.$options;
+
+ var re = this.$assembleRegExp(options);
+ if (options.$isMultiLine)
+ return replacement;
+
+ if (!re)
+ return;
+
+ var match = re.exec(input);
+ if (!match || match[0].length != input.length)
+ return null;
+
+ replacement = input.replace(re, replacement);
+ if (options.preserveCase) {
+ replacement = replacement.split("");
+ for (var i = Math.min(input.length, input.length); i--; ) {
+ var ch = input[i];
+ if (ch && ch.toLowerCase() != ch)
+ replacement[i] = replacement[i].toUpperCase();
+ else
+ replacement[i] = replacement[i].toLowerCase();
+ }
+ replacement = replacement.join("");
+ }
+
+ return replacement;
+ };
+
+ this.$matchIterator = function(session, options) {
+ var re = this.$assembleRegExp(options);
+ if (!re)
+ return false;
+
+ var self = this, callback, backwards = options.backwards;
+
+ if (options.$isMultiLine) {
+ var len = re.length;
+ var matchIterator = function(line, row, offset) {
+ var startIndex = line.search(re[0]);
+ if (startIndex == -1)
+ return;
+ for (var i = 1; i < len; i++) {
+ line = session.getLine(row + i);
+ if (line.search(re[i]) == -1)
+ return;
+ }
+
+ var endIndex = line.match(re[len - 1])[0].length;
+
+ var range = new Range(row, startIndex, row + len - 1, endIndex);
+ if (re.offset == 1) {
+ range.start.row--;
+ range.start.column = Number.MAX_VALUE;
+ } else if (offset)
+ range.start.column += offset;
+
+ if (callback(range))
+ return true;
+ };
+ } else if (backwards) {
+ var matchIterator = function(line, row, startIndex) {
+ var matches = lang.getMatchOffsets(line, re);
+ for (var i = matches.length-1; i >= 0; i--)
+ if (callback(matches[i], row, startIndex))
+ return true;
+ };
+ } else {
+ var matchIterator = function(line, row, startIndex) {
+ var matches = lang.getMatchOffsets(line, re);
+ for (var i = 0; i < matches.length; i++)
+ if (callback(matches[i], row, startIndex))
+ return true;
+ };
+ }
+
+ return {
+ forEach: function(_callback) {
+ callback = _callback;
+ self.$lineIterator(session, options).forEach(matchIterator);
+ }
+ };
+ };
+
+ this.$assembleRegExp = function(options) {
+ if (options.needle instanceof RegExp)
+ return options.re = options.needle;
+
+ var needle = options.needle;
+
+ if (!options.needle)
+ return options.re = false;
+
+ if (!options.regExp)
+ needle = lang.escapeRegExp(needle);
+
+ if (options.wholeWord)
+ needle = "\\b" + needle + "\\b";
+
+ var modifier = options.caseSensitive ? "g" : "gi";
+
+ options.$isMultiLine = /[\n\r]/.test(needle);
+ if (options.$isMultiLine)
+ return options.re = this.$assembleMultilineRegExp(needle, modifier);
+
+ try {
+ var re = new RegExp(needle, modifier);
+ } catch(e) {
+ re = false;
+ }
+ return options.re = re;
+ };
+
+ this.$assembleMultilineRegExp = function(needle, modifier) {
+ var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n");
+ var re = [];
+ for (var i = 0; i < parts.length; i++) try {
+ re.push(new RegExp(parts[i], modifier));
+ } catch(e) {
+ return false;
+ }
+ if (parts[0] == "") {
+ re.shift();
+ re.offset = 1;
+ } else {
+ re.offset = 0;
+ }
+ return re;
+ };
+
+ this.$lineIterator = function(session, options) {
+ var backwards = options.backwards == true;
+ var skipCurrent = options.skipCurrent != false;
+
+ var range = options.range;
+ var start = options.start;
+ if (!start)
+ start = range ? range[backwards ? "end" : "start"] : session.selection.getRange();
+
+ if (start.start)
+ start = start[skipCurrent != backwards ? "end" : "start"];
+
+ var firstRow = range ? range.start.row : 0;
+ var lastRow = range ? range.end.row : session.getLength() - 1;
+
+ var forEach = backwards ? function(callback) {
+ var row = start.row;
+
+ var line = session.getLine(row).substring(0, start.column);
+ if (callback(line, row))
+ return;
+
+ for (row--; row >= firstRow; row--)
+ if (callback(session.getLine(row), row))
+ return;
+
+ if (options.wrap == false)
+ return;
+
+ for (row = lastRow, firstRow = start.row; row >= firstRow; row--)
+ if (callback(session.getLine(row), row))
+ return;
+ } : function(callback) {
+ var row = start.row;
+
+ var line = session.getLine(row).substr(start.column);
+ if (callback(line, row, start.column))
+ return;
+
+ for (row = row+1; row <= lastRow; row++)
+ if (callback(session.getLine(row), row))
+ return;
+
+ if (options.wrap == false)
+ return;
+
+ for (row = firstRow, lastRow = start.row; row <= lastRow; row++)
+ if (callback(session.getLine(row), row))
+ return;
+ };
+
+ return {forEach: forEach};
+ };
+
+}).call(Search.prototype);
+
+exports.Search = Search;
+});
+ace.define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/keyboard/hash_handler', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var CommandManager = function(platform, commands) {
+ this.platform = platform;
+ this.commands = this.byName = {};
+ this.commmandKeyBinding = {};
+
+ this.addCommands(commands);
+
+ this.setDefaultHandler("exec", function(e) {
+ return e.command.exec(e.editor, e.args || {});
+ });
+};
+
+oop.inherits(CommandManager, HashHandler);
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.exec = function(command, editor, args) {
+ if (typeof command === 'string')
+ command = this.commands[command];
+
+ if (!command)
+ return false;
+
+ if (editor && editor.$readOnly && !command.readOnly)
+ return false;
+
+ var retvalue = this._emit("exec", {
+ editor: editor,
+ command: command,
+ args: args
+ });
+
+ return retvalue === false ? false : true;
+ };
+
+ this.toggleRecording = function(editor) {
+ if (this.$inReplay)
+ return;
+
+ editor && editor._emit("changeStatus");
+ if (this.recording) {
+ this.macro.pop();
+ this.removeEventListener("exec", this.$addCommandToMacro);
+
+ if (!this.macro.length)
+ this.macro = this.oldMacro;
+
+ return this.recording = false;
+ }
+ if (!this.$addCommandToMacro) {
+ this.$addCommandToMacro = function(e) {
+ this.macro.push([e.command, e.args]);
+ }.bind(this);
+ }
+
+ this.oldMacro = this.macro;
+ this.macro = [];
+ this.on("exec", this.$addCommandToMacro);
+ return this.recording = true;
+ };
+
+ this.replay = function(editor) {
+ if (this.$inReplay || !this.macro)
+ return;
+
+ if (this.recording)
+ return this.toggleRecording(editor);
+
+ try {
+ this.$inReplay = true;
+ this.macro.forEach(function(x) {
+ if (typeof x == "string")
+ this.exec(x, editor);
+ else
+ this.exec(x[0], editor, x[1]);
+ }, this);
+ } finally {
+ this.$inReplay = false;
+ }
+ };
+
+ this.trimMacro = function(m) {
+ return m.map(function(x){
+ if (typeof x[0] != "string")
+ x[0] = x[0].name;
+ if (!x[1])
+ x = x[0];
+ return x;
+ });
+ };
+
+}).call(CommandManager.prototype);
+
+exports.CommandManager = CommandManager;
+
+});
+
+ace.define('ace/keyboard/hash_handler', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
+
+
+var keyUtil = require("../lib/keys");
+
+function HashHandler(config, platform) {
+ this.platform = platform;
+ this.commands = {};
+ this.commmandKeyBinding = {};
+
+ this.addCommands(config);
+};
+
+(function() {
+
+ this.addCommand = function(command) {
+ if (this.commands[command.name])
+ this.removeCommand(command);
+
+ this.commands[command.name] = command;
+
+ if (command.bindKey)
+ this._buildKeyHash(command);
+ };
+
+ this.removeCommand = function(command) {
+ var name = (typeof command === 'string' ? command : command.name);
+ command = this.commands[name];
+ delete this.commands[name];
+ var ckb = this.commmandKeyBinding;
+ for (var hashId in ckb) {
+ for (var key in ckb[hashId]) {
+ if (ckb[hashId][key] == command)
+ delete ckb[hashId][key];
+ }
+ }
+ };
+
+ this.bindKey = function(key, command) {
+ if(!key)
+ return;
+ if (typeof command == "function") {
+ this.addCommand({exec: command, bindKey: key, name: key});
+ return;
+ }
+
+ var ckb = this.commmandKeyBinding;
+ key.split("|").forEach(function(keyPart) {
+ var binding = this.parseKeys(keyPart, command);
+ var hashId = binding.hashId;
+ (ckb[hashId] || (ckb[hashId] = {}))[binding.key] = command;
+ }, this);
+ };
+
+ this.addCommands = function(commands) {
+ commands && Object.keys(commands).forEach(function(name) {
+ var command = commands[name];
+ if (typeof command === "string")
+ return this.bindKey(command, name);
+
+ if (typeof command === "function")
+ command = { exec: command };
+
+ if (!command.name)
+ command.name = name;
+
+ this.addCommand(command);
+ }, this);
+ };
+
+ this.removeCommands = function(commands) {
+ Object.keys(commands).forEach(function(name) {
+ this.removeCommand(commands[name]);
+ }, this);
+ };
+
+ this.bindKeys = function(keyList) {
+ Object.keys(keyList).forEach(function(key) {
+ this.bindKey(key, keyList[key]);
+ }, this);
+ };
+
+ this._buildKeyHash = function(command) {
+ var binding = command.bindKey;
+ if (!binding)
+ return;
+
+ var key = typeof binding == "string" ? binding: binding[this.platform];
+ this.bindKey(key, command);
+ };
+ this.parseKeys = function(keys) {
+ var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x});
+ var key = parts.pop();
+
+ var keyCode = keyUtil[key];
+ if (keyUtil.FUNCTION_KEYS[keyCode])
+ key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();
+ else if (!parts.length)
+ return {key: key, hashId: -1};
+ else if (parts.length == 1 && parts[0] == "shift")
+ return {key: key.toUpperCase(), hashId: -1};
+
+ var hashId = 0;
+ for (var i = parts.length; i--;) {
+ var modifier = keyUtil.KEY_MODS[parts[i]];
+ if (modifier == null)
+ throw "invalid modifier " + parts[i] + " in " + keys;
+ hashId |= modifier;
+ }
+ return {key: key, hashId: hashId};
+ };
+
+ this.findKeyCommand = function findKeyCommand(hashId, keyString) {
+ var ckbr = this.commmandKeyBinding;
+ return ckbr[hashId] && ckbr[hashId][keyString];
+ };
+
+ this.handleKeyboard = function(data, hashId, keyString, keyCode) {
+ return {
+ command: this.findKeyCommand(hashId, keyString)
+ };
+ };
+
+}).call(HashHandler.prototype)
+
+exports.HashHandler = HashHandler;
+});
+
+ace.define('ace/commands/default_commands', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
+
+
+var lang = require("../lib/lang");
+
+function bindKey(win, mac) {
+ return {
+ win: win,
+ mac: mac
+ };
+}
+
+exports.commands = [{
+ name: "selectall",
+ bindKey: bindKey("Ctrl-A", "Command-A"),
+ exec: function(editor) { editor.selectAll(); },
+ readOnly: true
+}, {
+ name: "centerselection",
+ bindKey: bindKey(null, "Ctrl-L"),
+ exec: function(editor) { editor.centerSelection(); },
+ readOnly: true
+}, {
+ name: "gotoline",
+ bindKey: bindKey("Ctrl-L", "Command-L"),
+ exec: function(editor) {
+ var line = parseInt(prompt("Enter line number:"), 10);
+ if (!isNaN(line)) {
+ editor.gotoLine(line);
+ }
+ },
+ readOnly: true
+}, {
+ name: "fold",
+ bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"),
+ exec: function(editor) { editor.session.toggleFold(false); },
+ readOnly: true
+}, {
+ name: "unfold",
+ bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"),
+ exec: function(editor) { editor.session.toggleFold(true); },
+ readOnly: true
+}, {
+ name: "foldall",
+ bindKey: bindKey("Alt-0", "Command-Option-0"),
+ exec: function(editor) { editor.session.foldAll(); },
+ readOnly: true
+}, {
+ name: "unfoldall",
+ bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"),
+ exec: function(editor) { editor.session.unfold(); },
+ readOnly: true
+}, {
+ name: "findnext",
+ bindKey: bindKey("Ctrl-K", "Command-G"),
+ exec: function(editor) { editor.findNext(); },
+ readOnly: true
+}, {
+ name: "findprevious",
+ bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
+ exec: function(editor) { editor.findPrevious(); },
+ readOnly: true
+}, {
+ name: "find",
+ bindKey: bindKey("Ctrl-F", "Command-F"),
+ exec: function(editor) {
+ var needle = prompt("Find:", editor.getCopyText());
+ editor.find(needle);
+ },
+ readOnly: true
+}, {
+ name: "overwrite",
+ bindKey: "Insert",
+ exec: function(editor) { editor.toggleOverwrite(); },
+ readOnly: true
+}, {
+ name: "selecttostart",
+ bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Up"),
+ exec: function(editor) { editor.getSelection().selectFileStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotostart",
+ bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"),
+ exec: function(editor) { editor.navigateFileStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectup",
+ bindKey: bindKey("Shift-Up", "Shift-Up"),
+ exec: function(editor) { editor.getSelection().selectUp(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "golineup",
+ bindKey: bindKey("Up", "Up|Ctrl-P"),
+ exec: function(editor, args) { editor.navigateUp(args.times); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selecttoend",
+ bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-Down"),
+ exec: function(editor) { editor.getSelection().selectFileEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotoend",
+ bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"),
+ exec: function(editor) { editor.navigateFileEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectdown",
+ bindKey: bindKey("Shift-Down", "Shift-Down"),
+ exec: function(editor) { editor.getSelection().selectDown(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "golinedown",
+ bindKey: bindKey("Down", "Down|Ctrl-N"),
+ exec: function(editor, args) { editor.navigateDown(args.times); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectwordleft",
+ bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
+ exec: function(editor) { editor.getSelection().selectWordLeft(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotowordleft",
+ bindKey: bindKey("Ctrl-Left", "Option-Left"),
+ exec: function(editor) { editor.navigateWordLeft(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selecttolinestart",
+ bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
+ exec: function(editor) { editor.getSelection().selectLineStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotolinestart",
+ bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
+ exec: function(editor) { editor.navigateLineStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectleft",
+ bindKey: bindKey("Shift-Left", "Shift-Left"),
+ exec: function(editor) { editor.getSelection().selectLeft(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotoleft",
+ bindKey: bindKey("Left", "Left|Ctrl-B"),
+ exec: function(editor, args) { editor.navigateLeft(args.times); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectwordright",
+ bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
+ exec: function(editor) { editor.getSelection().selectWordRight(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotowordright",
+ bindKey: bindKey("Ctrl-Right", "Option-Right"),
+ exec: function(editor) { editor.navigateWordRight(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selecttolineend",
+ bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
+ exec: function(editor) { editor.getSelection().selectLineEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotolineend",
+ bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
+ exec: function(editor) { editor.navigateLineEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectright",
+ bindKey: bindKey("Shift-Right", "Shift-Right"),
+ exec: function(editor) { editor.getSelection().selectRight(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotoright",
+ bindKey: bindKey("Right", "Right|Ctrl-F"),
+ exec: function(editor, args) { editor.navigateRight(args.times); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectpagedown",
+ bindKey: "Shift-PageDown",
+ exec: function(editor) { editor.selectPageDown(); },
+ readOnly: true
+}, {
+ name: "pagedown",
+ bindKey: bindKey(null, "Option-PageDown"),
+ exec: function(editor) { editor.scrollPageDown(); },
+ readOnly: true
+}, {
+ name: "gotopagedown",
+ bindKey: bindKey("PageDown", "PageDown|Ctrl-V"),
+ exec: function(editor) { editor.gotoPageDown(); },
+ readOnly: true
+}, {
+ name: "selectpageup",
+ bindKey: "Shift-PageUp",
+ exec: function(editor) { editor.selectPageUp(); },
+ readOnly: true
+}, {
+ name: "pageup",
+ bindKey: bindKey(null, "Option-PageUp"),
+ exec: function(editor) { editor.scrollPageUp(); },
+ readOnly: true
+}, {
+ name: "gotopageup",
+ bindKey: "PageUp",
+ exec: function(editor) { editor.gotoPageUp(); },
+ readOnly: true
+}, {
+ name: "scrollup",
+ bindKey: bindKey("Ctrl-Up", null),
+ exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },
+ readOnly: true
+}, {
+ name: "scrolldown",
+ bindKey: bindKey("Ctrl-Down", null),
+ exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },
+ readOnly: true
+}, {
+ name: "selectlinestart",
+ bindKey: "Shift-Home",
+ exec: function(editor) { editor.getSelection().selectLineStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectlineend",
+ bindKey: "Shift-End",
+ exec: function(editor) { editor.getSelection().selectLineEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "togglerecording",
+ bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
+ exec: function(editor) { editor.commands.toggleRecording(editor); },
+ readOnly: true
+}, {
+ name: "replaymacro",
+ bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
+ exec: function(editor) { editor.commands.replay(editor); },
+ readOnly: true
+}, {
+ name: "jumptomatching",
+ bindKey: bindKey("Ctrl-P", "Ctrl-Shift-P"),
+ exec: function(editor) { editor.jumpToMatching(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selecttomatching",
+ bindKey: bindKey("Ctrl-Shift-P", null),
+ exec: function(editor) { editor.jumpToMatching(true); },
+ readOnly: true
+},
+{
+ name: "cut",
+ exec: function(editor) {
+ var range = editor.getSelectionRange();
+ editor._emit("cut", range);
+
+ if (!editor.selection.isEmpty()) {
+ editor.session.remove(range);
+ editor.clearSelection();
+ }
+ },
+ multiSelectAction: "forEach"
+}, {
+ name: "removeline",
+ bindKey: bindKey("Ctrl-D", "Command-D"),
+ exec: function(editor) { editor.removeLines(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "duplicateSelection",
+ bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"),
+ exec: function(editor) { editor.duplicateSelection(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "sortlines",
+ bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"),
+ exec: function(editor) { editor.sortLines(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "togglecomment",
+ bindKey: bindKey("Ctrl-/", "Command-/"),
+ exec: function(editor) { editor.toggleCommentLines(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "modifyNumberUp",
+ bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"),
+ exec: function(editor) { editor.modifyNumber(1); },
+ multiSelectAction: "forEach"
+}, {
+ name: "modifyNumberDown",
+ bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"),
+ exec: function(editor) { editor.modifyNumber(-1); },
+ multiSelectAction: "forEach"
+}, {
+ name: "replace",
+ bindKey: bindKey("Ctrl-R", "Command-Option-F"),
+ exec: function(editor) {
+ var needle = prompt("Find:", editor.getCopyText());
+ if (!needle)
+ return;
+ var replacement = prompt("Replacement:");
+ if (!replacement)
+ return;
+ editor.replace(replacement, {needle: needle});
+ }
+}, {
+ name: "replaceall",
+ bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"),
+ exec: function(editor) {
+ var needle = prompt("Find:");
+ if (!needle)
+ return;
+ var replacement = prompt("Replacement:");
+ if (!replacement)
+ return;
+ editor.replaceAll(replacement, {needle: needle});
+ }
+}, {
+ name: "undo",
+ bindKey: bindKey("Ctrl-Z", "Command-Z"),
+ exec: function(editor) { editor.undo(); }
+}, {
+ name: "redo",
+ bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
+ exec: function(editor) { editor.redo(); }
+}, {
+ name: "copylinesup",
+ bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"),
+ exec: function(editor) { editor.copyLinesUp(); }
+}, {
+ name: "movelinesup",
+ bindKey: bindKey("Alt-Up", "Option-Up"),
+ exec: function(editor) { editor.moveLinesUp(); }
+}, {
+ name: "copylinesdown",
+ bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"),
+ exec: function(editor) { editor.copyLinesDown(); }
+}, {
+ name: "movelinesdown",
+ bindKey: bindKey("Alt-Down", "Option-Down"),
+ exec: function(editor) { editor.moveLinesDown(); }
+}, {
+ name: "del",
+ bindKey: bindKey("Delete", "Delete|Ctrl-D"),
+ exec: function(editor) { editor.remove("right"); },
+ multiSelectAction: "forEach"
+}, {
+ name: "backspace",
+ bindKey: bindKey(
+ "Command-Backspace|Option-Backspace|Shift-Backspace|Backspace",
+ "Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"
+ ),
+ exec: function(editor) { editor.remove("left"); },
+ multiSelectAction: "forEach"
+}, {
+ name: "removetolinestart",
+ bindKey: bindKey("Alt-Backspace", "Command-Backspace"),
+ exec: function(editor) { editor.removeToLineStart(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "removetolineend",
+ bindKey: bindKey("Alt-Delete", "Ctrl-K"),
+ exec: function(editor) { editor.removeToLineEnd(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "removewordleft",
+ bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
+ exec: function(editor) { editor.removeWordLeft(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "removewordright",
+ bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
+ exec: function(editor) { editor.removeWordRight(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "outdent",
+ bindKey: bindKey("Shift-Tab", "Shift-Tab"),
+ exec: function(editor) { editor.blockOutdent(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "indent",
+ bindKey: bindKey("Tab", "Tab"),
+ exec: function(editor) { editor.indent(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "insertstring",
+ exec: function(editor, str) { editor.insert(str); },
+ multiSelectAction: "forEach"
+}, {
+ name: "inserttext",
+ exec: function(editor, args) {
+ editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
+ },
+ multiSelectAction: "forEach"
+}, {
+ name: "splitline",
+ bindKey: bindKey(null, "Ctrl-O"),
+ exec: function(editor) { editor.splitLine(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "transposeletters",
+ bindKey: bindKey("Ctrl-T", "Ctrl-T"),
+ exec: function(editor) { editor.transposeLetters(); },
+ multiSelectAction: function(editor) {editor.transposeSelections(1); }
+}, {
+ name: "touppercase",
+ bindKey: bindKey("Ctrl-U", "Ctrl-U"),
+ exec: function(editor) { editor.toUpperCase(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "tolowercase",
+ bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"),
+ exec: function(editor) { editor.toLowerCase(); },
+ multiSelectAction: "forEach"
+}];
+
+});
+
+ace.define('ace/undomanager', ['require', 'exports', 'module' ], function(require, exports, module) {
+var UndoManager = function() {
+ this.reset();
+};
+
+(function() {
+ this.execute = function(options) {
+ var deltas = options.args[0];
+ this.$doc = options.args[1];
+ this.$undoStack.push(deltas);
+ this.$redoStack = [];
+ };
+ this.undo = function(dontSelect) {
+ var deltas = this.$undoStack.pop();
+ var undoSelectionRange = null;
+ if (deltas) {
+ undoSelectionRange =
+ this.$doc.undoChanges(deltas, dontSelect);
+ this.$redoStack.push(deltas);
+ }
+ return undoSelectionRange;
+ };
+ this.redo = function(dontSelect) {
+ var deltas = this.$redoStack.pop();
+ var redoSelectionRange = null;
+ if (deltas) {
+ redoSelectionRange =
+ this.$doc.redoChanges(deltas, dontSelect);
+ this.$undoStack.push(deltas);
+ }
+ return redoSelectionRange;
+ };
+ this.reset = function() {
+ this.$undoStack = [];
+ this.$redoStack = [];
+ };
+ this.hasUndo = function() {
+ return this.$undoStack.length > 0;
+ };
+ this.hasRedo = function() {
+ return this.$redoStack.length > 0;
+ };
+
+}).call(UndoManager.prototype);
+
+exports.UndoManager = UndoManager;
+});
+
+ace.define('ace/virtual_renderer', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/event', 'ace/lib/useragent', 'ace/config', 'ace/lib/net', 'ace/layer/gutter', 'ace/layer/marker', 'ace/layer/text', 'ace/layer/cursor', 'ace/scrollbar', 'ace/renderloop', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+var useragent = require("./lib/useragent");
+var config = require("./config");
+var net = require("./lib/net");
+var GutterLayer = require("./layer/gutter").Gutter;
+var MarkerLayer = require("./layer/marker").Marker;
+var TextLayer = require("./layer/text").Text;
+var CursorLayer = require("./layer/cursor").Cursor;
+var ScrollBar = require("./scrollbar").ScrollBar;
+var RenderLoop = require("./renderloop").RenderLoop;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var editorCss = ".ace_editor {\
+position: absolute;\
+overflow: hidden;\
+font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\
+font-size: 12px;\
+}\
+.ace_scroller {\
+position: absolute;\
+overflow: hidden;\
+}\
+.ace_content {\
+position: absolute;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+cursor: text;\
+}\
+.ace_gutter {\
+position: absolute;\
+overflow : hidden;\
+height: 100%;\
+width: auto;\
+cursor: default;\
+z-index: 4;\
+}\
+.ace_gutter-active-line {\
+position: absolute;\
+left: 0;\
+right: 0;\
+}\
+.ace_scroller.ace_scroll-left {\
+box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\
+}\
+.ace_gutter-cell {\
+padding-left: 19px;\
+padding-right: 6px;\
+background-repeat: no-repeat;\
+}\
+.ace_gutter-cell.ace_error {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");\
+background-repeat: no-repeat;\
+background-position: 2px center;\
+}\
+.ace_gutter-cell.ace_warning {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");\
+background-position: 2px center;\
+}\
+.ace_gutter-cell.ace_info {\
+background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");\
+background-position: 2px center;\
+}\
+.ace_dark .ace_gutter-cell.ace_info {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");\
+}\
+.ace_scrollbar {\
+position: absolute;\
+overflow-x: hidden;\
+overflow-y: scroll;\
+right: 0;\
+}\
+.ace_scrollbar-inner {\
+position: absolute;\
+width: 1px;\
+left: 0;\
+}\
+.ace_print-margin {\
+position: absolute;\
+height: 100%;\
+}\
+.ace_text-input {\
+position: absolute;\
+z-index: 0;\
+width: 0.5em;\
+height: 1em;\
+opacity: 0;\
+background: transparent;\
+-moz-appearance: none;\
+appearance: none;\
+border: none;\
+resize: none;\
+outline: none;\
+overflow: hidden;\
+}\
+.ace_text-input.ace_composition {\
+background: #fff;\
+color: #000;\
+z-index: 1000;\
+opacity: 1;\
+border: solid lightgray 1px;\
+margin: -1px\
+}\
+.ace_layer {\
+z-index: 1;\
+position: absolute;\
+overflow: hidden;\
+white-space: nowrap;\
+height: 100%;\
+width: 100%;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+/* setting pointer-events: auto; on node under the mouse, which changes\
+during scroll, will break mouse wheel scrolling in Safari */\
+pointer-events: none;\
+}\
+.ace_gutter-layer {\
+position: relative;\
+width: auto;\
+text-align: right;\
+pointer-events: auto;\
+}\
+.ace_text-layer {\
+color: black;\
+font: inherit !important;\
+}\
+.ace_cjk {\
+display: inline-block;\
+text-align: center;\
+}\
+.ace_cursor-layer {\
+z-index: 4;\
+}\
+.ace_cursor {\
+z-index: 4;\
+position: absolute;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+}\
+.ace_hidden-cursors .ace_cursor {\
+opacity: 0.2;\
+}\
+.ace_smooth-blinking .ace_cursor {\
+-moz-transition: opacity 0.18s;\
+-webkit-transition: opacity 0.18s;\
+-o-transition: opacity 0.18s;\
+-ms-transition: opacity 0.18s;\
+transition: opacity 0.18s;\
+}\
+.ace_cursor[style*=\"opacity: 0\"]{\
+-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\
+}\
+.ace_editor.ace_multiselect .ace_cursor {\
+border-left-width: 1px;\
+}\
+.ace_line {\
+white-space: nowrap;\
+}\
+.ace_marker-layer .ace_step {\
+position: absolute;\
+z-index: 3;\
+}\
+.ace_marker-layer .ace_selection {\
+position: absolute;\
+z-index: 5;\
+}\
+.ace_marker-layer .ace_bracket {\
+position: absolute;\
+z-index: 6;\
+}\
+.ace_marker-layer .ace_active-line {\
+position: absolute;\
+z-index: 2;\
+}\
+.ace_marker-layer .ace_selected-word {\
+position: absolute;\
+z-index: 4;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+}\
+.ace_line .ace_fold {\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+display: inline-block;\
+height: 11px;\
+margin-top: -2px;\
+vertical-align: middle;\
+background-image:\
+url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\
+url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");\
+background-repeat: no-repeat, repeat-x;\
+background-position: center center, top left;\
+color: transparent;\
+border: 1px solid black;\
+-moz-border-radius: 2px;\
+-webkit-border-radius: 2px;\
+border-radius: 2px;\
+cursor: pointer;\
+pointer-events: auto;\
+}\
+.ace_dark .ace_fold {\
+}\
+.ace_fold:hover{\
+background-image:\
+url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\
+url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");\
+background-repeat: no-repeat, repeat-x;\
+background-position: center center, top left;\
+}\
+.ace_editor.ace_dragging .ace_content {\
+cursor: move;\
+}\
+.ace_gutter-tooltip {\
+background-color: #FFFFD5;\
+border: 1px solid gray;\
+box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);\
+color: black;\
+display: inline-block;\
+padding: 4px;\
+position: absolute;\
+z-index: 300;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+cursor: default;\
+white-space: pre-line;\
+word-wrap: break-word;\
+}\
+.ace_folding-enabled > .ace_gutter-cell {\
+padding-right: 13px;\
+}\
+.ace_fold-widget {\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+margin: 0 -12px 0 1px;\
+display: inline-block;\
+width: 11px;\
+vertical-align: top;\
+background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");\
+background-repeat: no-repeat;\
+background-position: center;\
+border-radius: 3px;\
+border: 1px solid transparent;\
+}\
+.ace_fold-widget.ace_end {\
+background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");\
+}\
+.ace_fold-widget.ace_closed {\
+background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");\
+}\
+.ace_fold-widget:hover {\
+border: 1px solid rgba(0, 0, 0, 0.3);\
+background-color: rgba(255, 255, 255, 0.2);\
+-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\
+-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\
+}\
+.ace_fold-widget:active {\
+border: 1px solid rgba(0, 0, 0, 0.4);\
+background-color: rgba(0, 0, 0, 0.05);\
+-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\
+-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\
+}\
+/**\
+* Dark version for fold widgets\
+*/\
+.ace_dark .ace_fold-widget {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\
+}\
+.ace_dark .ace_fold-widget.ace_end {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\
+}\
+.ace_dark .ace_fold-widget.ace_closed {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\
+}\
+.ace_dark .ace_fold-widget:hover {\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
+background-color: rgba(255, 255, 255, 0.1);\
+}\
+.ace_dark .ace_fold-widget:active {\
+-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
+-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
+}\
+.ace_fold-widget.ace_invalid {\
+background-color: #FFB4B4;\
+border-color: #DE5555;\
+}\
+.ace_fade-fold-widgets .ace_fold-widget {\
+-moz-transition: opacity 0.4s ease 0.05s;\
+-webkit-transition: opacity 0.4s ease 0.05s;\
+-o-transition: opacity 0.4s ease 0.05s;\
+-ms-transition: opacity 0.4s ease 0.05s;\
+transition: opacity 0.4s ease 0.05s;\
+opacity: 0;\
+}\
+.ace_fade-fold-widgets:hover .ace_fold-widget {\
+-moz-transition: opacity 0.05s ease 0.05s;\
+-webkit-transition: opacity 0.05s ease 0.05s;\
+-o-transition: opacity 0.05s ease 0.05s;\
+-ms-transition: opacity 0.05s ease 0.05s;\
+transition: opacity 0.05s ease 0.05s;\
+opacity:1;\
+}\
+.ace_underline {\
+text-decoration: underline;\
+}\
+.ace_bold {\
+font-weight: bold;\
+}\
+.ace_nobold .ace_bold {\
+font-weight: normal;\
+}\
+.ace_italic {\
+font-style: italic;\
+}\
+";
+
+dom.importCssString(editorCss, "ace_editor");
+
+var VirtualRenderer = function(container, theme) {
+ var _self = this;
+
+ this.container = container;
+ this.$keepTextAreaAtCursor = !useragent.isIE;
+
+ dom.addCssClass(container, "ace_editor");
+
+ this.setTheme(theme);
+
+ this.$gutter = dom.createElement("div");
+ this.$gutter.className = "ace_gutter";
+ this.container.appendChild(this.$gutter);
+
+ this.scroller = dom.createElement("div");
+ this.scroller.className = "ace_scroller";
+ this.container.appendChild(this.scroller);
+
+ this.content = dom.createElement("div");
+ this.content.className = "ace_content";
+ this.scroller.appendChild(this.content);
+
+ this.setHighlightGutterLine(true);
+ this.$gutterLayer = new GutterLayer(this.$gutter);
+ this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this));
+
+ this.$markerBack = new MarkerLayer(this.content);
+
+ var textLayer = this.$textLayer = new TextLayer(this.content);
+ this.canvas = textLayer.element;
+
+ this.$markerFront = new MarkerLayer(this.content);
+
+ this.$cursorLayer = new CursorLayer(this.content);
+ this.$horizScroll = false;
+ this.$horizScrollAlwaysVisible = false;
+
+ this.$animatedScroll = false;
+
+ this.scrollBar = new ScrollBar(container);
+ this.scrollBar.addEventListener("scroll", function(e) {
+ if (!_self.$inScrollAnimation)
+ _self.session.setScrollTop(e.data);
+ });
+
+ this.scrollTop = 0;
+ this.scrollLeft = 0;
+
+ event.addListener(this.scroller, "scroll", function() {
+ var scrollLeft = _self.scroller.scrollLeft;
+ _self.scrollLeft = scrollLeft;
+ _self.session.setScrollLeft(scrollLeft);
+ });
+
+ this.cursorPos = {
+ row : 0,
+ column : 0
+ };
+
+ this.$textLayer.addEventListener("changeCharacterSize", function() {
+ _self.updateCharacterSize();
+ _self.onResize(true);
+ });
+
+ this.$size = {
+ width: 0,
+ height: 0,
+ scrollerHeight: 0,
+ scrollerWidth: 0
+ };
+
+ this.layerConfig = {
+ width : 1,
+ padding : 0,
+ firstRow : 0,
+ firstRowScreen: 0,
+ lastRow : 0,
+ lineHeight : 1,
+ characterWidth : 1,
+ minHeight : 1,
+ maxHeight : 1,
+ offset : 0,
+ height : 1
+ };
+
+ this.$loop = new RenderLoop(
+ this.$renderChanges.bind(this),
+ this.container.ownerDocument.defaultView
+ );
+ this.$loop.schedule(this.CHANGE_FULL);
+
+ this.updateCharacterSize();
+ this.setPadding(4);
+};
+
+(function() {
+ this.showGutter = true;
+
+ this.CHANGE_CURSOR = 1;
+ this.CHANGE_MARKER = 2;
+ this.CHANGE_GUTTER = 4;
+ this.CHANGE_SCROLL = 8;
+ this.CHANGE_LINES = 16;
+ this.CHANGE_TEXT = 32;
+ this.CHANGE_SIZE = 64;
+ this.CHANGE_MARKER_BACK = 128;
+ this.CHANGE_MARKER_FRONT = 256;
+ this.CHANGE_FULL = 512;
+ this.CHANGE_H_SCROLL = 1024;
+
+ oop.implement(this, EventEmitter);
+
+ this.updateCharacterSize = function() {
+ if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {
+ this.$allowBoldFonts = this.$textLayer.allowBoldFonts;
+ this.setStyle("ace_nobold", !this.$allowBoldFonts);
+ }
+
+ this.characterWidth = this.$textLayer.getCharacterWidth();
+ this.lineHeight = this.$textLayer.getLineHeight();
+ this.$updatePrintMargin();
+ };
+ this.setSession = function(session) {
+ this.session = session;
+
+ this.scroller.className = "ace_scroller";
+
+ this.$cursorLayer.setSession(session);
+ this.$markerBack.setSession(session);
+ this.$markerFront.setSession(session);
+ this.$gutterLayer.setSession(session);
+ this.$textLayer.setSession(session);
+ this.$loop.schedule(this.CHANGE_FULL);
+
+ };
+ this.updateLines = function(firstRow, lastRow) {
+ if (lastRow === undefined)
+ lastRow = Infinity;
+
+ if (!this.$changedLines) {
+ this.$changedLines = {
+ firstRow: firstRow,
+ lastRow: lastRow
+ };
+ }
+ else {
+ if (this.$changedLines.firstRow > firstRow)
+ this.$changedLines.firstRow = firstRow;
+
+ if (this.$changedLines.lastRow < lastRow)
+ this.$changedLines.lastRow = lastRow;
+ }
+
+ if (this.$changedLines.firstRow > this.layerConfig.lastRow ||
+ this.$changedLines.lastRow < this.layerConfig.firstRow)
+ return;
+ this.$loop.schedule(this.CHANGE_LINES);
+ };
+
+ this.onChangeTabSize = function() {
+ this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);
+ this.$textLayer.onChangeTabSize();
+ };
+ this.updateText = function() {
+ this.$loop.schedule(this.CHANGE_TEXT);
+ };
+ this.updateFull = function(force) {
+ if (force){
+ this.$renderChanges(this.CHANGE_FULL, true);
+ }
+ else {
+ this.$loop.schedule(this.CHANGE_FULL);
+ }
+ };
+ this.updateFontSize = function() {
+ this.$textLayer.checkForSizeChanges();
+ };
+ this.onResize = function(force, gutterWidth, width, height) {
+ var changes = this.CHANGE_SIZE;
+ var size = this.$size;
+
+ if (this.resizing > 2)
+ return;
+ else if (this.resizing > 1)
+ this.resizing++;
+ else
+ this.resizing = force ? 1 : 0;
+
+ if (!height)
+ height = dom.getInnerHeight(this.container);
+ if (force || size.height != height) {
+ size.height = height;
+
+ this.scroller.style.height = height + "px";
+ size.scrollerHeight = this.scroller.clientHeight;
+ this.scrollBar.setHeight(size.scrollerHeight);
+
+ if (this.session) {
+ this.session.setScrollTop(this.getScrollTop());
+ changes = changes | this.CHANGE_FULL;
+ }
+ }
+
+ if (!width)
+ width = dom.getInnerWidth(this.container);
+ if (force || this.resizing > 1 || size.width != width) {
+ size.width = width;
+
+ var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
+ this.scroller.style.left = gutterWidth + "px";
+ size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBar.getWidth());
+ this.scroller.style.right = this.scrollBar.getWidth() + "px";
+
+ if (this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
+ changes = changes | this.CHANGE_FULL;
+ }
+
+ if (force)
+ this.$renderChanges(changes, true);
+ else
+ this.$loop.schedule(changes);
+
+ if (force)
+ delete this.resizing;
+ };
+
+ this.onGutterResize = function() {
+ var width = this.$size.width;
+ var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
+ this.scroller.style.left = gutterWidth + "px";
+ this.$size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBar.getWidth());
+
+ if (this.session.getUseWrapMode() && this.adjustWrapLimit())
+ this.$loop.schedule(this.CHANGE_FULL);
+ };
+ this.adjustWrapLimit = function() {
+ var availableWidth = this.$size.scrollerWidth - this.$padding * 2;
+ var limit = Math.floor(availableWidth / this.characterWidth);
+ return this.session.adjustWrapLimit(limit);
+ };
+ this.setAnimatedScroll = function(shouldAnimate){
+ this.$animatedScroll = shouldAnimate;
+ };
+ this.getAnimatedScroll = function() {
+ return this.$animatedScroll;
+ };
+ this.setShowInvisibles = function(showInvisibles) {
+ if (this.$textLayer.setShowInvisibles(showInvisibles))
+ this.$loop.schedule(this.CHANGE_TEXT);
+ };
+ this.getShowInvisibles = function() {
+ return this.$textLayer.showInvisibles;
+ };
+
+ this.getDisplayIndentGuides = function() {
+ return this.$textLayer.displayIndentGuides;
+ };
+
+ this.setDisplayIndentGuides = function(display) {
+ if (this.$textLayer.setDisplayIndentGuides(display))
+ this.$loop.schedule(this.CHANGE_TEXT);
+ };
+
+ this.$showPrintMargin = true;
+ this.setShowPrintMargin = function(showPrintMargin) {
+ this.$showPrintMargin = showPrintMargin;
+ this.$updatePrintMargin();
+ };
+ this.getShowPrintMargin = function() {
+ return this.$showPrintMargin;
+ };
+
+ this.$printMarginColumn = 80;
+ this.setPrintMarginColumn = function(showPrintMargin) {
+ this.$printMarginColumn = showPrintMargin;
+ this.$updatePrintMargin();
+ };
+ this.getPrintMarginColumn = function() {
+ return this.$printMarginColumn;
+ };
+ this.getShowGutter = function(){
+ return this.showGutter;
+ };
+ this.setShowGutter = function(show){
+ if(this.showGutter === show)
+ return;
+ this.$gutter.style.display = show ? "block" : "none";
+ this.showGutter = show;
+ this.onResize(true);
+ };
+
+ this.getFadeFoldWidgets = function(){
+ return dom.hasCssClass(this.$gutter, "ace_fade-fold-widgets");
+ };
+
+ this.setFadeFoldWidgets = function(show) {
+ if (show)
+ dom.addCssClass(this.$gutter, "ace_fade-fold-widgets");
+ else
+ dom.removeCssClass(this.$gutter, "ace_fade-fold-widgets");
+ };
+
+ this.$highlightGutterLine = false;
+ this.setHighlightGutterLine = function(shouldHighlight) {
+ if (this.$highlightGutterLine == shouldHighlight)
+ return;
+ this.$highlightGutterLine = shouldHighlight;
+
+ if (!this.$gutterLineHighlight) {
+ this.$gutterLineHighlight = dom.createElement("div");
+ this.$gutterLineHighlight.className = "ace_gutter-active-line";
+ this.$gutter.appendChild(this.$gutterLineHighlight);
+ return;
+ }
+
+ this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none";
+ if (this.$cursorLayer.$pixelPos)
+ this.$updateGutterLineHighlight();
+ };
+
+ this.getHighlightGutterLine = function() {
+ return this.$highlightGutterLine;
+ };
+
+ this.$updateGutterLineHighlight = function() {
+ this.$gutterLineHighlight.style.top = this.$cursorLayer.$pixelPos.top - this.layerConfig.offset + "px";
+ this.$gutterLineHighlight.style.height = this.layerConfig.lineHeight + "px";
+ };
+
+ this.$updatePrintMargin = function() {
+ if (!this.$showPrintMargin && !this.$printMarginEl)
+ return;
+
+ if (!this.$printMarginEl) {
+ var containerEl = dom.createElement("div");
+ containerEl.className = "ace_layer ace_print-margin-layer";
+ this.$printMarginEl = dom.createElement("div");
+ this.$printMarginEl.className = "ace_print-margin";
+ containerEl.appendChild(this.$printMarginEl);
+ this.content.insertBefore(containerEl, this.content.firstChild);
+ }
+
+ var style = this.$printMarginEl.style;
+ style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px";
+ style.visibility = this.$showPrintMargin ? "visible" : "hidden";
+ };
+ this.getContainerElement = function() {
+ return this.container;
+ };
+ this.getMouseEventTarget = function() {
+ return this.content;
+ };
+ this.getTextAreaContainer = function() {
+ return this.container;
+ };
+ this.$moveTextAreaToCursor = function() {
+ if (!this.$keepTextAreaAtCursor)
+ return;
+
+ var posTop = this.$cursorLayer.$pixelPos.top;
+ var posLeft = this.$cursorLayer.$pixelPos.left;
+ posTop -= this.layerConfig.offset;
+
+ if (posTop < 0 || posTop > this.layerConfig.height - this.lineHeight)
+ return;
+
+ var w = this.characterWidth;
+ if (this.$composition)
+ w += this.textarea.scrollWidth;
+ posLeft -= this.scrollLeft;
+ if (posLeft > this.$size.scrollerWidth - w)
+ posLeft = this.$size.scrollerWidth - w;
+
+ if (this.showGutter)
+ posLeft += this.$gutterLayer.gutterWidth;
+
+ this.textarea.style.height = this.lineHeight + "px";
+ this.textarea.style.width = w + "px";
+ this.textarea.style.left = posLeft + "px";
+ this.textarea.style.top = posTop - 1 + "px";
+ };
+ this.getFirstVisibleRow = function() {
+ return this.layerConfig.firstRow;
+ };
+ this.getFirstFullyVisibleRow = function() {
+ return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
+ };
+ this.getLastFullyVisibleRow = function() {
+ var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
+ return this.layerConfig.firstRow - 1 + flint;
+ };
+ this.getLastVisibleRow = function() {
+ return this.layerConfig.lastRow;
+ };
+
+ this.$padding = null;
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ this.$textLayer.setPadding(padding);
+ this.$cursorLayer.setPadding(padding);
+ this.$markerFront.setPadding(padding);
+ this.$markerBack.setPadding(padding);
+ this.$loop.schedule(this.CHANGE_FULL);
+ this.$updatePrintMargin();
+ };
+ this.getHScrollBarAlwaysVisible = function() {
+ return this.$horizScrollAlwaysVisible;
+ };
+ this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
+ if (this.$horizScrollAlwaysVisible != alwaysVisible) {
+ this.$horizScrollAlwaysVisible = alwaysVisible;
+ if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ }
+ };
+
+ this.$updateScrollBar = function() {
+ this.scrollBar.setInnerHeight(this.layerConfig.maxHeight);
+ this.scrollBar.setScrollTop(this.scrollTop);
+ };
+
+ this.$renderChanges = function(changes, force) {
+ if (!force && (!changes || !this.session || !this.container.offsetWidth))
+ return;
+ if (changes & this.CHANGE_FULL ||
+ changes & this.CHANGE_SIZE ||
+ changes & this.CHANGE_TEXT ||
+ changes & this.CHANGE_LINES ||
+ changes & this.CHANGE_SCROLL
+ )
+ this.$computeLayerConfig();
+ if (changes & this.CHANGE_H_SCROLL) {
+ this.scroller.scrollLeft = this.scrollLeft;
+ var scrollLeft = this.scroller.scrollLeft;
+ this.scrollLeft = scrollLeft;
+ this.session.setScrollLeft(scrollLeft);
+
+ this.scroller.className = this.scrollLeft == 0 ? "ace_scroller" : "ace_scroller ace_scroll-left";
+ }
+ if (changes & this.CHANGE_FULL) {
+ this.$textLayer.checkForSizeChanges();
+ this.$updateScrollBar();
+ this.$textLayer.update(this.layerConfig);
+ if (this.showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ this.$markerBack.update(this.layerConfig);
+ this.$markerFront.update(this.layerConfig);
+ this.$cursorLayer.update(this.layerConfig);
+ this.$moveTextAreaToCursor();
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ return;
+ }
+ if (changes & this.CHANGE_SCROLL) {
+ this.$updateScrollBar();
+ if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
+ this.$textLayer.update(this.layerConfig);
+ else
+ this.$textLayer.scrollLines(this.layerConfig);
+
+ if (this.showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ this.$markerBack.update(this.layerConfig);
+ this.$markerFront.update(this.layerConfig);
+ this.$cursorLayer.update(this.layerConfig);
+ this.$moveTextAreaToCursor();
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ return;
+ }
+
+ if (changes & this.CHANGE_TEXT) {
+ this.$textLayer.update(this.layerConfig);
+ if (this.showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ }
+ else if (changes & this.CHANGE_LINES) {
+ if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ }
+ else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {
+ if (this.showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ }
+
+ if (changes & this.CHANGE_CURSOR) {
+ this.$cursorLayer.update(this.layerConfig);
+ this.$moveTextAreaToCursor();
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ }
+
+ if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
+ this.$markerFront.update(this.layerConfig);
+ }
+
+ if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
+ this.$markerBack.update(this.layerConfig);
+ }
+
+ if (changes & this.CHANGE_SIZE)
+ this.$updateScrollBar();
+ };
+
+ this.$computeLayerConfig = function() {
+ var session = this.session;
+
+ var offset = this.scrollTop % this.lineHeight;
+ var minHeight = this.$size.scrollerHeight + this.lineHeight;
+
+ var longestLine = this.$getLongestLine();
+
+ var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
+ var horizScrollChanged = this.$horizScroll !== horizScroll;
+ this.$horizScroll = horizScroll;
+ if (horizScrollChanged) {
+ this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
+ if (!horizScroll)
+ this.session.setScrollLeft(0);
+ }
+ var maxHeight = this.session.getScreenLength() * this.lineHeight;
+ this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
+
+ var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
+ var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
+ var lastRow = firstRow + lineCount;
+ var firstRowScreen, firstRowHeight;
+ var lineHeight = this.lineHeight;
+ firstRow = session.screenToDocumentRow(firstRow, 0);
+ var foldLine = session.getFoldLine(firstRow);
+ if (foldLine) {
+ firstRow = foldLine.start.row;
+ }
+
+ firstRowScreen = session.documentToScreenRow(firstRow, 0);
+ firstRowHeight = session.getRowLength(firstRow) * lineHeight;
+
+ lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
+ minHeight = this.$size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +
+ firstRowHeight;
+
+ offset = this.scrollTop - firstRowScreen * lineHeight;
+
+ this.layerConfig = {
+ width : longestLine,
+ padding : this.$padding,
+ firstRow : firstRow,
+ firstRowScreen: firstRowScreen,
+ lastRow : lastRow,
+ lineHeight : lineHeight,
+ characterWidth : this.characterWidth,
+ minHeight : minHeight,
+ maxHeight : maxHeight,
+ offset : offset,
+ height : this.$size.scrollerHeight
+ };
+
+ this.$gutterLayer.element.style.marginTop = (-offset) + "px";
+ this.content.style.marginTop = (-offset) + "px";
+ this.content.style.width = longestLine + 2 * this.$padding + "px";
+ this.content.style.height = minHeight + "px";
+ if (horizScrollChanged)
+ this.onResize(true);
+ };
+
+ this.$updateLines = function() {
+ var firstRow = this.$changedLines.firstRow;
+ var lastRow = this.$changedLines.lastRow;
+ this.$changedLines = null;
+
+ var layerConfig = this.layerConfig;
+
+ if (firstRow > layerConfig.lastRow + 1) { return; }
+ if (lastRow < layerConfig.firstRow) { return; }
+ if (lastRow === Infinity) {
+ if (this.showGutter)
+ this.$gutterLayer.update(layerConfig);
+ this.$textLayer.update(layerConfig);
+ return;
+ }
+ this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
+ return true;
+ };
+
+ this.$getLongestLine = function() {
+ var charCount = this.session.getScreenWidth();
+ if (this.$textLayer.showInvisibles)
+ charCount += 1;
+
+ return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));
+ };
+ this.updateFrontMarkers = function() {
+ this.$markerFront.setMarkers(this.session.getMarkers(true));
+ this.$loop.schedule(this.CHANGE_MARKER_FRONT);
+ };
+ this.updateBackMarkers = function() {
+ this.$markerBack.setMarkers(this.session.getMarkers());
+ this.$loop.schedule(this.CHANGE_MARKER_BACK);
+ };
+ this.addGutterDecoration = function(row, className){
+ this.$gutterLayer.addGutterDecoration(row, className);
+ };
+ this.removeGutterDecoration = function(row, className){
+ this.$gutterLayer.removeGutterDecoration(row, className);
+ };
+ this.updateBreakpoints = function(rows) {
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ };
+ this.setAnnotations = function(annotations) {
+ this.$gutterLayer.setAnnotations(annotations);
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ };
+ this.updateCursor = function() {
+ this.$loop.schedule(this.CHANGE_CURSOR);
+ };
+ this.hideCursor = function() {
+ this.$cursorLayer.hideCursor();
+ };
+ this.showCursor = function() {
+ this.$cursorLayer.showCursor();
+ };
+
+ this.scrollSelectionIntoView = function(anchor, lead, offset) {
+ this.scrollCursorIntoView(anchor, offset);
+ this.scrollCursorIntoView(lead, offset);
+ };
+ this.scrollCursorIntoView = function(cursor, offset) {
+ if (this.$size.scrollerHeight === 0)
+ return;
+
+ var pos = this.$cursorLayer.getPixelPosition(cursor);
+
+ var left = pos.left;
+ var top = pos.top;
+
+ if (this.scrollTop > top) {
+ if (offset)
+ top -= offset * this.$size.scrollerHeight;
+ this.session.setScrollTop(top);
+ } else if (this.scrollTop + this.$size.scrollerHeight < top + this.lineHeight) {
+ if (offset)
+ top += offset * this.$size.scrollerHeight;
+ this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
+ }
+
+ var scrollLeft = this.scrollLeft;
+
+ if (scrollLeft > left) {
+ if (left < this.$padding + 2 * this.layerConfig.characterWidth)
+ left = 0;
+ this.session.setScrollLeft(left);
+ } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
+ this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
+ }
+ };
+ this.getScrollTop = function() {
+ return this.session.getScrollTop();
+ };
+ this.getScrollLeft = function() {
+ return this.session.getScrollLeft();
+ };
+ this.getScrollTopRow = function() {
+ return this.scrollTop / this.lineHeight;
+ };
+ this.getScrollBottomRow = function() {
+ return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
+ };
+ this.scrollToRow = function(row) {
+ this.session.setScrollTop(row * this.lineHeight);
+ };
+
+ this.alignCursor = function(cursor, alignment) {
+ if (typeof cursor == "number")
+ cursor = {row: cursor, column: 0};
+
+ var pos = this.$cursorLayer.getPixelPosition(cursor);
+ var h = this.$size.scrollerHeight - this.lineHeight;
+ var offset = pos.top - h * (alignment || 0);
+
+ this.session.setScrollTop(offset);
+ return offset;
+ };
+
+ this.STEPS = 8;
+ this.$calcSteps = function(fromValue, toValue){
+ var i = 0;
+ var l = this.STEPS;
+ var steps = [];
+
+ var func = function(t, x_min, dx) {
+ return dx * (Math.pow(t - 1, 3) + 1) + x_min;
+ };
+
+ for (i = 0; i < l; ++i)
+ steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));
+
+ return steps;
+ };
+ this.scrollToLine = function(line, center, animate, callback) {
+ var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
+ var offset = pos.top;
+ if (center)
+ offset -= this.$size.scrollerHeight / 2;
+
+ var initialScroll = this.scrollTop;
+ this.session.setScrollTop(offset);
+ if (animate !== false)
+ this.animateScrolling(initialScroll, callback);
+ };
+
+ this.animateScrolling = function(fromValue, callback) {
+ var toValue = this.scrollTop;
+ if (this.$animatedScroll && Math.abs(fromValue - toValue) < 100000) {
+ var _self = this;
+ var steps = _self.$calcSteps(fromValue, toValue);
+ this.$inScrollAnimation = true;
+
+ clearInterval(this.$timer);
+
+ _self.session.setScrollTop(steps.shift());
+ this.$timer = setInterval(function() {
+ if (steps.length) {
+ _self.session.setScrollTop(steps.shift());
+ _self.session.$scrollTop = toValue;
+ } else if (toValue != null) {
+ _self.session.$scrollTop = -1;
+ _self.session.setScrollTop(toValue);
+ toValue = null;
+ } else {
+ _self.$timer = clearInterval(_self.$timer);
+ _self.$inScrollAnimation = false;
+ callback && callback();
+ }
+ }, 10);
+ }
+ };
+ this.scrollToY = function(scrollTop) {
+ if (this.scrollTop !== scrollTop) {
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ this.scrollTop = scrollTop;
+ }
+ };
+ this.scrollToX = function(scrollLeft) {
+ if (scrollLeft < 0)
+ scrollLeft = 0;
+
+ if (this.scrollLeft !== scrollLeft)
+ this.scrollLeft = scrollLeft;
+ this.$loop.schedule(this.CHANGE_H_SCROLL);
+ };
+ this.scrollBy = function(deltaX, deltaY) {
+ deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);
+ deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);
+ };
+ this.isScrollableBy = function(deltaX, deltaY) {
+ if (deltaY < 0 && this.session.getScrollTop() > 0)
+ return true;
+ if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight < this.layerConfig.maxHeight)
+ return true;
+ };
+
+ this.pixelToScreenCoordinates = function(x, y) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+
+ var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth;
+ var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);
+ var col = Math.round(offset);
+
+ return {row: row, column: col, side: offset - col > 0 ? 1 : -1};
+ };
+
+ this.screenToTextCoordinates = function(x, y) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+
+ var col = Math.round(
+ (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth
+ );
+ var row = Math.floor(
+ (y + this.scrollTop - canvasPos.top) / this.lineHeight
+ );
+
+ return this.session.screenToDocumentPosition(row, Math.max(col, 0));
+ };
+ this.textToScreenCoordinates = function(row, column) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+ var pos = this.session.documentToScreenPosition(row, column);
+
+ var x = this.$padding + Math.round(pos.column * this.characterWidth);
+ var y = pos.row * this.lineHeight;
+
+ return {
+ pageX: canvasPos.left + x - this.scrollLeft,
+ pageY: canvasPos.top + y - this.scrollTop
+ };
+ };
+ this.visualizeFocus = function() {
+ dom.addCssClass(this.container, "ace_focus");
+ };
+ this.visualizeBlur = function() {
+ dom.removeCssClass(this.container, "ace_focus");
+ };
+ this.showComposition = function(position) {
+ if (!this.$composition)
+ this.$composition = {
+ keepTextAreaAtCursor: this.$keepTextAreaAtCursor,
+ cssText: this.textarea.style.cssText
+ };
+
+ this.$keepTextAreaAtCursor = true;
+ dom.addCssClass(this.textarea, "ace_composition");
+ this.textarea.style.cssText = "";
+ this.$moveTextAreaToCursor();
+ };
+ this.setCompositionText = function(text) {
+ this.$moveTextAreaToCursor();
+ };
+ this.hideComposition = function() {
+ if (!this.$composition)
+ return;
+
+ dom.removeCssClass(this.textarea, "ace_composition");
+ this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;
+ this.textarea.style.cssText = this.$composition.cssText;
+ this.$composition = null;
+ };
+
+ this._loadTheme = function(name, callback) {
+ if (!config.get("packaged"))
+ return callback();
+
+ net.loadScript(config.moduleUrl(name, "theme"), callback);
+ };
+ this.setTheme = function(theme) {
+ var _self = this;
+
+ this.$themeValue = theme;
+ _self._dispatchEvent('themeChange',{theme:theme});
+
+ if (!theme || typeof theme == "string") {
+ var moduleName = theme || "ace/theme/textmate";
+
+ var module;
+ try {
+ module = require(moduleName);
+ } catch (e) {};
+ if (module)
+ return afterLoad(module);
+
+ _self._loadTheme(moduleName, function() {
+ require([moduleName], function(module) {
+ if (_self.$themeValue !== theme)
+ return;
+
+ afterLoad(module);
+ });
+ });
+ } else {
+ afterLoad(theme);
+ }
+
+ function afterLoad(theme) {
+ dom.importCssString(
+ theme.cssText,
+ theme.cssClass,
+ _self.container.ownerDocument
+ );
+
+ if (_self.theme)
+ dom.removeCssClass(_self.container, _self.theme.cssClass);
+ _self.$theme = theme.cssClass;
+
+ _self.theme = theme;
+ dom.addCssClass(_self.container, theme.cssClass);
+ dom.setCssClass(_self.container, "ace_dark", theme.isDark);
+
+ var padding = theme.padding || 4;
+ if (_self.$padding && padding != _self.$padding)
+ _self.setPadding(padding);
+ if (_self.$size) {
+ _self.$size.width = 0;
+ _self.onResize();
+ }
+
+ _self._dispatchEvent('themeLoaded',{theme:theme});
+ }
+ };
+ this.getTheme = function() {
+ return this.$themeValue;
+ };
+ this.setStyle = function setStyle(style, include) {
+ dom.setCssClass(this.container, style, include != false);
+ };
+ this.unsetStyle = function unsetStyle(style) {
+ dom.removeCssClass(this.container, style);
+ };
+ this.destroy = function() {
+ this.$textLayer.destroy();
+ this.$cursorLayer.destroy();
+ };
+
+}).call(VirtualRenderer.prototype);
+
+exports.VirtualRenderer = VirtualRenderer;
+});
+
+ace.define('ace/layer/gutter', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var dom = require("../lib/dom");
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var Gutter = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_gutter-layer";
+ parentEl.appendChild(this.element);
+ this.setShowFoldWidgets(this.$showFoldWidgets);
+
+ this.gutterWidth = 0;
+
+ this.$annotations = [];
+ this.$updateAnnotations = this.$updateAnnotations.bind(this);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.setSession = function(session) {
+ if (this.session)
+ this.session.removeEventListener("change", this.$updateAnnotations);
+ this.session = session;
+ session.on("change", this.$updateAnnotations);
+ };
+
+ this.addGutterDecoration = function(row, className){
+ if (window.console)
+ console.warn && console.warn("deprecated use session.addGutterDecoration");
+ this.session.addGutterDecoration(row, className);
+ };
+
+ this.removeGutterDecoration = function(row, className){
+ if (window.console)
+ console.warn && console.warn("deprecated use session.removeGutterDecoration");
+ this.session.removeGutterDecoration(row, className);
+ };
+
+ this.setAnnotations = function(annotations) {
+ this.$annotations = []
+ var rowInfo, row;
+ for (var i = 0; i < annotations.length; i++) {
+ var annotation = annotations[i];
+ var row = annotation.row;
+ var rowInfo = this.$annotations[row];
+ if (!rowInfo)
+ rowInfo = this.$annotations[row] = {text: []};
+
+ var annoText = annotation.text;
+ annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || "";
+
+ if (rowInfo.text.indexOf(annoText) === -1)
+ rowInfo.text.push(annoText);
+
+ var type = annotation.type;
+ if (type == "error")
+ rowInfo.className = " ace_error";
+ else if (type == "warning" && rowInfo.className != " ace_error")
+ rowInfo.className = " ace_warning";
+ else if (type == "info" && (!rowInfo.className))
+ rowInfo.className = " ace_info";
+ }
+ };
+
+ this.$updateAnnotations = function (e) {
+ if (!this.$annotations.length)
+ return;
+ var delta = e.data;
+ var range = delta.range;
+ var firstRow = range.start.row;
+ var len = range.end.row - firstRow;
+ if (len === 0) {
+ } else if (delta.action == "removeText" || delta.action == "removeLines") {
+ this.$annotations.splice(firstRow, len + 1, null);
+ } else {
+ var args = Array(len + 1);
+ args.unshift(firstRow, 1);
+ this.$annotations.splice.apply(this.$annotations, args);
+ }
+ };
+
+ this.update = function(config) {
+ var emptyAnno = {className: ""};
+ var html = [];
+ var i = config.firstRow;
+ var lastRow = config.lastRow;
+ var fold = this.session.getNextFoldLine(i);
+ var foldStart = fold ? fold.start.row : Infinity;
+ var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets;
+ var breakpoints = this.session.$breakpoints;
+ var decorations = this.session.$decorations;
+ var lastLineNumber = 0;
+
+ while (true) {
+ if(i > foldStart) {
+ i = fold.end.row + 1;
+ fold = this.session.getNextFoldLine(i, fold);
+ foldStart = fold ?fold.start.row :Infinity;
+ }
+ if(i > lastRow)
+ break;
+
+ var annotation = this.$annotations[i] || emptyAnno;
+ html.push(
+ "<div class='ace_gutter-cell ",
+ breakpoints[i] || "", decorations[i] || "", annotation.className,
+ "' style='height:", this.session.getRowLength(i) * config.lineHeight, "px;'>",
+ lastLineNumber = i + 1
+ );
+
+ if (foldWidgets) {
+ var c = foldWidgets[i];
+ if (c == null)
+ c = foldWidgets[i] = this.session.getFoldWidget(i);
+ if (c)
+ html.push(
+ "<span class='ace_fold-widget ace_", c,
+ c == "start" && i == foldStart && i < fold.end.row ? " ace_closed" : " ace_open",
+ "' style='height:", config.lineHeight, "px",
+ "'></span>"
+ );
+ }
+
+ html.push("</div>");
+
+ i++;
+ }
+
+ this.element = dom.setInnerHtml(this.element, html.join(""));
+ this.element.style.height = config.minHeight + "px";
+
+ if (this.session.$useWrapMode)
+ lastLineNumber = this.session.getLength();
+
+ var gutterWidth = ("" + lastLineNumber).length * config.characterWidth;
+ var padding = this.$padding || this.$computePadding();
+ gutterWidth += padding.left + padding.right;
+ if (gutterWidth !== this.gutterWidth) {
+ this.gutterWidth = gutterWidth;
+ this.element.style.width = Math.ceil(this.gutterWidth) + "px";
+ this._emit("changeGutterWidth", gutterWidth);
+ }
+ };
+
+ this.$showFoldWidgets = true;
+ this.setShowFoldWidgets = function(show) {
+ if (show)
+ dom.addCssClass(this.element, "ace_folding-enabled");
+ else
+ dom.removeCssClass(this.element, "ace_folding-enabled");
+
+ this.$showFoldWidgets = show;
+ this.$padding = null;
+ };
+
+ this.getShowFoldWidgets = function() {
+ return this.$showFoldWidgets;
+ };
+
+ this.$computePadding = function() {
+ if (!this.element.firstChild)
+ return {left: 0, right: 0};
+ var style = dom.computedStyle(this.element.firstChild);
+ this.$padding = {}
+ this.$padding.left = parseInt(style.paddingLeft) + 1;
+ this.$padding.right = parseInt(style.paddingRight);
+ return this.$padding;
+ };
+
+ this.getRegion = function(point) {
+ var padding = this.$padding || this.$computePadding();
+ var rect = this.element.getBoundingClientRect();
+ if (point.x < padding.left + rect.left)
+ return "markers";
+ if (this.$showFoldWidgets && point.x > rect.right - padding.right)
+ return "foldWidgets";
+ };
+
+}).call(Gutter.prototype);
+
+exports.Gutter = Gutter;
+
+});
+
+ace.define('ace/layer/marker', ['require', 'exports', 'module' , 'ace/range', 'ace/lib/dom'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+var dom = require("../lib/dom");
+
+var Marker = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_marker-layer";
+ parentEl.appendChild(this.element);
+};
+
+(function() {
+
+ this.$padding = 0;
+
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ };
+ this.setSession = function(session) {
+ this.session = session;
+ };
+
+ this.setMarkers = function(markers) {
+ this.markers = markers;
+ };
+
+ this.update = function(config) {
+ var config = config || this.config;
+ if (!config)
+ return;
+
+ this.config = config;
+
+
+ var html = [];
+ for (var key in this.markers) {
+ var marker = this.markers[key];
+
+ if (!marker.range) {
+ marker.update(html, this, this.session, config);
+ continue;
+ }
+
+ var range = marker.range.clipRows(config.firstRow, config.lastRow);
+ if (range.isEmpty()) continue;
+
+ range = range.toScreenRange(this.session);
+ if (marker.renderer) {
+ var top = this.$getTop(range.start.row, config);
+ var left = this.$padding + range.start.column * config.characterWidth;
+ marker.renderer(html, range, left, top, config);
+ } else if (marker.type == "fullLine") {
+ this.drawFullLineMarker(html, range, marker.clazz, config);
+ } else if (range.isMultiLine()) {
+ if (marker.type == "text")
+ this.drawTextMarker(html, range, marker.clazz, config);
+ else
+ this.drawMultiLineMarker(html, range, marker.clazz, config);
+ } else {
+ this.drawSingleLineMarker(html, range, marker.clazz + " ace_start", config);
+ }
+ }
+ this.element = dom.setInnerHtml(this.element, html.join(""));
+ };
+
+ this.$getTop = function(row, layerConfig) {
+ return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
+ };
+ this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig) {
+ var row = range.start.row;
+
+ var lineRange = new Range(
+ row, range.start.column,
+ row, this.session.getScreenLastRowColumn(row)
+ );
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz + " ace_start", layerConfig, 1, "text");
+ row = range.end.row;
+ lineRange = new Range(row, 0, row, range.end.column);
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, "text");
+
+ for (row = range.start.row + 1; row < range.end.row; row++) {
+ lineRange.start.row = row;
+ lineRange.end.row = row;
+ lineRange.end.column = this.session.getScreenLastRowColumn(row);
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, "text");
+ }
+ };
+ this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, type) {
+ var padding = this.$padding;
+ var height = config.lineHeight;
+ var top = this.$getTop(range.start.row, config);
+ var left = padding + range.start.column * config.characterWidth;
+
+ stringBuilder.push(
+ "<div class='", clazz, " ace_start' style='",
+ "height:", height, "px;",
+ "right:0;",
+ "top:", top, "px;",
+ "left:", left, "px;'></div>"
+ );
+ top = this.$getTop(range.end.row, config);
+ var width = range.end.column * config.characterWidth;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "width:", width, "px;",
+ "top:", top, "px;",
+ "left:", padding, "px;'></div>"
+ );
+ height = (range.end.row - range.start.row - 1) * config.lineHeight;
+ if (height < 0)
+ return;
+ top = this.$getTop(range.start.row + 1, config);
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "right:0;",
+ "top:", top, "px;",
+ "left:", padding, "px;'></div>"
+ );
+ };
+ this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength) {
+ var height = config.lineHeight;
+ var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;
+
+ var top = this.$getTop(range.start.row, config);
+ var left = this.$padding + range.start.column * config.characterWidth;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "width:", width, "px;",
+ "top:", top, "px;",
+ "left:", left,"px;'></div>"
+ );
+ };
+
+ this.drawFullLineMarker = function(stringBuilder, range, clazz, config) {
+ var top = this.$getTop(range.start.row, config);
+ var height = config.lineHeight;
+ if (range.start.row != range.end.row)
+ height += this.$getTop(range.end.row, config) - top;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "top:", top, "px;",
+ "left:0;right:0;'></div>"
+ );
+ }
+
+}).call(Marker.prototype);
+
+exports.Marker = Marker;
+
+});
+
+ace.define('ace/layer/text', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/lang', 'ace/lib/useragent', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var useragent = require("../lib/useragent");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var Text = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_text-layer";
+ parentEl.appendChild(this.element);
+
+ this.$characterSize = {width: 0, height: 0};
+ this.checkForSizeChanges();
+ this.$pollSizeChanges();
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.EOF_CHAR = "\xB6"; //"&para;";
+ this.EOL_CHAR = "\xAC"; //"&not;";
+ this.TAB_CHAR = "\u2192"; //"&rarr;" "\u21E5";
+ this.SPACE_CHAR = "\xB7"; //"&middot;";
+ this.$padding = 0;
+
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ this.element.style.padding = "0 " + padding + "px";
+ };
+
+ this.getLineHeight = function() {
+ return this.$characterSize.height || 1;
+ };
+
+ this.getCharacterWidth = function() {
+ return this.$characterSize.width || 1;
+ };
+
+ this.checkForSizeChanges = function() {
+ var size = this.$measureSizes();
+ if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
+ this.$measureNode.style.fontWeight = "bold";
+ var boldSize = this.$measureSizes();
+ this.$measureNode.style.fontWeight = "";
+ this.$characterSize = size;
+ this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
+ this._emit("changeCharacterSize", {data: size});
+ }
+ };
+
+ this.$pollSizeChanges = function() {
+ var self = this;
+ this.$pollSizeChangesTimer = setInterval(function() {
+ self.checkForSizeChanges();
+ }, 500);
+ };
+
+ this.$fontStyles = {
+ fontFamily : 1,
+ fontSize : 1,
+ fontWeight : 1,
+ fontStyle : 1,
+ lineHeight : 1
+ };
+
+ this.$measureSizes = useragent.isIE || useragent.isOldGecko ? function() {
+ var n = 1000;
+ if (!this.$measureNode) {
+ var measureNode = this.$measureNode = dom.createElement("div");
+ var style = measureNode.style;
+
+ style.width = style.height = "auto";
+ style.left = style.top = (-n * 40) + "px";
+
+ style.visibility = "hidden";
+ style.position = "fixed";
+ style.overflow = "visible";
+ style.whiteSpace = "nowrap";
+ measureNode.innerHTML = lang.stringRepeat("Xy", n);
+
+ if (this.element.ownerDocument.body) {
+ this.element.ownerDocument.body.appendChild(measureNode);
+ } else {
+ var container = this.element.parentNode;
+ while (!dom.hasCssClass(container, "ace_editor"))
+ container = container.parentNode;
+ container.appendChild(measureNode);
+ }
+ }
+ if (!this.element.offsetWidth)
+ return null;
+
+ var style = this.$measureNode.style;
+ var computedStyle = dom.computedStyle(this.element);
+ for (var prop in this.$fontStyles)
+ style[prop] = computedStyle[prop];
+
+ var size = {
+ height: this.$measureNode.offsetHeight,
+ width: this.$measureNode.offsetWidth / (n * 2)
+ };
+ if (size.width == 0 || size.height == 0)
+ return null;
+
+ return size;
+ }
+ : function() {
+ if (!this.$measureNode) {
+ var measureNode = this.$measureNode = dom.createElement("div");
+ var style = measureNode.style;
+
+ style.width = style.height = "auto";
+ style.left = style.top = -100 + "px";
+
+ style.visibility = "hidden";
+ style.position = "fixed";
+ style.overflow = "visible";
+ style.whiteSpace = "nowrap";
+
+ measureNode.innerHTML = "X";
+
+ var container = this.element.parentNode;
+ while (container && !dom.hasCssClass(container, "ace_editor"))
+ container = container.parentNode;
+
+ if (!container)
+ return this.$measureNode = null;
+
+ container.appendChild(measureNode);
+ }
+
+ var rect = this.$measureNode.getBoundingClientRect();
+
+ var size = {
+ height: rect.height,
+ width: rect.width
+ };
+ if (size.width == 0 || size.height == 0)
+ return null;
+
+ return size;
+ };
+
+ this.setSession = function(session) {
+ this.session = session;
+ this.$computeTabString();
+ };
+
+ this.showInvisibles = false;
+ this.setShowInvisibles = function(showInvisibles) {
+ if (this.showInvisibles == showInvisibles)
+ return false;
+
+ this.showInvisibles = showInvisibles;
+ this.$computeTabString();
+ return true;
+ };
+
+ this.displayIndentGuides = true;
+ this.setDisplayIndentGuides = function(display) {
+ if (this.displayIndentGuides == display)
+ return false;
+
+ this.displayIndentGuides = display;
+ this.$computeTabString();
+ return true;
+ };
+
+ this.$tabStrings = [];
+ this.onChangeTabSize =
+ this.$computeTabString = function() {
+ var tabSize = this.session.getTabSize();
+ this.tabSize = tabSize;
+ var tabStr = this.$tabStrings = [0];
+ for (var i = 1; i < tabSize + 1; i++) {
+ if (this.showInvisibles) {
+ tabStr.push("<span class='ace_invisible'>"
+ + this.TAB_CHAR
+ + Array(i).join("&#160;")
+ + "</span>");
+ } else {
+ tabStr.push(new Array(i+1).join("&#160;"));
+ }
+ }
+ if (this.displayIndentGuides) {
+ this.$indentGuideRe = /\s\S| \t|\t |\s$/;
+ var className = "ace_indent-guide";
+ var content = Array(this.tabSize + 1).join("&#160;");
+ var tabContent = content;
+ if (this.showInvisibles) {
+ className += " ace_invisible";
+ tabContent = this.TAB_CHAR + content.substr(6);
+ }
+
+ this.$tabStrings[" "] = "<span class='" + className + "'>" + content + "</span>";
+ this.$tabStrings["\t"] = "<span class='" + className + "'>" + tabContent + "</span>";
+ }
+ };
+
+ this.updateLines = function(config, firstRow, lastRow) {
+ if (this.config.lastRow != config.lastRow ||
+ this.config.firstRow != config.firstRow) {
+ this.scrollLines(config);
+ }
+ this.config = config;
+
+ var first = Math.max(firstRow, config.firstRow);
+ var last = Math.min(lastRow, config.lastRow);
+
+ var lineElements = this.element.childNodes;
+ var lineElementsIdx = 0;
+
+ for (var row = config.firstRow; row < first; row++) {
+ var foldLine = this.session.getFoldLine(row);
+ if (foldLine) {
+ if (foldLine.containsRow(first)) {
+ first = foldLine.start.row;
+ break;
+ } else {
+ row = foldLine.end.row;
+ }
+ }
+ lineElementsIdx ++;
+ }
+
+ var row = first;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row :Infinity;
+ }
+ if (row > last)
+ break;
+
+ var lineElement = lineElements[lineElementsIdx++];
+ if (lineElement) {
+ var html = [];
+ this.$renderLine(
+ html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false
+ );
+ dom.setInnerHtml(lineElement, html.join(""));
+ }
+ row++;
+ }
+ };
+
+ this.scrollLines = function(config) {
+ var oldConfig = this.config;
+ this.config = config;
+
+ if (!oldConfig || oldConfig.lastRow < config.firstRow)
+ return this.update(config);
+
+ if (config.lastRow < oldConfig.firstRow)
+ return this.update(config);
+
+ var el = this.element;
+ if (oldConfig.firstRow < config.firstRow)
+ for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)
+ el.removeChild(el.firstChild);
+
+ if (oldConfig.lastRow > config.lastRow)
+ for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)
+ el.removeChild(el.lastChild);
+
+ if (config.firstRow < oldConfig.firstRow) {
+ var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);
+ if (el.firstChild)
+ el.insertBefore(fragment, el.firstChild);
+ else
+ el.appendChild(fragment);
+ }
+
+ if (config.lastRow > oldConfig.lastRow) {
+ var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);
+ el.appendChild(fragment);
+ }
+ };
+
+ this.$renderLinesFragment = function(config, firstRow, lastRow) {
+ var fragment = this.element.ownerDocument.createDocumentFragment();
+ var row = firstRow;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+ if (row > lastRow)
+ break;
+
+ var container = dom.createElement("div");
+
+ var html = [];
+ this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+ container.innerHTML = html.join("");
+ if (this.$useLineGroups()) {
+ container.className = 'ace_line_group';
+ fragment.appendChild(container);
+ } else {
+ var lines = container.childNodes
+ while(lines.length)
+ fragment.appendChild(lines[0]);
+ }
+
+ row++;
+ }
+ return fragment;
+ };
+
+ this.update = function(config) {
+ this.config = config;
+
+ var html = [];
+ var firstRow = config.firstRow, lastRow = config.lastRow;
+
+ var row = firstRow;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row :Infinity;
+ }
+ if (row > lastRow)
+ break;
+
+ if (this.$useLineGroups())
+ html.push("<div class='ace_line_group'>")
+
+ this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+
+ if (this.$useLineGroups())
+ html.push("</div>"); // end the line group
+
+ row++;
+ }
+ this.element = dom.setInnerHtml(this.element, html.join(""));
+ };
+
+ this.$textToken = {
+ "text": true,
+ "rparen": true,
+ "lparen": true
+ };
+
+ this.$renderToken = function(stringBuilder, screenColumn, token, value) {
+ var self = this;
+ var replaceReg = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g;
+ var replaceFunc = function(c, a, b, tabIdx, idx4) {
+ if (a) {
+ return new Array(c.length+1).join("&#160;");
+ } else if (c == "&") {
+ return "&#38;";
+ } else if (c == "<") {
+ return "&#60;";
+ } else if (c == "\t") {
+ var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
+ screenColumn += tabSize - 1;
+ return self.$tabStrings[tabSize];
+ } else if (c == "\u3000") {
+ var classToUse = self.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk";
+ var space = self.showInvisibles ? self.SPACE_CHAR : "";
+ screenColumn += 1;
+ return "<span class='" + classToUse + "' style='width:" +
+ (self.config.characterWidth * 2) +
+ "px'>" + space + "</span>";
+ } else if (b) {
+ return "<span class='ace_invisible ace_invalid'>" + self.SPACE_CHAR + "</span>";
+ } else {
+ screenColumn += 1;
+ return "<span class='ace_cjk' style='width:" +
+ (self.config.characterWidth * 2) +
+ "px'>" + c + "</span>";
+ }
+ };
+
+ var output = value.replace(replaceReg, replaceFunc);
+
+ if (!this.$textToken[token.type]) {
+ var classes = "ace_" + token.type.replace(/\./g, " ace_");
+ var style = "";
+ if (token.type == "fold")
+ style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' ";
+ stringBuilder.push("<span class='", classes, "'", style, ">", output, "</span>");
+ }
+ else {
+ stringBuilder.push(output);
+ }
+ return screenColumn + value.length;
+ };
+
+ this.renderIndentGuide = function(stringBuilder, value) {
+ var cols = value.search(this.$indentGuideRe);
+ if (cols <= 0)
+ return value;
+ if (value[0] == " ") {
+ cols -= cols % this.tabSize;
+ stringBuilder.push(Array(cols/this.tabSize + 1).join(this.$tabStrings[" "]));
+ return value.substr(cols);
+ } else if (value[0] == "\t") {
+ stringBuilder.push(Array(cols + 1).join(this.$tabStrings["\t"]));
+ return value.substr(cols);
+ }
+ return value;
+ };
+
+ this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {
+ var chars = 0;
+ var split = 0;
+ var splitChars = splits[0];
+ var screenColumn = 0;
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ var value = token.value;
+ if (i == 0 && this.displayIndentGuides) {
+ chars = value.length;
+ value = this.renderIndentGuide(stringBuilder, value);
+ if (!value)
+ continue;
+ chars -= value.length;
+ }
+
+ if (chars + value.length < splitChars) {
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ chars += value.length;
+ } else {
+ while (chars + value.length >= splitChars) {
+ screenColumn = this.$renderToken(
+ stringBuilder, screenColumn,
+ token, value.substring(0, splitChars - chars)
+ );
+ value = value.substring(splitChars - chars);
+ chars = splitChars;
+
+ if (!onlyContents) {
+ stringBuilder.push("</div>",
+ "<div class='ace_line' style='height:",
+ this.config.lineHeight, "px'>"
+ );
+ }
+
+ split ++;
+ screenColumn = 0;
+ splitChars = splits[split] || Number.MAX_VALUE;
+ }
+ if (value.length != 0) {
+ chars += value.length;
+ screenColumn = this.$renderToken(
+ stringBuilder, screenColumn, token, value
+ );
+ }
+ }
+ }
+ };
+
+ this.$renderSimpleLine = function(stringBuilder, tokens) {
+ var screenColumn = 0;
+ var token = tokens[0];
+ var value = token.value;
+ if (this.displayIndentGuides)
+ value = this.renderIndentGuide(stringBuilder, value);
+ if (value)
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ for (var i = 1; i < tokens.length; i++) {
+ token = tokens[i];
+ value = token.value;
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ }
+ };
+ this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {
+ if (!foldLine && foldLine != false)
+ foldLine = this.session.getFoldLine(row);
+
+ if (foldLine)
+ var tokens = this.$getFoldLineTokens(row, foldLine);
+ else
+ var tokens = this.session.getTokens(row);
+
+
+ if (!onlyContents) {
+ stringBuilder.push(
+ "<div class='ace_line' style='height:", this.config.lineHeight, "px'>"
+ );
+ }
+
+ if (tokens.length) {
+ var splits = this.session.getRowSplitData(row);
+ if (splits && splits.length)
+ this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);
+ else
+ this.$renderSimpleLine(stringBuilder, tokens);
+ }
+
+ if (this.showInvisibles) {
+ if (foldLine)
+ row = foldLine.end.row
+
+ stringBuilder.push(
+ "<span class='ace_invisible'>",
+ row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,
+ "</span>"
+ );
+ }
+ if (!onlyContents)
+ stringBuilder.push("</div>");
+ };
+
+ this.$getFoldLineTokens = function(row, foldLine) {
+ var session = this.session;
+ var renderTokens = [];
+
+ function addTokens(tokens, from, to) {
+ var idx = 0, col = 0;
+ while ((col + tokens[idx].value.length) < from) {
+ col += tokens[idx].value.length;
+ idx++;
+
+ if (idx == tokens.length)
+ return;
+ }
+ if (col != from) {
+ var value = tokens[idx].value.substring(from - col);
+ if (value.length > (to - from))
+ value = value.substring(0, to - from);
+
+ renderTokens.push({
+ type: tokens[idx].type,
+ value: value
+ });
+
+ col = from + value.length;
+ idx += 1;
+ }
+
+ while (col < to && idx < tokens.length) {
+ var value = tokens[idx].value;
+ if (value.length + col > to) {
+ renderTokens.push({
+ type: tokens[idx].type,
+ value: value.substring(0, to - col)
+ });
+ } else
+ renderTokens.push(tokens[idx]);
+ col += value.length;
+ idx += 1;
+ }
+ }
+
+ var tokens = session.getTokens(row);
+ foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {
+ if (placeholder != null) {
+ renderTokens.push({
+ type: "fold",
+ value: placeholder
+ });
+ } else {
+ if (isNewRow)
+ tokens = session.getTokens(row);
+
+ if (tokens.length)
+ addTokens(tokens, lastColumn, column);
+ }
+ }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);
+
+ return renderTokens;
+ };
+
+ this.$useLineGroups = function() {
+ return this.session.getUseWrapMode();
+ };
+
+ this.destroy = function() {
+ clearInterval(this.$pollSizeChangesTimer);
+ if (this.$measureNode)
+ this.$measureNode.parentNode.removeChild(this.$measureNode);
+ delete this.$measureNode;
+ };
+
+}).call(Text.prototype);
+
+exports.Text = Text;
+
+});
+
+ace.define('ace/layer/cursor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+
+var dom = require("../lib/dom");
+
+var Cursor = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_cursor-layer";
+ parentEl.appendChild(this.element);
+
+ this.isVisible = false;
+ this.isBlinking = true;
+ this.blinkInterval = 1000;
+ this.smoothBlinking = false;
+
+ this.cursors = [];
+ this.cursor = this.addCursor();
+ dom.addCssClass(this.element, "ace_hidden-cursors");
+};
+
+(function() {
+
+ this.$padding = 0;
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ };
+
+ this.setSession = function(session) {
+ this.session = session;
+ };
+
+ this.setBlinking = function(blinking) {
+ if (blinking != this.isBlinking){
+ this.isBlinking = blinking;
+ this.restartTimer();
+ }
+ };
+
+ this.setBlinkInterval = function(blinkInterval) {
+ if (blinkInterval != this.blinkInterval){
+ this.blinkInterval = blinkInterval;
+ this.restartTimer();
+ }
+ };
+
+ this.setSmoothBlinking = function(smoothBlinking) {
+ if (smoothBlinking != this.smoothBlinking) {
+ this.smoothBlinking = smoothBlinking;
+ if (smoothBlinking)
+ dom.addCssClass(this.element, "ace_smooth-blinking");
+ else
+ dom.removeCssClass(this.element, "ace_smooth-blinking");
+ this.restartTimer();
+ }
+ };
+
+ this.addCursor = function() {
+ var el = dom.createElement("div");
+ el.className = "ace_cursor";
+ this.element.appendChild(el);
+ this.cursors.push(el);
+ return el;
+ };
+
+ this.removeCursor = function() {
+ if (this.cursors.length > 1) {
+ var el = this.cursors.pop();
+ el.parentNode.removeChild(el);
+ return el;
+ }
+ };
+
+ this.hideCursor = function() {
+ this.isVisible = false;
+ dom.addCssClass(this.element, "ace_hidden-cursors");
+ this.restartTimer();
+ };
+
+ this.showCursor = function() {
+ this.isVisible = true;
+ dom.removeCssClass(this.element, "ace_hidden-cursors");
+ this.restartTimer();
+ };
+
+ this.restartTimer = function() {
+ clearInterval(this.intervalId);
+ clearTimeout(this.timeoutId);
+ if (this.smoothBlinking)
+ dom.removeCssClass(this.element, "ace_smooth-blinking");
+ for (var i = this.cursors.length; i--; )
+ this.cursors[i].style.opacity = "";
+
+ if (!this.isBlinking || !this.blinkInterval || !this.isVisible)
+ return;
+
+ if (this.smoothBlinking)
+ setTimeout(function(){
+ dom.addCssClass(this.element, "ace_smooth-blinking");
+ }.bind(this));
+
+ var blink = function(){
+ this.timeoutId = setTimeout(function() {
+ for (var i = this.cursors.length; i--; ) {
+ this.cursors[i].style.opacity = 0;
+ }
+ }.bind(this), 0.6 * this.blinkInterval);
+ }.bind(this);
+
+ this.intervalId = setInterval(function() {
+ for (var i = this.cursors.length; i--; ) {
+ this.cursors[i].style.opacity = "";
+ }
+ blink();
+ }.bind(this), this.blinkInterval);
+
+ blink();
+ };
+
+ this.getPixelPosition = function(position, onScreen) {
+ if (!this.config || !this.session)
+ return {left : 0, top : 0};
+
+ if (!position)
+ position = this.session.selection.getCursor();
+ var pos = this.session.documentToScreenPosition(position);
+ var cursorLeft = this.$padding + pos.column * this.config.characterWidth;
+ var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
+ this.config.lineHeight;
+
+ return {left : cursorLeft, top : cursorTop};
+ };
+
+ this.update = function(config) {
+ this.config = config;
+
+ var selections = this.session.$selectionMarkers;
+ var i = 0, cursorIndex = 0;
+
+ if (selections === undefined || selections.length === 0){
+ selections = [{cursor: null}];
+ }
+
+ for (var i = selections.length; i--; ) {
+ var pixelPos = this.getPixelPosition(selections[i].cursor, true);
+ if ((pixelPos.top > config.height + config.offset ||
+ pixelPos.top < -config.offset) && i > 1) {
+ continue;
+ }
+
+ var style = (this.cursors[cursorIndex++] || this.addCursor()).style;
+
+ style.left = pixelPos.left + "px";
+ style.top = pixelPos.top + "px";
+ style.width = config.characterWidth + "px";
+ style.height = config.lineHeight + "px";
+ }
+ while (this.cursors.length > cursorIndex)
+ this.removeCursor();
+
+ var overwrite = this.session.getOverwrite();
+ this.$setOverwrite(overwrite);
+ this.$pixelPos = pixelPos;
+ this.restartTimer();
+ };
+
+ this.$setOverwrite = function(overwrite) {
+ if (overwrite != this.overwrite) {
+ this.overwrite = overwrite;
+ if (overwrite)
+ dom.addCssClass(this.element, "ace_overwrite-cursors");
+ else
+ dom.removeCssClass(this.element, "ace_overwrite-cursors");
+ }
+ };
+
+ this.destroy = function() {
+ clearInterval(this.intervalId);
+ clearTimeout(this.timeoutId);
+ };
+
+}).call(Cursor.prototype);
+
+exports.Cursor = Cursor;
+
+});
+
+ace.define('ace/scrollbar', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/event', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var ScrollBar = function(parent) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_scrollbar";
+
+ this.inner = dom.createElement("div");
+ this.inner.className = "ace_scrollbar-inner";
+ this.element.appendChild(this.inner);
+
+ parent.appendChild(this.element);
+ this.width = dom.scrollbarWidth(parent.ownerDocument);
+ this.element.style.width = (this.width || 15) + 5 + "px";
+
+ event.addListener(this.element, "scroll", this.onScroll.bind(this));
+};
+
+(function() {
+ oop.implement(this, EventEmitter);
+ this.onScroll = function() {
+ if (!this.skipEvent) {
+ this.scrollTop = this.element.scrollTop;
+ this._emit("scroll", {data: this.scrollTop});
+ }
+ this.skipEvent = false;
+ };
+ this.getWidth = function() {
+ return this.width;
+ };
+ this.setHeight = function(height) {
+ this.element.style.height = height + "px";
+ };
+ this.setInnerHeight = function(height) {
+ this.inner.style.height = height + "px";
+ };
+ this.setScrollTop = function(scrollTop) {
+ if (this.scrollTop != scrollTop) {
+ this.skipEvent = true;
+ this.scrollTop = this.element.scrollTop = scrollTop;
+ }
+ };
+
+}).call(ScrollBar.prototype);
+
+exports.ScrollBar = ScrollBar;
+});
+
+ace.define('ace/renderloop', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
+
+
+var event = require("./lib/event");
+
+
+var RenderLoop = function(onRender, win) {
+ this.onRender = onRender;
+ this.pending = false;
+ this.changes = 0;
+ this.window = win || window;
+};
+
+(function() {
+
+
+ this.schedule = function(change) {
+ this.changes = this.changes | change;
+ if (!this.pending) {
+ this.pending = true;
+ var _self = this;
+ event.nextFrame(function() {
+ _self.pending = false;
+ var changes;
+ while (changes = _self.changes) {
+ _self.changes = 0;
+ _self.onRender(changes);
+ }
+ }, this.window);
+ }
+ };
+
+}).call(RenderLoop.prototype);
+
+exports.RenderLoop = RenderLoop;
+});
+
+ace.define('ace/multi_select', ['require', 'exports', 'module' , 'ace/range_list', 'ace/range', 'ace/selection', 'ace/mouse/multi_select_handler', 'ace/lib/event', 'ace/lib/lang', 'ace/commands/multi_select_commands', 'ace/search', 'ace/edit_session', 'ace/editor'], function(require, exports, module) {
+
+var RangeList = require("./range_list").RangeList;
+var Range = require("./range").Range;
+var Selection = require("./selection").Selection;
+var onMouseDown = require("./mouse/multi_select_handler").onMouseDown;
+var event = require("./lib/event");
+var lang = require("./lib/lang");
+var commands = require("./commands/multi_select_commands");
+exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);
+var Search = require("./search").Search;
+var search = new Search();
+
+function find(session, needle, dir) {
+ search.$options.wrap = true;
+ search.$options.needle = needle;
+ search.$options.backwards = dir == -1;
+ return search.find(session);
+}
+var EditSession = require("./edit_session").EditSession;
+(function() {
+ this.getSelectionMarkers = function() {
+ return this.$selectionMarkers;
+ };
+}).call(EditSession.prototype);
+(function() {
+ this.ranges = null;
+ this.rangeList = null;
+ this.addRange = function(range, $blockChangeEvents) {
+ if (!range)
+ return;
+
+ if (!this.inMultiSelectMode && this.rangeCount == 0) {
+ var oldRange = this.toOrientedRange();
+ if (range.intersects(oldRange))
+ return $blockChangeEvents || this.fromOrientedRange(range);
+
+ this.rangeList.add(oldRange);
+ this.$onAddRange(oldRange);
+ }
+
+ if (!range.cursor)
+ range.cursor = range.end;
+
+ var removed = this.rangeList.add(range);
+
+ this.$onAddRange(range);
+
+ if (removed.length)
+ this.$onRemoveRange(removed);
+
+ if (this.rangeCount > 1 && !this.inMultiSelectMode) {
+ this._emit("multiSelect");
+ this.inMultiSelectMode = true;
+ this.session.$undoSelect = false;
+ this.rangeList.attach(this.session);
+ }
+
+ return $blockChangeEvents || this.fromOrientedRange(range);
+ };
+
+ this.toSingleRange = function(range) {
+ range = range || this.ranges[0];
+ var removed = this.rangeList.removeAll();
+ if (removed.length)
+ this.$onRemoveRange(removed);
+
+ range && this.fromOrientedRange(range);
+ };
+ this.substractPoint = function(pos) {
+ var removed = this.rangeList.substractPoint(pos);
+ if (removed) {
+ this.$onRemoveRange(removed);
+ return removed[0];
+ }
+ };
+ this.mergeOverlappingRanges = function() {
+ var removed = this.rangeList.merge();
+ if (removed.length)
+ this.$onRemoveRange(removed);
+ else if(this.ranges[0])
+ this.fromOrientedRange(this.ranges[0]);
+ };
+
+ this.$onAddRange = function(range) {
+ this.rangeCount = this.rangeList.ranges.length;
+ this.ranges.unshift(range);
+ this._emit("addRange", {range: range});
+ };
+
+ this.$onRemoveRange = function(removed) {
+ this.rangeCount = this.rangeList.ranges.length;
+ if (this.rangeCount == 1 && this.inMultiSelectMode) {
+ var lastRange = this.rangeList.ranges.pop();
+ removed.push(lastRange);
+ this.rangeCount = 0;
+ }
+
+ for (var i = removed.length; i--; ) {
+ var index = this.ranges.indexOf(removed[i]);
+ this.ranges.splice(index, 1);
+ }
+
+ this._emit("removeRange", {ranges: removed});
+
+ if (this.rangeCount == 0 && this.inMultiSelectMode) {
+ this.inMultiSelectMode = false;
+ this._emit("singleSelect");
+ this.session.$undoSelect = true;
+ this.rangeList.detach(this.session);
+ }
+
+ lastRange = lastRange || this.ranges[0];
+ if (lastRange && !lastRange.isEqual(this.getRange()))
+ this.fromOrientedRange(lastRange);
+ };
+ this.$initRangeList = function() {
+ if (this.rangeList)
+ return;
+
+ this.rangeList = new RangeList();
+ this.ranges = [];
+ this.rangeCount = 0;
+ };
+ this.getAllRanges = function() {
+ return this.rangeList.ranges.concat();
+ };
+
+ this.splitIntoLines = function () {
+ if (this.rangeCount > 1) {
+ var ranges = this.rangeList.ranges;
+ var lastRange = ranges[ranges.length - 1];
+ var range = Range.fromPoints(ranges[0].start, lastRange.end);
+
+ this.toSingleRange();
+ this.setSelectionRange(range, lastRange.cursor == lastRange.start);
+ } else {
+ var range = this.getRange();
+ var isBackwards = this.isBackwards();
+ var startRow = range.start.row;
+ var endRow = range.end.row;
+ if (startRow == endRow) {
+ if (isBackwards)
+ var start = range.end, end = range.start;
+ else
+ var start = range.start, end = range.end;
+
+ this.addRange(Range.fromPoints(end, end));
+ this.addRange(Range.fromPoints(start, start));
+ return;
+ }
+
+ var rectSel = [];
+ var r = this.getLineRange(startRow, true);
+ r.start.column = range.start.column;
+ rectSel.push(r);
+
+ for (var i = startRow + 1; i < endRow; i++)
+ rectSel.push(this.getLineRange(i, true));
+
+ r = this.getLineRange(endRow, true);
+ r.end.column = range.end.column;
+ rectSel.push(r);
+
+ rectSel.forEach(this.addRange, this);
+ }
+ };
+ this.toggleBlockSelection = function () {
+ if (this.rangeCount > 1) {
+ var ranges = this.rangeList.ranges;
+ var lastRange = ranges[ranges.length - 1];
+ var range = Range.fromPoints(ranges[0].start, lastRange.end);
+
+ this.toSingleRange();
+ this.setSelectionRange(range, lastRange.cursor == lastRange.start);
+ } else {
+ var cursor = this.session.documentToScreenPosition(this.selectionLead);
+ var anchor = this.session.documentToScreenPosition(this.selectionAnchor);
+
+ var rectSel = this.rectangularRangeBlock(cursor, anchor);
+ rectSel.forEach(this.addRange, this);
+ }
+ };
+ this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {
+ var rectSel = [];
+
+ var xBackwards = screenCursor.column < screenAnchor.column;
+ if (xBackwards) {
+ var startColumn = screenCursor.column;
+ var endColumn = screenAnchor.column;
+ } else {
+ var startColumn = screenAnchor.column;
+ var endColumn = screenCursor.column;
+ }
+
+ var yBackwards = screenCursor.row < screenAnchor.row;
+ if (yBackwards) {
+ var startRow = screenCursor.row;
+ var endRow = screenAnchor.row;
+ } else {
+ var startRow = screenAnchor.row;
+ var endRow = screenCursor.row;
+ }
+
+ if (startColumn < 0)
+ startColumn = 0;
+ if (startRow < 0)
+ startRow = 0;
+
+ if (startRow == endRow)
+ includeEmptyLines = true;
+
+ for (var row = startRow; row <= endRow; row++) {
+ var range = Range.fromPoints(
+ this.session.screenToDocumentPosition(row, startColumn),
+ this.session.screenToDocumentPosition(row, endColumn)
+ );
+ if (range.isEmpty()) {
+ if (docEnd && isSamePoint(range.end, docEnd))
+ break;
+ var docEnd = range.end;
+ }
+ range.cursor = xBackwards ? range.start : range.end;
+ rectSel.push(range);
+ }
+
+ if (yBackwards)
+ rectSel.reverse();
+
+ if (!includeEmptyLines) {
+ var end = rectSel.length - 1;
+ while (rectSel[end].isEmpty() && end > 0)
+ end--;
+ if (end > 0) {
+ var start = 0;
+ while (rectSel[start].isEmpty())
+ start++;
+ }
+ for (var i = end; i >= start; i--) {
+ if (rectSel[i].isEmpty())
+ rectSel.splice(i, 1);
+ }
+ }
+
+ return rectSel;
+ };
+}).call(Selection.prototype);
+var Editor = require("./editor").Editor;
+(function() {
+ this.updateSelectionMarkers = function() {
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+ this.addSelectionMarker = function(orientedRange) {
+ if (!orientedRange.cursor)
+ orientedRange.cursor = orientedRange.end;
+
+ var style = this.getSelectionStyle();
+ orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style);
+
+ this.session.$selectionMarkers.push(orientedRange);
+ this.session.selectionMarkerCount = this.session.$selectionMarkers.length;
+ return orientedRange;
+ };
+ this.removeSelectionMarker = function(range) {
+ if (!range.marker)
+ return;
+ this.session.removeMarker(range.marker);
+ var index = this.session.$selectionMarkers.indexOf(range);
+ if (index != -1)
+ this.session.$selectionMarkers.splice(index, 1);
+ this.session.selectionMarkerCount = this.session.$selectionMarkers.length;
+ };
+
+ this.removeSelectionMarkers = function(ranges) {
+ var markerList = this.session.$selectionMarkers;
+ for (var i = ranges.length; i--; ) {
+ var range = ranges[i];
+ if (!range.marker)
+ continue;
+ this.session.removeMarker(range.marker);
+ var index = markerList.indexOf(range);
+ if (index != -1)
+ markerList.splice(index, 1);
+ }
+ this.session.selectionMarkerCount = markerList.length;
+ };
+
+ this.$onAddRange = function(e) {
+ this.addSelectionMarker(e.range);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ this.$onRemoveRange = function(e) {
+ this.removeSelectionMarkers(e.ranges);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ this.$onMultiSelect = function(e) {
+ if (this.inMultiSelectMode)
+ return;
+ this.inMultiSelectMode = true;
+
+ this.setStyle("ace_multiselect");
+ this.keyBinding.addKeyboardHandler(commands.keyboardHandler);
+ this.commands.on("exec", this.$onMultiSelectExec);
+
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ this.$onSingleSelect = function(e) {
+ if (this.session.multiSelect.inVirtualMode)
+ return;
+ this.inMultiSelectMode = false;
+
+ this.unsetStyle("ace_multiselect");
+ this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);
+
+ this.commands.removeEventListener("exec", this.$onMultiSelectExec);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ this.$onMultiSelectExec = function(e) {
+ var command = e.command;
+ var editor = e.editor;
+ if (!editor.multiSelect)
+ return;
+ if (!command.multiSelectAction) {
+ command.exec(editor, e.args || {});
+ editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());
+ editor.multiSelect.mergeOverlappingRanges();
+ } else if (command.multiSelectAction == "forEach") {
+ editor.forEachSelection(command, e.args);
+ } else if (command.multiSelectAction == "single") {
+ editor.exitMultiSelectMode();
+ command.exec(editor, e.args || {});
+ } else {
+ command.multiSelectAction(editor, e.args || {});
+ }
+ e.preventDefault();
+ };
+ this.forEachSelection = function(cmd, args) {
+ if (this.inVirtualSelectionMode)
+ return;
+
+ var session = this.session;
+ var selection = this.selection;
+ var rangeList = selection.rangeList;
+
+ var reg = selection._eventRegistry;
+ selection._eventRegistry = {};
+
+ var tmpSel = new Selection(session);
+ this.inVirtualSelectionMode = true;
+ for (var i = rangeList.ranges.length; i--;) {
+ tmpSel.fromOrientedRange(rangeList.ranges[i]);
+ this.selection = session.selection = tmpSel;
+ cmd.exec(this, args || {});
+ tmpSel.toOrientedRange(rangeList.ranges[i]);
+ }
+ tmpSel.detach();
+
+ this.selection = session.selection = selection;
+ this.inVirtualSelectionMode = false;
+ selection._eventRegistry = reg;
+ selection.mergeOverlappingRanges();
+
+ this.onCursorChange();
+ this.onSelectionChange();
+ };
+ this.exitMultiSelectMode = function() {
+ if (this.inVirtualSelectionMode)
+ return;
+ this.multiSelect.toSingleRange();
+ };
+
+ this.getCopyText = function() {
+ var text = "";
+ if (this.inMultiSelectMode) {
+ var ranges = this.multiSelect.rangeList.ranges;
+ text = [];
+ for (var i = 0; i < ranges.length; i++) {
+ text.push(this.session.getTextRange(ranges[i]));
+ }
+ text = text.join(this.session.getDocument().getNewLineCharacter());
+ } else if (!this.selection.isEmpty()) {
+ text = this.session.getTextRange(this.getSelectionRange());
+ }
+
+ return text;
+ };
+ this.onPaste = function(text) {
+ if (this.$readOnly)
+ return;
+
+ this._emit("paste", text);
+ if (!this.inMultiSelectMode)
+ return this.insert(text);
+
+ var lines = text.split(/\r\n|\r|\n/);
+ var ranges = this.selection.rangeList.ranges;
+
+ if (lines.length > ranges.length || (lines.length <= 2 || !lines[1]))
+ return this.commands.exec("insertstring", this, text);
+
+ for (var i = ranges.length; i--; ) {
+ var range = ranges[i];
+ if (!range.isEmpty())
+ this.session.remove(range);
+
+ this.session.insert(range.start, lines[i]);
+ }
+ };
+ this.findAll = function(needle, options, additive) {
+ options = options || {};
+ options.needle = needle || options.needle;
+ this.$search.set(options);
+
+ var ranges = this.$search.findAll(this.session);
+ if (!ranges.length)
+ return 0;
+
+ this.$blockScrolling += 1;
+ var selection = this.multiSelect;
+
+ if (!additive)
+ selection.toSingleRange(ranges[0]);
+
+ for (var i = ranges.length; i--; )
+ selection.addRange(ranges[i], true);
+
+ this.$blockScrolling -= 1;
+
+ return ranges.length;
+ };
+ this.selectMoreLines = function(dir, skip) {
+ var range = this.selection.toOrientedRange();
+ var isBackwards = range.cursor == range.end;
+
+ var screenLead = this.session.documentToScreenPosition(range.cursor);
+ if (this.selection.$desiredColumn)
+ screenLead.column = this.selection.$desiredColumn;
+
+ var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);
+
+ if (!range.isEmpty()) {
+ var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);
+ var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);
+ } else {
+ var anchor = lead;
+ }
+
+ if (isBackwards) {
+ var newRange = Range.fromPoints(lead, anchor);
+ newRange.cursor = newRange.start;
+ } else {
+ var newRange = Range.fromPoints(anchor, lead);
+ newRange.cursor = newRange.end;
+ }
+
+ newRange.desiredColumn = screenLead.column;
+ if (!this.selection.inMultiSelectMode) {
+ this.selection.addRange(range);
+ } else {
+ if (skip)
+ var toRemove = range.cursor;
+ }
+
+ this.selection.addRange(newRange);
+ if (toRemove)
+ this.selection.substractPoint(toRemove);
+ };
+ this.transposeSelections = function(dir) {
+ var session = this.session;
+ var sel = session.multiSelect;
+ var all = sel.ranges;
+
+ for (var i = all.length; i--; ) {
+ var range = all[i];
+ if (range.isEmpty()) {
+ var tmp = session.getWordRange(range.start.row, range.start.column);
+ range.start.row = tmp.start.row;
+ range.start.column = tmp.start.column;
+ range.end.row = tmp.end.row;
+ range.end.column = tmp.end.column;
+ }
+ }
+ sel.mergeOverlappingRanges();
+
+ var words = [];
+ for (var i = all.length; i--; ) {
+ var range = all[i];
+ words.unshift(session.getTextRange(range));
+ }
+
+ if (dir < 0)
+ words.unshift(words.pop());
+ else
+ words.push(words.shift());
+
+ for (var i = all.length; i--; ) {
+ var range = all[i];
+ var tmp = range.clone();
+ session.replace(range, words[i]);
+ range.start.row = tmp.start.row;
+ range.start.column = tmp.start.column;
+ }
+ };
+ this.selectMore = function(dir, skip) {
+ var session = this.session;
+ var sel = session.multiSelect;
+
+ var range = sel.toOrientedRange();
+ if (range.isEmpty()) {
+ var range = session.getWordRange(range.start.row, range.start.column);
+ range.cursor = range.end;
+ this.multiSelect.addRange(range);
+ }
+ var needle = session.getTextRange(range);
+
+ var newRange = find(session, needle, dir);
+ if (newRange) {
+ newRange.cursor = dir == -1 ? newRange.start : newRange.end;
+ this.multiSelect.addRange(newRange);
+ }
+ if (skip)
+ this.multiSelect.substractPoint(range.cursor);
+ };
+ this.alignCursors = function() {
+ var session = this.session;
+ var sel = session.multiSelect;
+ var ranges = sel.ranges;
+
+ if (!ranges.length) {
+ var range = this.selection.getRange();
+ var fr = range.start.row, lr = range.end.row;
+ var lines = this.session.doc.removeLines(fr, lr);
+ lines = this.$reAlignText(lines);
+ this.session.doc.insertLines(fr, lines);
+ range.start.column = 0;
+ range.end.column = lines[lines.length - 1].length;
+ this.selection.setRange(range);
+ } else {
+ var row = -1;
+ var sameRowRanges = ranges.filter(function(r) {
+ if (r.cursor.row == row)
+ return true;
+ row = r.cursor.row;
+ });
+ sel.$onRemoveRange(sameRowRanges);
+
+ var maxCol = 0;
+ var minSpace = Infinity;
+ var spaceOffsets = ranges.map(function(r) {
+ var p = r.cursor;
+ var line = session.getLine(p.row);
+ var spaceOffset = line.substr(p.column).search(/\S/g);
+ if (spaceOffset == -1)
+ spaceOffset = 0;
+
+ if (p.column > maxCol)
+ maxCol = p.column;
+ if (spaceOffset < minSpace)
+ minSpace = spaceOffset;
+ return spaceOffset;
+ });
+ ranges.forEach(function(r, i) {
+ var p = r.cursor;
+ var l = maxCol - p.column;
+ var d = spaceOffsets[i] - minSpace;
+ if (l > d)
+ session.insert(p, lang.stringRepeat(" ", l - d));
+ else
+ session.remove(new Range(p.row, p.column, p.row, p.column - l + d));
+
+ r.start.column = r.end.column = maxCol;
+ r.start.row = r.end.row = p.row;
+ r.cursor = r.end;
+ });
+ sel.fromOrientedRange(ranges[0]);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ }
+ };
+
+ this.$reAlignText = function(lines) {
+ var isLeftAligned = true, isRightAligned = true;
+ var startW, textW, endW;
+
+ return lines.map(function(line) {
+ var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/);
+ if (!m)
+ return [line];
+
+ if (startW == null) {
+ startW = m[1].length;
+ textW = m[2].length;
+ endW = m[3].length;
+ return m;
+ }
+
+ if (startW + textW + endW != m[1].length + m[2].length + m[3].length)
+ isRightAligned = false;
+ if (startW != m[1].length)
+ isLeftAligned = false;
+
+ if (startW > m[1].length)
+ startW = m[1].length;
+ if (textW < m[2].length)
+ textW = m[2].length;
+ if (endW > m[3].length)
+ endW = m[3].length;
+
+ return m;
+ }).map(isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);
+
+ function strRepeat(n, ch) {
+ return Array(n + 1).join(ch)
+ }
+
+ function alignLeft(m) {
+ return !m[2] ? m[0] : strRepeat(startW, " ") + m[2]
+ + strRepeat(textW - m[2].length + endW, " ")
+ + m[4].replace(/^([=:])\s+/, "$1 ")
+ }
+ function alignRight(m) {
+ return !m[2] ? m[0] : strRepeat(startW + textW - m[2].length, " ") + m[2]
+ + strRepeat(endW, " ")
+ + m[4].replace(/^([=:])\s+/, "$1 ")
+ }
+ function unAlign(m) {
+ return !m[2] ? m[0] : strRepeat(startW, " ") + m[2]
+ + strRepeat(endW, " ")
+ + m[4].replace(/^([=:])\s+/, "$1 ")
+ }
+ }
+}).call(Editor.prototype);
+
+
+function isSamePoint(p1, p2) {
+ return p1.row == p2.row && p1.column == p2.column;
+}
+exports.onSessionChange = function(e) {
+ var session = e.session;
+ if (!session.multiSelect) {
+ session.$selectionMarkers = [];
+ session.selection.$initRangeList();
+ session.multiSelect = session.selection;
+ }
+ this.multiSelect = session.multiSelect;
+
+ var oldSession = e.oldSession;
+ if (oldSession) {
+ if (oldSession.multiSelect && oldSession.multiSelect.editor == this)
+ oldSession.multiSelect.editor = null;
+
+ session.multiSelect.removeEventListener("addRange", this.$onAddRange);
+ session.multiSelect.removeEventListener("removeRange", this.$onRemoveRange);
+ session.multiSelect.removeEventListener("multiSelect", this.$onMultiSelect);
+ session.multiSelect.removeEventListener("singleSelect", this.$onSingleSelect);
+ }
+
+ session.multiSelect.on("addRange", this.$onAddRange);
+ session.multiSelect.on("removeRange", this.$onRemoveRange);
+ session.multiSelect.on("multiSelect", this.$onMultiSelect);
+ session.multiSelect.on("singleSelect", this.$onSingleSelect);
+
+ if (this.inMultiSelectMode != session.selection.inMultiSelectMode) {
+ if (session.selection.inMultiSelectMode)
+ this.$onMultiSelect();
+ else
+ this.$onSingleSelect();
+ }
+};
+function MultiSelect(editor) {
+ editor.$onAddRange = editor.$onAddRange.bind(editor);
+ editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);
+ editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);
+ editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);
+
+ exports.onSessionChange.call(editor, editor);
+ editor.on("changeSession", exports.onSessionChange.bind(editor));
+
+ editor.on("mousedown", onMouseDown);
+ editor.commands.addCommands(commands.defaultCommands);
+
+ addAltCursorListeners(editor);
+}
+
+function addAltCursorListeners(editor){
+ var el = editor.textInput.getElement();
+ var altCursor = false;
+ var contentEl = editor.renderer.content;
+ event.addListener(el, "keydown", function(e) {
+ if (e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey)) {
+ if (!altCursor) {
+ contentEl.style.cursor = "crosshair";
+ altCursor = true;
+ }
+ } else if (altCursor) {
+ contentEl.style.cursor = "";
+ }
+ });
+
+ event.addListener(el, "keyup", reset);
+ event.addListener(el, "blur", reset);
+ function reset() {
+ if (altCursor) {
+ contentEl.style.cursor = "";
+ altCursor = false;
+ }
+ }
+}
+
+exports.MultiSelect = MultiSelect;
+
+});
+
+ace.define('ace/range_list', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+
+var RangeList = function() {
+ this.ranges = [];
+};
+
+(function() {
+ this.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+ };
+
+ this.pointIndex = function(pos, startIndex) {
+ var list = this.ranges;
+
+ for (var i = startIndex || 0; i < list.length; i++) {
+ var range = list[i];
+ var cmp = this.comparePoints(pos, range.end);
+
+ if (cmp > 0)
+ continue;
+ if (cmp == 0)
+ return i;
+ cmp = this.comparePoints(pos, range.start);
+ if (cmp >= 0)
+ return i;
+
+ return -i-1;
+ }
+ return -i - 1;
+ };
+
+ this.add = function(range) {
+ var startIndex = this.pointIndex(range.start);
+ if (startIndex < 0)
+ startIndex = -startIndex - 1;
+
+ var endIndex = this.pointIndex(range.end, startIndex);
+
+ if (endIndex < 0)
+ endIndex = -endIndex - 1;
+ else
+ endIndex++;
+
+ return this.ranges.splice(startIndex, endIndex - startIndex, range);
+ };
+
+ this.addList = function(list) {
+ var removed = [];
+ for (var i = list.length; i--; ) {
+ removed.push.call(removed, this.add(list[i]));
+ }
+ return removed;
+ };
+
+ this.substractPoint = function(pos) {
+ var i = this.pointIndex(pos);
+
+ if (i >= 0)
+ return this.ranges.splice(i, 1);
+ };
+ this.merge = function() {
+ var removed = [];
+ var list = this.ranges;
+ var next = list[0], range;
+ for (var i = 1; i < list.length; i++) {
+ range = next;
+ next = list[i];
+ var cmp = this.comparePoints(range.end, next.start);
+ if (cmp < 0)
+ continue;
+
+ if (cmp == 0 && !(range.isEmpty() || next.isEmpty()))
+ continue;
+
+ if (this.comparePoints(range.end, next.end) < 0) {
+ range.end.row = next.end.row;
+ range.end.column = next.end.column;
+ }
+
+ list.splice(i, 1);
+ removed.push(next);
+ next = range;
+ i--;
+ }
+
+ return removed;
+ };
+
+ this.contains = function(row, column) {
+ return this.pointIndex({row: row, column: column}) >= 0;
+ };
+
+ this.containsPoint = function(pos) {
+ return this.pointIndex(pos) >= 0;
+ };
+
+ this.rangeAtPoint = function(pos) {
+ var i = this.pointIndex(pos);
+ if (i >= 0)
+ return this.ranges[i];
+ };
+
+
+ this.clipRows = function(startRow, endRow) {
+ var list = this.ranges;
+ if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)
+ return [];
+
+ var startIndex = this.pointIndex({row: startRow, column: 0});
+ if (startIndex < 0)
+ startIndex = -startIndex - 1;
+ var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);
+ if (endIndex < 0)
+ endIndex = -endIndex - 1;
+
+ var clipped = [];
+ for (var i = startIndex; i < endIndex; i++) {
+ clipped.push(list[i]);
+ }
+ return clipped;
+ };
+
+ this.removeAll = function() {
+ return this.ranges.splice(0, this.ranges.length);
+ };
+
+ this.attach = function(session) {
+ if (this.session)
+ this.detach();
+
+ this.session = session;
+ this.onChange = this.$onChange.bind(this);
+
+ this.session.on('change', this.onChange);
+ };
+
+ this.detach = function() {
+ if (!this.session)
+ return;
+ this.session.removeListener('change', this.onChange);
+ this.session = null;
+ };
+
+ this.$onChange = function(e) {
+ var changeRange = e.data.range;
+ if (e.data.action[0] == "i"){
+ var start = changeRange.start;
+ var end = changeRange.end;
+ } else {
+ var end = changeRange.start;
+ var start = changeRange.end;
+ }
+ var startRow = start.row;
+ var endRow = end.row;
+ var lineDif = endRow - startRow;
+
+ var colDiff = -start.column + end.column;
+ var ranges = this.ranges;
+
+ for (var i = 0, n = ranges.length; i < n; i++) {
+ var r = ranges[i];
+ if (r.end.row < startRow)
+ continue;
+ if (r.start.row > startRow)
+ break;
+
+ if (r.start.row == startRow && r.start.column >= start.column ) {
+ r.start.column += colDiff;
+ r.start.row += lineDif;
+ }
+ if (r.end.row == startRow && r.end.column >= start.column) {
+ r.end.column += colDiff;
+ r.end.row += lineDif;
+ }
+ }
+
+ if (lineDif != 0 && i < n) {
+ for (; i < n; i++) {
+ var r = ranges[i];
+ r.start.row += lineDif;
+ r.end.row += lineDif;
+ }
+ }
+ };
+
+}).call(RangeList.prototype);
+
+exports.RangeList = RangeList;
+});
+
+ace.define('ace/mouse/multi_select_handler', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
+
+var event = require("../lib/event");
+function isSamePoint(p1, p2) {
+ return p1.row == p2.row && p1.column == p2.column;
+}
+
+function onMouseDown(e) {
+ var ev = e.domEvent;
+ var alt = ev.altKey;
+ var shift = ev.shiftKey;
+ var ctrl = e.getAccelKey();
+ var button = e.getButton();
+
+ if (e.editor.inMultiSelectMode && button == 2) {
+ e.editor.textInput.onContextMenu(e.domEvent);
+ return;
+ }
+
+ if (!ctrl && !alt) {
+ if (button == 0 && e.editor.inMultiSelectMode)
+ e.editor.exitMultiSelectMode();
+ return;
+ }
+
+ var editor = e.editor;
+ var selection = editor.selection;
+ var isMultiSelect = editor.inMultiSelectMode;
+ var pos = e.getDocumentPosition();
+ var cursor = selection.getCursor();
+ var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));
+
+
+ var mouseX = e.x, mouseY = e.y;
+ var onMouseSelection = function(e) {
+ mouseX = e.clientX;
+ mouseY = e.clientY;
+ };
+
+ var blockSelect = function() {
+ var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+ var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column);
+
+ if (isSamePoint(screenCursor, newCursor)
+ && isSamePoint(cursor, selection.selectionLead))
+ return;
+ screenCursor = newCursor;
+
+ editor.selection.moveCursorToPosition(cursor);
+ editor.selection.clearSelection();
+ editor.renderer.scrollCursorIntoView();
+
+ editor.removeSelectionMarkers(rectSel);
+ rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);
+ rectSel.forEach(editor.addSelectionMarker, editor);
+ editor.updateSelectionMarkers();
+ };
+
+ var session = editor.session;
+ var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+ var screenCursor = screenAnchor;
+
+
+
+ if (ctrl && !shift && !alt && button == 0) {
+ if (!isMultiSelect && inSelection)
+ return; // dragging
+
+ if (!isMultiSelect) {
+ var range = selection.toOrientedRange();
+ editor.addSelectionMarker(range);
+ }
+
+ var oldRange = selection.rangeList.rangeAtPoint(pos);
+
+ event.capture(editor.container, function(){}, function() {
+ var tmpSel = selection.toOrientedRange();
+
+ if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))
+ selection.substractPoint(tmpSel.cursor);
+ else {
+ if (range) {
+ editor.removeSelectionMarker(range);
+ selection.addRange(range);
+ }
+ selection.addRange(tmpSel);
+ }
+ });
+
+ } else if (!shift && alt && button == 0) {
+ e.stop();
+
+ if (isMultiSelect && !ctrl)
+ selection.toSingleRange();
+ else if (!isMultiSelect && ctrl)
+ selection.addRange();
+
+ selection.moveCursorToPosition(pos);
+ selection.clearSelection();
+
+ var rectSel = [];
+
+ var onMouseSelectionEnd = function(e) {
+ clearInterval(timerId);
+ editor.removeSelectionMarkers(rectSel);
+ for (var i = 0; i < rectSel.length; i++)
+ selection.addRange(rectSel[i]);
+ };
+
+ var onSelectionInterval = blockSelect;
+
+ event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
+ var timerId = setInterval(function() {onSelectionInterval();}, 20);
+
+ return e.preventDefault();
+ }
+}
+
+
+exports.onMouseDown = onMouseDown;
+
+});
+
+ace.define('ace/commands/multi_select_commands', ['require', 'exports', 'module' , 'ace/keyboard/hash_handler'], function(require, exports, module) {
+exports.defaultCommands = [{
+ name: "addCursorAbove",
+ exec: function(editor) { editor.selectMoreLines(-1); },
+ bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"},
+ readonly: true
+}, {
+ name: "addCursorBelow",
+ exec: function(editor) { editor.selectMoreLines(1); },
+ bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"},
+ readonly: true
+}, {
+ name: "addCursorAboveSkipCurrent",
+ exec: function(editor) { editor.selectMoreLines(-1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"},
+ readonly: true
+}, {
+ name: "addCursorBelowSkipCurrent",
+ exec: function(editor) { editor.selectMoreLines(1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"},
+ readonly: true
+}, {
+ name: "selectMoreBefore",
+ exec: function(editor) { editor.selectMore(-1); },
+ bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"},
+ readonly: true
+}, {
+ name: "selectMoreAfter",
+ exec: function(editor) { editor.selectMore(1); },
+ bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"},
+ readonly: true
+}, {
+ name: "selectNextBefore",
+ exec: function(editor) { editor.selectMore(-1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"},
+ readonly: true
+}, {
+ name: "selectNextAfter",
+ exec: function(editor) { editor.selectMore(1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"},
+ readonly: true
+}, {
+ name: "splitIntoLines",
+ exec: function(editor) { editor.multiSelect.splitIntoLines(); },
+ bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"},
+ readonly: true
+}, {
+ name: "alignCursors",
+ exec: function(editor) { editor.alignCursors(); },
+ bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}
+}];
+exports.multiSelectCommands = [{
+ name: "singleSelection",
+ bindKey: "esc",
+ exec: function(editor) { editor.exitMultiSelectMode(); },
+ readonly: true,
+ isAvailable: function(editor) {return editor && editor.inMultiSelectMode}
+}];
+
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+exports.keyboardHandler = new HashHandler(exports.multiSelectCommands);
+
+});
+
+ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/config'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+var config = require("../config");
+
+var WorkerClient = function(topLevelNamespaces, mod, classname) {
+ this.changeListener = this.changeListener.bind(this);
+ this.onMessage = this.onMessage.bind(this);
+ this.onError = this.onError.bind(this);
+
+ var workerUrl;
+ if (config.get("packaged")) {
+ workerUrl = config.moduleUrl(mod, "worker");
+ } else {
+ var normalizePath = this.$normalizePath;
+ if (typeof require.supports !== "undefined" && require.supports.indexOf("ucjs2-pinf-0") >= 0) {
+ workerUrl = require.nameToUrl("ace/worker/worker_sourcemint");
+ } else {
+ if (require.nameToUrl && !require.toUrl)
+ require.toUrl = require.nameToUrl;
+ workerUrl = normalizePath(require.toUrl("ace/worker/worker", null, "_"));
+ }
+
+ var tlns = {};
+ topLevelNamespaces.forEach(function(ns) {
+ tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/.js(\?.*)?$/, ""));
+ });
+ }
+
+ this.$worker = new Worker(workerUrl);
+ this.$worker.postMessage({
+ init : true,
+ tlns: tlns,
+ module: mod,
+ classname: classname
+ });
+
+ this.callbackId = 1;
+ this.callbacks = {};
+
+ this.$worker.onerror = this.onError;
+ this.$worker.onmessage = this.onMessage;
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ this.onError = function(e) {
+ window.console && console.log && console.log(e);
+ throw e;
+ };
+
+ this.onMessage = function(e) {
+ var msg = e.data;
+ switch(msg.type) {
+ case "log":
+ window.console && console.log && console.log.apply(console, msg.data);
+ break;
+
+ case "event":
+ this._emit(msg.name, {data: msg.data});
+ break;
+
+ case "call":
+ var callback = this.callbacks[msg.id];
+ if (callback) {
+ callback(msg.data);
+ delete this.callbacks[msg.id];
+ }
+ break;
+ }
+ };
+
+ this.$normalizePath = function(path) {
+ if (!location.host) // needed for file:// protocol
+ return path;
+ path = path.replace(/^[a-z]+:\/\/[^\/]+/, ""); // Remove domain name and rebuild it
+ path = location.protocol + "//" + location.host
+ + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
+ + "/" + path.replace(/^[\/]+/, "");
+ return path;
+ };
+
+ this.terminate = function() {
+ this._emit("terminate", {});
+ this.$worker.terminate();
+ this.$worker = null;
+ this.$doc.removeEventListener("change", this.changeListener);
+ this.$doc = null;
+ };
+
+ this.send = function(cmd, args) {
+ this.$worker.postMessage({command: cmd, args: args});
+ };
+
+ this.call = function(cmd, args, callback) {
+ if (callback) {
+ var id = this.callbackId++;
+ this.callbacks[id] = callback;
+ args.push(id);
+ }
+ this.send(cmd, args);
+ };
+
+ this.emit = function(event, data) {
+ try {
+ this.$worker.postMessage({event: event, data: {data: data.data}});
+ }
+ catch(ex) {}
+ };
+
+ this.attachToDocument = function(doc) {
+ if(this.$doc)
+ this.terminate();
+
+ this.$doc = doc;
+ this.call("setValue", [doc.getValue()]);
+ doc.on("change", this.changeListener);
+ };
+
+ this.changeListener = function(e) {
+ e.range = {
+ start: e.data.range.start,
+ end: e.data.range.end
+ };
+ this.emit("change", e);
+ };
+
+}).call(WorkerClient.prototype);
+
+
+var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
+ this.changeListener = this.changeListener.bind(this);
+ this.callbackId = 1;
+ this.callbacks = {};
+ this.messageBuffer = [];
+
+ var main = null;
+ var sender = Object.create(EventEmitter);
+ var _self = this;
+
+ this.$worker = {}
+ this.$worker.postMessage = function(e) {
+ _self.messageBuffer.push(e);
+ main && setTimeout(processNext);
+ };
+
+ var processNext = function() {
+ var msg = _self.messageBuffer.shift();
+ if (msg.command)
+ main[msg.command].apply(main, msg.args);
+ else if (msg.event)
+ sender._emit(msg.event, msg.data);
+ };
+
+ sender.postMessage = function(msg) {
+ _self.onMessage({data: msg});
+ };
+ sender.callback = function(data, callbackId) {
+ this.postMessage({type: "call", id: callbackId, data: data});
+ };
+ sender.emit = function(name, data) {
+ this.postMessage({type: "event", name: name, data: data});
+ };
+
+ require([mod], function(Main) {
+ main = new Main[classname](sender);
+ while (_self.messageBuffer.length)
+ processNext();
+ });
+};
+
+UIWorkerClient.prototype = WorkerClient.prototype;
+
+exports.UIWorkerClient = UIWorkerClient;
+exports.WorkerClient = WorkerClient;
+
+});
+ace.define('ace/placeholder', ['require', 'exports', 'module' , 'ace/range', 'ace/lib/event_emitter', 'ace/lib/oop'], function(require, exports, module) {
+
+
+var Range = require("./range").Range;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var oop = require("./lib/oop");
+
+var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {
+ var _self = this;
+ this.length = length;
+ this.session = session;
+ this.doc = session.getDocument();
+ this.mainClass = mainClass;
+ this.othersClass = othersClass;
+ this.$onUpdate = this.onUpdate.bind(this);
+ this.doc.on("change", this.$onUpdate);
+ this.$others = others;
+
+ this.$onCursorChange = function() {
+ setTimeout(function() {
+ _self.onCursorChange();
+ });
+ };
+
+ this.$pos = pos;
+ var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};
+ this.$undoStackDepth = undoStack.length;
+ this.setup();
+
+ session.selection.on("changeCursor", this.$onCursorChange);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setup = function() {
+ var _self = this;
+ var doc = this.doc;
+ var session = this.session;
+ var pos = this.$pos;
+
+ this.pos = doc.createAnchor(pos.row, pos.column);
+ this.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);
+ this.pos.on("change", function(event) {
+ session.removeMarker(_self.markerId);
+ _self.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.mainClass, null, false);
+ });
+ this.others = [];
+ this.$others.forEach(function(other) {
+ var anchor = doc.createAnchor(other.row, other.column);
+ _self.others.push(anchor);
+ });
+ session.setUndoSelect(false);
+ };
+ this.showOtherMarkers = function() {
+ if(this.othersActive) return;
+ var session = this.session;
+ var _self = this;
+ this.othersActive = true;
+ this.others.forEach(function(anchor) {
+ anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);
+ anchor.on("change", function(event) {
+ session.removeMarker(anchor.markerId);
+ anchor.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.othersClass, null, false);
+ });
+ });
+ };
+ this.hideOtherMarkers = function() {
+ if(!this.othersActive) return;
+ this.othersActive = false;
+ for (var i = 0; i < this.others.length; i++) {
+ this.session.removeMarker(this.others[i].markerId);
+ }
+ };
+ this.onUpdate = function(event) {
+ var delta = event.data;
+ var range = delta.range;
+ if(range.start.row !== range.end.row) return;
+ if(range.start.row !== this.pos.row) return;
+ if (this.$updating) return;
+ this.$updating = true;
+ var lengthDiff = delta.action === "insertText" ? range.end.column - range.start.column : range.start.column - range.end.column;
+
+ if(range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1) {
+ var distanceFromStart = range.start.column - this.pos.column;
+ this.length += lengthDiff;
+ if(!this.session.$fromUndo) {
+ if(delta.action === "insertText") {
+ for (var i = this.others.length - 1; i >= 0; i--) {
+ var otherPos = this.others[i];
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+ if(otherPos.row === range.start.row && range.start.column < otherPos.column)
+ newPos.column += lengthDiff;
+ this.doc.insert(newPos, delta.text);
+ }
+ } else if(delta.action === "removeText") {
+ for (var i = this.others.length - 1; i >= 0; i--) {
+ var otherPos = this.others[i];
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+ if(otherPos.row === range.start.row && range.start.column < otherPos.column)
+ newPos.column += lengthDiff;
+ this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));
+ }
+ }
+ if(range.start.column === this.pos.column && delta.action === "insertText") {
+ setTimeout(function() {
+ this.pos.setPosition(this.pos.row, this.pos.column - lengthDiff);
+ for (var i = 0; i < this.others.length; i++) {
+ var other = this.others[i];
+ var newPos = {row: other.row, column: other.column - lengthDiff};
+ if(other.row === range.start.row && range.start.column < other.column)
+ newPos.column += lengthDiff;
+ other.setPosition(newPos.row, newPos.column);
+ }
+ }.bind(this), 0);
+ }
+ else if(range.start.column === this.pos.column && delta.action === "removeText") {
+ setTimeout(function() {
+ for (var i = 0; i < this.others.length; i++) {
+ var other = this.others[i];
+ if(other.row === range.start.row && range.start.column < other.column) {
+ other.setPosition(other.row, other.column - lengthDiff);
+ }
+ }
+ }.bind(this), 0);
+ }
+ }
+ this.pos._emit("change", {value: this.pos});
+ for (var i = 0; i < this.others.length; i++) {
+ this.others[i]._emit("change", {value: this.others[i]});
+ }
+ }
+ this.$updating = false;
+ };
+
+ this.onCursorChange = function(event) {
+ if (this.$updating) return;
+ var pos = this.session.selection.getCursor();
+ if(pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {
+ this.showOtherMarkers();
+ this._emit("cursorEnter", event);
+ } else {
+ this.hideOtherMarkers();
+ this._emit("cursorLeave", event);
+ }
+ };
+ this.detach = function() {
+ this.session.removeMarker(this.markerId);
+ this.hideOtherMarkers();
+ this.doc.removeEventListener("change", this.$onUpdate);
+ this.session.selection.removeEventListener("changeCursor", this.$onCursorChange);
+ this.pos.detach();
+ for (var i = 0; i < this.others.length; i++) {
+ this.others[i].detach();
+ }
+ this.session.setUndoSelect(true);
+ };
+ this.cancel = function() {
+ if(this.$undoStackDepth === -1)
+ throw Error("Canceling placeholders only supported with undo manager attached to session.");
+ var undoManager = this.session.getUndoManager();
+ var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;
+ for (var i = 0; i < undosRequired; i++) {
+ undoManager.undo(true);
+ }
+ };
+}).call(PlaceHolder.prototype);
+
+
+exports.PlaceHolder = PlaceHolder;
+});
+
+ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+
+(function() {
+
+ this.foldingStartMarker = null;
+ this.foldingStopMarker = null;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ if (this.foldingStartMarker.test(line))
+ return "start";
+ if (foldStyle == "markbeginend"
+ && this.foldingStopMarker
+ && this.foldingStopMarker.test(line))
+ return "end";
+ return "";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ return null;
+ };
+
+ this.indentationBlock = function(session, row, column) {
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1)
+ return;
+
+ var startColumn = column || line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ var level = session.getLine(row).search(re);
+
+ if (level == -1)
+ continue;
+
+ if (level <= startLevel)
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+ this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
+ var start = {row: row, column: column + 1};
+ var end = session.$findClosingBracket(bracket, start, typeRe);
+ if (!end)
+ return;
+
+ var fw = session.foldWidgets[end.row];
+ if (fw == null)
+ fw = this.getFoldWidget(session, end.row);
+
+ if (fw == "start" && end.row > start.row) {
+ end.row --;
+ end.column = session.getLine(end.row).length;
+ }
+ return Range.fromPoints(start, end);
+ };
+
+ this.closingBracketBlock = function(session, bracket, row, column, typeRe) {
+ var end = {row: row, column: column};
+ var start = session.$findOpeningBracket(bracket, end);
+
+ if (!start)
+ return;
+
+ start.column++;
+ end.column--;
+
+ return Range.fromPoints(start, end);
+ };
+}).call(FoldMode.prototype);
+
+});
+;
+ (function() {
+ ace.require(["ace/ace"], function(a) {
+ a && a.config.init();
+ if (!window.ace)
+ window.ace = {};
+ for (var key in a) if (a.hasOwnProperty(key))
+ ace[key] = a[key];
+ });
+ })();
+ \ No newline at end of file
diff --git a/contexts/data/lib/ace/ext-static_highlight.js b/contexts/data/lib/ace/ext-static_highlight.js
new file mode 100644
index 0000000..723de68
--- /dev/null
+++ b/contexts/data/lib/ace/ext-static_highlight.js
@@ -0,0 +1,96 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/ext/static_highlight', ['require', 'exports', 'module' , 'ace/edit_session', 'ace/layer/text'], function(require, exports, module) {
+
+
+var EditSession = require("../edit_session").EditSession;
+var TextLayer = require("../layer/text").Text;
+var baseStyles = ".ace_editor {\
+font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace;\
+font-size: 12px;\
+}\
+.ace_editor .ace_gutter { \
+width: 25px !important;\
+display: block;\
+float: left;\
+text-align: right; \
+padding: 0 3px 0 0; \
+margin-right: 3px;\
+}\
+.ace_line { clear: both; }\
+*.ace_gutter-cell {\
+-moz-user-select: -moz-none;\
+-khtml-user-select: none;\
+-webkit-user-select: none;\
+user-select: none;\
+}";
+
+exports.render = function(input, mode, theme, lineStart, disableGutter) {
+ lineStart = parseInt(lineStart || 1, 10);
+
+ var session = new EditSession("");
+ session.setMode(mode);
+ session.setUseWorker(false);
+
+ var textLayer = new TextLayer(document.createElement("div"));
+ textLayer.setSession(session);
+ textLayer.config = {
+ characterWidth: 10,
+ lineHeight: 20
+ };
+
+ session.setValue(input);
+
+ var stringBuilder = [];
+ var length = session.getLength();
+
+ for(var ix = 0; ix < length; ix++) {
+ stringBuilder.push("<div class='ace_line'>");
+ if (!disableGutter)
+ stringBuilder.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>" + (ix + lineStart) + "</span>");
+ textLayer.$renderLine(stringBuilder, ix, true, false);
+ stringBuilder.push("</div>");
+ }
+ var html = "<div class=':cssClass'>\
+ <div class='ace_editor ace_scroller ace_text-layer'>\
+ :code\
+ </div>\
+ </div>".replace(/:cssClass/, theme.cssClass).replace(/:code/, stringBuilder.join(""));
+
+ textLayer.destroy();
+
+ return {
+ css: baseStyles + theme.cssText,
+ html: html
+ };
+};
+
+});
diff --git a/contexts/data/lib/ace/ext-textarea.js b/contexts/data/lib/ace/ext-textarea.js
new file mode 100644
index 0000000..472df98
--- /dev/null
+++ b/contexts/data/lib/ace/ext-textarea.js
@@ -0,0 +1,591 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/ext/textarea', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/lib/net', 'ace/ace', 'ace/theme/textmate', 'ace/mode/text'], function(require, exports, module) {
+
+
+var event = require("../lib/event");
+var UA = require("../lib/useragent");
+var net = require("../lib/net");
+var ace = require("../ace");
+
+require("../theme/textmate");
+
+module.exports = exports = ace;
+var getCSSProperty = function(element, container, property) {
+ var ret = element.style[property];
+
+ if (!ret) {
+ if (window.getComputedStyle) {
+ ret = window.getComputedStyle(element, '').getPropertyValue(property);
+ } else {
+ ret = element.currentStyle[property];
+ }
+ }
+
+ if (!ret || ret == 'auto' || ret == 'intrinsic') {
+ ret = container.style[property];
+ }
+ return ret;
+};
+
+function applyStyles(elm, styles) {
+ for (var style in styles) {
+ elm.style[style] = styles[style];
+ }
+}
+
+function setupContainer(element, getValue) {
+ if (element.type != 'textarea') {
+ throw "Textarea required!";
+ }
+
+ var parentNode = element.parentNode;
+ var container = document.createElement('div');
+ var resizeEvent = function() {
+ var style = 'position:relative;';
+ [
+ 'margin-top', 'margin-left', 'margin-right', 'margin-bottom'
+ ].forEach(function(item) {
+ style += item + ':' +
+ getCSSProperty(element, container, item) + ';';
+ });
+ var width = getCSSProperty(element, container, 'width') || (element.clientWidth + "px");
+ var height = getCSSProperty(element, container, 'height') || (element.clientHeight + "px");
+ style += 'height:' + height + ';width:' + width + ';';
+ style += 'display:inline-block;';
+ container.setAttribute('style', style);
+ };
+ event.addListener(window, 'resize', resizeEvent);
+ resizeEvent();
+ if (element.nextSibling) {
+ parentNode.insertBefore(container, element.nextSibling);
+ } else {
+ parentNode.appendChild(container);
+ }
+ while (parentNode !== document) {
+ if (parentNode.tagName.toUpperCase() === 'FORM') {
+ var oldSumit = parentNode.onsubmit;
+ parentNode.onsubmit = function(evt) {
+ element.innerHTML = getValue();
+ element.value = getValue();
+ if (oldSumit) {
+ oldSumit.call(this, evt);
+ }
+ };
+ break;
+ }
+ parentNode = parentNode.parentNode;
+ }
+ return container;
+}
+
+exports.transformTextarea = function(element, loader) {
+ var session;
+ var container = setupContainer(element, function() {
+ return session.getValue();
+ });
+ element.style.display = 'none';
+ container.style.background = 'white';
+ var editorDiv = document.createElement("div");
+ applyStyles(editorDiv, {
+ top: "0px",
+ left: "0px",
+ right: "0px",
+ bottom: "0px",
+ border: "1px solid gray"
+ });
+ container.appendChild(editorDiv);
+
+ var settingOpener = document.createElement("div");
+ applyStyles(settingOpener, {
+ position: "absolute",
+ right: "0px",
+ bottom: "0px",
+ background: "red",
+ cursor: "nw-resize",
+ borderStyle: "solid",
+ borderWidth: "9px 8px 10px 9px",
+ width: "2px",
+ borderColor: "lightblue gray gray lightblue",
+ zIndex: 101
+ });
+
+ var settingDiv = document.createElement("div");
+ var settingDivStyles = {
+ top: "0px",
+ left: "0px",
+ right: "0px",
+ bottom: "0px",
+ position: "absolute",
+ padding: "5px",
+ zIndex: 100,
+ color: "white",
+ display: "none",
+ overflow: "auto",
+ fontSize: "14px"
+ };
+ if (!UA.isOldIE) {
+ settingDivStyles.backgroundColor = "rgba(0, 0, 0, 0.6)";
+ } else {
+ settingDivStyles.backgroundColor = "#333";
+ }
+
+ applyStyles(settingDiv, settingDivStyles);
+ container.appendChild(settingDiv);
+ var options = {};
+
+ var editor = ace.edit(editorDiv);
+ session = editor.getSession();
+
+ session.setValue(element.value || element.innerHTML);
+ editor.focus();
+ editorDiv.appendChild(settingOpener);
+ setupApi(editor, editorDiv, settingDiv, ace, options, loader);
+ setupSettingPanel(settingDiv, settingOpener, editor, options);
+
+ var state = "";
+ event.addListener(settingOpener, "mousemove", function(e) {
+ var rect = this.getBoundingClientRect();
+ var x = e.clientX - rect.left, y = e.clientY - rect.top;
+ if (x + y < (rect.width + rect.height)/2) {
+ this.style.cursor = "pointer";
+ state = "toggle";
+ } else {
+ state = "resize";
+ this.style.cursor = "nw-resize";
+ }
+ });
+
+ event.addListener(settingOpener, "mousedown", function(e) {
+ if (state == "toggle") {
+ editor.setDisplaySettings();
+ return;
+ }
+ container.style.zIndex = 100000;
+ var rect = container.getBoundingClientRect();
+ var startX = rect.width + rect.left - e.clientX;
+ var startY = rect.height + rect.top - e.clientY;
+ event.capture(settingOpener, function(e) {
+ container.style.width = e.clientX - rect.left + startX + "px";
+ container.style.height = e.clientY - rect.top + startY + "px";
+ editor.resize();
+ }, function() {});
+ });
+
+ return editor;
+};
+
+function load(url, module, callback) {
+ net.loadScript(url, function() {
+ require([module], callback);
+ });
+}
+
+function setupApi(editor, editorDiv, settingDiv, ace, options, loader) {
+ var session = editor.getSession();
+ var renderer = editor.renderer;
+ loader = loader || load;
+
+ function toBool(value) {
+ return value == "true";
+ }
+
+ editor.setDisplaySettings = function(display) {
+ if (display == null)
+ display = settingDiv.style.display == "none";
+ settingDiv.style.display = display ? "block" : "none";
+ };
+
+ editor.setOption = function(key, value) {
+ if (options[key] == value) return;
+
+ switch (key) {
+ case "gutter":
+ renderer.setShowGutter(toBool(value));
+ break;
+
+ case "mode":
+ if (value != "text") {
+ loader("mode-" + value + ".js", "ace/mode/" + value, function() {
+ var aceMode = require("../mode/" + value).Mode;
+ session.setMode(new aceMode());
+ });
+ } else {
+ session.setMode(new (require("../mode/text").Mode));
+ }
+ break;
+
+ case "theme":
+ if (value != "textmate") {
+ loader("theme-" + value + ".js", "ace/theme/" + value, function() {
+ editor.setTheme("ace/theme/" + value);
+ });
+ } else {
+ editor.setTheme("ace/theme/textmate");
+ }
+ break;
+
+ case "fontSize":
+ editorDiv.style.fontSize = value;
+ break;
+
+ case "softWrap":
+ switch (value) {
+ case "off":
+ session.setUseWrapMode(false);
+ renderer.setPrintMarginColumn(80);
+ break;
+ case "40":
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(40, 40);
+ renderer.setPrintMarginColumn(40);
+ break;
+ case "80":
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(80, 80);
+ renderer.setPrintMarginColumn(80);
+ break;
+ case "free":
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(null, null);
+ renderer.setPrintMarginColumn(80);
+ break;
+ }
+ break;
+
+ case "useSoftTabs":
+ session.setUseSoftTabs(toBool(value));
+ break;
+
+ case "showPrintMargin":
+ renderer.setShowPrintMargin(toBool(value));
+ break;
+
+ case "showInvisibles":
+ editor.setShowInvisibles(toBool(value));
+ break;
+ }
+
+ options[key] = value;
+ };
+
+ editor.getOption = function(key) {
+ return options[key];
+ };
+
+ editor.getOptions = function() {
+ return options;
+ };
+
+ for (var option in exports.options) {
+ editor.setOption(option, exports.options[option]);
+ }
+
+ return editor;
+}
+
+function setupSettingPanel(settingDiv, settingOpener, editor, options) {
+ var BOOL = {
+ "true": true,
+ "false": false
+ };
+
+ var desc = {
+ mode: "Mode:",
+ gutter: "Display Gutter:",
+ theme: "Theme:",
+ fontSize: "Font Size:",
+ softWrap: "Soft Wrap:",
+ showPrintMargin: "Show Print Margin:",
+ useSoftTabs: "Use Soft Tabs:",
+ showInvisibles: "Show Invisibles"
+ };
+
+ var optionValues = {
+ mode: {
+ text: "Plain",
+ javascript: "JavaScript",
+ xml: "XML",
+ html: "HTML",
+ css: "CSS",
+ scss: "SCSS",
+ python: "Python",
+ php: "PHP",
+ java: "Java",
+ ruby: "Ruby",
+ c_cpp: "C/C++",
+ coffee: "CoffeeScript",
+ json: "json",
+ perl: "Perl",
+ clojure: "Clojure",
+ ocaml: "OCaml",
+ csharp: "C#",
+ haxe: "haXe",
+ svg: "SVG",
+ textile: "Textile",
+ groovy: "Groovy",
+ liquid: "Liquid",
+ Scala: "Scala"
+ },
+ theme: {
+ clouds: "Clouds",
+ clouds_midnight: "Clouds Midnight",
+ cobalt: "Cobalt",
+ crimson_editor: "Crimson Editor",
+ dawn: "Dawn",
+ eclipse: "Eclipse",
+ idle_fingers: "Idle Fingers",
+ kr_theme: "Kr Theme",
+ merbivore: "Merbivore",
+ merbivore_soft: "Merbivore Soft",
+ mono_industrial: "Mono Industrial",
+ monokai: "Monokai",
+ pastel_on_dark: "Pastel On Dark",
+ solarized_dark: "Solarized Dark",
+ solarized_light: "Solarized Light",
+ textmate: "Textmate",
+ twilight: "Twilight",
+ vibrant_ink: "Vibrant Ink"
+ },
+ gutter: BOOL,
+ fontSize: {
+ "10px": "10px",
+ "11px": "11px",
+ "12px": "12px",
+ "14px": "14px",
+ "16px": "16px"
+ },
+ softWrap: {
+ off: "Off",
+ 40: "40",
+ 80: "80",
+ free: "Free"
+ },
+ showPrintMargin: BOOL,
+ useSoftTabs: BOOL,
+ showInvisibles: BOOL
+ };
+
+ var table = [];
+ table.push("<table><tr><th>Setting</th><th>Value</th></tr>");
+
+ function renderOption(builder, option, obj, cValue) {
+ builder.push("<select title='" + option + "'>");
+ for (var value in obj) {
+ builder.push("<option value='" + value + "' ");
+
+ if (cValue == value) {
+ builder.push(" selected ");
+ }
+
+ builder.push(">",
+ obj[value],
+ "</option>");
+ }
+ builder.push("</select>");
+ }
+
+ for (var option in options) {
+ table.push("<tr><td>", desc[option], "</td>");
+ table.push("<td>");
+ renderOption(table, option, optionValues[option], options[option]);
+ table.push("</td></tr>");
+ }
+ table.push("</table>");
+ settingDiv.innerHTML = table.join("");
+
+ var selects = settingDiv.getElementsByTagName("select");
+ for (var i = 0; i < selects.length; i++) {
+ var onChange = (function() {
+ var select = selects[i];
+ return function() {
+ var option = select.title;
+ var value = select.value;
+ editor.setOption(option, value);
+ };
+ })();
+ selects[i].onchange = onChange;
+ }
+
+ var button = document.createElement("input");
+ button.type = "button";
+ button.value = "Hide";
+ event.addListener(button, "click", function() {
+ editor.setDisplaySettings(false);
+ });
+ settingDiv.appendChild(button);
+}
+exports.options = {
+ mode: "text",
+ theme: "textmate",
+ gutter: "false",
+ fontSize: "12px",
+ softWrap: "off",
+ showPrintMargin: "false",
+ useSoftTabs: "true",
+ showInvisibles: "true"
+};
+
+});
+
+ace.define('ace/theme/textmate', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+
+exports.isDark = false;
+exports.cssClass = "ace-tm";
+exports.cssText = ".ace-tm .ace_gutter {\
+background: #f0f0f0;\
+color: #333;\
+}\
+.ace-tm .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-tm .ace_fold {\
+background-color: #6B72E6;\
+}\
+.ace-tm .ace_scroller {\
+background-color: #FFFFFF;\
+}\
+.ace-tm .ace_cursor {\
+border-left: 2px solid black;\
+}\
+.ace-tm .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid black;\
+}\
+.ace-tm .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-tm .ace_storage,\
+.ace-tm .ace_keyword {\
+color: blue;\
+}\
+.ace-tm .ace_constant {\
+color: rgb(197, 6, 11);\
+}\
+.ace-tm .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-tm .ace_constant.ace_language {\
+color: rgb(88, 92, 246);\
+}\
+.ace-tm .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-tm .ace_invalid {\
+background-color: rgba(255, 0, 0, 0.1);\
+color: red;\
+}\
+.ace-tm .ace_support.ace_function {\
+color: rgb(60, 76, 114);\
+}\
+.ace-tm .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-tm .ace_support.ace_type,\
+.ace-tm .ace_support.ace_class {\
+color: rgb(109, 121, 222);\
+}\
+.ace-tm .ace_keyword.ace_operator {\
+color: rgb(104, 118, 135);\
+}\
+.ace-tm .ace_string {\
+color: rgb(3, 106, 7);\
+}\
+.ace-tm .ace_comment {\
+color: rgb(76, 136, 107);\
+}\
+.ace-tm .ace_comment.ace_doc {\
+color: rgb(0, 102, 255);\
+}\
+.ace-tm .ace_comment.ace_doc.ace_tag {\
+color: rgb(128, 159, 191);\
+}\
+.ace-tm .ace_constant.ace_numeric {\
+color: rgb(0, 0, 205);\
+}\
+.ace-tm .ace_variable {\
+color: rgb(49, 132, 149);\
+}\
+.ace-tm .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-tm .ace_entity.ace_name.ace_function {\
+color: #0000A2;\
+}\
+.ace-tm .ace_markup.ace_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-tm .ace_markup.ace_list {\
+color:rgb(185, 6, 144);\
+}\
+.ace-tm .ace_meta.ace_tag {\
+color:rgb(0, 22, 142);\
+}\
+.ace-tm .ace_string.ace_regex {\
+color: rgb(255, 0, 0)\
+}\
+.ace-tm .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-tm.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px white;\
+border-radius: 2px;\
+}\
+.ace-tm .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-tm .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-tm .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-tm .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.07);\
+}\
+.ace-tm .ace_gutter-active-line {\
+background-color : #dcdcdc;\
+}\
+.ace-tm .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-tm .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/keybinding-emacs-noconflict.js b/contexts/data/lib/ace/keybinding-emacs-noconflict.js
deleted file mode 100644
index 3ea8547..0000000
--- a/contexts/data/lib/ace/keybinding-emacs-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/keyboard/keybinding/emacs",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){"use strict";var d=a("../state_handler").StateHandler,e=a("../state_handler").matchCharacterOnly,f={start:[{key:"ctrl-x",then:"c-x"},{regex:["(?:command-([0-9]*))*","(down|ctrl-n)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(right|ctrl-f)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(up|ctrl-p)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(left|ctrl-b)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",regex:["(?:command-([0-9]*))","([^0-9]+)*"],match:e,exec:"inserttext",params:[{name:"times",match:1,type:"number",defaultValue:"1"},{name:"text",match:2}]},{comment:"This binding matches numbers as long as there is no meta_number in the buffer.",regex:["(command-[0-9]*)*","([0-9]+)"],match:e,disallowMatches:[1],exec:"inserttext",params:[{name:"text",match:2,type:"text"}]},{regex:["command-([0-9]*)","(command-[0-9]|[0-9])"],comment:"Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."}],"c-x":[{key:"ctrl-g",then:"start"},{key:"ctrl-s",exec:"save",then:"start"}]};b.Emacs=new d(f)}),ace.define("ace/keyboard/state_handler",["require","exports","module"],function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}"use strict";var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(var b in a)this.$buildBindingsRegex(a[b]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?("key"in a||(a.key=new RegExp("^"+a.regex[1]+"$")),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c,d){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var e=[];b&1&&e.push("ctrl"),b&8&&e.push("command"),b&2&&e.push("option"),b&4&&e.push("shift"),c&&e.push(c);var f=e.join("-"),g=a.buffer+f;b!=2&&(a.buffer=g);var h={bufferToUse:g,symbolicName:f};return d&&(h.keyIdentifier=d.keyIdentifier),h},$find:function(a,b,c,e,f,g){var h={};return this.keymapping[a.state].some(function(i){var j;if(i.key&&!i.key.test(c))return!1;if(i.regex&&!(j=i.regex.exec(b)))return!1;if(i.match&&!i.match(b,e,f,c,g))return!1;if(i.disallowMatches)for(var k=0;k<i.disallowMatches.length;k++)if(!!j[i.disallowMatches[k]])return!1;if(i.exec){h.command=i.exec;if(i.params){var l;h.args={},i.params.forEach(function(a){a.match!=null&&j!=null?l=j[a.match]||a.defaultValue:l=a.defaultValue,a.type==="number"&&(l=parseInt(l)),h.args[a.name]=l})}a.buffer=""}return i.then&&(a.state=i.then,a.buffer=""),h.command==null&&(h.command="null"),d&&console.log("KeyboardStateMapper#find",i),!0}),h.command?h:(a.buffer="",!1)},handleKeyboard:function(a,b,c,e,f){if(b==0||c!=""&&c!=String.fromCharCode(0)){var g=this.$composeBuffer(a,b,c,f),h=g.bufferToUse,i=g.symbolicName,j=g.keyIdentifier;return g=this.$find(a,h,i,b,c,j),d&&console.log("KeyboardStateMapper#match",h,i,g),g}return null}},b.matchCharacterOnly=function(a,b,c,d){return b==0?!0:b==4&&c.length==1?!0:!1},b.StateHandler=e}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/keybinding-emacs-uncompressed-noconflict.js b/contexts/data/lib/ace/keybinding-emacs-uncompressed-noconflict.js
deleted file mode 100644
index aaa7ec2..0000000
--- a/contexts/data/lib/ace/keybinding-emacs-uncompressed-noconflict.js
+++ /dev/null
@@ -1,415 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck (julian.viereck@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/keyboard/keybinding/emacs', ['require', 'exports', 'module' , 'ace/keyboard/state_handler'], function(require, exports, module) {
-"use strict";
-
-var StateHandler = require("../state_handler").StateHandler;
-var matchCharacterOnly = require("../state_handler").matchCharacterOnly;
-
-var emacsState = {
- start: [
- {
- key: "ctrl-x",
- then: "c-x"
- },
- {
- regex: [ "(?:command-([0-9]*))*", "(down|ctrl-n)" ],
- exec: "golinedown",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ]
- },
- {
- regex: [ "(?:command-([0-9]*))*", "(right|ctrl-f)" ],
- exec: "gotoright",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ]
- },
- {
- regex: [ "(?:command-([0-9]*))*", "(up|ctrl-p)" ],
- exec: "golineup",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ]
- },
- {
- regex: [ "(?:command-([0-9]*))*", "(left|ctrl-b)" ],
- exec: "gotoleft",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ]
- },
- {
- comment: "This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",
- regex: [ "(?:command-([0-9]*))", "([^0-9]+)*" ],
- match: matchCharacterOnly,
- exec: "inserttext",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: "1"
- },
- {
- name: "text",
- match: 2
- }
- ]
- },
- {
- comment: "This binding matches numbers as long as there is no meta_number in the buffer.",
- regex: [ "(command-[0-9]*)*", "([0-9]+)" ],
- match: matchCharacterOnly,
- disallowMatches: [ 1 ],
- exec: "inserttext",
- params: [
- {
- name: "text",
- match: 2,
- type: "text"
- }
- ]
- },
- {
- regex: [ "command-([0-9]*)", "(command-[0-9]|[0-9])" ],
- comment: "Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."
- }
- ],
- "c-x": [
- {
- key: "ctrl-g",
- then: "start"
- },
- {
- key: "ctrl-s",
- exec: "save",
- then: "start"
- }
- ]
-};
-
-exports.Emacs = new StateHandler(emacsState);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck (julian.viereck@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/keyboard/state_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-// If you're developing a new keymapping and want to get an idea what's going
-// on, then enable debugging.
-var DEBUG = false;
-
-function StateHandler(keymapping) {
- this.keymapping = this.$buildKeymappingRegex(keymapping);
-}
-
-StateHandler.prototype = {
- /**
- * Build the RegExp from the keymapping as RegExp can't stored directly
- * in the metadata JSON and as the RegExp used to match the keys/buffer
- * need to be adapted.
- */
- $buildKeymappingRegex: function(keymapping) {
- for (var state in keymapping) {
- this.$buildBindingsRegex(keymapping[state]);
- }
- return keymapping;
- },
-
- $buildBindingsRegex: function(bindings) {
- // Escape a given Regex string.
- bindings.forEach(function(binding) {
- if (binding.key) {
- binding.key = new RegExp('^' + binding.key + '$');
- } else if (Array.isArray(binding.regex)) {
- if (!('key' in binding))
- binding.key = new RegExp('^' + binding.regex[1] + '$');
- binding.regex = new RegExp(binding.regex.join('') + '$');
- } else if (binding.regex) {
- binding.regex = new RegExp(binding.regex + '$');
- }
- });
- },
-
- $composeBuffer: function(data, hashId, key, e) {
- // Initialize the data object.
- if (data.state == null || data.buffer == null) {
- data.state = "start";
- data.buffer = "";
- }
-
- var keyArray = [];
- if (hashId & 1) keyArray.push("ctrl");
- if (hashId & 8) keyArray.push("command");
- if (hashId & 2) keyArray.push("option");
- if (hashId & 4) keyArray.push("shift");
- if (key) keyArray.push(key);
-
- var symbolicName = keyArray.join("-");
- var bufferToUse = data.buffer + symbolicName;
-
- // Don't add the symbolic name to the key buffer if the alt_ key is
- // part of the symbolic name. If it starts with alt_, this means
- // that the user hit an alt keycombo and there will be a single,
- // new character detected after this event, which then will be
- // added to the buffer (e.g. alt_j will result in ∆).
- //
- // We test for 2 and not for & 2 as we only want to exclude the case where
- // the option key is pressed alone.
- if (hashId != 2) {
- data.buffer = bufferToUse;
- }
-
- var bufferObj = {
- bufferToUse: bufferToUse,
- symbolicName: symbolicName,
- };
-
- if (e) {
- bufferObj.keyIdentifier = e.keyIdentifier
- }
-
- return bufferObj;
- },
-
- $find: function(data, buffer, symbolicName, hashId, key, keyIdentifier) {
- // Holds the command to execute and the args if a command matched.
- var result = {};
-
- // Loop over all the bindings of the keymap until a match is found.
- this.keymapping[data.state].some(function(binding) {
- var match;
-
- // Check if the key matches.
- if (binding.key && !binding.key.test(symbolicName)) {
- return false;
- }
-
- // Check if the regex matches.
- if (binding.regex && !(match = binding.regex.exec(buffer))) {
- return false;
- }
-
- // Check if the match function matches.
- if (binding.match && !binding.match(buffer, hashId, key, symbolicName, keyIdentifier)) {
- return false;
- }
-
- // Check for disallowed matches.
- if (binding.disallowMatches) {
- for (var i = 0; i < binding.disallowMatches.length; i++) {
- if (!!match[binding.disallowMatches[i]]) {
- return false;
- }
- }
- }
-
- // If there is a command to execute, then figure out the
- // command and the arguments.
- if (binding.exec) {
- result.command = binding.exec;
-
- // Build the arguments.
- if (binding.params) {
- var value;
- result.args = {};
- binding.params.forEach(function(param) {
- if (param.match != null && match != null) {
- value = match[param.match] || param.defaultValue;
- } else {
- value = param.defaultValue;
- }
-
- if (param.type === 'number') {
- value = parseInt(value);
- }
-
- result.args[param.name] = value;
- });
- }
- data.buffer = "";
- }
-
- // Handle the 'then' property.
- if (binding.then) {
- data.state = binding.then;
- data.buffer = "";
- }
-
- // If no command is set, then execute the "null" fake command.
- if (result.command == null) {
- result.command = "null";
- }
-
- if (DEBUG) {
- console.log("KeyboardStateMapper#find", binding);
- }
- return true;
- });
-
- if (result.command) {
- return result;
- } else {
- data.buffer = "";
- return false;
- }
- },
-
- /**
- * This function is called by keyBinding.
- */
- handleKeyboard: function(data, hashId, key, keyCode, e) {
- // If we pressed any command key but no other key, then ignore the input.
- // Otherwise "shift-" is added to the buffer, and later on "shift-g"
- // which results in "shift-shift-g" which doesn't make sense.
- if (hashId != 0 && (key == "" || key == String.fromCharCode(0))) {
- return null;
- }
-
- // Compute the current value of the keyboard input buffer.
- var r = this.$composeBuffer(data, hashId, key, e);
- var buffer = r.bufferToUse;
- var symbolicName = r.symbolicName;
- var keyId = r.keyIdentifier;
-
- r = this.$find(data, buffer, symbolicName, hashId, key, keyId);
- if (DEBUG) {
- console.log("KeyboardStateMapper#match", buffer, symbolicName, r);
- }
-
- return r;
- }
-}
-
-/**
- * This is a useful matching function and therefore is defined here so that
- * users of KeyboardStateMapper can use it.
- *
- * @return boolean
- * If no command key (Command|Option|Shift|Ctrl) is pressed, it
- * returns true. If the only the Shift key is pressed + a character
- * true is returned as well. Otherwise, false is returned.
- * Summing up, the function returns true whenever the user typed
- * a normal character on the keyboard and no shortcut.
- */
-exports.matchCharacterOnly = function(buffer, hashId, key, symbolicName) {
- // If no command keys are pressed, then catch the input.
- if (hashId == 0) {
- return true;
- }
- // If only the shift key is pressed and a character key, then
- // catch that input as well.
- else if ((hashId == 4) && key.length == 1) {
- return true;
- }
- // Otherwise, we let the input got through.
- else {
- return false;
- }
-};
-
-exports.StateHandler = StateHandler;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/keybinding-emacs-uncompressed.js b/contexts/data/lib/ace/keybinding-emacs-uncompressed.js
deleted file mode 100644
index 1d40eb4..0000000
--- a/contexts/data/lib/ace/keybinding-emacs-uncompressed.js
+++ /dev/null
@@ -1,415 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck (julian.viereck@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/keyboard/keybinding/emacs', ['require', 'exports', 'module' , 'ace/keyboard/state_handler'], function(require, exports, module) {
-"use strict";
-
-var StateHandler = require("../state_handler").StateHandler;
-var matchCharacterOnly = require("../state_handler").matchCharacterOnly;
-
-var emacsState = {
- start: [
- {
- key: "ctrl-x",
- then: "c-x"
- },
- {
- regex: [ "(?:command-([0-9]*))*", "(down|ctrl-n)" ],
- exec: "golinedown",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ]
- },
- {
- regex: [ "(?:command-([0-9]*))*", "(right|ctrl-f)" ],
- exec: "gotoright",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ]
- },
- {
- regex: [ "(?:command-([0-9]*))*", "(up|ctrl-p)" ],
- exec: "golineup",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ]
- },
- {
- regex: [ "(?:command-([0-9]*))*", "(left|ctrl-b)" ],
- exec: "gotoleft",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ]
- },
- {
- comment: "This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",
- regex: [ "(?:command-([0-9]*))", "([^0-9]+)*" ],
- match: matchCharacterOnly,
- exec: "inserttext",
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: "1"
- },
- {
- name: "text",
- match: 2
- }
- ]
- },
- {
- comment: "This binding matches numbers as long as there is no meta_number in the buffer.",
- regex: [ "(command-[0-9]*)*", "([0-9]+)" ],
- match: matchCharacterOnly,
- disallowMatches: [ 1 ],
- exec: "inserttext",
- params: [
- {
- name: "text",
- match: 2,
- type: "text"
- }
- ]
- },
- {
- regex: [ "command-([0-9]*)", "(command-[0-9]|[0-9])" ],
- comment: "Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."
- }
- ],
- "c-x": [
- {
- key: "ctrl-g",
- then: "start"
- },
- {
- key: "ctrl-s",
- exec: "save",
- then: "start"
- }
- ]
-};
-
-exports.Emacs = new StateHandler(emacsState);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck (julian.viereck@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/keyboard/state_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-// If you're developing a new keymapping and want to get an idea what's going
-// on, then enable debugging.
-var DEBUG = false;
-
-function StateHandler(keymapping) {
- this.keymapping = this.$buildKeymappingRegex(keymapping);
-}
-
-StateHandler.prototype = {
- /**
- * Build the RegExp from the keymapping as RegExp can't stored directly
- * in the metadata JSON and as the RegExp used to match the keys/buffer
- * need to be adapted.
- */
- $buildKeymappingRegex: function(keymapping) {
- for (var state in keymapping) {
- this.$buildBindingsRegex(keymapping[state]);
- }
- return keymapping;
- },
-
- $buildBindingsRegex: function(bindings) {
- // Escape a given Regex string.
- bindings.forEach(function(binding) {
- if (binding.key) {
- binding.key = new RegExp('^' + binding.key + '$');
- } else if (Array.isArray(binding.regex)) {
- if (!('key' in binding))
- binding.key = new RegExp('^' + binding.regex[1] + '$');
- binding.regex = new RegExp(binding.regex.join('') + '$');
- } else if (binding.regex) {
- binding.regex = new RegExp(binding.regex + '$');
- }
- });
- },
-
- $composeBuffer: function(data, hashId, key, e) {
- // Initialize the data object.
- if (data.state == null || data.buffer == null) {
- data.state = "start";
- data.buffer = "";
- }
-
- var keyArray = [];
- if (hashId & 1) keyArray.push("ctrl");
- if (hashId & 8) keyArray.push("command");
- if (hashId & 2) keyArray.push("option");
- if (hashId & 4) keyArray.push("shift");
- if (key) keyArray.push(key);
-
- var symbolicName = keyArray.join("-");
- var bufferToUse = data.buffer + symbolicName;
-
- // Don't add the symbolic name to the key buffer if the alt_ key is
- // part of the symbolic name. If it starts with alt_, this means
- // that the user hit an alt keycombo and there will be a single,
- // new character detected after this event, which then will be
- // added to the buffer (e.g. alt_j will result in ∆).
- //
- // We test for 2 and not for & 2 as we only want to exclude the case where
- // the option key is pressed alone.
- if (hashId != 2) {
- data.buffer = bufferToUse;
- }
-
- var bufferObj = {
- bufferToUse: bufferToUse,
- symbolicName: symbolicName,
- };
-
- if (e) {
- bufferObj.keyIdentifier = e.keyIdentifier
- }
-
- return bufferObj;
- },
-
- $find: function(data, buffer, symbolicName, hashId, key, keyIdentifier) {
- // Holds the command to execute and the args if a command matched.
- var result = {};
-
- // Loop over all the bindings of the keymap until a match is found.
- this.keymapping[data.state].some(function(binding) {
- var match;
-
- // Check if the key matches.
- if (binding.key && !binding.key.test(symbolicName)) {
- return false;
- }
-
- // Check if the regex matches.
- if (binding.regex && !(match = binding.regex.exec(buffer))) {
- return false;
- }
-
- // Check if the match function matches.
- if (binding.match && !binding.match(buffer, hashId, key, symbolicName, keyIdentifier)) {
- return false;
- }
-
- // Check for disallowed matches.
- if (binding.disallowMatches) {
- for (var i = 0; i < binding.disallowMatches.length; i++) {
- if (!!match[binding.disallowMatches[i]]) {
- return false;
- }
- }
- }
-
- // If there is a command to execute, then figure out the
- // command and the arguments.
- if (binding.exec) {
- result.command = binding.exec;
-
- // Build the arguments.
- if (binding.params) {
- var value;
- result.args = {};
- binding.params.forEach(function(param) {
- if (param.match != null && match != null) {
- value = match[param.match] || param.defaultValue;
- } else {
- value = param.defaultValue;
- }
-
- if (param.type === 'number') {
- value = parseInt(value);
- }
-
- result.args[param.name] = value;
- });
- }
- data.buffer = "";
- }
-
- // Handle the 'then' property.
- if (binding.then) {
- data.state = binding.then;
- data.buffer = "";
- }
-
- // If no command is set, then execute the "null" fake command.
- if (result.command == null) {
- result.command = "null";
- }
-
- if (DEBUG) {
- console.log("KeyboardStateMapper#find", binding);
- }
- return true;
- });
-
- if (result.command) {
- return result;
- } else {
- data.buffer = "";
- return false;
- }
- },
-
- /**
- * This function is called by keyBinding.
- */
- handleKeyboard: function(data, hashId, key, keyCode, e) {
- // If we pressed any command key but no other key, then ignore the input.
- // Otherwise "shift-" is added to the buffer, and later on "shift-g"
- // which results in "shift-shift-g" which doesn't make sense.
- if (hashId != 0 && (key == "" || key == String.fromCharCode(0))) {
- return null;
- }
-
- // Compute the current value of the keyboard input buffer.
- var r = this.$composeBuffer(data, hashId, key, e);
- var buffer = r.bufferToUse;
- var symbolicName = r.symbolicName;
- var keyId = r.keyIdentifier;
-
- r = this.$find(data, buffer, symbolicName, hashId, key, keyId);
- if (DEBUG) {
- console.log("KeyboardStateMapper#match", buffer, symbolicName, r);
- }
-
- return r;
- }
-}
-
-/**
- * This is a useful matching function and therefore is defined here so that
- * users of KeyboardStateMapper can use it.
- *
- * @return boolean
- * If no command key (Command|Option|Shift|Ctrl) is pressed, it
- * returns true. If the only the Shift key is pressed + a character
- * true is returned as well. Otherwise, false is returned.
- * Summing up, the function returns true whenever the user typed
- * a normal character on the keyboard and no shortcut.
- */
-exports.matchCharacterOnly = function(buffer, hashId, key, symbolicName) {
- // If no command keys are pressed, then catch the input.
- if (hashId == 0) {
- return true;
- }
- // If only the shift key is pressed and a character key, then
- // catch that input as well.
- else if ((hashId == 4) && key.length == 1) {
- return true;
- }
- // Otherwise, we let the input got through.
- else {
- return false;
- }
-};
-
-exports.StateHandler = StateHandler;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/keybinding-emacs.js b/contexts/data/lib/ace/keybinding-emacs.js
index 7ddcd76..93a8f59 100644
--- a/contexts/data/lib/ace/keybinding-emacs.js
+++ b/contexts/data/lib/ace/keybinding-emacs.js
@@ -1 +1,364 @@
-define("ace/keyboard/keybinding/emacs",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){"use strict";var d=a("../state_handler").StateHandler,e=a("../state_handler").matchCharacterOnly,f={start:[{key:"ctrl-x",then:"c-x"},{regex:["(?:command-([0-9]*))*","(down|ctrl-n)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(right|ctrl-f)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(up|ctrl-p)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(left|ctrl-b)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",regex:["(?:command-([0-9]*))","([^0-9]+)*"],match:e,exec:"inserttext",params:[{name:"times",match:1,type:"number",defaultValue:"1"},{name:"text",match:2}]},{comment:"This binding matches numbers as long as there is no meta_number in the buffer.",regex:["(command-[0-9]*)*","([0-9]+)"],match:e,disallowMatches:[1],exec:"inserttext",params:[{name:"text",match:2,type:"text"}]},{regex:["command-([0-9]*)","(command-[0-9]|[0-9])"],comment:"Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."}],"c-x":[{key:"ctrl-g",then:"start"},{key:"ctrl-s",exec:"save",then:"start"}]};b.Emacs=new d(f)}),define("ace/keyboard/state_handler",["require","exports","module"],function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}"use strict";var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(var b in a)this.$buildBindingsRegex(a[b]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?("key"in a||(a.key=new RegExp("^"+a.regex[1]+"$")),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c,d){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var e=[];b&1&&e.push("ctrl"),b&8&&e.push("command"),b&2&&e.push("option"),b&4&&e.push("shift"),c&&e.push(c);var f=e.join("-"),g=a.buffer+f;b!=2&&(a.buffer=g);var h={bufferToUse:g,symbolicName:f};return d&&(h.keyIdentifier=d.keyIdentifier),h},$find:function(a,b,c,e,f,g){var h={};return this.keymapping[a.state].some(function(i){var j;if(i.key&&!i.key.test(c))return!1;if(i.regex&&!(j=i.regex.exec(b)))return!1;if(i.match&&!i.match(b,e,f,c,g))return!1;if(i.disallowMatches)for(var k=0;k<i.disallowMatches.length;k++)if(!!j[i.disallowMatches[k]])return!1;if(i.exec){h.command=i.exec;if(i.params){var l;h.args={},i.params.forEach(function(a){a.match!=null&&j!=null?l=j[a.match]||a.defaultValue:l=a.defaultValue,a.type==="number"&&(l=parseInt(l)),h.args[a.name]=l})}a.buffer=""}return i.then&&(a.state=i.then,a.buffer=""),h.command==null&&(h.command="null"),d&&console.log("KeyboardStateMapper#find",i),!0}),h.command?h:(a.buffer="",!1)},handleKeyboard:function(a,b,c,e,f){if(b==0||c!=""&&c!=String.fromCharCode(0)){var g=this.$composeBuffer(a,b,c,f),h=g.bufferToUse,i=g.symbolicName,j=g.keyIdentifier;return g=this.$find(a,h,i,b,c,j),d&&console.log("KeyboardStateMapper#match",h,i,g),g}return null}},b.matchCharacterOnly=function(a,b,c,d){return b==0?!0:b==4&&c.length==1?!0:!1},b.StateHandler=e}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/keyboard/emacs', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/keyboard/hash_handler', 'ace/lib/keys'], function(require, exports, module) {
+
+
+var dom = require("../lib/dom");
+
+var screenToTextBlockCoordinates = function(pageX, pageY) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+
+ var col = Math.floor(
+ (pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft()) / this.characterWidth
+ );
+ var row = Math.floor(
+ (pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop()) / this.lineHeight
+ );
+
+ return this.session.screenToDocumentPosition(row, col);
+};
+
+var HashHandler = require("./hash_handler").HashHandler;
+exports.handler = new HashHandler();
+
+var initialized = false;
+exports.handler.attach = function(editor) {
+ if (!initialized) {
+ initialized = true;
+ dom.importCssString('\
+ .emacs-mode .ace_cursor{\
+ border: 2px rgba(50,250,50,0.8) solid!important;\
+ -moz-box-sizing: border-box!important;\
+ -webkit-box-sizing: border-box!important;\
+ box-sizing: border-box!important;\
+ background-color: rgba(0,250,0,0.9);\
+ opacity: 0.5;\
+ }\
+ .emacs-mode .ace_cursor.ace_hidden{\
+ opacity: 1;\
+ background-color: transparent;\
+ }\
+ .emacs-mode .ace_overwrite-cursors .ace_cursor {\
+ opacity: 1;\
+ background-color: transparent;\
+ border-width: 0 0 2px 2px !important;\
+ }\
+ .emacs-mode .ace_text-layer {\
+ z-index: 4\
+ }\
+ .emacs-mode .ace_cursor-layer {\
+ z-index: 2\
+ }', 'emacsMode'
+ );
+ }
+
+ editor.renderer.screenToTextCoordinates = screenToTextBlockCoordinates;
+ editor.setStyle("emacs-mode");
+};
+
+exports.handler.detach = function(editor) {
+ delete editor.renderer.screenToTextCoordinates;
+ editor.unsetStyle("emacs-mode");
+};
+
+
+var keys = require("../lib/keys").KEY_MODS;
+var eMods = {
+ C: "ctrl", S: "shift", M: "alt"
+};
+["S-C-M", "S-C", "S-M", "C-M", "S", "C", "M"].forEach(function(c) {
+ var hashId = 0;
+ c.split("-").forEach(function(c){
+ hashId = hashId | keys[eMods[c]];
+ });
+ eMods[hashId] = c.toLowerCase() + "-";
+});
+
+exports.handler.bindKey = function(key, command) {
+ if (!key)
+ return;
+
+ var ckb = this.commmandKeyBinding;
+ key.split("|").forEach(function(keyPart) {
+ keyPart = keyPart.toLowerCase();
+ ckb[keyPart] = command;
+ keyPart = keyPart.split(" ")[0];
+ if (!ckb[keyPart])
+ ckb[keyPart] = "null";
+ }, this);
+};
+
+
+exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
+ if (hashId == -1) {
+ if (data.count) {
+ var str = Array(data.count + 1).join(key);
+ data.count = null;
+ return {command: "insertstring", args: str};
+ }
+ }
+
+ if (key == "\x00")
+ return;
+
+ var modifier = eMods[hashId];
+ if (modifier == "c-" || data.universalArgument) {
+ var count = parseInt(key[key.length - 1]);
+ if (count) {
+ data.count = count;
+ return {command: "null"};
+ }
+ }
+ data.universalArgument = false;
+
+ if (modifier)
+ key = modifier + key;
+
+ if (data.keyChain)
+ key = data.keyChain += " " + key;
+
+ var command = this.commmandKeyBinding[key];
+ data.keyChain = command == "null" ? key : "";
+
+ if (!command)
+ return;
+
+ if (command == "null")
+ return {command: "null"};
+
+ if (command == "universalArgument") {
+ data.universalArgument = true;
+ return {command: "null"};
+ }
+
+ if (typeof command != "string") {
+ var args = command.args;
+ command = command.command;
+ }
+
+ if (typeof command == "string") {
+ command = this.commands[command] || data.editor.commands.commands[command];
+ }
+
+ if (!command.readonly && !command.isYank)
+ data.lastCommand = null;
+
+ if (data.count) {
+ var count = data.count;
+ data.count = 0;
+ return {
+ args: args,
+ command: {
+ exec: function(editor, args) {
+ for (var i = 0; i < count; i++)
+ command.exec(editor, args);
+ }
+ }
+ };
+ }
+
+ return {command: command, args: args};
+};
+
+exports.emacsKeys = {
+ "Up|C-p" : "golineup",
+ "Down|C-n" : "golinedown",
+ "Left|C-b" : "gotoleft",
+ "Right|C-f" : "gotoright",
+ "C-Left|M-b" : "gotowordleft",
+ "C-Right|M-f" : "gotowordright",
+ "Home|C-a" : "gotolinestart",
+ "End|C-e" : "gotolineend",
+ "C-Home|S-M-,": "gotostart",
+ "C-End|S-M-." : "gotoend",
+ "S-Up|S-C-p" : "selectup",
+ "S-Down|S-C-n" : "selectdown",
+ "S-Left|S-C-b" : "selectleft",
+ "S-Right|S-C-f" : "selectright",
+ "S-C-Left|S-M-b" : "selectwordleft",
+ "S-C-Right|S-M-f" : "selectwordright",
+ "S-Home|S-C-a" : "selecttolinestart",
+ "S-End|S-C-e" : "selecttolineend",
+ "S-C-Home" : "selecttostart",
+ "S-C-End" : "selecttoend",
+
+ "C-l" : "recenterTopBottom",
+ "M-s" : "centerselection",
+ "M-g": "gotoline",
+ "C-x C-p": "selectall",
+ "C-Down": "gotopagedown",
+ "C-Up": "gotopageup",
+ "PageDown|C-v": "gotopagedown",
+ "PageUp|M-v": "gotopageup",
+ "S-C-Down": "selectpagedown",
+ "S-C-Up": "selectpageup",
+ "C-s": "findnext",
+ "C-r": "findprevious",
+ "M-C-s": "findnext",
+ "M-C-r": "findprevious",
+ "S-M-5": "replace",
+ "Backspace": "backspace",
+ "Delete|C-d": "del",
+ "Return|C-m": {command: "insertstring", args: "\n"}, // "newline"
+ "C-o": "splitline",
+
+ "M-d|C-Delete": {command: "killWord", args: "right"},
+ "C-Backspace|M-Backspace|M-Delete": {command: "killWord", args: "left"},
+ "C-k": "killLine",
+
+ "C-y|S-Delete": "yank",
+ "M-y": "yankRotate",
+ "C-g": "keyboardQuit",
+
+ "C-w": "killRegion",
+ "M-w": "killRingSave",
+
+ "C-Space": "setMark",
+ "C-x C-x": "exchangePointAndMark",
+
+ "C-t": "transposeletters",
+
+ "M-u": "touppercase",
+ "M-l": "tolowercase",
+ "M-/": "autocomplete",
+ "C-u": "universalArgument",
+ "M-;": "togglecomment",
+
+ "C-/|C-x u|S-C--|C-z": "undo",
+ "S-C-/|S-C-x u|C--|S-C-z": "redo", //infinite undo?
+ "C-x r": "selectRectangularRegion"
+};
+
+
+exports.handler.bindKeys(exports.emacsKeys);
+
+exports.handler.addCommands({
+ recenterTopBottom: function(editor) {
+ var renderer = editor.renderer;
+ var pos = renderer.$cursorLayer.getPixelPosition();
+ var h = renderer.$size.scrollerHeight - renderer.lineHeight;
+ var scrollTop = renderer.scrollTop;
+ if (Math.abs(pos.top - scrollTop) < 2) {
+ scrollTop = pos.top - h;
+ } else if (Math.abs(pos.top - scrollTop - h * 0.5) < 2) {
+ scrollTop = pos.top;
+ } else {
+ scrollTop = pos.top - h * 0.5;
+ }
+ editor.session.setScrollTop(scrollTop);
+ },
+ selectRectangularRegion: function(editor) {
+ editor.multiSelect.toggleBlockSelection();
+ },
+ setMark: function() {
+ },
+ exchangePointAndMark: {
+ exec: function(editor) {
+ var range = editor.selection.getRange();
+ editor.selection.setSelectionRange(range, !editor.selection.isBackwards());
+ },
+ readonly: true,
+ multiselectAction: "forEach"
+ },
+ killWord: {
+ exec: function(editor, dir) {
+ editor.clearSelection();
+ if (dir == "left")
+ editor.selection.selectWordLeft();
+ else
+ editor.selection.selectWordRight();
+
+ var range = editor.getSelectionRange();
+ var text = editor.session.getTextRange(range);
+ exports.killRing.add(text);
+
+ editor.session.remove(range);
+ editor.clearSelection();
+ },
+ multiselectAction: "forEach"
+ },
+ killLine: function(editor) {
+ editor.selection.selectLine();
+ var range = editor.getSelectionRange();
+ var text = editor.session.getTextRange(range);
+ exports.killRing.add(text);
+
+ editor.session.remove(range);
+ editor.clearSelection();
+ },
+ yank: function(editor) {
+ editor.onPaste(exports.killRing.get());
+ editor.keyBinding.$data.lastCommand = "yank";
+ },
+ yankRotate: function(editor) {
+ if (editor.keyBinding.$data.lastCommand != "yank")
+ return;
+
+ editor.undo();
+ editor.onPaste(exports.killRing.rotate());
+ editor.keyBinding.$data.lastCommand = "yank";
+ },
+ killRegion: function(editor) {
+ exports.killRing.add(editor.getCopyText());
+ editor.commands.byName.cut.exec(editor);
+ },
+ killRingSave: function(editor) {
+ exports.killRing.add(editor.getCopyText());
+ }
+});
+
+var commands = exports.handler.commands;
+commands.yank.isYank = true;
+commands.yankRotate.isYank = true;
+
+exports.killRing = {
+ $data: [],
+ add: function(str) {
+ str && this.$data.push(str);
+ if (this.$data.length > 30)
+ this.$data.shift();
+ },
+ get: function() {
+ return this.$data[this.$data.length - 1] || "";
+ },
+ pop: function() {
+ if (this.$data.length > 1)
+ this.$data.pop();
+ return this.get();
+ },
+ rotate: function() {
+ this.$data.unshift(this.$data.pop());
+ return this.get();
+ }
+};
+
+
+});
diff --git a/contexts/data/lib/ace/keybinding-vim-noconflict.js b/contexts/data/lib/ace/keybinding-vim-noconflict.js
deleted file mode 100644
index 0be29e7..0000000
--- a/contexts/data/lib/ace/keybinding-vim-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/keyboard/keybinding/vim",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){"use strict";var d=a("../state_handler").StateHandler,e=a("../state_handler").matchCharacterOnly,f=function(a,b,c){return{regex:["([0-9]*)",a],exec:b,params:[{name:"times",match:1,type:"number",defaultValue:1}],then:c}},g={start:[{key:"i",then:"insertMode"},{key:"d",then:"deleteMode"},{key:"a",exec:"gotoright",then:"insertMode"},{key:"shift-i",exec:"gotolinestart",then:"insertMode"},{key:"shift-a",exec:"gotolineend",then:"insertMode"},{key:"shift-c",exec:"removetolineend",then:"insertMode"},{key:"shift-r",exec:"overwrite",then:"replaceMode"},f("(k|up)","golineup"),f("(j|down)","golinedown"),f("(l|right)","gotoright"),f("(h|left)","gotoleft"),{key:"shift-g",exec:"gotoend"},f("b","gotowordleft"),f("e","gotowordright"),f("x","del"),f("shift-x","backspace"),f("shift-d","removetolineend"),f("u","undo"),{comment:"Catch some keyboard input to stop it here",match:e}],insertMode:[{key:"esc",then:"start"}],replaceMode:[{key:"esc",exec:"overwrite",then:"start"}],deleteMode:[{key:"d",exec:"removeline",then:"start"}]};b.Vim=new d(g)}),ace.define("ace/keyboard/state_handler",["require","exports","module"],function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}"use strict";var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(var b in a)this.$buildBindingsRegex(a[b]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?("key"in a||(a.key=new RegExp("^"+a.regex[1]+"$")),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c,d){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var e=[];b&1&&e.push("ctrl"),b&8&&e.push("command"),b&2&&e.push("option"),b&4&&e.push("shift"),c&&e.push(c);var f=e.join("-"),g=a.buffer+f;b!=2&&(a.buffer=g);var h={bufferToUse:g,symbolicName:f};return d&&(h.keyIdentifier=d.keyIdentifier),h},$find:function(a,b,c,e,f,g){var h={};return this.keymapping[a.state].some(function(i){var j;if(i.key&&!i.key.test(c))return!1;if(i.regex&&!(j=i.regex.exec(b)))return!1;if(i.match&&!i.match(b,e,f,c,g))return!1;if(i.disallowMatches)for(var k=0;k<i.disallowMatches.length;k++)if(!!j[i.disallowMatches[k]])return!1;if(i.exec){h.command=i.exec;if(i.params){var l;h.args={},i.params.forEach(function(a){a.match!=null&&j!=null?l=j[a.match]||a.defaultValue:l=a.defaultValue,a.type==="number"&&(l=parseInt(l)),h.args[a.name]=l})}a.buffer=""}return i.then&&(a.state=i.then,a.buffer=""),h.command==null&&(h.command="null"),d&&console.log("KeyboardStateMapper#find",i),!0}),h.command?h:(a.buffer="",!1)},handleKeyboard:function(a,b,c,e,f){if(b==0||c!=""&&c!=String.fromCharCode(0)){var g=this.$composeBuffer(a,b,c,f),h=g.bufferToUse,i=g.symbolicName,j=g.keyIdentifier;return g=this.$find(a,h,i,b,c,j),d&&console.log("KeyboardStateMapper#match",h,i,g),g}return null}},b.matchCharacterOnly=function(a,b,c,d){return b==0?!0:b==4&&c.length==1?!0:!1},b.StateHandler=e}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/keybinding-vim-uncompressed-noconflict.js b/contexts/data/lib/ace/keybinding-vim-uncompressed-noconflict.js
deleted file mode 100644
index cd96f8a..0000000
--- a/contexts/data/lib/ace/keybinding-vim-uncompressed-noconflict.js
+++ /dev/null
@@ -1,403 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck (julian.viereck@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/keyboard/keybinding/vim', ['require', 'exports', 'module' , 'ace/keyboard/state_handler'], function(require, exports, module) {
-"use strict";
-
-var StateHandler = require("../state_handler").StateHandler;
-var matchCharacterOnly = require("../state_handler").matchCharacterOnly;
-
-var vimcommand = function(key, exec, then) {
- return {
- regex: [ "([0-9]*)", key ],
- exec: exec,
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ],
- then: then
- }
-}
-
-var vimStates = {
- start: [
- {
- key: "i",
- then: "insertMode"
- },
- {
- key: "d",
- then: "deleteMode"
- },
- {
- key: "a",
- exec: "gotoright",
- then: "insertMode"
- },
- {
- key: "shift-i",
- exec: "gotolinestart",
- then: "insertMode"
- },
- {
- key: "shift-a",
- exec: "gotolineend",
- then: "insertMode"
- },
- {
- key: "shift-c",
- exec: "removetolineend",
- then: "insertMode"
- },
- {
- key: "shift-r",
- exec: "overwrite",
- then: "replaceMode"
- },
- vimcommand("(k|up)", "golineup"),
- vimcommand("(j|down)", "golinedown"),
- vimcommand("(l|right)", "gotoright"),
- vimcommand("(h|left)", "gotoleft"),
- {
- key: "shift-g",
- exec: "gotoend"
- },
- vimcommand("b", "gotowordleft"),
- vimcommand("e", "gotowordright"),
- vimcommand("x", "del"),
- vimcommand("shift-x", "backspace"),
- vimcommand("shift-d", "removetolineend"),
- vimcommand("u", "undo"), // [count] on this may/may not work, depending on browser implementation...
- {
- comment: "Catch some keyboard input to stop it here",
- match: matchCharacterOnly
- }
- ],
- insertMode: [
- {
- key: "esc",
- then: "start"
- }
- ],
- replaceMode: [
- {
- key: "esc",
- exec: "overwrite",
- then: "start"
- }
- ],
- deleteMode: [
- {
- key: "d",
- exec: "removeline",
- then: "start"
- }
- ]
-};
-
-exports.Vim = new StateHandler(vimStates);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck (julian.viereck@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/keyboard/state_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-// If you're developing a new keymapping and want to get an idea what's going
-// on, then enable debugging.
-var DEBUG = false;
-
-function StateHandler(keymapping) {
- this.keymapping = this.$buildKeymappingRegex(keymapping);
-}
-
-StateHandler.prototype = {
- /**
- * Build the RegExp from the keymapping as RegExp can't stored directly
- * in the metadata JSON and as the RegExp used to match the keys/buffer
- * need to be adapted.
- */
- $buildKeymappingRegex: function(keymapping) {
- for (var state in keymapping) {
- this.$buildBindingsRegex(keymapping[state]);
- }
- return keymapping;
- },
-
- $buildBindingsRegex: function(bindings) {
- // Escape a given Regex string.
- bindings.forEach(function(binding) {
- if (binding.key) {
- binding.key = new RegExp('^' + binding.key + '$');
- } else if (Array.isArray(binding.regex)) {
- if (!('key' in binding))
- binding.key = new RegExp('^' + binding.regex[1] + '$');
- binding.regex = new RegExp(binding.regex.join('') + '$');
- } else if (binding.regex) {
- binding.regex = new RegExp(binding.regex + '$');
- }
- });
- },
-
- $composeBuffer: function(data, hashId, key, e) {
- // Initialize the data object.
- if (data.state == null || data.buffer == null) {
- data.state = "start";
- data.buffer = "";
- }
-
- var keyArray = [];
- if (hashId & 1) keyArray.push("ctrl");
- if (hashId & 8) keyArray.push("command");
- if (hashId & 2) keyArray.push("option");
- if (hashId & 4) keyArray.push("shift");
- if (key) keyArray.push(key);
-
- var symbolicName = keyArray.join("-");
- var bufferToUse = data.buffer + symbolicName;
-
- // Don't add the symbolic name to the key buffer if the alt_ key is
- // part of the symbolic name. If it starts with alt_, this means
- // that the user hit an alt keycombo and there will be a single,
- // new character detected after this event, which then will be
- // added to the buffer (e.g. alt_j will result in ∆).
- //
- // We test for 2 and not for & 2 as we only want to exclude the case where
- // the option key is pressed alone.
- if (hashId != 2) {
- data.buffer = bufferToUse;
- }
-
- var bufferObj = {
- bufferToUse: bufferToUse,
- symbolicName: symbolicName,
- };
-
- if (e) {
- bufferObj.keyIdentifier = e.keyIdentifier
- }
-
- return bufferObj;
- },
-
- $find: function(data, buffer, symbolicName, hashId, key, keyIdentifier) {
- // Holds the command to execute and the args if a command matched.
- var result = {};
-
- // Loop over all the bindings of the keymap until a match is found.
- this.keymapping[data.state].some(function(binding) {
- var match;
-
- // Check if the key matches.
- if (binding.key && !binding.key.test(symbolicName)) {
- return false;
- }
-
- // Check if the regex matches.
- if (binding.regex && !(match = binding.regex.exec(buffer))) {
- return false;
- }
-
- // Check if the match function matches.
- if (binding.match && !binding.match(buffer, hashId, key, symbolicName, keyIdentifier)) {
- return false;
- }
-
- // Check for disallowed matches.
- if (binding.disallowMatches) {
- for (var i = 0; i < binding.disallowMatches.length; i++) {
- if (!!match[binding.disallowMatches[i]]) {
- return false;
- }
- }
- }
-
- // If there is a command to execute, then figure out the
- // command and the arguments.
- if (binding.exec) {
- result.command = binding.exec;
-
- // Build the arguments.
- if (binding.params) {
- var value;
- result.args = {};
- binding.params.forEach(function(param) {
- if (param.match != null && match != null) {
- value = match[param.match] || param.defaultValue;
- } else {
- value = param.defaultValue;
- }
-
- if (param.type === 'number') {
- value = parseInt(value);
- }
-
- result.args[param.name] = value;
- });
- }
- data.buffer = "";
- }
-
- // Handle the 'then' property.
- if (binding.then) {
- data.state = binding.then;
- data.buffer = "";
- }
-
- // If no command is set, then execute the "null" fake command.
- if (result.command == null) {
- result.command = "null";
- }
-
- if (DEBUG) {
- console.log("KeyboardStateMapper#find", binding);
- }
- return true;
- });
-
- if (result.command) {
- return result;
- } else {
- data.buffer = "";
- return false;
- }
- },
-
- /**
- * This function is called by keyBinding.
- */
- handleKeyboard: function(data, hashId, key, keyCode, e) {
- // If we pressed any command key but no other key, then ignore the input.
- // Otherwise "shift-" is added to the buffer, and later on "shift-g"
- // which results in "shift-shift-g" which doesn't make sense.
- if (hashId != 0 && (key == "" || key == String.fromCharCode(0))) {
- return null;
- }
-
- // Compute the current value of the keyboard input buffer.
- var r = this.$composeBuffer(data, hashId, key, e);
- var buffer = r.bufferToUse;
- var symbolicName = r.symbolicName;
- var keyId = r.keyIdentifier;
-
- r = this.$find(data, buffer, symbolicName, hashId, key, keyId);
- if (DEBUG) {
- console.log("KeyboardStateMapper#match", buffer, symbolicName, r);
- }
-
- return r;
- }
-}
-
-/**
- * This is a useful matching function and therefore is defined here so that
- * users of KeyboardStateMapper can use it.
- *
- * @return boolean
- * If no command key (Command|Option|Shift|Ctrl) is pressed, it
- * returns true. If the only the Shift key is pressed + a character
- * true is returned as well. Otherwise, false is returned.
- * Summing up, the function returns true whenever the user typed
- * a normal character on the keyboard and no shortcut.
- */
-exports.matchCharacterOnly = function(buffer, hashId, key, symbolicName) {
- // If no command keys are pressed, then catch the input.
- if (hashId == 0) {
- return true;
- }
- // If only the shift key is pressed and a character key, then
- // catch that input as well.
- else if ((hashId == 4) && key.length == 1) {
- return true;
- }
- // Otherwise, we let the input got through.
- else {
- return false;
- }
-};
-
-exports.StateHandler = StateHandler;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/keybinding-vim-uncompressed.js b/contexts/data/lib/ace/keybinding-vim-uncompressed.js
deleted file mode 100644
index bd73027..0000000
--- a/contexts/data/lib/ace/keybinding-vim-uncompressed.js
+++ /dev/null
@@ -1,403 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck (julian.viereck@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/keyboard/keybinding/vim', ['require', 'exports', 'module' , 'ace/keyboard/state_handler'], function(require, exports, module) {
-"use strict";
-
-var StateHandler = require("../state_handler").StateHandler;
-var matchCharacterOnly = require("../state_handler").matchCharacterOnly;
-
-var vimcommand = function(key, exec, then) {
- return {
- regex: [ "([0-9]*)", key ],
- exec: exec,
- params: [
- {
- name: "times",
- match: 1,
- type: "number",
- defaultValue: 1
- }
- ],
- then: then
- }
-}
-
-var vimStates = {
- start: [
- {
- key: "i",
- then: "insertMode"
- },
- {
- key: "d",
- then: "deleteMode"
- },
- {
- key: "a",
- exec: "gotoright",
- then: "insertMode"
- },
- {
- key: "shift-i",
- exec: "gotolinestart",
- then: "insertMode"
- },
- {
- key: "shift-a",
- exec: "gotolineend",
- then: "insertMode"
- },
- {
- key: "shift-c",
- exec: "removetolineend",
- then: "insertMode"
- },
- {
- key: "shift-r",
- exec: "overwrite",
- then: "replaceMode"
- },
- vimcommand("(k|up)", "golineup"),
- vimcommand("(j|down)", "golinedown"),
- vimcommand("(l|right)", "gotoright"),
- vimcommand("(h|left)", "gotoleft"),
- {
- key: "shift-g",
- exec: "gotoend"
- },
- vimcommand("b", "gotowordleft"),
- vimcommand("e", "gotowordright"),
- vimcommand("x", "del"),
- vimcommand("shift-x", "backspace"),
- vimcommand("shift-d", "removetolineend"),
- vimcommand("u", "undo"), // [count] on this may/may not work, depending on browser implementation...
- {
- comment: "Catch some keyboard input to stop it here",
- match: matchCharacterOnly
- }
- ],
- insertMode: [
- {
- key: "esc",
- then: "start"
- }
- ],
- replaceMode: [
- {
- key: "esc",
- exec: "overwrite",
- then: "start"
- }
- ],
- deleteMode: [
- {
- key: "d",
- exec: "removeline",
- then: "start"
- }
- ]
-};
-
-exports.Vim = new StateHandler(vimStates);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Skywriter.
- *
- * The Initial Developer of the Original Code is
- * Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Julian Viereck (julian.viereck@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/keyboard/state_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-// If you're developing a new keymapping and want to get an idea what's going
-// on, then enable debugging.
-var DEBUG = false;
-
-function StateHandler(keymapping) {
- this.keymapping = this.$buildKeymappingRegex(keymapping);
-}
-
-StateHandler.prototype = {
- /**
- * Build the RegExp from the keymapping as RegExp can't stored directly
- * in the metadata JSON and as the RegExp used to match the keys/buffer
- * need to be adapted.
- */
- $buildKeymappingRegex: function(keymapping) {
- for (var state in keymapping) {
- this.$buildBindingsRegex(keymapping[state]);
- }
- return keymapping;
- },
-
- $buildBindingsRegex: function(bindings) {
- // Escape a given Regex string.
- bindings.forEach(function(binding) {
- if (binding.key) {
- binding.key = new RegExp('^' + binding.key + '$');
- } else if (Array.isArray(binding.regex)) {
- if (!('key' in binding))
- binding.key = new RegExp('^' + binding.regex[1] + '$');
- binding.regex = new RegExp(binding.regex.join('') + '$');
- } else if (binding.regex) {
- binding.regex = new RegExp(binding.regex + '$');
- }
- });
- },
-
- $composeBuffer: function(data, hashId, key, e) {
- // Initialize the data object.
- if (data.state == null || data.buffer == null) {
- data.state = "start";
- data.buffer = "";
- }
-
- var keyArray = [];
- if (hashId & 1) keyArray.push("ctrl");
- if (hashId & 8) keyArray.push("command");
- if (hashId & 2) keyArray.push("option");
- if (hashId & 4) keyArray.push("shift");
- if (key) keyArray.push(key);
-
- var symbolicName = keyArray.join("-");
- var bufferToUse = data.buffer + symbolicName;
-
- // Don't add the symbolic name to the key buffer if the alt_ key is
- // part of the symbolic name. If it starts with alt_, this means
- // that the user hit an alt keycombo and there will be a single,
- // new character detected after this event, which then will be
- // added to the buffer (e.g. alt_j will result in ∆).
- //
- // We test for 2 and not for & 2 as we only want to exclude the case where
- // the option key is pressed alone.
- if (hashId != 2) {
- data.buffer = bufferToUse;
- }
-
- var bufferObj = {
- bufferToUse: bufferToUse,
- symbolicName: symbolicName,
- };
-
- if (e) {
- bufferObj.keyIdentifier = e.keyIdentifier
- }
-
- return bufferObj;
- },
-
- $find: function(data, buffer, symbolicName, hashId, key, keyIdentifier) {
- // Holds the command to execute and the args if a command matched.
- var result = {};
-
- // Loop over all the bindings of the keymap until a match is found.
- this.keymapping[data.state].some(function(binding) {
- var match;
-
- // Check if the key matches.
- if (binding.key && !binding.key.test(symbolicName)) {
- return false;
- }
-
- // Check if the regex matches.
- if (binding.regex && !(match = binding.regex.exec(buffer))) {
- return false;
- }
-
- // Check if the match function matches.
- if (binding.match && !binding.match(buffer, hashId, key, symbolicName, keyIdentifier)) {
- return false;
- }
-
- // Check for disallowed matches.
- if (binding.disallowMatches) {
- for (var i = 0; i < binding.disallowMatches.length; i++) {
- if (!!match[binding.disallowMatches[i]]) {
- return false;
- }
- }
- }
-
- // If there is a command to execute, then figure out the
- // command and the arguments.
- if (binding.exec) {
- result.command = binding.exec;
-
- // Build the arguments.
- if (binding.params) {
- var value;
- result.args = {};
- binding.params.forEach(function(param) {
- if (param.match != null && match != null) {
- value = match[param.match] || param.defaultValue;
- } else {
- value = param.defaultValue;
- }
-
- if (param.type === 'number') {
- value = parseInt(value);
- }
-
- result.args[param.name] = value;
- });
- }
- data.buffer = "";
- }
-
- // Handle the 'then' property.
- if (binding.then) {
- data.state = binding.then;
- data.buffer = "";
- }
-
- // If no command is set, then execute the "null" fake command.
- if (result.command == null) {
- result.command = "null";
- }
-
- if (DEBUG) {
- console.log("KeyboardStateMapper#find", binding);
- }
- return true;
- });
-
- if (result.command) {
- return result;
- } else {
- data.buffer = "";
- return false;
- }
- },
-
- /**
- * This function is called by keyBinding.
- */
- handleKeyboard: function(data, hashId, key, keyCode, e) {
- // If we pressed any command key but no other key, then ignore the input.
- // Otherwise "shift-" is added to the buffer, and later on "shift-g"
- // which results in "shift-shift-g" which doesn't make sense.
- if (hashId != 0 && (key == "" || key == String.fromCharCode(0))) {
- return null;
- }
-
- // Compute the current value of the keyboard input buffer.
- var r = this.$composeBuffer(data, hashId, key, e);
- var buffer = r.bufferToUse;
- var symbolicName = r.symbolicName;
- var keyId = r.keyIdentifier;
-
- r = this.$find(data, buffer, symbolicName, hashId, key, keyId);
- if (DEBUG) {
- console.log("KeyboardStateMapper#match", buffer, symbolicName, r);
- }
-
- return r;
- }
-}
-
-/**
- * This is a useful matching function and therefore is defined here so that
- * users of KeyboardStateMapper can use it.
- *
- * @return boolean
- * If no command key (Command|Option|Shift|Ctrl) is pressed, it
- * returns true. If the only the Shift key is pressed + a character
- * true is returned as well. Otherwise, false is returned.
- * Summing up, the function returns true whenever the user typed
- * a normal character on the keyboard and no shortcut.
- */
-exports.matchCharacterOnly = function(buffer, hashId, key, symbolicName) {
- // If no command keys are pressed, then catch the input.
- if (hashId == 0) {
- return true;
- }
- // If only the shift key is pressed and a character key, then
- // catch that input as well.
- else if ((hashId == 4) && key.length == 1) {
- return true;
- }
- // Otherwise, we let the input got through.
- else {
- return false;
- }
-};
-
-exports.StateHandler = StateHandler;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/keybinding-vim.js b/contexts/data/lib/ace/keybinding-vim.js
index fa94c79..80a8534 100644
--- a/contexts/data/lib/ace/keybinding-vim.js
+++ b/contexts/data/lib/ace/keybinding-vim.js
@@ -1 +1,1646 @@
-define("ace/keyboard/keybinding/vim",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){"use strict";var d=a("../state_handler").StateHandler,e=a("../state_handler").matchCharacterOnly,f=function(a,b,c){return{regex:["([0-9]*)",a],exec:b,params:[{name:"times",match:1,type:"number",defaultValue:1}],then:c}},g={start:[{key:"i",then:"insertMode"},{key:"d",then:"deleteMode"},{key:"a",exec:"gotoright",then:"insertMode"},{key:"shift-i",exec:"gotolinestart",then:"insertMode"},{key:"shift-a",exec:"gotolineend",then:"insertMode"},{key:"shift-c",exec:"removetolineend",then:"insertMode"},{key:"shift-r",exec:"overwrite",then:"replaceMode"},f("(k|up)","golineup"),f("(j|down)","golinedown"),f("(l|right)","gotoright"),f("(h|left)","gotoleft"),{key:"shift-g",exec:"gotoend"},f("b","gotowordleft"),f("e","gotowordright"),f("x","del"),f("shift-x","backspace"),f("shift-d","removetolineend"),f("u","undo"),{comment:"Catch some keyboard input to stop it here",match:e}],insertMode:[{key:"esc",then:"start"}],replaceMode:[{key:"esc",exec:"overwrite",then:"start"}],deleteMode:[{key:"d",exec:"removeline",then:"start"}]};b.Vim=new d(g)}),define("ace/keyboard/state_handler",["require","exports","module"],function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}"use strict";var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(var b in a)this.$buildBindingsRegex(a[b]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?("key"in a||(a.key=new RegExp("^"+a.regex[1]+"$")),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c,d){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var e=[];b&1&&e.push("ctrl"),b&8&&e.push("command"),b&2&&e.push("option"),b&4&&e.push("shift"),c&&e.push(c);var f=e.join("-"),g=a.buffer+f;b!=2&&(a.buffer=g);var h={bufferToUse:g,symbolicName:f};return d&&(h.keyIdentifier=d.keyIdentifier),h},$find:function(a,b,c,e,f,g){var h={};return this.keymapping[a.state].some(function(i){var j;if(i.key&&!i.key.test(c))return!1;if(i.regex&&!(j=i.regex.exec(b)))return!1;if(i.match&&!i.match(b,e,f,c,g))return!1;if(i.disallowMatches)for(var k=0;k<i.disallowMatches.length;k++)if(!!j[i.disallowMatches[k]])return!1;if(i.exec){h.command=i.exec;if(i.params){var l;h.args={},i.params.forEach(function(a){a.match!=null&&j!=null?l=j[a.match]||a.defaultValue:l=a.defaultValue,a.type==="number"&&(l=parseInt(l)),h.args[a.name]=l})}a.buffer=""}return i.then&&(a.state=i.then,a.buffer=""),h.command==null&&(h.command="null"),d&&console.log("KeyboardStateMapper#find",i),!0}),h.command?h:(a.buffer="",!1)},handleKeyboard:function(a,b,c,e,f){if(b==0||c!=""&&c!=String.fromCharCode(0)){var g=this.$composeBuffer(a,b,c,f),h=g.bufferToUse,i=g.symbolicName,j=g.keyIdentifier;return g=this.$find(a,h,i,b,c,j),d&&console.log("KeyboardStateMapper#match",h,i,g),g}return null}},b.matchCharacterOnly=function(a,b,c,d){return b==0?!0:b==4&&c.length==1?!0:!1},b.StateHandler=e}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/keyboard/vim', ['require', 'exports', 'module' , 'ace/keyboard/vim/commands', 'ace/keyboard/vim/maps/util', 'ace/lib/useragent'], function(require, exports, module) {
+
+
+var cmds = require("./vim/commands");
+var coreCommands = cmds.coreCommands;
+var util = require("./vim/maps/util");
+var useragent = require("../lib/useragent");
+
+var startCommands = {
+ "i": {
+ command: coreCommands.start
+ },
+ "I": {
+ command: coreCommands.startBeginning
+ },
+ "a": {
+ command: coreCommands.append
+ },
+ "A": {
+ command: coreCommands.appendEnd
+ },
+ "ctrl-f": {
+ command: "gotopagedown"
+ },
+ "ctrl-b": {
+ command: "gotopageup"
+ }
+};
+
+exports.handler = {
+ handleMacRepeat: function(data, hashId, key) {
+ if (hashId == -1) {
+ data.inputChar = key;
+ data.lastEvent = "input";
+ } else if (data.inputChar && data.$lastHash == hashId && data.$lastKey == key) {
+ if (data.lastEvent == "input") {
+ data.lastEvent = "input1";
+ } else if (data.lastEvent == "input1") {
+ return true;
+ }
+ } else {
+ data.$lastHash = hashId;
+ data.$lastKey = key;
+ data.lastEvent = "keypress";
+ }
+ },
+
+ handleKeyboard: function(data, hashId, key, keyCode, e) {
+ if (hashId != 0 && (key == "" || key == "\x00"))
+ return null;
+
+ if (hashId == 1)
+ key = "ctrl-" + key;
+
+ if ((key == "esc" && hashId == 0) || key == "ctrl-[") {
+ return {command: coreCommands.stop};
+ } else if (data.state == "start") {
+ if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
+ hashId = -1;
+ key = data.inputChar;
+ }
+
+ if (hashId == -1 || hashId == 1 || hashId == 0 && key.length > 1) {
+ if (cmds.inputBuffer.idle && startCommands[key])
+ return startCommands[key];
+ return {
+ command: {
+ exec: function(editor) {
+ return cmds.inputBuffer.push(editor, key);
+ }
+ }
+ };
+ } // if no modifier || shift: wait for input.
+ else if (key.length == 1 && (hashId == 0 || hashId == 4)) {
+ return {command: "null", passEvent: true};
+ } else if (key == "esc" && hashId == 0) {
+ return {command: coreCommands.stop};
+ }
+ } else {
+ if (key == "ctrl-w") {
+ return {command: "removewordleft"};
+ }
+ }
+ },
+
+ attach: function(editor) {
+ editor.on("click", exports.onCursorMove);
+ if (util.currentMode !== "insert")
+ cmds.coreCommands.stop.exec(editor);
+ editor.$vimModeHandler = this;
+ },
+
+ detach: function(editor) {
+ editor.removeListener("click", exports.onCursorMove);
+ util.noMode(editor);
+ util.currentMode = "normal";
+ },
+
+ actions: cmds.actions,
+ getStatusText: function() {
+ if (util.currentMode == "insert")
+ return "INSERT";
+ if (util.onVisualMode)
+ return (util.onVisualLineMode ? "VISUAL LINE " : "VISUAL ") + cmds.inputBuffer.status;
+ return cmds.inputBuffer.status;
+ }
+};
+
+
+exports.onCursorMove = function(e) {
+ cmds.onCursorMove(e.editor, e);
+ exports.onCursorMove.scheduled = false;
+};
+
+});
+
+ace.define('ace/keyboard/vim/commands', ['require', 'exports', 'module' , 'ace/keyboard/vim/maps/util', 'ace/keyboard/vim/maps/motions', 'ace/keyboard/vim/maps/operators', 'ace/keyboard/vim/maps/aliases', 'ace/keyboard/vim/registers'], function(require, exports, module) {
+
+"never use strict";
+
+var util = require("./maps/util");
+var motions = require("./maps/motions");
+var operators = require("./maps/operators");
+var alias = require("./maps/aliases");
+var registers = require("./registers");
+
+var NUMBER = 1;
+var OPERATOR = 2;
+var MOTION = 3;
+var ACTION = 4;
+var HMARGIN = 8; // Minimum amount of line separation between margins;
+
+var repeat = function repeat(fn, count, args) {
+ while (0 < count--)
+ fn.apply(this, args);
+};
+
+var ensureScrollMargin = function(editor) {
+ var renderer = editor.renderer;
+ var pos = renderer.$cursorLayer.getPixelPosition();
+
+ var top = pos.top;
+
+ var margin = HMARGIN * renderer.layerConfig.lineHeight;
+ if (2 * margin > renderer.$size.scrollerHeight)
+ margin = renderer.$size.scrollerHeight / 2;
+
+ if (renderer.scrollTop > top - margin) {
+ renderer.session.setScrollTop(top - margin);
+ }
+
+ if (renderer.scrollTop + renderer.$size.scrollerHeight < top + margin + renderer.lineHeight) {
+ renderer.session.setScrollTop(top + margin + renderer.lineHeight - renderer.$size.scrollerHeight);
+ }
+};
+
+var actions = exports.actions = {
+ "z": {
+ param: true,
+ fn: function(editor, range, count, param) {
+ switch (param) {
+ case "z":
+ editor.renderer.alignCursor(null, 0.5);
+ break;
+ case "t":
+ editor.renderer.alignCursor(null, 0);
+ break;
+ case "b":
+ editor.renderer.alignCursor(null, 1);
+ break;
+ }
+ }
+ },
+ "r": {
+ param: true,
+ fn: function(editor, range, count, param) {
+ if (param && param.length) {
+ repeat(function() { editor.insert(param); }, count || 1);
+ editor.navigateLeft();
+ }
+ }
+ },
+ "R": {
+ fn: function(editor, range, count, param) {
+ util.insertMode(editor);
+ editor.setOverwrite(true);
+ }
+ },
+ "~": {
+ fn: function(editor, range, count) {
+ repeat(function() {
+ var range = editor.selection.getRange();
+ if (range.isEmpty())
+ range.end.column++;
+ var text = editor.session.getTextRange(range);
+ var toggled = text.toUpperCase();
+ if (toggled == text)
+ editor.navigateRight();
+ else
+ editor.session.replace(range, toggled);
+ }, count || 1);
+ }
+ },
+ "*": {
+ fn: function(editor, range, count, param) {
+ editor.selection.selectWord();
+ editor.findNext();
+ ensureScrollMargin(editor);
+ var r = editor.selection.getRange();
+ editor.selection.setSelectionRange(r, true);
+ }
+ },
+ "#": {
+ fn: function(editor, range, count, param) {
+ editor.selection.selectWord();
+ editor.findPrevious();
+ ensureScrollMargin(editor);
+ var r = editor.selection.getRange();
+ editor.selection.setSelectionRange(r, true);
+ }
+ },
+ "m": {
+ param: true,
+ fn: function(editor, range, count, param) {
+ var s = editor.session;
+ var markers = s.vimMarkers || (s.vimMarkers = {});
+ var c = editor.getCursorPosition();
+ if (!markers[param]) {
+ markers[param] = editor.session.doc.createAnchor(c);
+ }
+ markers[param].setPosition(c.row, c.column, true);
+ }
+ },
+ "n": {
+ fn: function(editor, range, count, param) {
+ var options = editor.getLastSearchOptions();
+ options.backwards = false;
+
+ editor.selection.moveCursorRight();
+ editor.selection.clearSelection();
+ editor.findNext(options);
+
+ ensureScrollMargin(editor);
+ var r = editor.selection.getRange();
+ r.end.row = r.start.row;
+ r.end.column = r.start.column;
+ editor.selection.setSelectionRange(r, true);
+ }
+ },
+ "N": {
+ fn: function(editor, range, count, param) {
+ var options = editor.getLastSearchOptions();
+ options.backwards = true;
+
+ editor.findPrevious(options);
+ ensureScrollMargin(editor);
+ var r = editor.selection.getRange();
+ r.end.row = r.start.row;
+ r.end.column = r.start.column;
+ editor.selection.setSelectionRange(r, true);
+ }
+ },
+ "v": {
+ fn: function(editor, range, count, param) {
+ editor.selection.selectRight();
+ util.visualMode(editor, false);
+ },
+ acceptsMotion: true
+ },
+ "V": {
+ fn: function(editor, range, count, param) {
+ var row = editor.getCursorPosition().row;
+ editor.selection.clearSelection();
+ editor.selection.moveCursorTo(row, 0);
+ editor.selection.selectLineEnd();
+ editor.selection.visualLineStart = row;
+
+ util.visualMode(editor, true);
+ },
+ acceptsMotion: true
+ },
+ "Y": {
+ fn: function(editor, range, count, param) {
+ util.copyLine(editor);
+ }
+ },
+ "p": {
+ fn: function(editor, range, count, param) {
+ var defaultReg = registers._default;
+
+ editor.setOverwrite(false);
+ if (defaultReg.isLine) {
+ var pos = editor.getCursorPosition();
+ var lines = defaultReg.text.split("\n");
+ editor.session.getDocument().insertLines(pos.row + 1, lines);
+ editor.moveCursorTo(pos.row + 1, 0);
+ }
+ else {
+ editor.navigateRight();
+ editor.insert(defaultReg.text);
+ editor.navigateLeft();
+ }
+ editor.setOverwrite(true);
+ editor.selection.clearSelection();
+ }
+ },
+ "P": {
+ fn: function(editor, range, count, param) {
+ var defaultReg = registers._default;
+ editor.setOverwrite(false);
+
+ if (defaultReg.isLine) {
+ var pos = editor.getCursorPosition();
+ var lines = defaultReg.text.split("\n");
+ editor.session.getDocument().insertLines(pos.row, lines);
+ editor.moveCursorTo(pos.row, 0);
+ }
+ else {
+ editor.insert(defaultReg.text);
+ }
+ editor.setOverwrite(true);
+ editor.selection.clearSelection();
+ }
+ },
+ "J": {
+ fn: function(editor, range, count, param) {
+ var session = editor.session;
+ range = editor.getSelectionRange();
+ var pos = {row: range.start.row, column: range.start.column};
+ count = count || range.end.row - range.start.row;
+ var maxRow = Math.min(pos.row + (count || 1), session.getLength() - 1);
+
+ range.start.column = session.getLine(pos.row).length;
+ range.end.column = session.getLine(maxRow).length;
+ range.end.row = maxRow;
+
+ var text = "";
+ for (var i = pos.row; i < maxRow; i++) {
+ var nextLine = session.getLine(i + 1);
+ text += " " + /^\s*(.*)$/.exec(nextLine)[1] || "";
+ }
+
+ session.replace(range, text);
+ editor.moveCursorTo(pos.row, pos.column);
+ }
+ },
+ "u": {
+ fn: function(editor, range, count, param) {
+ count = parseInt(count || 1, 10);
+ for (var i = 0; i < count; i++) {
+ editor.undo();
+ }
+ editor.selection.clearSelection();
+ }
+ },
+ "ctrl-r": {
+ fn: function(editor, range, count, param) {
+ count = parseInt(count || 1, 10);
+ for (var i = 0; i < count; i++) {
+ editor.redo();
+ }
+ editor.selection.clearSelection();
+ }
+ },
+ ":": {
+ fn: function(editor, range, count, param) {
+ }
+ },
+ "/": {
+ fn: function(editor, range, count, param) {
+ }
+ },
+ "?": {
+ fn: function(editor, range, count, param) {
+ }
+ },
+ ".": {
+ fn: function(editor, range, count, param) {
+ util.onInsertReplaySequence = inputBuffer.lastInsertCommands;
+ var previous = inputBuffer.previous;
+ if (previous) // If there is a previous action
+ inputBuffer.exec(editor, previous.action, previous.param);
+ }
+ },
+ "ctrl-x": {
+ fn: function(editor, range, count, param) {
+ editor.modifyNumber(-(count || 1));
+ }
+ },
+ "ctrl-a": {
+ fn: function(editor, range, count, param) {
+ editor.modifyNumber(count || 1);
+ }
+ },
+};
+
+var inputBuffer = exports.inputBuffer = {
+ accepting: [NUMBER, OPERATOR, MOTION, ACTION],
+ currentCmd: null,
+ currentCount: "",
+ status: "",
+ operator: null,
+ motion: null,
+
+ lastInsertCommands: [],
+
+ push: function(editor, ch, keyId) {
+ var isKeyHandled = true;
+ this.idle = false;
+ var wObj = this.waitingForParam;
+ if (wObj) {
+ this.exec(editor, wObj, ch);
+ }
+ else if (!(ch === "0" && !this.currentCount.length) &&
+ (ch.match(/^\d+$/) && this.isAccepting(NUMBER))) {
+ this.currentCount += ch;
+ this.currentCmd = NUMBER;
+ this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
+ }
+ else if (!this.operator && this.isAccepting(OPERATOR) && operators[ch]) {
+ this.operator = {
+ ch: ch,
+ count: this.getCount()
+ };
+ this.currentCmd = OPERATOR;
+ this.accepting = [NUMBER, MOTION, ACTION];
+ this.exec(editor, { operator: this.operator });
+ }
+ else if (motions[ch] && this.isAccepting(MOTION)) {
+ this.currentCmd = MOTION;
+
+ var ctx = {
+ operator: this.operator,
+ motion: {
+ ch: ch,
+ count: this.getCount()
+ }
+ };
+
+ if (motions[ch].param)
+ this.waitForParam(ctx);
+ else
+ this.exec(editor, ctx);
+ }
+ else if (alias[ch] && this.isAccepting(MOTION)) {
+ alias[ch].operator.count = this.getCount();
+ this.exec(editor, alias[ch]);
+ }
+ else if (actions[ch] && this.isAccepting(ACTION)) {
+ var actionObj = {
+ action: {
+ fn: actions[ch].fn,
+ count: this.getCount()
+ }
+ };
+
+ if (actions[ch].param) {
+ this.waitForParam(actionObj);
+ }
+ else {
+ this.exec(editor, actionObj);
+ }
+
+ if (actions[ch].acceptsMotion)
+ this.idle = false;
+ }
+ else if (this.operator) {
+ this.exec(editor, { operator: this.operator }, ch);
+ }
+ else {
+ isKeyHandled = ch.length == 1;
+ this.reset();
+ }
+
+ if (this.waitingForParam || this.motion || this.operator) {
+ this.status += ch;
+ } else if (this.currentCount) {
+ this.status = this.currentCount;
+ } else if (this.status) {
+ this.status = "";
+ } else {
+ return isKeyHandled;
+ }
+ editor._emit("changeStatus");
+ return isKeyHandled;
+ },
+
+ waitForParam: function(cmd) {
+ this.waitingForParam = cmd;
+ },
+
+ getCount: function() {
+ var count = this.currentCount;
+ this.currentCount = "";
+ return count && parseInt(count, 10);
+ },
+
+ exec: function(editor, action, param) {
+ var m = action.motion;
+ var o = action.operator;
+ var a = action.action;
+
+ if (!param)
+ param = action.param;
+
+ if (o) {
+ this.previous = {
+ action: action,
+ param: param
+ };
+ }
+
+ if (o && !editor.selection.isEmpty()) {
+ if (operators[o.ch].selFn) {
+ operators[o.ch].selFn(editor, editor.getSelectionRange(), o.count, param);
+ this.reset();
+ }
+ return;
+ }
+ else if (!m && !a && o && param) {
+ operators[o.ch].fn(editor, null, o.count, param);
+ this.reset();
+ }
+ else if (m) {
+ var run = function(fn) {
+ if (fn && typeof fn === "function") { // There should always be a motion
+ if (m.count && !motionObj.handlesCount)
+ repeat(fn, m.count, [editor, null, m.count, param]);
+ else
+ fn(editor, null, m.count, param);
+ }
+ };
+
+ var motionObj = motions[m.ch];
+ var selectable = motionObj.sel;
+
+ if (!o) {
+ if ((util.onVisualMode || util.onVisualLineMode) && selectable)
+ run(motionObj.sel);
+ else
+ run(motionObj.nav);
+ }
+ else if (selectable) {
+ repeat(function() {
+ run(motionObj.sel);
+ operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param);
+ }, o.count || 1);
+ }
+ this.reset();
+ }
+ else if (a) {
+ a.fn(editor, editor.getSelectionRange(), a.count, param);
+ this.reset();
+ }
+ handleCursorMove(editor);
+ },
+
+ isAccepting: function(type) {
+ return this.accepting.indexOf(type) !== -1;
+ },
+
+ reset: function() {
+ this.operator = null;
+ this.motion = null;
+ this.currentCount = "";
+ this.status = "";
+ this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
+ this.idle = true;
+ this.waitingForParam = null;
+ }
+};
+
+function setPreviousCommand(fn) {
+ inputBuffer.previous = { action: { action: { fn: fn } } };
+}
+
+exports.coreCommands = {
+ start: {
+ exec: function start(editor) {
+ util.insertMode(editor);
+ setPreviousCommand(start);
+ }
+ },
+ startBeginning: {
+ exec: function startBeginning(editor) {
+ editor.navigateLineStart();
+ util.insertMode(editor);
+ setPreviousCommand(startBeginning);
+ }
+ },
+ stop: {
+ exec: function stop(editor) {
+ inputBuffer.reset();
+ util.onVisualMode = false;
+ util.onVisualLineMode = false;
+ inputBuffer.lastInsertCommands = util.normalMode(editor);
+ }
+ },
+ append: {
+ exec: function append(editor) {
+ var pos = editor.getCursorPosition();
+ var lineLen = editor.session.getLine(pos.row).length;
+ if (lineLen)
+ editor.navigateRight();
+ util.insertMode(editor);
+ setPreviousCommand(append);
+ }
+ },
+ appendEnd: {
+ exec: function appendEnd(editor) {
+ editor.navigateLineEnd();
+ util.insertMode(editor);
+ setPreviousCommand(appendEnd);
+ }
+ }
+};
+
+var handleCursorMove = exports.onCursorMove = function(editor, e) {
+ if (util.currentMode === 'insert' || handleCursorMove.running)
+ return;
+ else if(!editor.selection.isEmpty()) {
+ handleCursorMove.running = true;
+ if (util.onVisualLineMode) {
+ var originRow = editor.selection.visualLineStart;
+ var cursorRow = editor.getCursorPosition().row;
+ if(originRow <= cursorRow) {
+ var endLine = editor.session.getLine(cursorRow);
+ editor.selection.clearSelection();
+ editor.selection.moveCursorTo(originRow, 0);
+ editor.selection.selectTo(cursorRow, endLine.length);
+ } else {
+ var endLine = editor.session.getLine(originRow);
+ editor.selection.clearSelection();
+ editor.selection.moveCursorTo(originRow, endLine.length);
+ editor.selection.selectTo(cursorRow, 0);
+ }
+ }
+ handleCursorMove.running = false;
+ return;
+ }
+ else {
+ if (e && (util.onVisualLineMode || util.onVisualMode)) {
+ editor.selection.clearSelection();
+ util.normalMode(editor);
+ }
+
+ handleCursorMove.running = true;
+ var pos = editor.getCursorPosition();
+ var lineLen = editor.session.getLine(pos.row).length;
+
+ if (lineLen && pos.column === lineLen)
+ editor.navigateLeft();
+ handleCursorMove.running = false;
+ }
+};
+});
+ace.define('ace/keyboard/vim/maps/util', ['require', 'exports', 'module' , 'ace/keyboard/vim/registers', 'ace/lib/dom'], function(require, exports, module) {
+var registers = require("../registers");
+
+var dom = require("../../../lib/dom");
+dom.importCssString('.insert-mode .ace_cursor{\
+ border-left: 2px solid #333333;\
+}\
+.ace_dark.insert-mode .ace_cursor{\
+ border-left: 2px solid #eeeeee;\
+}\
+.normal-mode .ace_cursor{\
+ border: 0!important;\
+ background-color: red;\
+ opacity: 0.5;\
+}', 'vimMode');
+
+module.exports = {
+ onVisualMode: false,
+ onVisualLineMode: false,
+ currentMode: 'normal',
+ noMode: function(editor) {
+ editor.unsetStyle('insert-mode');
+ editor.unsetStyle('normal-mode');
+ if (editor.commands.recording)
+ editor.commands.toggleRecording(editor);
+ editor.setOverwrite(false);
+ },
+ insertMode: function(editor) {
+ this.currentMode = 'insert';
+ editor.setStyle('insert-mode');
+ editor.unsetStyle('normal-mode');
+
+ editor.setOverwrite(false);
+ editor.keyBinding.$data.buffer = "";
+ editor.keyBinding.$data.state = "insertMode";
+ this.onVisualMode = false;
+ this.onVisualLineMode = false;
+ if(this.onInsertReplaySequence) {
+ editor.commands.macro = this.onInsertReplaySequence;
+ editor.commands.replay(editor);
+ this.onInsertReplaySequence = null;
+ this.normalMode(editor);
+ } else {
+ editor._emit("changeStatus");
+ if(!editor.commands.recording)
+ editor.commands.toggleRecording(editor);
+ }
+ },
+ normalMode: function(editor) {
+ this.currentMode = 'normal';
+
+ editor.unsetStyle('insert-mode');
+ editor.setStyle('normal-mode');
+ editor.clearSelection();
+
+ var pos;
+ if (!editor.getOverwrite()) {
+ pos = editor.getCursorPosition();
+ if (pos.column > 0)
+ editor.navigateLeft();
+ }
+
+ editor.setOverwrite(true);
+ editor.keyBinding.$data.buffer = "";
+ editor.keyBinding.$data.state = "start";
+ this.onVisualMode = false;
+ this.onVisualLineMode = false;
+ editor._emit("changeStatus");
+ if (editor.commands.recording) {
+ editor.commands.toggleRecording(editor);
+ return editor.commands.macro;
+ }
+ else {
+ return [];
+ }
+ },
+ visualMode: function(editor, lineMode) {
+ if (
+ (this.onVisualLineMode && lineMode)
+ || (this.onVisualMode && !lineMode)
+ ) {
+ this.normalMode(editor);
+ return;
+ }
+
+ editor.setStyle('insert-mode');
+ editor.unsetStyle('normal-mode');
+
+ editor._emit("changeStatus");
+ if (lineMode) {
+ this.onVisualLineMode = true;
+ } else {
+ this.onVisualMode = true;
+ this.onVisualLineMode = false;
+ }
+ },
+ getRightNthChar: function(editor, cursor, ch, n) {
+ var line = editor.getSession().getLine(cursor.row);
+ var matches = line.substr(cursor.column + 1).split(ch);
+
+ return n < matches.length ? matches.slice(0, n).join(ch).length : null;
+ },
+ getLeftNthChar: function(editor, cursor, ch, n) {
+ var line = editor.getSession().getLine(cursor.row);
+ var matches = line.substr(0, cursor.column).split(ch);
+
+ return n < matches.length ? matches.slice(-1 * n).join(ch).length : null;
+ },
+ toRealChar: function(ch) {
+ if (ch.length === 1)
+ return ch;
+
+ if (/^shift-./.test(ch))
+ return ch[ch.length - 1].toUpperCase();
+ else
+ return "";
+ },
+ copyLine: function(editor) {
+ var pos = editor.getCursorPosition();
+ editor.selection.clearSelection();
+ editor.moveCursorTo(pos.row, pos.column);
+ editor.selection.selectLine();
+ registers._default.isLine = true;
+ registers._default.text = editor.getCopyText().replace(/\n$/, "");
+ editor.selection.clearSelection();
+ editor.moveCursorTo(pos.row, pos.column);
+ }
+};
+});
+
+ace.define('ace/keyboard/vim/registers', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+"never use strict";
+
+module.exports = {
+ _default: {
+ text: "",
+ isLine: false
+ }
+};
+
+});
+
+
+ace.define('ace/keyboard/vim/maps/motions', ['require', 'exports', 'module' , 'ace/keyboard/vim/maps/util', 'ace/search', 'ace/range'], function(require, exports, module) {
+
+
+var util = require("./util");
+
+var keepScrollPosition = function(editor, fn) {
+ var scrollTopRow = editor.renderer.getScrollTopRow();
+ var initialRow = editor.getCursorPosition().row;
+ var diff = initialRow - scrollTopRow;
+ fn && fn.call(editor);
+ editor.renderer.scrollToRow(editor.getCursorPosition().row - diff);
+};
+
+function Motion(m) {
+ if (typeof m == "function") {
+ var getPos = m;
+ m = this;
+ } else {
+ var getPos = m.getPos;
+ }
+ m.nav = function(editor, range, count, param) {
+ var a = getPos(editor, range, count, param, false);
+ if (!a)
+ return;
+ editor.clearSelection();
+ editor.moveCursorTo(a.row, a.column);
+ };
+ m.sel = function(editor, range, count, param) {
+ var a = getPos(editor, range, count, param, true);
+ if (!a)
+ return;
+ editor.selection.selectTo(a.row, a.column);
+ };
+ return m;
+}
+
+var nonWordRe = /[\s.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/;
+var wordSeparatorRe = /[.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/;
+var whiteRe = /\s/;
+var StringStream = function(editor, cursor) {
+ var sel = editor.selection;
+ this.range = sel.getRange();
+ cursor = cursor || sel.selectionLead;
+ this.row = cursor.row;
+ this.col = cursor.column;
+ var line = editor.session.getLine(this.row);
+ var maxRow = editor.session.getLength();
+ this.ch = line[this.col] || '\n';
+ this.skippedLines = 0;
+
+ this.next = function() {
+ this.ch = line[++this.col] || this.handleNewLine(1);
+ return this.ch;
+ };
+ this.prev = function() {
+ this.ch = line[--this.col] || this.handleNewLine(-1);
+ return this.ch;
+ };
+ this.peek = function(dir) {
+ var ch = line[this.col + dir];
+ if (ch)
+ return ch;
+ if (dir == -1)
+ return '\n';
+ if (this.col == line.length - 1)
+ return '\n';
+ return editor.session.getLine(this.row + 1)[0] || '\n';
+ };
+
+ this.handleNewLine = function(dir) {
+ if (dir == 1){
+ if (this.col == line.length)
+ return '\n';
+ if (this.row == maxRow - 1)
+ return '';
+ this.col = 0;
+ this.row ++;
+ line = editor.session.getLine(this.row);
+ this.skippedLines++;
+ return line[0] || '\n';
+ }
+ if (dir == -1) {
+ if (this.row === 0)
+ return '';
+ this.row --;
+ line = editor.session.getLine(this.row);
+ this.col = line.length;
+ this.skippedLines--;
+ return '\n';
+ }
+ };
+ this.debug = function() {
+ console.log(line.substring(0, this.col)+'|'+this.ch+'\''+this.col+'\''+line.substr(this.col+1));
+ };
+};
+
+var Search = require("../../../search").Search;
+var search = new Search();
+
+function find(editor, needle, dir) {
+ search.$options.needle = needle;
+ search.$options.backwards = dir == -1;
+ return search.find(editor.session);
+}
+
+var Range = require("../../../range").Range;
+
+module.exports = {
+ "w": new Motion(function(editor) {
+ var str = new StringStream(editor);
+
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
+ while (str.ch && wordSeparatorRe.test(str.ch))
+ str.next();
+ } else {
+ while (str.ch && !nonWordRe.test(str.ch))
+ str.next();
+ }
+ while (str.ch && whiteRe.test(str.ch) && str.skippedLines < 2)
+ str.next();
+
+ str.skippedLines == 2 && str.prev();
+ return {column: str.col, row: str.row};
+ }),
+ "W": new Motion(function(editor) {
+ var str = new StringStream(editor);
+ while(str.ch && !(whiteRe.test(str.ch) && !whiteRe.test(str.peek(1))) && str.skippedLines < 2)
+ str.next();
+ if (str.skippedLines == 2)
+ str.prev();
+ else
+ str.next();
+
+ return {column: str.col, row: str.row};
+ }),
+ "b": new Motion(function(editor) {
+ var str = new StringStream(editor);
+
+ str.prev();
+ while (str.ch && whiteRe.test(str.ch) && str.skippedLines > -2)
+ str.prev();
+
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
+ while (str.ch && wordSeparatorRe.test(str.ch))
+ str.prev();
+ } else {
+ while (str.ch && !nonWordRe.test(str.ch))
+ str.prev();
+ }
+ str.ch && str.next();
+ return {column: str.col, row: str.row};
+ }),
+ "B": new Motion(function(editor) {
+ var str = new StringStream(editor);
+ str.prev();
+ while(str.ch && !(!whiteRe.test(str.ch) && whiteRe.test(str.peek(-1))) && str.skippedLines > -2)
+ str.prev();
+
+ if (str.skippedLines == -2)
+ str.next();
+
+ return {column: str.col, row: str.row};
+ }),
+ "e": new Motion(function(editor) {
+ var str = new StringStream(editor);
+
+ str.next();
+ while (str.ch && whiteRe.test(str.ch))
+ str.next();
+
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
+ while (str.ch && wordSeparatorRe.test(str.ch))
+ str.next();
+ } else {
+ while (str.ch && !nonWordRe.test(str.ch))
+ str.next();
+ }
+ str.ch && str.prev();
+ return {column: str.col, row: str.row};
+ }),
+ "E": new Motion(function(editor) {
+ var str = new StringStream(editor);
+ str.next();
+ while(str.ch && !(!whiteRe.test(str.ch) && whiteRe.test(str.peek(1))))
+ str.next();
+
+ return {column: str.col, row: str.row};
+ }),
+
+ "l": {
+ nav: function(editor) {
+ var pos = editor.getCursorPosition();
+ var col = pos.column;
+ var lineLen = editor.session.getLine(pos.row).length;
+ if (lineLen && col !== lineLen)
+ editor.navigateRight();
+ },
+ sel: function(editor) {
+ var pos = editor.getCursorPosition();
+ var col = pos.column;
+ var lineLen = editor.session.getLine(pos.row).length;
+ if (lineLen && col !== lineLen) //In selection mode you can select the newline
+ editor.selection.selectRight();
+ }
+ },
+ "h": {
+ nav: function(editor) {
+ var pos = editor.getCursorPosition();
+ if (pos.column > 0)
+ editor.navigateLeft();
+ },
+ sel: function(editor) {
+ var pos = editor.getCursorPosition();
+ if (pos.column > 0)
+ editor.selection.selectLeft();
+ }
+ },
+ "H": {
+ nav: function(editor) {
+ var row = editor.renderer.getScrollTopRow();
+ editor.moveCursorTo(row);
+ },
+ sel: function(editor) {
+ var row = editor.renderer.getScrollTopRow();
+ editor.selection.selectTo(row);
+ }
+ },
+ "M": {
+ nav: function(editor) {
+ var topRow = editor.renderer.getScrollTopRow();
+ var bottomRow = editor.renderer.getScrollBottomRow();
+ var row = topRow + ((bottomRow - topRow) / 2);
+ editor.moveCursorTo(row);
+ },
+ sel: function(editor) {
+ var topRow = editor.renderer.getScrollTopRow();
+ var bottomRow = editor.renderer.getScrollBottomRow();
+ var row = topRow + ((bottomRow - topRow) / 2);
+ editor.selection.selectTo(row);
+ }
+ },
+ "L": {
+ nav: function(editor) {
+ var row = editor.renderer.getScrollBottomRow();
+ editor.moveCursorTo(row);
+ },
+ sel: function(editor) {
+ var row = editor.renderer.getScrollBottomRow();
+ editor.selection.selectTo(row);
+ }
+ },
+ "k": {
+ nav: function(editor) {
+ editor.navigateUp();
+ },
+ sel: function(editor) {
+ editor.selection.selectUp();
+ }
+ },
+ "j": {
+ nav: function(editor) {
+ editor.navigateDown();
+ },
+ sel: function(editor) {
+ editor.selection.selectDown();
+ }
+ },
+
+ "i": {
+ param: true,
+ sel: function(editor, range, count, param) {
+ switch (param) {
+ case "w":
+ editor.selection.selectWord();
+ break;
+ case "W":
+ editor.selection.selectAWord();
+ break;
+ case "(":
+ case "{":
+ case "[":
+ var cursor = editor.getCursorPosition();
+ var end = editor.session.$findClosingBracket(param, cursor, /paren/);
+ if (!end)
+ return;
+ var start = editor.session.$findOpeningBracket(editor.session.$brackets[param], cursor, /paren/);
+ if (!start)
+ return;
+ start.column ++;
+ editor.selection.setSelectionRange(Range.fromPoints(start, end));
+ break;
+ case "'":
+ case '"':
+ case "/":
+ var end = find(editor, param, 1);
+ if (!end)
+ return;
+ var start = find(editor, param, -1);
+ if (!start)
+ return;
+ editor.selection.setSelectionRange(Range.fromPoints(start.end, end.start));
+ break;
+ }
+ }
+ },
+ "a": {
+ param: true,
+ sel: function(editor, range, count, param) {
+ switch (param) {
+ case "w":
+ editor.selection.selectAWord();
+ break;
+ case "W":
+ editor.selection.selectAWord();
+ break;
+ case "(":
+ case "{":
+ case "[":
+ var cursor = editor.getCursorPosition();
+ var end = editor.session.$findClosingBracket(param, cursor, /paren/);
+ if (!end)
+ return;
+ var start = editor.session.$findOpeningBracket(editor.session.$brackets[param], cursor, /paren/);
+ if (!start)
+ return;
+ end.column ++;
+ editor.selection.setSelectionRange(Range.fromPoints(start, end));
+ break;
+ case "'":
+ case "\"":
+ case "/":
+ var end = find(editor, param, 1);
+ if (!end)
+ return;
+ var start = find(editor, param, -1);
+ if (!start)
+ return;
+ end.column ++;
+ editor.selection.setSelectionRange(Range.fromPoints(start.start, end.end));
+ break;
+ }
+ }
+ },
+
+ "f": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var cursor = editor.getCursorPosition();
+ var column = util.getRightNthChar(editor, cursor, param, count || 1);
+
+ if (typeof column === "number") {
+ cursor.column += column + (isSel ? 2 : 1);
+ return cursor;
+ }
+ }
+ }),
+ "F": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var cursor = editor.getCursorPosition();
+ var column = util.getLeftNthChar(editor, cursor, param, count || 1);
+
+ if (typeof column === "number") {
+ cursor.column -= column + 1;
+ return cursor;
+ }
+ }
+ }),
+ "t": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var cursor = editor.getCursorPosition();
+ var column = util.getRightNthChar(editor, cursor, param, count || 1);
+
+ if (typeof column === "number") {
+ cursor.column += column + (isSel ? 1 : 0);
+ return cursor;
+ }
+ }
+ }),
+ "T": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var cursor = editor.getCursorPosition();
+ var column = util.getLeftNthChar(editor, cursor, param, count || 1);
+
+ if (typeof column === "number") {
+ cursor.column -= column;
+ return cursor;
+ }
+ }
+ }),
+
+ "^": {
+ nav: function(editor) {
+ editor.navigateLineStart();
+ },
+ sel: function(editor) {
+ editor.selection.selectLineStart();
+ }
+ },
+ "$": {
+ nav: function(editor) {
+ editor.navigateLineEnd();
+ },
+ sel: function(editor) {
+ editor.selection.selectLineEnd();
+ }
+ },
+ "0": new Motion(function(ed) {
+ return {row: ed.selection.lead.row, column: 0};
+ }),
+ "G": {
+ nav: function(editor, range, count, param) {
+ if (!count && count !== 0) { // Stupid JS
+ count = editor.session.getLength();
+ }
+ editor.gotoLine(count);
+ },
+ sel: function(editor, range, count, param) {
+ if (!count && count !== 0) { // Stupid JS
+ count = editor.session.getLength();
+ }
+ editor.selection.selectTo(count, 0);
+ }
+ },
+ "g": {
+ param: true,
+ nav: function(editor, range, count, param) {
+ switch(param) {
+ case "m":
+ console.log("Middle line");
+ break;
+ case "e":
+ console.log("End of prev word");
+ break;
+ case "g":
+ editor.gotoLine(count || 0);
+ case "u":
+ editor.gotoLine(count || 0);
+ case "U":
+ editor.gotoLine(count || 0);
+ }
+ },
+ sel: function(editor, range, count, param) {
+ switch(param) {
+ case "m":
+ console.log("Middle line");
+ break;
+ case "e":
+ console.log("End of prev word");
+ break;
+ case "g":
+ editor.selection.selectTo(count || 0, 0);
+ }
+ }
+ },
+ "o": {
+ nav: function(editor, range, count, param) {
+ count = count || 1;
+ var content = "";
+ while (0 < count--)
+ content += "\n";
+
+ if (content.length) {
+ editor.navigateLineEnd()
+ editor.insert(content);
+ util.insertMode(editor);
+ }
+ }
+ },
+ "O": {
+ nav: function(editor, range, count, param) {
+ var row = editor.getCursorPosition().row;
+ count = count || 1;
+ var content = "";
+ while (0 < count--)
+ content += "\n";
+
+ if (content.length) {
+ if(row > 0) {
+ editor.navigateUp();
+ editor.navigateLineEnd()
+ editor.insert(content);
+ } else {
+ editor.session.insert({row: 0, column: 0}, content);
+ editor.navigateUp();
+ }
+ util.insertMode(editor);
+ }
+ }
+ },
+ "%": new Motion(function(editor){
+ var brRe = /[\[\]{}()]/g;
+ var cursor = editor.getCursorPosition();
+ var ch = editor.session.getLine(cursor.row)[cursor.column];
+ if (!brRe.test(ch)) {
+ var range = find(editor, brRe);
+ if (!range)
+ return;
+ cursor = range.start;
+ }
+ var match = editor.session.findMatchingBracket({
+ row: cursor.row,
+ column: cursor.column + 1
+ });
+
+ return match;
+ }),
+ "{": new Motion(function(ed) {
+ var session = ed.session;
+ var row = session.selection.lead.row;
+ while(row > 0 && !/\S/.test(session.getLine(row)))
+ row--;
+ while(/\S/.test(session.getLine(row)))
+ row--;
+ return {column: 0, row: row};
+ }),
+ "}": new Motion(function(ed) {
+ var session = ed.session;
+ var l = session.getLength();
+ var row = session.selection.lead.row;
+ while(row < l && !/\S/.test(session.getLine(row)))
+ row++;
+ while(/\S/.test(session.getLine(row)))
+ row++;
+ return {column: 0, row: row};
+ }),
+ "ctrl-d": {
+ nav: function(editor, range, count, param) {
+ editor.selection.clearSelection();
+ keepScrollPosition(editor, editor.gotoPageDown);
+ },
+ sel: function(editor, range, count, param) {
+ keepScrollPosition(editor, editor.selectPageDown);
+ }
+ },
+ "ctrl-u": {
+ nav: function(editor, range, count, param) {
+ editor.selection.clearSelection();
+ keepScrollPosition(editor, editor.gotoPageUp);
+ },
+ sel: function(editor, range, count, param) {
+ keepScrollPosition(editor, editor.selectPageUp);
+ }
+ },
+ "`": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var s = editor.session;
+ var marker = s.vimMarkers && s.vimMarkers[param];
+ if (marker) {
+ return marker.getPosition();
+ }
+ }
+ }),
+ "'": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var s = editor.session;
+ var marker = s.vimMarkers && s.vimMarkers[param];
+ if (marker) {
+ var pos = marker.getPosition();
+ var line = editor.session.getLine(pos.row);
+ pos.column = line.search(/\S/);
+ if (pos.column == -1)
+ pos.column = line.length;
+ return pos;
+ }
+ }
+ }),
+};
+
+module.exports.backspace = module.exports.left = module.exports.h;
+module.exports.right = module.exports.l;
+module.exports.up = module.exports.k;
+module.exports.down = module.exports.j;
+module.exports.pagedown = module.exports["ctrl-d"];
+module.exports.pageup = module.exports["ctrl-u"];
+
+});
+
+ace.define('ace/keyboard/vim/maps/operators', ['require', 'exports', 'module' , 'ace/keyboard/vim/maps/util', 'ace/keyboard/vim/registers'], function(require, exports, module) {
+
+"never use strict";
+
+var util = require("./util");
+var registers = require("../registers");
+
+module.exports = {
+ "d": {
+ selFn: function(editor, range, count, param) {
+ registers._default.text = editor.getCopyText();
+ registers._default.isLine = util.onVisualLineMode;
+ if(util.onVisualLineMode)
+ editor.removeLines();
+ else
+ editor.session.remove(range);
+ util.normalMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = count || 1;
+ switch (param) {
+ case "d":
+ registers._default.text = "";
+ registers._default.isLine = true;
+ for (var i = 0; i < count; i++) {
+ editor.selection.selectLine();
+ registers._default.text += editor.getCopyText();
+ var selRange = editor.getSelectionRange();
+ if (!selRange.isMultiLine()) {
+ lastLineReached = true
+ var row = selRange.start.row - 1;
+ var col = editor.session.getLine(row).length
+ selRange.setStart(row, col);
+ editor.session.remove(selRange);
+ editor.selection.clearSelection();
+ break;
+ }
+ editor.session.remove(selRange);
+ editor.selection.clearSelection();
+ }
+ registers._default.text = registers._default.text.replace(/\n$/, "");
+ break;
+ default:
+ if (range) {
+ editor.selection.setSelectionRange(range);
+ registers._default.text = editor.getCopyText();
+ registers._default.isLine = false;
+ editor.session.remove(range);
+ editor.selection.clearSelection();
+ }
+ }
+ }
+ },
+ "c": {
+ selFn: function(editor, range, count, param) {
+ editor.session.remove(range);
+ util.insertMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = count || 1;
+ switch (param) {
+ case "c":
+ for (var i = 0; i < count; i++) {
+ editor.removeLines();
+ util.insertMode(editor);
+ }
+
+ break;
+ default:
+ if (range) {
+ editor.session.remove(range);
+ util.insertMode(editor);
+ }
+ }
+ }
+ },
+ "y": {
+ selFn: function(editor, range, count, param) {
+ registers._default.text = editor.getCopyText();
+ registers._default.isLine = util.onVisualLineMode;
+ editor.selection.clearSelection();
+ util.normalMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = count || 1;
+ switch (param) {
+ case "y":
+ var pos = editor.getCursorPosition();
+ editor.selection.selectLine();
+ for (var i = 0; i < count - 1; i++) {
+ editor.selection.moveCursorDown();
+ }
+ registers._default.text = editor.getCopyText().replace(/\n$/, "");
+ editor.selection.clearSelection();
+ registers._default.isLine = true;
+ editor.moveCursorToPosition(pos);
+ break;
+ default:
+ if (range) {
+ var pos = editor.getCursorPosition();
+ editor.selection.setSelectionRange(range);
+ registers._default.text = editor.getCopyText();
+ registers._default.isLine = false;
+ editor.selection.clearSelection();
+ editor.moveCursorTo(pos.row, pos.column);
+ }
+ }
+ }
+ },
+ ">": {
+ selFn: function(editor, range, count, param) {
+ count = count || 1;
+ for (var i = 0; i < count; i++) {
+ editor.indent();
+ }
+ util.normalMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = parseInt(count || 1, 10);
+ switch (param) {
+ case ">":
+ var pos = editor.getCursorPosition();
+ editor.selection.selectLine();
+ for (var i = 0; i < count - 1; i++) {
+ editor.selection.moveCursorDown();
+ }
+ editor.indent();
+ editor.selection.clearSelection();
+ editor.moveCursorToPosition(pos);
+ editor.navigateLineEnd();
+ editor.navigateLineStart();
+ break;
+ }
+ }
+ },
+ "<": {
+ selFn: function(editor, range, count, param) {
+ count = count || 1;
+ for (var i = 0; i < count; i++) {
+ editor.blockOutdent();
+ }
+ util.normalMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = count || 1;
+ switch (param) {
+ case "<":
+ var pos = editor.getCursorPosition();
+ editor.selection.selectLine();
+ for (var i = 0; i < count - 1; i++) {
+ editor.selection.moveCursorDown();
+ }
+ editor.blockOutdent();
+ editor.selection.clearSelection();
+ editor.moveCursorToPosition(pos);
+ editor.navigateLineEnd();
+ editor.navigateLineStart();
+ break;
+ }
+ }
+ }
+};
+});
+
+"use strict"
+
+ace.define('ace/keyboard/vim/maps/aliases', ['require', 'exports', 'module' ], function(require, exports, module) {
+module.exports = {
+ "x": {
+ operator: {
+ ch: "d",
+ count: 1
+ },
+ motion: {
+ ch: "l",
+ count: 1
+ }
+ },
+ "X": {
+ operator: {
+ ch: "d",
+ count: 1
+ },
+ motion: {
+ ch: "h",
+ count: 1
+ }
+ },
+ "D": {
+ operator: {
+ ch: "d",
+ count: 1
+ },
+ motion: {
+ ch: "$",
+ count: 1
+ }
+ },
+ "C": {
+ operator: {
+ ch: "c",
+ count: 1
+ },
+ motion: {
+ ch: "$",
+ count: 1
+ }
+ },
+ "s": {
+ operator: {
+ ch: "c",
+ count: 1
+ },
+ motion: {
+ ch: "l",
+ count: 1
+ }
+ },
+ "S": {
+ operator: {
+ ch: "c",
+ count: 1
+ },
+ param: "c"
+ }
+};
+});
+
diff --git a/contexts/data/lib/ace/mode-abap.js b/contexts/data/lib/ace/mode-abap.js
new file mode 100644
index 0000000..e1e71dd
--- /dev/null
+++ b/contexts/data/lib/ace/mode-abap.js
@@ -0,0 +1,259 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/abap', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/abap_highlight_rules', 'ace/mode/folding/coffee', 'ace/range', 'ace/mode/text', 'ace/lib/oop'], function(require, exports, module) {
+
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var Rules = require("./abap_highlight_rules").AbapHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var oop = require("../lib/oop");
+
+function Mode() {
+ this.$tokenizer = new Tokenizer(new Rules().getRules(), "i");
+ this.foldingRules = new FoldMode();
+}
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ return indent;
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow){
+ var range = new Range(0, 0, 0, 0);
+ for (var i = startRow; i <= endRow; ++i) {
+ var line = doc.getLine(i);
+ if (hereComment.test(line))
+ continue;
+
+ if (commentLine.test(line))
+ line = line.replace(commentLine, '$1');
+ else
+ line = line.replace(indentation, '$&#');
+
+ range.end.row = range.start.row = i;
+ range.end.column = line.length + 1;
+ doc.replace(range, line);
+ }
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/abap_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var AbapHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword":
+ "ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT BACK" +
+ " CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY" +
+ " DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO" +
+ " ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT" +
+ " FETCH FIELDS FORM FORMAT FREE FROM FUNCTION" +
+ " GENERATE GET" +
+ " HIDE" +
+ " IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION" +
+ " LEAVE LIKE LINE LOAD LOCAL LOOP" +
+ " MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY" +
+ " ON OVERLAY OPTIONAL OTHERS" +
+ " PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT" +
+ " RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK" +
+ " SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS" +
+ " TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES" +
+ " UNASSIGN ULINE UNPACK UPDATE" +
+ " WHEN WHILE WINDOW WRITE" +
+ " OCCURS STRUCTURE OBJECT PROPERTY" +
+ " CASTING APPEND RAISING VALUE COLOR" +
+ " CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT" +
+ " ID NUMBER FOR TITLE OUTPUT" +
+ " WITH EXIT USING" +
+ " INTO WHERE GROUP BY HAVING ORDER BY SINGLE" +
+ " APPENDING CORRESPONDING FIELDS OF TABLE" +
+ " LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING" +
+ " EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN",
+ "constant.language":
+ "TRUE FALSE NULL SPACE",
+ "support.type":
+ "c n i p f d t x string xstring decfloat16 decfloat34",
+ "keyword.operator":
+ "abs sign ceil floor trunc frac acos asin atan cos sin tan" +
+ " abapOperator cosh sinh tanh exp log log10 sqrt" +
+ " strlen xstrlen charlen numofchar dbmaxlen lines"
+ }, "text", true, " ");
+
+ var compoundKeywords = "WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|"+
+ "EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|"+
+ "END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|"+
+ "RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|"+
+ "WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|"+
+ "(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)"+
+ "(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|"+
+ "LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|"+
+ "CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|"+
+ "FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|"+
+ "NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|"+
+ "START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|"+
+ "TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|"+
+ "IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)";
+
+ this.$rules = {
+ "start" : [
+ {token : "string", regex : "`", next : "string"},
+ {token : "string", regex : "'", next : "qstring"},
+ {token : "doc.comment", regex : /^\*.+/},
+ {token : "comment", regex : /".+$/},
+ {token : "invalid", regex: "\\.{2,}"},
+ {token : "keyword.operator", regex: /\W[\-+\%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/},
+ {token : "paren.lparen", regex : "[\\[({]"},
+ {token : "paren.rparen", regex : "[\\])}]"},
+ {token : "constant.numeric", regex: "[+-]?\\d+\\b"},
+ {token : "variable.parameter", regex : /sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/},
+ {token : "keyword", regex : compoundKeywords},
+ {token : "variable.parameter", regex : /\w+-\w+(?:-\w+)*/},
+ {token : keywordMapper, regex : "\\w+\\b"},
+ ],
+ "qstring" : [
+ {token : "constant.language.escape", regex : "''"},
+ {token : "string", regex : "'", next : "start"},
+ {token : "string", regex : ".|\w+"}
+ ],
+ "string" : [
+ {token : "constant.language.escape", regex : "``"},
+ {token : "string", regex : "`", next : "start"},
+ {token : "string", regex : ".|\w+"}
+ ]
+ }
+};
+oop.inherits(AbapHighlightRules, TextHighlightRules);
+
+exports.AbapHighlightRules = AbapHighlightRules;
+});
+
+ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-asciidoc.js b/contexts/data/lib/ace/mode-asciidoc.js
new file mode 100644
index 0000000..c303320
--- /dev/null
+++ b/contexts/data/lib/ace/mode-asciidoc.js
@@ -0,0 +1,372 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/asciidoc', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/asciidoc_highlight_rules', 'ace/mode/folding/asciidoc'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules;
+var AsciidocFoldMode = require("./folding/asciidoc").FoldMode;
+
+var Mode = function() {
+ var highlighter = new AsciidocHighlightRules();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.foldingRules = new AsciidocFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "listblock") {
+ var match = /^((?:.+)?)([-+*][ ]+)/.exec(line);
+ if (match) {
+ return new Array(match[1].length + 1).join(" ") + match[2];
+ } else {
+ return "";
+ }
+ } else {
+ return this.$getIndent(line);
+ }
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/asciidoc_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var AsciidocHighlightRules = function() {
+ var identifierRe = "[a-zA-Z\u00a1-\uffff]+\\b";
+
+ this.$rules = {
+ "start": [
+ {token: "empty", regex: /$/},
+ {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"},
+ {token: "literal", regex: /^-{4,}\s*$/, next: "literalBlock"},
+ {token: "string", regex: /^\+{4,}\s*$/, next: "passthroughBlock"},
+ {token: "keyword", regex: /^={4,}\s*$/},
+ {token: "text", regex: /^\s*$/},
+ {token: "empty", regex: "", next: "dissallowDelimitedBlock"}
+ ],
+
+ "dissallowDelimitedBlock": [
+ {include: "paragraphEnd"},
+ {token: "comment", regex: '^//.+$'},
+ {token: "keyword", regex: "^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},
+
+ {include: "listStart"},
+ {token: "literal", regex: /^\s+.+$/, next: "indentedBlock"},
+ {token: "empty", regex: "", next: "text"}
+ ],
+
+ "paragraphEnd": [
+ {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "commentBlock"},
+ {token: "tableBlock", regex: /^\s*[|!]=+\s*$/, next: "tableBlock"},
+ {token: "keyword", regex: /^(?:--|''')\s*$/, next: "start"},
+ {token: "option", regex: /^\[.*\]\s*$/, next: "start"},
+ {token: "pageBreak", regex: /^>{3,}$/, next: "start"},
+ {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"},
+ {token: "titleUnderline", regex: /^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/, next: "start"},
+ {token: "singleLineTitle", regex: /^={1,5}\s+\S.*$/, next: "start"},
+
+ {token: "otherBlock", regex: /^(?:\*{2,}|_{2,})\s*$/, next: "start"},
+ {token: "optionalTitle", regex: /^\.[^.\s].+$/, next: "start"}
+ ],
+
+ "listStart": [
+ {token: "keyword", regex: /^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/, next: "listText"},
+ {token: "meta.tag", regex: /^.+(?::{2,4}|;;)(?: |$)/, next: "listText"},
+ {token: "support.function.list.callout", regex: /^(?:<\d+>|\d+>|>) /, next: "text"},
+ {token: "keyword", regex: /^\+\s*$/, next: "start"}
+ ],
+
+ "text": [
+ {token: ["link", "variable.language"], regex: /((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},
+ {token: "link", regex: /(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},
+ {token: "link", regex: /\b[\w\.\/\-]+@[\w\.\/\-]+\b/},
+ {include: "macros"},
+ {include: "paragraphEnd"},
+ {token: "literal", regex:/\+{3,}/, next:"smallPassthrough"},
+ {token: "escape", regex: /\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},
+ {token: "escape", regex: /\\[_*'`+#]|\\{2}[_*'`+#]{2}/},
+ {token: "keyword", regex: /\s\+$/},
+ {token: "text", regex: identifierRe},
+ {token: ["keyword", "string", "keyword"],
+ regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/},
+ {token: "keyword", regex: /<<[\w\d\-$]+,?|>>/},
+ {token: "constant.character", regex: /\({2,3}.*?\){2,3}/},
+ {token: "keyword", regex: /\[\[.+?\]\]/},
+ {token: "support", regex: /^\[{3}[\w\d =\-]+\]{3}/},
+
+ {include: "quotes"},
+ {token: "empty", regex: /^\s*$/, next: "start"}
+ ],
+
+ "listText": [
+ {include: "listStart"},
+ {include: "text"}
+ ],
+
+ "indentedBlock": [
+ {token: "literal", regex: /^[\s\w].+$/, next: "indentedBlock"},
+ {token: "literal", regex: "", next: "start"}
+ ],
+
+ "listingBlock": [
+ {token: "literal", regex: /^\.{4,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "constant.numeric", regex: '<\\d+>'},
+ {token: "literal", regex: '[^<]+'},
+ {token: "literal", regex: '<'}
+ ],
+ "literalBlock": [
+ {token: "literal", regex: /^-{4,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "constant.numeric", regex: '<\\d+>'},
+ {token: "literal", regex: '[^<]+'},
+ {token: "literal", regex: '<'}
+ ],
+ "passthroughBlock": [
+ {token: "literal", regex: /^\+{4,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "literal", regex: identifierRe + "|\\d+"},
+ {include: "macros"},
+ {token: "literal", regex: "."}
+ ],
+
+ "smallPassthrough": [
+ {token: "literal", regex: /[+]{3,}/, next: "dissallowDelimitedBlock"},
+ {token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "literal", regex: identifierRe + "|\\d+"},
+ {include: "macros"}
+ ],
+
+ "commentBlock": [
+ {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "doc.comment", regex: '^.*$'}
+ ],
+ "tableBlock": [
+ {token: "tableBlock", regex: /^\s*\|={3,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "innerTableBlock"},
+ {token: "tableBlock", regex: /\|/},
+ {include: "text", noEscape: true}
+ ],
+ "innerTableBlock": [
+ {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "tableBlock"},
+ {token: "tableBlock", regex: /^\s*|={3,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "tableBlock", regex: /\!/}
+ ],
+ "macros": [
+ {token: "macro", regex: /{[\w\-$]+}/},
+ {token: ["text", "string", "text", "constant.character", "text"], regex: /({)([\w\-$]+)(:)?(.+)?(})/},
+ {token: ["text", "markup.list.macro", "keyword", "string"], regex: /(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},
+ {token: ["markup.list.macro", "keyword", "string"], regex: /([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},
+ {token: ["markup.list.macro", "keyword"], regex: /([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},
+ {token: "keyword", regex: /^:.+?:(?= |$)/}
+ ],
+
+ "quotes": [
+ {token: "string.italic", regex: /__[^_\s].*?__/},
+ {token: "string.italic", regex: quoteRule("_")},
+
+ {token: "keyword.bold", regex: /\*\*[^*\s].*?\*\*/},
+ {token: "keyword.bold", regex: quoteRule("\\*")},
+
+ {token: "literal", regex: quoteRule("\\+")},
+ {token: "literal", regex: /\+\+[^+\s].*?\+\+/},
+ {token: "literal", regex: /\$\$.+?\$\$/},
+ {token: "literal", regex: quoteRule("`")},
+
+ {token: "keyword", regex: quoteRule("^")},
+ {token: "keyword", regex: quoteRule("~")},
+ {token: "keyword", regex: /##?/},
+ {token: "keyword", regex: /(?:\B|^)``|\b''/}
+ ]
+
+ };
+
+ function quoteRule(ch) {
+ var prefix = /\w/.test(ch) ? "\\b" : "(?:\\B|^)";
+ return prefix + ch + "[^" + ch + "].*?" + ch + "(?![\\w*])";
+ }
+
+ var tokenMap = {
+ macro: "constant.character",
+ tableBlock: "doc.comment",
+ titleUnderline: "markup.heading",
+ singleLineTitle: "markup.heading",
+ pageBreak: "string",
+ option: "string.regexp",
+ otherBlock: "markup.list",
+ literal: "support.function",
+ optionalTitle: "constant.numeric",
+ escape: "constant.language.escape",
+ link: "markup.underline.list"
+ };
+
+ for (var state in this.$rules) {
+ var stateRules = this.$rules[state];
+ for (var i = stateRules.length; i--; ) {
+ var rule = stateRules[i];
+ if (rule.include || typeof rule == "string") {
+ var args = [i, 1].concat(this.$rules[rule.include || rule]);
+ if (rule.noEscape) {
+ args = args.filter(function(x) {
+ return !x.next;
+ });
+ }
+ stateRules.splice.apply(stateRules, args);
+ } else if (rule.token in tokenMap) {
+ rule.token = tokenMap[rule.token];
+ }
+ }
+ }
+};
+oop.inherits(AsciidocHighlightRules, TextHighlightRules);
+
+exports.AsciidocHighlightRules = AsciidocHighlightRules;
+});
+
+ace.define('ace/mode/folding/asciidoc', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+ this.foldingStartMarker = /^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/;
+ this.singleLineHeadingRe = /^={1,5}(?=\s+\S)/;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ if (!this.foldingStartMarker.test(line))
+ return ""
+
+ if (line[0] == "=") {
+ if (this.singleLineHeadingRe.test(line))
+ return "start";
+ if (session.getLine(row - 1).length != session.getLine(row).length)
+ return "";
+ return "start";
+ }
+ if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock")
+ return "end";
+ return "start";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+ if (!line.match(this.foldingStartMarker))
+ return;
+
+ var token;
+ function getTokenType(row) {
+ token = session.getTokens(row)[0];
+ return token && token.type;
+ }
+
+ var levels = ["=","-","~","^","+"];
+ var heading = "markup.heading";
+ var singleLineHeadingRe = this.singleLineHeadingRe;
+ function getLevel() {
+ var match = token.value.match(singleLineHeadingRe);
+ if (match)
+ return match[0].length;
+ var level = levels.indexOf(token.value[0]) + 1;
+ if (level == 1) {
+ if (session.getLine(row - 1).length != session.getLine(row).length)
+ return Infinity;
+ }
+ return level;
+ }
+
+ if (getTokenType(row) == heading) {
+ var startHeadingLevel = getLevel();
+ while (++row < maxRow) {
+ if (getTokenType(row) != heading)
+ continue;
+ var level = getLevel();
+ if (level <= startHeadingLevel)
+ break;
+ }
+
+ var isSingleLineHeading = token && token.value.match(this.singleLineHeadingRe);
+ endRow = isSingleLineHeading ? row - 1 : row - 2;
+
+ if (endRow > startRow) {
+ while (endRow > startRow && (!getTokenType(endRow) || token.value[0] == "["))
+ endRow--;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ } else {
+ var state = session.bgTokenizer.getState(row);
+ if (state == "dissallowDelimitedBlock") {
+ while (row -- > 0) {
+ if (session.bgTokenizer.getState(row).lastIndexOf("Block") == -1)
+ break;
+ }
+ endRow = row + 1;
+ if (endRow < startRow) {
+ var endColumn = session.getLine(row).length;
+ return new Range(endRow, 5, startRow, startColumn - 5);
+ }
+ } else {
+ while (++row < maxRow) {
+ if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock")
+ break;
+ }
+ endRow = row;
+ if (endRow > startRow) {
+ var endColumn = session.getLine(row).length;
+ return new Range(startRow, 5, endRow, endColumn - 5);
+ }
+ }
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-c9search.js b/contexts/data/lib/ace/mode-c9search.js
new file mode 100644
index 0000000..b1b2093
--- /dev/null
+++ b/contexts/data/lib/ace/mode-c9search.js
@@ -0,0 +1,187 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/c9search', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c9search_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/c9search'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var C9StyleFoldMode = require("./folding/c9search").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new C9SearchHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new C9StyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/c9search_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var C9SearchHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text"],
+ regex : "(^\\s+[0-9]+)(:\\s*)(.+)"
+ },
+ {
+ token : ["string", "text"], // single line
+ regex : "(.+)(:$)"
+ }
+ ]
+ };
+};
+
+oop.inherits(C9SearchHighlightRules, TextHighlightRules);
+
+exports.C9SearchHighlightRules = C9SearchHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+
+ace.define('ace/mode/folding/c9search', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /^(\S.*\:|Searching for.*)$/;
+ this.foldingStopMarker = /^(\s+|Found.*)$/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var lines = session.doc.getAllLines(row);
+ var line = lines[row];
+ var level1 = /^(Found.*|Searching for.*)$/;
+ var level2 = /^(\S.*\:|\s*)$/;
+ var re = level1.test(line) ? level1 : level2;
+
+ if (this.foldingStartMarker.test(line)) {
+ for (var i = row + 1, l = session.getLength(); i < l; i++) {
+ if (re.test(lines[i]))
+ break;
+ }
+
+ return new Range(row, line.length, i, 0);
+ }
+
+ if (this.foldingStopMarker.test(line)) {
+ for (var i = row - 1; i >= 0; i--) {
+ line = lines[i];
+ if (re.test(line))
+ break;
+ }
+
+ return new Range(i, line.length, row, 0);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
diff --git a/contexts/data/lib/ace/mode-c_cpp-noconflict.js b/contexts/data/lib/ace/mode-c_cpp-noconflict.js
deleted file mode 100644
index daf1d6d..0000000
--- a/contexts/data/lib/ace/mode-c_cpp-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./c_cpp_highlight_rules").c_cppHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./behaviour/cstyle").CstyleBehaviour,k=a("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j,this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(l.prototype),b.Mode=l}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("and|double|not_eq|throw|and_eq|dynamic_cast|operator|true|asm|else|or|try|auto|enum|or_eq|typedef|bitand|explicit|private|typeid|bitor|extern|protected|typename|bool|false|public|union|break|float|register|unsigned|case|fro|reinterpret-cast|using|catch|friend|return|virtual|char|goto|short|void|class|if|signed|volatile|compl|inline|sizeof|wchar_t|const|int|static|while|const-cast|long|static_cast|xor|continue|mutable|struct|xor_eq|default|namespace|switch|delete|new|template|do|not|this|for".split("|")),b=e.arrayToMap("NULL".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.c_cppHighlightRules=h}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-c_cpp-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-c_cpp-uncompressed-noconflict.js
deleted file mode 100644
index f9668df..0000000
--- a/contexts/data/lib/ace/mode-c_cpp-uncompressed-noconflict.js
+++ /dev/null
@@ -1,928 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Gastón Kleiman <gaston.kleiman AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/c_cpp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new c_cppHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Gastón Kleiman <gaston.kleiman AT gmail DOT com>
- *
- * Based on Bespin's C/C++ Syntax Plugin by Marc McIntyre.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var c_cppHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("and|double|not_eq|throw|and_eq|dynamic_cast|operator|true|" +
- "asm|else|or|try|auto|enum|or_eq|typedef|bitand|explicit|private|" +
- "typeid|bitor|extern|protected|typename|bool|false|public|union|" +
- "break|float|register|unsigned|case|fro|reinterpret-cast|using|catch|" +
- "friend|return|virtual|char|goto|short|void|class|if|signed|volatile|" +
- "compl|inline|sizeof|wchar_t|const|int|static|while|const-cast|long|" +
- "static_cast|xor|continue|mutable|struct|xor_eq|default|namespace|" +
- "switch|delete|new|template|do|not|this|for").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("NULL").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant", // <CONSTANT>
- regex : "<[a-zA-Z0-9.]+>"
- }, {
- token : "keyword", // pre-compiler directivs
- regex : "(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(c_cppHighlightRules, TextHighlightRules);
-
-exports.c_cppHighlightRules = c_cppHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-c_cpp-uncompressed.js b/contexts/data/lib/ace/mode-c_cpp-uncompressed.js
deleted file mode 100644
index 87a8fab..0000000
--- a/contexts/data/lib/ace/mode-c_cpp-uncompressed.js
+++ /dev/null
@@ -1,928 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Gastón Kleiman <gaston.kleiman AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/c_cpp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new c_cppHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Gastón Kleiman <gaston.kleiman AT gmail DOT com>
- *
- * Based on Bespin's C/C++ Syntax Plugin by Marc McIntyre.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var c_cppHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("and|double|not_eq|throw|and_eq|dynamic_cast|operator|true|" +
- "asm|else|or|try|auto|enum|or_eq|typedef|bitand|explicit|private|" +
- "typeid|bitor|extern|protected|typename|bool|false|public|union|" +
- "break|float|register|unsigned|case|fro|reinterpret-cast|using|catch|" +
- "friend|return|virtual|char|goto|short|void|class|if|signed|volatile|" +
- "compl|inline|sizeof|wchar_t|const|int|static|while|const-cast|long|" +
- "static_cast|xor|continue|mutable|struct|xor_eq|default|namespace|" +
- "switch|delete|new|template|do|not|this|for").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("NULL").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant", // <CONSTANT>
- regex : "<[a-zA-Z0-9.]+>"
- }, {
- token : "keyword", // pre-compiler directivs
- regex : "(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(c_cppHighlightRules, TextHighlightRules);
-
-exports.c_cppHighlightRules = c_cppHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-c_cpp.js b/contexts/data/lib/ace/mode-c_cpp.js
index c49e93e..ca26008 100644
--- a/contexts/data/lib/ace/mode-c_cpp.js
+++ b/contexts/data/lib/ace/mode-c_cpp.js
@@ -1 +1,765 @@
-define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./c_cpp_highlight_rules").c_cppHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./behaviour/cstyle").CstyleBehaviour,k=a("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j,this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(l.prototype),b.Mode=l}),define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("and|double|not_eq|throw|and_eq|dynamic_cast|operator|true|asm|else|or|try|auto|enum|or_eq|typedef|bitand|explicit|private|typeid|bitor|extern|protected|typename|bool|false|public|union|break|float|register|unsigned|case|fro|reinterpret-cast|using|catch|friend|return|virtual|char|goto|short|void|class|if|signed|volatile|compl|inline|sizeof|wchar_t|const|int|static|while|const-cast|long|static_cast|xor|continue|mutable|struct|xor_eq|default|namespace|switch|delete|new|template|do|not|this|for".split("|")),b=e.arrayToMap("NULL".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.c_cppHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/c_cpp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new c_cppHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
+
+var c_cppHighlightRules = function() {
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
+ "return|switch|while|catch|operator|try|throw|using"
+ );
+
+ var storageType = (
+ "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
+ "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
+ "class|wchar_t|template"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private:|" +
+ "protected:|public:|friend|explicit|virtual|export|mutable|typename"
+ );
+
+ var keywordOperators = (
+ "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
+ "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
+ );
+
+ var builtinConstants = (
+ "NULL|true|false|TRUE|FALSE"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "storage.modifier" : storageModifiers,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "this",
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "(?:#endif)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ token : "constant.other",
+ regex : "\\s*<.+?>",
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
+ next : "start"
+ },
+ {
+ token : "constant.other.multiline",
+ regex : /.*\\/
+ },
+ {
+ token : "constant.other",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-clojure-noconflict.js b/contexts/data/lib/ace/mode-clojure-noconflict.js
deleted file mode 100644
index 01d0666..0000000
--- a/contexts/data/lib/ace/mode-clojure-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./clojure_highlight_rules").ClojureHighlightRules,h=a("./matching_parens_outdent").MatchingParensOutdent,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,";")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/[\(\[]/);g&&(d+=" "),g=b.match(/[\)]/),g&&(d="")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> -&gt; ->> -&gt;&gt; .. / < &lt; <= &lt;= = == > &gt; >= &gt;= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq zero? zipmap ".split(" ")),b=e.arrayToMap("def do fn if let loop monitor-enter monitor-exit new quote recur set! throw try var".split(" ")),c=e.arrayToMap("true false nil".split(" "));this.$rules={start:[{token:"comment",regex:";.*$"},{token:"comment",regex:"^=begin$",next:"comment"},{token:"keyword",regex:"[\\(|\\)]"},{token:"keyword",regex:"[\\'\\(]"},{token:"keyword",regex:"[\\[|\\]]"},{token:"keyword",regex:"[\\{|\\}|\\#\\{|\\#\\}]"},{token:"keyword",regex:"[\\&]"},{token:"keyword",regex:"[\\#\\^\\{]"},{token:"keyword",regex:"[\\%]"},{token:"keyword",regex:"[@]"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]"},{token:function(d){return b.hasOwnProperty(d)?"keyword":c.hasOwnProperty(d)?"constant.language":a.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"[:](?:[a-zA-Z]|d)+"},{token:"string.regexp",regex:'/#"(?:.|(\\")|[^""\n])*"/g'}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.ClojureHighlightRules=g}),ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\)/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\))/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingParensOutdent=e}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-clojure-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-clojure-uncompressed-noconflict.js
deleted file mode 100644
index 987fe01..0000000
--- a/contexts/data/lib/ace/mode-clojure-uncompressed-noconflict.js
+++ /dev/null
@@ -1,432 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Shlomo Zalman Heigh <shlomozalmanheigh AT gmail DOT com>
- * Carin Meier
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/clojure', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/clojure_highlight_rules', 'ace/mode/matching_parens_outdent', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules;
-var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new ClojureHighlightRules().getRules());
- this.$outdent = new MatchingParensOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, ";");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/[\(\[]/);
- if (match) {
- indent += " ";
- }
- match = line.match(/[\)]/);
- if (match) {
- indent = "";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Shlomo Zalman Heigh <shlomozalmanheigh AT gmail DOT com>
- * Carin Meier
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/clojure_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-
-
-var ClojureHighlightRules = function() {
-
- var builtinFunctions = lang.arrayToMap(
- ('* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' +
- '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' +
- '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' +
- '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' +
- '*read-eval* *source-path* *use-context-classloader* ' +
- '*warn-on-reflection* + - -> -&gt; ->> -&gt;&gt; .. / < &lt; <= &lt;= = ' +
- '== > &gt; >= &gt;= accessor aclone ' +
- 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' +
- 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' +
- 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' +
- 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' +
- 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' +
- 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' +
- 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' +
- 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' +
- 'char-escape-string char-name-string char? chars chunk chunk-append ' +
- 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' +
- 'class class? clear-agent-errors clojure-version coll? comment commute ' +
- 'comp comparator compare compare-and-set! compile complement concat cond ' +
- 'condp conj conj! cons constantly construct-proxy contains? count ' +
- 'counted? create-ns create-struct cycle dec decimal? declare definline ' +
- 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' +
- 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' +
- 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' +
- 'double-array doubles drop drop-last drop-while empty empty? ensure ' +
- 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' +
- 'find-doc find-ns find-var first float float-array float? floats flush ' +
- 'fn fn? fnext for force format future future-call future-cancel ' +
- 'future-cancelled? future-done? future? gen-class gen-interface gensym ' +
- 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' +
- 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' +
- 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' +
- 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' +
- 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' +
- 'list* list? load load-file load-reader load-string loaded-libs locking ' +
- 'long long-array longs loop macroexpand macroexpand-1 make-array ' +
- 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' +
- 'merge-with meta method-sig methods min min-key mod name namespace neg? ' +
- 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' +
- 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' +
- 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' +
- 'or parents partial partition pcalls peek persistent! pmap pop pop! ' +
- 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' +
- 'primitives-classnames print print-ctor print-doc print-dup print-method ' +
- 'print-namespace-doc print-simple print-special-doc print-str printf ' +
- 'println println-str prn prn-str promise proxy proxy-call-with-super ' +
- 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' +
- 'rand rand-int range ratio? rational? rationalize re-find re-groups ' +
- 're-matcher re-matches re-pattern re-seq read read-line read-string ' +
- 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' +
- 'refer refer-clojure release-pending-sends rem remove remove-method ' +
- 'remove-ns remove-watch repeat repeatedly replace replicate require ' +
- 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' +
- 'rsubseq second select-keys send send-off seq seq? seque sequence ' +
- 'sequential? set set-validator! set? short short-array shorts ' +
- 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' +
- 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' +
- 'split-at split-with str stream? string? struct struct-map subs subseq ' +
- 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' +
- 'take-last take-nth take-while test the-ns time to-array to-array-2d ' +
- 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' +
- 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' +
- 'unchecked-remainder unchecked-subtract underive unquote ' +
- 'unquote-splicing update-in update-proxy use val vals var-get var-set ' +
- 'var? vary-meta vec vector vector? when when-first when-let when-not ' +
- 'while with-bindings with-bindings* with-in-str with-loading-context ' +
- 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' +
- 'zero? zipmap ').split(" ")
- );
-
- var keywords = lang.arrayToMap(
- ('def do fn if let loop monitor-enter monitor-exit new quote recur set! ' +
- 'throw try var').split(" ")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("true false nil").split(" ")
- );
-
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : ";.*$"
- }, {
- token : "comment", // multi line comment
- regex : "^\=begin$",
- next : "comment"
- }, {
- token : "keyword", //parens
- regex : "[\\(|\\)]"
- }, {
- token : "keyword", //lists
- regex : "[\\'\\(]"
- }, {
- token : "keyword", //vectors
- regex : "[\\[|\\]]"
- }, {
- token : "keyword", //sets and maps
- regex : "[\\{|\\}|\\#\\{|\\#\\}]"
- }, {
- token : "keyword", // ampersands
- regex : '[\\&]'
- }, {
- token : "keyword", // metadata
- regex : '[\\#\\^\\{]'
- }, {
- token : "keyword", // anonymous fn syntactic sugar
- regex : '[\\%]'
- }, {
- token : "keyword", // deref reader macro
- regex : '[@]'
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language",
- regex : '[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]'
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // symbol
- regex : "[:](?:[a-zA-Z]|\d)+"
- }, {
- token : "string.regexp", //Regular Expressions
- regex : '/#"(?:\.|(\\\")|[^\""\n])*"/g'
- }
-
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : "^\=end$",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-};
-
-oop.inherits(ClojureHighlightRules, TextHighlightRules);
-
-exports.ClojureHighlightRules = ClojureHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_parens_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingParensOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\)/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\))/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingParensOutdent.prototype);
-
-exports.MatchingParensOutdent = MatchingParensOutdent;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-clojure-uncompressed.js b/contexts/data/lib/ace/mode-clojure-uncompressed.js
deleted file mode 100644
index eb99ceb..0000000
--- a/contexts/data/lib/ace/mode-clojure-uncompressed.js
+++ /dev/null
@@ -1,432 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Shlomo Zalman Heigh <shlomozalmanheigh AT gmail DOT com>
- * Carin Meier
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/clojure', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/clojure_highlight_rules', 'ace/mode/matching_parens_outdent', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules;
-var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new ClojureHighlightRules().getRules());
- this.$outdent = new MatchingParensOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, ";");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/[\(\[]/);
- if (match) {
- indent += " ";
- }
- match = line.match(/[\)]/);
- if (match) {
- indent = "";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Shlomo Zalman Heigh <shlomozalmanheigh AT gmail DOT com>
- * Carin Meier
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/clojure_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-
-
-var ClojureHighlightRules = function() {
-
- var builtinFunctions = lang.arrayToMap(
- ('* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' +
- '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' +
- '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' +
- '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' +
- '*read-eval* *source-path* *use-context-classloader* ' +
- '*warn-on-reflection* + - -> -&gt; ->> -&gt;&gt; .. / < &lt; <= &lt;= = ' +
- '== > &gt; >= &gt;= accessor aclone ' +
- 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' +
- 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' +
- 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' +
- 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' +
- 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' +
- 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' +
- 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' +
- 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' +
- 'char-escape-string char-name-string char? chars chunk chunk-append ' +
- 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' +
- 'class class? clear-agent-errors clojure-version coll? comment commute ' +
- 'comp comparator compare compare-and-set! compile complement concat cond ' +
- 'condp conj conj! cons constantly construct-proxy contains? count ' +
- 'counted? create-ns create-struct cycle dec decimal? declare definline ' +
- 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' +
- 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' +
- 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' +
- 'double-array doubles drop drop-last drop-while empty empty? ensure ' +
- 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' +
- 'find-doc find-ns find-var first float float-array float? floats flush ' +
- 'fn fn? fnext for force format future future-call future-cancel ' +
- 'future-cancelled? future-done? future? gen-class gen-interface gensym ' +
- 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' +
- 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' +
- 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' +
- 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' +
- 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' +
- 'list* list? load load-file load-reader load-string loaded-libs locking ' +
- 'long long-array longs loop macroexpand macroexpand-1 make-array ' +
- 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' +
- 'merge-with meta method-sig methods min min-key mod name namespace neg? ' +
- 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' +
- 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' +
- 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' +
- 'or parents partial partition pcalls peek persistent! pmap pop pop! ' +
- 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' +
- 'primitives-classnames print print-ctor print-doc print-dup print-method ' +
- 'print-namespace-doc print-simple print-special-doc print-str printf ' +
- 'println println-str prn prn-str promise proxy proxy-call-with-super ' +
- 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' +
- 'rand rand-int range ratio? rational? rationalize re-find re-groups ' +
- 're-matcher re-matches re-pattern re-seq read read-line read-string ' +
- 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' +
- 'refer refer-clojure release-pending-sends rem remove remove-method ' +
- 'remove-ns remove-watch repeat repeatedly replace replicate require ' +
- 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' +
- 'rsubseq second select-keys send send-off seq seq? seque sequence ' +
- 'sequential? set set-validator! set? short short-array shorts ' +
- 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' +
- 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' +
- 'split-at split-with str stream? string? struct struct-map subs subseq ' +
- 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' +
- 'take-last take-nth take-while test the-ns time to-array to-array-2d ' +
- 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' +
- 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' +
- 'unchecked-remainder unchecked-subtract underive unquote ' +
- 'unquote-splicing update-in update-proxy use val vals var-get var-set ' +
- 'var? vary-meta vec vector vector? when when-first when-let when-not ' +
- 'while with-bindings with-bindings* with-in-str with-loading-context ' +
- 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' +
- 'zero? zipmap ').split(" ")
- );
-
- var keywords = lang.arrayToMap(
- ('def do fn if let loop monitor-enter monitor-exit new quote recur set! ' +
- 'throw try var').split(" ")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("true false nil").split(" ")
- );
-
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : ";.*$"
- }, {
- token : "comment", // multi line comment
- regex : "^\=begin$",
- next : "comment"
- }, {
- token : "keyword", //parens
- regex : "[\\(|\\)]"
- }, {
- token : "keyword", //lists
- regex : "[\\'\\(]"
- }, {
- token : "keyword", //vectors
- regex : "[\\[|\\]]"
- }, {
- token : "keyword", //sets and maps
- regex : "[\\{|\\}|\\#\\{|\\#\\}]"
- }, {
- token : "keyword", // ampersands
- regex : '[\\&]'
- }, {
- token : "keyword", // metadata
- regex : '[\\#\\^\\{]'
- }, {
- token : "keyword", // anonymous fn syntactic sugar
- regex : '[\\%]'
- }, {
- token : "keyword", // deref reader macro
- regex : '[@]'
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language",
- regex : '[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]'
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // symbol
- regex : "[:](?:[a-zA-Z]|\d)+"
- }, {
- token : "string.regexp", //Regular Expressions
- regex : '/#"(?:\.|(\\\")|[^\""\n])*"/g'
- }
-
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : "^\=end$",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-};
-
-oop.inherits(ClojureHighlightRules, TextHighlightRules);
-
-exports.ClojureHighlightRules = ClojureHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_parens_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingParensOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\)/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\))/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingParensOutdent.prototype);
-
-exports.MatchingParensOutdent = MatchingParensOutdent;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-clojure.js b/contexts/data/lib/ace/mode-clojure.js
index 74e69fb..b3fd2a1 100644
--- a/contexts/data/lib/ace/mode-clojure.js
+++ b/contexts/data/lib/ace/mode-clojure.js
@@ -1 +1,325 @@
-define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./clojure_highlight_rules").ClojureHighlightRules,h=a("./matching_parens_outdent").MatchingParensOutdent,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,";")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/[\(\[]/);g&&(d+=" "),g=b.match(/[\)]/),g&&(d="")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> -&gt; ->> -&gt;&gt; .. / < &lt; <= &lt;= = == > &gt; >= &gt;= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq zero? zipmap ".split(" ")),b=e.arrayToMap("def do fn if let loop monitor-enter monitor-exit new quote recur set! throw try var".split(" ")),c=e.arrayToMap("true false nil".split(" "));this.$rules={start:[{token:"comment",regex:";.*$"},{token:"comment",regex:"^=begin$",next:"comment"},{token:"keyword",regex:"[\\(|\\)]"},{token:"keyword",regex:"[\\'\\(]"},{token:"keyword",regex:"[\\[|\\]]"},{token:"keyword",regex:"[\\{|\\}|\\#\\{|\\#\\}]"},{token:"keyword",regex:"[\\&]"},{token:"keyword",regex:"[\\#\\^\\{]"},{token:"keyword",regex:"[\\%]"},{token:"keyword",regex:"[@]"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]"},{token:function(d){return b.hasOwnProperty(d)?"keyword":c.hasOwnProperty(d)?"constant.language":a.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"[:](?:[a-zA-Z]|d)+"},{token:"string.regexp",regex:'/#"(?:.|(\\")|[^""\n])*"/g'}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.ClojureHighlightRules=g}),define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\)/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\))/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingParensOutdent=e}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/clojure', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/clojure_highlight_rules', 'ace/mode/matching_parens_outdent', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules;
+var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new ClojureHighlightRules().getRules());
+ this.$outdent = new MatchingParensOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)#/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, ";");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/[\(\[]/);
+ if (match) {
+ indent += " ";
+ }
+ match = line.match(/[\)]/);
+ if (match) {
+ indent = "";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/clojure_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+
+
+var ClojureHighlightRules = function() {
+
+ var builtinFunctions = (
+ '* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' +
+ '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' +
+ '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' +
+ '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' +
+ '*read-eval* *source-path* *use-context-classloader* ' +
+ '*warn-on-reflection* + - -> ->> .. / < <= = ' +
+ '== > &gt; >= &gt;= accessor aclone ' +
+ 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' +
+ 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' +
+ 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' +
+ 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' +
+ 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' +
+ 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' +
+ 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' +
+ 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' +
+ 'char-escape-string char-name-string char? chars chunk chunk-append ' +
+ 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' +
+ 'class class? clear-agent-errors clojure-version coll? comment commute ' +
+ 'comp comparator compare compare-and-set! compile complement concat cond ' +
+ 'condp conj conj! cons constantly construct-proxy contains? count ' +
+ 'counted? create-ns create-struct cycle dec decimal? declare definline ' +
+ 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' +
+ 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' +
+ 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' +
+ 'double-array doubles drop drop-last drop-while empty empty? ensure ' +
+ 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' +
+ 'find-doc find-ns find-var first float float-array float? floats flush ' +
+ 'fn fn? fnext for force format future future-call future-cancel ' +
+ 'future-cancelled? future-done? future? gen-class gen-interface gensym ' +
+ 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' +
+ 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' +
+ 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' +
+ 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' +
+ 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' +
+ 'list* list? load load-file load-reader load-string loaded-libs locking ' +
+ 'long long-array longs loop macroexpand macroexpand-1 make-array ' +
+ 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' +
+ 'merge-with meta method-sig methods min min-key mod name namespace neg? ' +
+ 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' +
+ 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' +
+ 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' +
+ 'or parents partial partition pcalls peek persistent! pmap pop pop! ' +
+ 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' +
+ 'primitives-classnames print print-ctor print-doc print-dup print-method ' +
+ 'print-namespace-doc print-simple print-special-doc print-str printf ' +
+ 'println println-str prn prn-str promise proxy proxy-call-with-super ' +
+ 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' +
+ 'rand rand-int range ratio? rational? rationalize re-find re-groups ' +
+ 're-matcher re-matches re-pattern re-seq read read-line read-string ' +
+ 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' +
+ 'refer refer-clojure release-pending-sends rem remove remove-method ' +
+ 'remove-ns remove-watch repeat repeatedly replace replicate require ' +
+ 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' +
+ 'rsubseq second select-keys send send-off seq seq? seque sequence ' +
+ 'sequential? set set-validator! set? short short-array shorts ' +
+ 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' +
+ 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' +
+ 'split-at split-with str stream? string? struct struct-map subs subseq ' +
+ 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' +
+ 'take-last take-nth take-while test the-ns time to-array to-array-2d ' +
+ 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' +
+ 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' +
+ 'unchecked-remainder unchecked-subtract underive unquote ' +
+ 'unquote-splicing update-in update-proxy use val vals var-get var-set ' +
+ 'var? vary-meta vec vector vector? when when-first when-let when-not ' +
+ 'while with-bindings with-bindings* with-in-str with-loading-context ' +
+ 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' +
+ 'zero? zipmap'
+ );
+
+ var keywords = ('throw try var ' +
+ 'def do fn if let loop monitor-enter monitor-exit new quote recur set!'
+ );
+
+ var buildinConstants = ("true false nil");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": builtinFunctions
+ }, "identifier", false, " ");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : ";.*$"
+ }, {
+ token : "keyword", //parens
+ regex : "[\\(|\\)]"
+ }, {
+ token : "keyword", //lists
+ regex : "[\\'\\(]"
+ }, {
+ token : "keyword", //vectors
+ regex : "[\\[|\\]]"
+ }, {
+ token : "keyword", //sets and maps
+ regex : "[\\{|\\}|\\#\\{|\\#\\}]"
+ }, {
+ token : "keyword", // ampersands
+ regex : '[\\&]'
+ }, {
+ token : "keyword", // metadata
+ regex : '[\\#\\^\\{]'
+ }, {
+ token : "keyword", // anonymous fn syntactic sugar
+ regex : '[\\%]'
+ }, {
+ token : "keyword", // deref reader macro
+ regex : '[@]'
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language",
+ regex : '[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]'
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"
+ }, {
+ token : "string", // single line
+ regex : '"',
+ next: "string"
+ }, {
+ token : "string", // symbol
+ regex : /:[\w*+!\-_?:\/]+/
+ }, {
+ token : "string.regexp", //Regular Expressions
+ regex : '/#"(?:\\.|(?:\\\")|[^\""\n])*"/g'
+ }
+
+ ],
+ "string" : [
+ {
+ token : "constant.language.escape",
+ regex : "\\\\.|\\\\$"
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }
+ ]
+ };
+};
+
+oop.inherits(ClojureHighlightRules, TextHighlightRules);
+
+exports.ClojureHighlightRules = ClojureHighlightRules;
+});
+
+ace.define('ace/mode/matching_parens_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingParensOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\)/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\))/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingParensOutdent.prototype);
+
+exports.MatchingParensOutdent = MatchingParensOutdent;
+});
diff --git a/contexts/data/lib/ace/mode-coffee-noconflict.js b/contexts/data/lib/ace/mode-coffee-noconflict.js
deleted file mode 100644
index 61b89e8..0000000
--- a/contexts/data/lib/ace/mode-coffee-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/coffee",["require","exports","module","ace/tokenizer","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/pythonic","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"],function(a,b,c){function l(){this.$tokenizer=new d((new e).getRules()),this.$outdent=new f,this.foldingRules=new g("=|=>|->|\\s*class [^#]*")}"use strict";var d=a("../tokenizer").Tokenizer,e=a("./coffee_highlight_rules").CoffeeHighlightRules,f=a("./matching_brace_outdent").MatchingBraceOutdent,g=a("./folding/pythonic").FoldMode,h=a("../range").Range,i=a("./text").Mode,j=a("../worker/worker_client").WorkerClient,k=a("../lib/oop");k.inherits(l,i),function(){var a=/(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/,b=/^(\s*)#/,c=/^\s*###(?!#)/,d=/^\s*/;this.getNextLineIndent=function(b,c,d){var e=this.$getIndent(c),f=this.$tokenizer.getLineTokens(c,b).tokens;return(!f.length||f[f.length-1].type!=="comment")&&b==="start"&&a.test(c)&&(e+=d),e},this.toggleCommentLines=function(a,e,f,g){console.log("toggle");var i=new h(0,0,0,0);for(var j=f;j<=g;++j){var k=e.getLine(j);if(c.test(k))continue;b.test(k)?k=k.replace(b,"$1"):k=k.replace(d,"$&#"),i.end.row=i.start.row=j,i.end.column=k.length+1,e.replace(i,k)}},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-coffee.js","ace/mode/coffee_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("error",function(b){a.setAnnotations([b.data])}),b.on("ok",function(b){a.clearAnnotations()}),b}}.call(l.prototype),b.Mode=l}),ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){function g(){var a="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",b={token:"string",merge:!0,regex:".+"},c=d.arrayToMap("this|throw|then|try|typeof|super|switch|return|break|by)|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes".split("|")),e=d.arrayToMap("true|false|null|undefined".split("|")),f=d.arrayToMap("case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|extends|slice|bind|indexOf".split("|")),g=d.arrayToMap("Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|RangeError|String|SyntaxError|Error|EvalError|TypeError|URIError".split("|")),h=d.arrayToMap("Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|RangeError|String|SyntaxError|Error|EvalError|TypeError|URIError".split("|"));this.$rules={start:[{token:"identifier",regex:"(?:(?:\\.|::)\\s*)"+a},{token:"variable",regex:"@(?:"+a+")?"},{token:function(a){return c.hasOwnProperty(a)?"keyword":e.hasOwnProperty(a)?"constant.language":f.hasOwnProperty(a)?"invalid.illegal":g.hasOwnProperty(a)?"language.support.class":h.hasOwnProperty(a)?"language.support.function":"identifier"},regex:a},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{token:"string",merge:!0,regex:"'''",next:"qdoc"},{token:"string",merge:!0,regex:'"""',next:"qqdoc"},{token:"string",merge:!0,regex:"'",next:"qstring"},{token:"string",merge:!0,regex:'"',next:"qqstring"},{token:"string",merge:!0,regex:"`",next:"js"},{token:"string.regex",merge:!0,regex:"///",next:"heregex"},{token:"string.regex",regex:"/(?!\\s)[^[/\\n\\\\]*(?: (?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[/\\n\\\\]*)*/[imgy]{0,4}(?!\\w)"},{token:"comment",merge:!0,regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\."},{token:"keyword.operator",regex:"(?:[\\-=]>|[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|\\!)"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},b],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},b],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",merge:!0,next:"start"},b],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',merge:!0,next:"start"},b],js:[{token:"string",merge:!0,regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"start"},b],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",merge:!0,regex:"\\S+"}],comment:[{token:"comment",regex:".*?###",next:"start"},{token:"comment",merge:!0,regex:".+"}]}}"use strict";var d=a("../lib/lang"),e=a("../lib/oop"),f=a("./text_highlight_rules").TextHighlightRules;e.inherits(g,f),b.CoffeeHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a){this.foldingStartMarker=new RegExp("(?:([\\[{])|("+a+"))(?:\\s*)(?:#.*)?$")};d.inherits(f,e),function(){this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),e=d.match(this.foldingStartMarker);if(e)return e[1]?this.openingBracketBlock(a,e[1],c,e.index):e[2]?this.indentationBlock(a,c,e.index+e[2].length):this.indentationBlock(a,c)}}.call(f.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-coffee-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-coffee-uncompressed-noconflict.js
deleted file mode 100644
index 1ef4773..0000000
--- a/contexts/data/lib/ace/mode-coffee-uncompressed-noconflict.js
+++ /dev/null
@@ -1,804 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Satoshi Murakami <murky.satyr AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/coffee', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/coffee_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/pythonic', 'ace/range', 'ace/mode/text', 'ace/worker/worker_client', 'ace/lib/oop'], function(require, exports, module) {
-"use strict";
-
-var Tokenizer = require("../tokenizer").Tokenizer;
-var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules;
-var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var PythonFoldMode = require("./folding/pythonic").FoldMode;
-var Range = require("../range").Range;
-var TextMode = require("./text").Mode;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var oop = require("../lib/oop");
-
-function Mode() {
- this.$tokenizer = new Tokenizer(new Rules().getRules());
- this.$outdent = new Outdent();
- this.foldingRules = new PythonFoldMode("=|=>|->|\\s*class [^#]*");
-}
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/;
- var commentLine = /^(\s*)#/;
- var hereComment = /^\s*###(?!#)/;
- var indentation = /^\s*/;
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
-
- if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
- state === 'start' && indenter.test(line))
- indent += tab;
- return indent;
- };
-
- this.toggleCommentLines = function(state, doc, startRow, endRow){
- console.log("toggle");
- var range = new Range(0, 0, 0, 0);
- for (var i = startRow; i <= endRow; ++i) {
- var line = doc.getLine(i);
- if (hereComment.test(line))
- continue;
-
- if (commentLine.test(line))
- line = line.replace(commentLine, '$1');
- else
- line = line.replace(indentation, '$&#');
-
- range.end.row = range.start.row = i;
- range.end.column = line.length + 1;
- doc.replace(range, line);
- }
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-coffee.js", "ace/mode/coffee_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("error", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("ok", function(e) {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Satoshi Murakami <murky.satyr AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
- var lang = require("../lib/lang");
- var oop = require("../lib/oop");
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
- oop.inherits(CoffeeHighlightRules, TextHighlightRules);
-
- function CoffeeHighlightRules() {
- var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
- var stringfill = {
- token : "string",
- merge : true,
- regex : ".+"
- };
-
- var keywords = lang.arrayToMap((
- "this|throw|then|try|typeof|super|switch|return|break|by)|continue|" +
- "catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|" +
- "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
- "or|on|unless|until|and|yes").split("|")
- );
-
- var langConstant = lang.arrayToMap((
- "true|false|null|undefined").split("|")
- );
-
- var illegal = lang.arrayToMap((
- "case|const|default|function|var|void|with|enum|export|implements|" +
- "interface|let|package|private|protected|public|static|yield|" +
- "__hasProp|extends|slice|bind|indexOf").split("|")
- );
-
- var supportClass = lang.arrayToMap((
- "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|" +
- "RangeError|String|SyntaxError|Error|EvalError|TypeError|URIError").split("|")
- );
-
- var supportFunction = lang.arrayToMap((
- "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
- "encodeURIComponent|decodeURI|decodeURIComponent|RangeError|String|" +
- "SyntaxError|Error|EvalError|TypeError|URIError").split("|")
- );
-
- this.$rules = {
- start : [
- {
- token : "identifier",
- regex : "(?:(?:\\.|::)\\s*)" + identifier
- }, {
- token : "variable",
- regex : "@(?:" + identifier + ")?"
- }, {
- token: function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (langConstant.hasOwnProperty(value))
- return "constant.language";
- else if (illegal.hasOwnProperty(value))
- return "invalid.illegal";
- else if (supportClass.hasOwnProperty(value))
- return "language.support.class";
- else if (supportFunction.hasOwnProperty(value))
- return "language.support.function";
- else
- return "identifier";
- },
- regex : identifier
- }, {
- token : "constant.numeric",
- regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
- }, {
- token : "string",
- merge : true,
- regex : "'''",
- next : "qdoc"
- }, {
- token : "string",
- merge : true,
- regex : '"""',
- next : "qqdoc"
- }, {
- token : "string",
- merge : true,
- regex : "'",
- next : "qstring"
- }, {
- token : "string",
- merge : true,
- regex : '"',
- next : "qqstring"
- }, {
- token : "string",
- merge : true,
- regex : "`",
- next : "js"
- }, {
- token : "string.regex",
- merge : true,
- regex : "///",
- next : "heregex"
- }, {
- token : "string.regex",
- regex : "/(?!\\s)[^[/\\n\\\\]*(?: (?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[/\\n\\\\]*)*/[imgy]{0,4}(?!\\w)"
- }, {
- token : "comment",
- merge : true,
- regex : "###(?!#)",
- next : "comment"
- }, {
- token : "comment",
- regex : "#.*"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\."
- }, {
- token : "keyword.operator",
- regex : "(?:[\\-=]>|[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|\\!)"
- }, {
- token : "paren.lparen",
- regex : "[({[]"
- }, {
- token : "paren.rparen",
- regex : "[\\]})]"
- }, {
- token : "text",
- regex : "\\s+"
- }],
-
- qdoc : [{
- token : "string",
- regex : ".*?'''",
- next : "start"
- }, stringfill],
-
- qqdoc : [{
- token : "string",
- regex : '.*?"""',
- next : "start"
- }, stringfill],
-
- qstring : [{
- token : "string",
- regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
- merge : true,
- next : "start"
- }, stringfill],
-
- qqstring : [{
- token : "string",
- regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
- merge : true,
- next : "start"
- }, stringfill],
-
- js : [{
- token : "string",
- merge : true,
- regex : "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
- next : "start"
- }, stringfill],
-
- heregex : [{
- token : "string.regex",
- regex : '.*?///[imgy]{0,4}',
- next : "start"
- }, {
- token : "comment.regex",
- regex : "\\s+(?:#.*)?"
- }, {
- token : "string.regex",
- merge : true,
- regex : "\\S+"
- }],
-
- comment : [{
- token : "comment",
- regex : '.*?###',
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
- }
-
- exports.CoffeeHighlightRules = CoffeeHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/pythonic', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(markers) {
- this.foldingStartMarker = new RegExp("(?:([\\[{])|(" + markers + "))(?:\\s*)(?:#.*)?$");
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, match.index);
- if (match[2])
- return this.indentationBlock(session, row, match.index + match[2].length);
- return this.indentationBlock(session, row);
- }
- }
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-coffee-uncompressed.js b/contexts/data/lib/ace/mode-coffee-uncompressed.js
deleted file mode 100644
index 9a06cbf..0000000
--- a/contexts/data/lib/ace/mode-coffee-uncompressed.js
+++ /dev/null
@@ -1,804 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Satoshi Murakami <murky.satyr AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/coffee', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/coffee_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/pythonic', 'ace/range', 'ace/mode/text', 'ace/worker/worker_client', 'ace/lib/oop'], function(require, exports, module) {
-"use strict";
-
-var Tokenizer = require("../tokenizer").Tokenizer;
-var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules;
-var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var PythonFoldMode = require("./folding/pythonic").FoldMode;
-var Range = require("../range").Range;
-var TextMode = require("./text").Mode;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var oop = require("../lib/oop");
-
-function Mode() {
- this.$tokenizer = new Tokenizer(new Rules().getRules());
- this.$outdent = new Outdent();
- this.foldingRules = new PythonFoldMode("=|=>|->|\\s*class [^#]*");
-}
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/;
- var commentLine = /^(\s*)#/;
- var hereComment = /^\s*###(?!#)/;
- var indentation = /^\s*/;
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
-
- if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
- state === 'start' && indenter.test(line))
- indent += tab;
- return indent;
- };
-
- this.toggleCommentLines = function(state, doc, startRow, endRow){
- console.log("toggle");
- var range = new Range(0, 0, 0, 0);
- for (var i = startRow; i <= endRow; ++i) {
- var line = doc.getLine(i);
- if (hereComment.test(line))
- continue;
-
- if (commentLine.test(line))
- line = line.replace(commentLine, '$1');
- else
- line = line.replace(indentation, '$&#');
-
- range.end.row = range.start.row = i;
- range.end.column = line.length + 1;
- doc.replace(range, line);
- }
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-coffee.js", "ace/mode/coffee_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("error", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("ok", function(e) {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Satoshi Murakami <murky.satyr AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
- var lang = require("../lib/lang");
- var oop = require("../lib/oop");
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
- oop.inherits(CoffeeHighlightRules, TextHighlightRules);
-
- function CoffeeHighlightRules() {
- var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
- var stringfill = {
- token : "string",
- merge : true,
- regex : ".+"
- };
-
- var keywords = lang.arrayToMap((
- "this|throw|then|try|typeof|super|switch|return|break|by)|continue|" +
- "catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|" +
- "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
- "or|on|unless|until|and|yes").split("|")
- );
-
- var langConstant = lang.arrayToMap((
- "true|false|null|undefined").split("|")
- );
-
- var illegal = lang.arrayToMap((
- "case|const|default|function|var|void|with|enum|export|implements|" +
- "interface|let|package|private|protected|public|static|yield|" +
- "__hasProp|extends|slice|bind|indexOf").split("|")
- );
-
- var supportClass = lang.arrayToMap((
- "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|" +
- "RangeError|String|SyntaxError|Error|EvalError|TypeError|URIError").split("|")
- );
-
- var supportFunction = lang.arrayToMap((
- "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
- "encodeURIComponent|decodeURI|decodeURIComponent|RangeError|String|" +
- "SyntaxError|Error|EvalError|TypeError|URIError").split("|")
- );
-
- this.$rules = {
- start : [
- {
- token : "identifier",
- regex : "(?:(?:\\.|::)\\s*)" + identifier
- }, {
- token : "variable",
- regex : "@(?:" + identifier + ")?"
- }, {
- token: function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (langConstant.hasOwnProperty(value))
- return "constant.language";
- else if (illegal.hasOwnProperty(value))
- return "invalid.illegal";
- else if (supportClass.hasOwnProperty(value))
- return "language.support.class";
- else if (supportFunction.hasOwnProperty(value))
- return "language.support.function";
- else
- return "identifier";
- },
- regex : identifier
- }, {
- token : "constant.numeric",
- regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
- }, {
- token : "string",
- merge : true,
- regex : "'''",
- next : "qdoc"
- }, {
- token : "string",
- merge : true,
- regex : '"""',
- next : "qqdoc"
- }, {
- token : "string",
- merge : true,
- regex : "'",
- next : "qstring"
- }, {
- token : "string",
- merge : true,
- regex : '"',
- next : "qqstring"
- }, {
- token : "string",
- merge : true,
- regex : "`",
- next : "js"
- }, {
- token : "string.regex",
- merge : true,
- regex : "///",
- next : "heregex"
- }, {
- token : "string.regex",
- regex : "/(?!\\s)[^[/\\n\\\\]*(?: (?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[/\\n\\\\]*)*/[imgy]{0,4}(?!\\w)"
- }, {
- token : "comment",
- merge : true,
- regex : "###(?!#)",
- next : "comment"
- }, {
- token : "comment",
- regex : "#.*"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\."
- }, {
- token : "keyword.operator",
- regex : "(?:[\\-=]>|[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|\\!)"
- }, {
- token : "paren.lparen",
- regex : "[({[]"
- }, {
- token : "paren.rparen",
- regex : "[\\]})]"
- }, {
- token : "text",
- regex : "\\s+"
- }],
-
- qdoc : [{
- token : "string",
- regex : ".*?'''",
- next : "start"
- }, stringfill],
-
- qqdoc : [{
- token : "string",
- regex : '.*?"""',
- next : "start"
- }, stringfill],
-
- qstring : [{
- token : "string",
- regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
- merge : true,
- next : "start"
- }, stringfill],
-
- qqstring : [{
- token : "string",
- regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
- merge : true,
- next : "start"
- }, stringfill],
-
- js : [{
- token : "string",
- merge : true,
- regex : "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
- next : "start"
- }, stringfill],
-
- heregex : [{
- token : "string.regex",
- regex : '.*?///[imgy]{0,4}',
- next : "start"
- }, {
- token : "comment.regex",
- regex : "\\s+(?:#.*)?"
- }, {
- token : "string.regex",
- merge : true,
- regex : "\\S+"
- }],
-
- comment : [{
- token : "comment",
- regex : '.*?###',
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
- }
-
- exports.CoffeeHighlightRules = CoffeeHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/pythonic', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(markers) {
- this.foldingStartMarker = new RegExp("(?:([\\[{])|(" + markers + "))(?:\\s*)(?:#.*)?$");
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, match.index);
- if (match[2])
- return this.indentationBlock(session, row, match.index + match[2].length);
- return this.indentationBlock(session, row);
- }
- }
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-coffee.js b/contexts/data/lib/ace/mode-coffee.js
index c42e1f8..beb67cd 100644
--- a/contexts/data/lib/ace/mode-coffee.js
+++ b/contexts/data/lib/ace/mode-coffee.js
@@ -1 +1,520 @@
-define("ace/mode/coffee",["require","exports","module","ace/tokenizer","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/pythonic","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"],function(a,b,c){function l(){this.$tokenizer=new d((new e).getRules()),this.$outdent=new f,this.foldingRules=new g("=|=>|->|\\s*class [^#]*")}"use strict";var d=a("../tokenizer").Tokenizer,e=a("./coffee_highlight_rules").CoffeeHighlightRules,f=a("./matching_brace_outdent").MatchingBraceOutdent,g=a("./folding/pythonic").FoldMode,h=a("../range").Range,i=a("./text").Mode,j=a("../worker/worker_client").WorkerClient,k=a("../lib/oop");k.inherits(l,i),function(){var a=/(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/,b=/^(\s*)#/,c=/^\s*###(?!#)/,d=/^\s*/;this.getNextLineIndent=function(b,c,d){var e=this.$getIndent(c),f=this.$tokenizer.getLineTokens(c,b).tokens;return(!f.length||f[f.length-1].type!=="comment")&&b==="start"&&a.test(c)&&(e+=d),e},this.toggleCommentLines=function(a,e,f,g){console.log("toggle");var i=new h(0,0,0,0);for(var j=f;j<=g;++j){var k=e.getLine(j);if(c.test(k))continue;b.test(k)?k=k.replace(b,"$1"):k=k.replace(d,"$&#"),i.end.row=i.start.row=j,i.end.column=k.length+1,e.replace(i,k)}},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-coffee.js","ace/mode/coffee_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("error",function(b){a.setAnnotations([b.data])}),b.on("ok",function(b){a.clearAnnotations()}),b}}.call(l.prototype),b.Mode=l}),define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){function g(){var a="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",b={token:"string",merge:!0,regex:".+"},c=d.arrayToMap("this|throw|then|try|typeof|super|switch|return|break|by)|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes".split("|")),e=d.arrayToMap("true|false|null|undefined".split("|")),f=d.arrayToMap("case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|extends|slice|bind|indexOf".split("|")),g=d.arrayToMap("Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|RangeError|String|SyntaxError|Error|EvalError|TypeError|URIError".split("|")),h=d.arrayToMap("Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|RangeError|String|SyntaxError|Error|EvalError|TypeError|URIError".split("|"));this.$rules={start:[{token:"identifier",regex:"(?:(?:\\.|::)\\s*)"+a},{token:"variable",regex:"@(?:"+a+")?"},{token:function(a){return c.hasOwnProperty(a)?"keyword":e.hasOwnProperty(a)?"constant.language":f.hasOwnProperty(a)?"invalid.illegal":g.hasOwnProperty(a)?"language.support.class":h.hasOwnProperty(a)?"language.support.function":"identifier"},regex:a},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{token:"string",merge:!0,regex:"'''",next:"qdoc"},{token:"string",merge:!0,regex:'"""',next:"qqdoc"},{token:"string",merge:!0,regex:"'",next:"qstring"},{token:"string",merge:!0,regex:'"',next:"qqstring"},{token:"string",merge:!0,regex:"`",next:"js"},{token:"string.regex",merge:!0,regex:"///",next:"heregex"},{token:"string.regex",regex:"/(?!\\s)[^[/\\n\\\\]*(?: (?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[/\\n\\\\]*)*/[imgy]{0,4}(?!\\w)"},{token:"comment",merge:!0,regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\."},{token:"keyword.operator",regex:"(?:[\\-=]>|[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|\\!)"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},b],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},b],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",merge:!0,next:"start"},b],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',merge:!0,next:"start"},b],js:[{token:"string",merge:!0,regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"start"},b],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",merge:!0,regex:"\\S+"}],comment:[{token:"comment",regex:".*?###",next:"start"},{token:"comment",merge:!0,regex:".+"}]}}"use strict";var d=a("../lib/lang"),e=a("../lib/oop"),f=a("./text_highlight_rules").TextHighlightRules;e.inherits(g,f),b.CoffeeHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a){this.foldingStartMarker=new RegExp("(?:([\\[{])|("+a+"))(?:\\s*)(?:#.*)?$")};d.inherits(f,e),function(){this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),e=d.match(this.foldingStartMarker);if(e)return e[1]?this.openingBracketBlock(a,e[1],c,e.index):e[2]?this.indentationBlock(a,c,e.index+e[2].length):this.indentationBlock(a,c)}}.call(f.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/coffee', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/coffee_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/coffee', 'ace/range', 'ace/mode/text', 'ace/worker/worker_client', 'ace/lib/oop'], function(require, exports, module) {
+
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules;
+var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var FoldMode = require("./folding/coffee").FoldMode;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+
+function Mode() {
+ this.$tokenizer = new Tokenizer(new Rules().getRules());
+ this.$outdent = new Outdent();
+ this.foldingRules = new FoldMode();
+}
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/;
+ var commentLine = /^(\s*)#/;
+ var hereComment = /^\s*###(?!#)/;
+ var indentation = /^\s*/;
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
+ state === 'start' && indenter.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow){
+ console.log("toggle");
+ var range = new Range(0, 0, 0, 0);
+ for (var i = startRow; i <= endRow; ++i) {
+ var line = doc.getLine(i);
+ if (hereComment.test(line))
+ continue;
+
+ if (commentLine.test(line))
+ line = line.replace(commentLine, '$1');
+ else
+ line = line.replace(indentation, '$&#');
+
+ range.end.row = range.start.row = i;
+ range.end.column = line.length + 1;
+ doc.replace(range, line);
+ }
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations([e.data]);
+ });
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ oop.inherits(CoffeeHighlightRules, TextHighlightRules);
+
+ function CoffeeHighlightRules() {
+ var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
+ var stringfill = {
+ token : "string",
+ regex : ".+"
+ };
+
+ var keywords = (
+ "this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|" +
+ "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
+ "or|on|unless|until|and|yes"
+ );
+
+ var langConstant = (
+ "true|false|null|undefined|NaN|Infinity"
+ );
+
+ var illegal = (
+ "case|const|default|function|var|void|with|enum|export|implements|" +
+ "interface|let|package|private|protected|public|static|yield|" +
+ "__hasProp|slice|bind|indexOf"
+ );
+
+ var supportClass = (
+ "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
+ "SyntaxError|TypeError|URIError|" +
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"
+ );
+
+ var supportFunction = (
+ "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
+ "encodeURIComponent|decodeURI|decodeURIComponent|String|"
+ );
+
+ var variableLanguage = (
+ "window|arguments|prototype|document"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": langConstant,
+ "invalid.illegal": illegal,
+ "language.support.class": supportClass,
+ "language.support.function": supportFunction,
+ "variable.language": variableLanguage
+ }, "identifier");
+
+ var functionRules = {
+ "({args})->": {
+ token: ["paren.lparen", "text", "paren.lparen", "text", "variable.parameter", "text", "paren.rparen", "text", "paren.rparen", "text", "storage.type"],
+ regex: "(\\()(\\s*)(\\{)(\\s*)([$@A-Za-z_\\x7f-\\uffff][$@\\w\\s,\\x7f-\\uffff]*)(\\s*)(\\})(\\s*)(\\))(\\s*)([\\-=]>)"
+ },
+ "({})->": {
+ token: ["paren.lparen", "text", "paren.lparen", "text", "paren.rparen", "text", "paren.rparen", "text", "storage.type"],
+ regex: "(\\()(\\s*)(\\{)(\\s*)(\\})(\\s*)(\\))(\\s*)([\\-=]>)"
+ },
+ "(args)->": {
+ token: ["paren.lparen", "text", "variable.parameter", "text", "paren.rparen", "text", "storage.type"],
+ regex: "(\\()(\\s*)([$@A-Za-z_\\x7f-\\uffff][\\s\\x21-\\uffff]*)(\\s*)(\\))(\\s*)([\\-=]>)"
+ },
+ "()->": {
+ token: ["paren.lparen", "text", "paren.rparen", "text", "storage.type"],
+ regex: "(\\()(\\s*)(\\))(\\s*)([\\-=]>)"
+ }
+ };
+
+ this.$rules = {
+ start : [
+ {
+ token : "constant.numeric",
+ regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
+ }, {
+ token : "string",
+ regex : "'''",
+ next : "qdoc"
+ }, {
+ token : "string",
+ regex : '"""',
+ next : "qqdoc"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"',
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : "`",
+ next : "js"
+ }, {
+ token : "string.regex",
+ regex : "///",
+ next : "heregex"
+ }, {
+ token : "string.regex",
+ regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/
+ }, {
+ token : "comment",
+ regex : "###(?!#)",
+ next : "comment"
+ }, {
+ token : "comment",
+ regex : "#.*"
+ }, {
+ token : [
+ "punctuation.operator", "identifier"
+ ],
+ regex : "(\\.)(" + illegal + ")"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\."
+ }, {
+ token : [
+ "keyword", "text", "language.support.class", "text", "keyword", "text", "language.support.class"
+ ],
+ regex : "(class)(\\s+)(" + identifier + ")(\\s+)(extends)(\\s+)(" + identifier + ")"
+ }, {
+ token : [
+ "keyword", "text", "language.support.class"
+ ],
+ regex : "(class)(\\s+)(" + identifier + ")"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text"
+ ].concat(functionRules["({args})->"].token),
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["({args})->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text"
+ ].concat(functionRules["({args})->"].token),
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["({args})->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text"
+ ].concat(functionRules["({})->"].token),
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["({})->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text"
+ ].concat(functionRules["({})->"].token),
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["({})->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text"
+ ].concat(functionRules["(args)->"].token),
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["(args)->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text"
+ ].concat(functionRules["(args)->"].token),
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["(args)->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text"
+ ].concat(functionRules["()->"].token),
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["()->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text"
+ ].concat(functionRules["()->"].token),
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["()->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type"
+ ],
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)([\\-=]>)"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text", "storage.type"
+ ],
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)([\\-=]>)"
+ },
+ functionRules["({args})->"],
+ functionRules["({})->"],
+ functionRules["(args)->"],
+ functionRules["()->"]
+ , {
+ token : "identifier",
+ regex : "(?:(?:\\.|::)\\s*)" + identifier
+ }, {
+ token : "variable",
+ regex : "@(?:" + identifier + ")?"
+ }, {
+ token: keywordMapper,
+ regex : identifier
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\."
+ }, {
+ token : "storage.type",
+ regex : "[\\-=]>"
+ }, {
+ token : "keyword.operator",
+ regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"
+ }, {
+ token : "paren.lparen",
+ regex : "[({[]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]})]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }],
+
+ qdoc : [{
+ token : "string",
+ regex : ".*?'''",
+ next : "start"
+ }, stringfill],
+
+ qqdoc : [{
+ token : "string",
+ regex : '.*?"""',
+ next : "start"
+ }, stringfill],
+
+ qstring : [{
+ token : "string",
+ regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
+ next : "start"
+ }, stringfill],
+
+ qqstring : [{
+ token : "string",
+ regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
+ next : "start"
+ }, stringfill],
+
+ js : [{
+ token : "string",
+ regex : "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
+ next : "start"
+ }, stringfill],
+
+ heregex : [{
+ token : "string.regex",
+ regex : '.*?///[imgy]{0,4}',
+ next : "start"
+ }, {
+ token : "comment.regex",
+ regex : "\\s+(?:#.*)?"
+ }, {
+ token : "string.regex",
+ regex : "\\S+"
+ }],
+
+ comment : [{
+ token : "comment",
+ regex : '.*?###',
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ }]
+ };
+ }
+
+ exports.CoffeeHighlightRules = CoffeeHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-coldfusion-noconflict.js b/contexts/data/lib/ace/mode-coldfusion-noconflict.js
deleted file mode 100644
index c845e01..0000000
--- a/contexts/data/lib/ace/mode-coldfusion-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/coldfusion_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./coldfusion_highlight_rules").ColdfusionHighlightRules,j=function(){e.call(this);var a=new i;this.$tokenizer=new h(a.getRules()),this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g})};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),ace.define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),ace.define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules","ace/mode/xml_util"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=a("./xml_util"),i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=s*script)",next:"script"},{token:"meta.tag",regex:"<(?=s*style)",next:"css"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},h.tag(this.$rules,"tag","start"),h.tag(this.$rules,"css","css-start"),h.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,g),b.ColdfusionHighlightRules=i}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-coldfusion-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-coldfusion-uncompressed-noconflict.js
deleted file mode 100644
index 2d67802..0000000
--- a/contexts/data/lib/ace/mode-coldfusion-uncompressed-noconflict.js
+++ /dev/null
@@ -1,2543 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/coldfusion', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/coldfusion_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var XmlMode = require("./xml").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
-
-var Mode = function() {
- XmlMode.call(this);
-
- var highlighter = new ColdfusionHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-};
-oop.inherits(Mode, XmlMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- }],
-
- cdata : [{
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "(?:[^\\]]|\\](?!\\]>))+"
- }],
-
- comment : [{
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
-};
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- var errors = [];
- e.data.forEach(function(message) {
- errors.push({
- row: message.line - 1,
- column: message.col - 1,
- text: message.message,
- type: message.type,
- lint: message
- });
- });
-
- session.setAnnotations(errors);
- });
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CssHighlightRules = function() {
-
- var properties = lang.arrayToMap(
- ("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
- "appearance|azimuth|background-attachment|background-color|background-image|" +
- "background-origin|background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|")
- );
-
- var functions = lang.arrayToMap(
- ("rgb|rgba|url|attr|counter|counters").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- var base_ruleset = [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "ruleset_comment"
- },{
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase())) {
- return "support.type";
- }
- else if (functions.hasOwnProperty(value.toLowerCase())) {
- return "support.function";
- }
- else if (constants.hasOwnProperty(value.toLowerCase())) {
- return "support.constant";
- }
- else if (colors.hasOwnProperty(value.toLowerCase())) {
- return "support.constant.color";
- }
- else {
- return "text";
- }
- },
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }
- ];
-
- var ruleset = lang.copyArray(base_ruleset);
- ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "start"
- });
-
- var media_ruleset = lang.copyArray( base_ruleset );
- media_ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "media"
- });
-
- var base_comment = [{
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }];
-
- var comment = lang.copyArray(base_comment);
- comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- });
-
- var media_comment = lang.copyArray(base_comment);
- media_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "media"
- });
-
- var ruleset_comment = lang.copyArray(base_comment);
- ruleset_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "ruleset"
- });
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- next: "media"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "media" : [ {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "media_comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "media_ruleset"
- },{
- token: "string",
- regex: "\\}",
- next: "start"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "comment" : comment,
-
- "ruleset" : ruleset,
- "ruleset_comment" : ruleset_comment,
-
- "media_ruleset" : media_ruleset,
- "media_comment" : media_comment
- };
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/coldfusion_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/xml_util'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var xml_util = require("./xml_util");
-
-var ColdfusionHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- start : [ {
- token : "text",
- merge : true,
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*script)",
- next : "script"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*style)",
- next : "css"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- } ],
-
- cdata : [ {
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- merge : true,
- regex : "\\s+"
- }, {
- token : "text",
- merge : true,
- regex : ".+"
- } ],
-
- comment : [ {
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- } ]
- };
-
- xml_util.tag(this.$rules, "tag", "start");
- xml_util.tag(this.$rules, "css", "css-start");
- xml_util.tag(this.$rules, "script", "js-start");
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "comment",
- regex: "\\/\\/.*(?=<\\/script>)",
- next: "tag"
- }, {
- token: "meta.tag",
- regex: "<\\/(?=script)",
- next: "tag"
- }]);
-
- this.embedRules(CssHighlightRules, "css-", [{
- token: "meta.tag",
- regex: "<\\/(?=style)",
- next: "tag"
- }]);
-};
-
-oop.inherits(ColdfusionHighlightRules, TextHighlightRules);
-
-exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-coldfusion-uncompressed.js b/contexts/data/lib/ace/mode-coldfusion-uncompressed.js
deleted file mode 100644
index c9092a5..0000000
--- a/contexts/data/lib/ace/mode-coldfusion-uncompressed.js
+++ /dev/null
@@ -1,2543 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/coldfusion', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/coldfusion_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var XmlMode = require("./xml").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
-
-var Mode = function() {
- XmlMode.call(this);
-
- var highlighter = new ColdfusionHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-};
-oop.inherits(Mode, XmlMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- }],
-
- cdata : [{
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "(?:[^\\]]|\\](?!\\]>))+"
- }],
-
- comment : [{
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
-};
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- var errors = [];
- e.data.forEach(function(message) {
- errors.push({
- row: message.line - 1,
- column: message.col - 1,
- text: message.message,
- type: message.type,
- lint: message
- });
- });
-
- session.setAnnotations(errors);
- });
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CssHighlightRules = function() {
-
- var properties = lang.arrayToMap(
- ("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
- "appearance|azimuth|background-attachment|background-color|background-image|" +
- "background-origin|background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|")
- );
-
- var functions = lang.arrayToMap(
- ("rgb|rgba|url|attr|counter|counters").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- var base_ruleset = [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "ruleset_comment"
- },{
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase())) {
- return "support.type";
- }
- else if (functions.hasOwnProperty(value.toLowerCase())) {
- return "support.function";
- }
- else if (constants.hasOwnProperty(value.toLowerCase())) {
- return "support.constant";
- }
- else if (colors.hasOwnProperty(value.toLowerCase())) {
- return "support.constant.color";
- }
- else {
- return "text";
- }
- },
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }
- ];
-
- var ruleset = lang.copyArray(base_ruleset);
- ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "start"
- });
-
- var media_ruleset = lang.copyArray( base_ruleset );
- media_ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "media"
- });
-
- var base_comment = [{
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }];
-
- var comment = lang.copyArray(base_comment);
- comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- });
-
- var media_comment = lang.copyArray(base_comment);
- media_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "media"
- });
-
- var ruleset_comment = lang.copyArray(base_comment);
- ruleset_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "ruleset"
- });
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- next: "media"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "media" : [ {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "media_comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "media_ruleset"
- },{
- token: "string",
- regex: "\\}",
- next: "start"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "comment" : comment,
-
- "ruleset" : ruleset,
- "ruleset_comment" : ruleset_comment,
-
- "media_ruleset" : media_ruleset,
- "media_comment" : media_comment
- };
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/coldfusion_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/xml_util'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var xml_util = require("./xml_util");
-
-var ColdfusionHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- start : [ {
- token : "text",
- merge : true,
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*script)",
- next : "script"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*style)",
- next : "css"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- } ],
-
- cdata : [ {
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- merge : true,
- regex : "\\s+"
- }, {
- token : "text",
- merge : true,
- regex : ".+"
- } ],
-
- comment : [ {
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- } ]
- };
-
- xml_util.tag(this.$rules, "tag", "start");
- xml_util.tag(this.$rules, "css", "css-start");
- xml_util.tag(this.$rules, "script", "js-start");
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "comment",
- regex: "\\/\\/.*(?=<\\/script>)",
- next: "tag"
- }, {
- token: "meta.tag",
- regex: "<\\/(?=script)",
- next: "tag"
- }]);
-
- this.embedRules(CssHighlightRules, "css-", [{
- token: "meta.tag",
- regex: "<\\/(?=style)",
- next: "tag"
- }]);
-};
-
-oop.inherits(ColdfusionHighlightRules, TextHighlightRules);
-
-exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-coldfusion.js b/contexts/data/lib/ace/mode-coldfusion.js
index fa8693e..5e6b987 100644
--- a/contexts/data/lib/ace/mode-coldfusion.js
+++ b/contexts/data/lib/ace/mode-coldfusion.js
@@ -1 +1,1725 @@
-define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/coldfusion_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./coldfusion_highlight_rules").ColdfusionHighlightRules,j=function(){e.call(this);var a=new i;this.$tokenizer=new h(a.getRules()),this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g})};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules","ace/mode/xml_util"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=a("./xml_util"),i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=s*script)",next:"script"},{token:"meta.tag",regex:"<(?=s*style)",next:"css"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},h.tag(this.$rules,"tag","start"),h.tag(this.$rules,"css","css-start"),h.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,g),b.ColdfusionHighlightRules=i}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/coldfusion', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/coldfusion_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var XmlMode = require("./xml").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
+
+var Mode = function() {
+ XmlMode.call(this);
+
+ var highlighter = new ColdfusionHighlightRules();
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+
+ this.$embeds = highlighter.getEmbeds();
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+};
+oop.inherits(Mode, XmlMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function() {
+ this.$rules = {
+ start : [
+ {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "xml-pe", regex : "<\\?.*?\\?>"},
+ {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "xml-pe", regex : "<\\!.*?>"},
+ {token : "meta.tag", regex : "<\\/?", next : "tag"},
+ {token : "text", regex : "\\s+"},
+ {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "text", regex : "[^<]+"}
+ ],
+
+ cdata : [
+ {token : "text", regex : "\\]\\]>", next : "start"},
+ {token : "text", regex : "\\s+"},
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment", regex : ".*?-->", next : "start"},
+ {token : "comment", regex : ".+"}
+ ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start");
+};
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var XmlBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var tag = token.value;
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
+ if (rightChars == '</') {
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
+
+ return {
+ text: '\n' + indent + '\n' + next_indent,
+ selection: [1, indent.length, 1, indent.length]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (tag.closing)
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ return "";
+
+ if (tag.selfClosing)
+ return "";
+
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ return "";
+
+ return "start";
+ };
+
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var value = "";
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type.indexOf("meta.tag") === 0)
+ value += token.value;
+ else
+ value += lang.stringRepeat(" ", token.value.length);
+ }
+
+ return this._parseTag(value);
+ };
+
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
+ this._parseTag = function(tag) {
+
+ var match = this.tagRe.exec(tag);
+ var column = this.tagRe.lastIndex || 0;
+ this.tagRe.lastIndex = 0;
+
+ return {
+ value: tag,
+ match: match ? match[2] : "",
+ closing: match ? !!match[3] : false,
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
+ tagName: match ? match[4] : "",
+ column: match[1] ? column + match[1].length : column
+ };
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var start;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!start) {
+ var start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ }
+ value += token.value;
+ if (value.indexOf(">") !== -1) {
+ var tag = this._parseTag(value);
+ tag.start = start;
+ tag.end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ iterator.stepForward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var end;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!end) {
+ end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ }
+ value = token.value + value;
+ if (value.indexOf("<") !== -1) {
+ var tag = this._parseTag(value);
+ tag.end = end;
+ tag.start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ iterator.stepBackward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.voidElements[tag.tagName]) {
+ return;
+ }
+ else if (this.voidElements[top.tagName]) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag.match)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.column);
+ var start = {
+ row: row,
+ column: firstTag.column + firstTag.tagName.length + 2
+ };
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var end = {
+ row: row,
+ column: firstTag.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("csslint", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define('ace/mode/coldfusion_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/xml_util'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var xml_util = require("./xml_util");
+
+var ColdfusionHighlightRules = function() {
+
+ this.$rules = {
+ start : [ {
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=script)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=style)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+
+ xml_util.tag(this.$rules, "tag", "start");
+ xml_util.tag(this.$rules, "style", "css-start");
+ xml_util.tag(this.$rules, "script", "js-start");
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(ColdfusionHighlightRules, TextHighlightRules);
+
+exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-csharp-noconflict.js b/contexts/data/lib/ace/mode-csharp-noconflict.js
deleted file mode 100644
index 52bfd66..0000000
--- a/contexts/data/lib/ace/mode-csharp-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./csharp_highlight_rules").CSharpHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){return null}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic".split("|")),b=e.arrayToMap("null|true|false".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",merge:!0,next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.CSharpHighlightRules=h}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-csharp-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-csharp-uncompressed-noconflict.js
deleted file mode 100644
index 715d1fa..0000000
--- a/contexts/data/lib/ace/mode-csharp-uncompressed-noconflict.js
+++ /dev/null
@@ -1,778 +0,0 @@
-ace.define('ace/mode/csharp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/csharp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CSharpHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-ace.define('ace/mode/csharp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CSharpHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("null|true|false").split("|")
- );
-
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- merge : true,
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(CSharpHighlightRules, TextHighlightRules);
-
-exports.CSharpHighlightRules = CSharpHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-csharp-uncompressed.js b/contexts/data/lib/ace/mode-csharp-uncompressed.js
deleted file mode 100644
index 492e2ff..0000000
--- a/contexts/data/lib/ace/mode-csharp-uncompressed.js
+++ /dev/null
@@ -1,778 +0,0 @@
-define('ace/mode/csharp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/csharp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CSharpHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-define('ace/mode/csharp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CSharpHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("null|true|false").split("|")
- );
-
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- merge : true,
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(CSharpHighlightRules, TextHighlightRules);
-
-exports.CSharpHighlightRules = CSharpHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-csharp.js b/contexts/data/lib/ace/mode-csharp.js
index b4c0605..ebae3e7 100644
--- a/contexts/data/lib/ace/mode-csharp.js
+++ b/contexts/data/lib/ace/mode-csharp.js
@@ -1 +1,605 @@
-define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./csharp_highlight_rules").CSharpHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){return null}}.call(k.prototype),b.Mode=k}),define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic".split("|")),b=e.arrayToMap("null|true|false".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",merge:!0,next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.CSharpHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+ace.define('ace/mode/csharp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/csharp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new CSharpHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/csharp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var CSharpHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": "abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic",
+ "constant.language": "null|true|false"
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(CSharpHighlightRules, TextHighlightRules);
+
+exports.CSharpHighlightRules = CSharpHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-css-noconflict.js b/contexts/data/lib/ace/mode-css-noconflict.js
deleted file mode 100644
index 3855cc2..0000000
--- a/contexts/data/lib/ace/mode-css-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-css-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-css-uncompressed-noconflict.js
deleted file mode 100644
index 2c1dc5d..0000000
--- a/contexts/data/lib/ace/mode-css-uncompressed-noconflict.js
+++ /dev/null
@@ -1,863 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- var errors = [];
- e.data.forEach(function(message) {
- errors.push({
- row: message.line - 1,
- column: message.col - 1,
- text: message.message,
- type: message.type,
- lint: message
- });
- });
-
- session.setAnnotations(errors);
- });
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CssHighlightRules = function() {
-
- var properties = lang.arrayToMap(
- ("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
- "appearance|azimuth|background-attachment|background-color|background-image|" +
- "background-origin|background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|")
- );
-
- var functions = lang.arrayToMap(
- ("rgb|rgba|url|attr|counter|counters").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- var base_ruleset = [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "ruleset_comment"
- },{
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase())) {
- return "support.type";
- }
- else if (functions.hasOwnProperty(value.toLowerCase())) {
- return "support.function";
- }
- else if (constants.hasOwnProperty(value.toLowerCase())) {
- return "support.constant";
- }
- else if (colors.hasOwnProperty(value.toLowerCase())) {
- return "support.constant.color";
- }
- else {
- return "text";
- }
- },
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }
- ];
-
- var ruleset = lang.copyArray(base_ruleset);
- ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "start"
- });
-
- var media_ruleset = lang.copyArray( base_ruleset );
- media_ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "media"
- });
-
- var base_comment = [{
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }];
-
- var comment = lang.copyArray(base_comment);
- comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- });
-
- var media_comment = lang.copyArray(base_comment);
- media_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "media"
- });
-
- var ruleset_comment = lang.copyArray(base_comment);
- ruleset_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "ruleset"
- });
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- next: "media"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "media" : [ {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "media_comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "media_ruleset"
- },{
- token: "string",
- regex: "\\}",
- next: "start"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "comment" : comment,
-
- "ruleset" : ruleset,
- "ruleset_comment" : ruleset_comment,
-
- "media_ruleset" : media_ruleset,
- "media_comment" : media_comment
- };
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-css-uncompressed.js b/contexts/data/lib/ace/mode-css-uncompressed.js
deleted file mode 100644
index 17a7738..0000000
--- a/contexts/data/lib/ace/mode-css-uncompressed.js
+++ /dev/null
@@ -1,863 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- var errors = [];
- e.data.forEach(function(message) {
- errors.push({
- row: message.line - 1,
- column: message.col - 1,
- text: message.message,
- type: message.type,
- lint: message
- });
- });
-
- session.setAnnotations(errors);
- });
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CssHighlightRules = function() {
-
- var properties = lang.arrayToMap(
- ("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
- "appearance|azimuth|background-attachment|background-color|background-image|" +
- "background-origin|background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|")
- );
-
- var functions = lang.arrayToMap(
- ("rgb|rgba|url|attr|counter|counters").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- var base_ruleset = [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "ruleset_comment"
- },{
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase())) {
- return "support.type";
- }
- else if (functions.hasOwnProperty(value.toLowerCase())) {
- return "support.function";
- }
- else if (constants.hasOwnProperty(value.toLowerCase())) {
- return "support.constant";
- }
- else if (colors.hasOwnProperty(value.toLowerCase())) {
- return "support.constant.color";
- }
- else {
- return "text";
- }
- },
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }
- ];
-
- var ruleset = lang.copyArray(base_ruleset);
- ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "start"
- });
-
- var media_ruleset = lang.copyArray( base_ruleset );
- media_ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "media"
- });
-
- var base_comment = [{
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }];
-
- var comment = lang.copyArray(base_comment);
- comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- });
-
- var media_comment = lang.copyArray(base_comment);
- media_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "media"
- });
-
- var ruleset_comment = lang.copyArray(base_comment);
- ruleset_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "ruleset"
- });
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- next: "media"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "media" : [ {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "media_comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "media_ruleset"
- },{
- token: "string",
- regex: "\\}",
- next: "start"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "comment" : comment,
-
- "ruleset" : ruleset,
- "ruleset_comment" : ruleset_comment,
-
- "media_ruleset" : media_ruleset,
- "media_comment" : media_comment
- };
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-css.js b/contexts/data/lib/ace/mode-css.js
index 0a6f1bd..7a4c96d 100644
--- a/contexts/data/lib/ace/mode-css.js
+++ b/contexts/data/lib/ace/mode-css.js
@@ -1 +1,680 @@
-define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("csslint", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-dart.js b/contexts/data/lib/ace/mode-dart.js
new file mode 100644
index 0000000..440a344
--- /dev/null
+++ b/contexts/data/lib/ace/mode-dart.js
@@ -0,0 +1,279 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/dart', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/dart_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ var highlighter = new DartHighlightRules();
+ this.foldingRules = new CStyleFoldMode();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+
+ace.define('ace/mode/dart_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DartHighlightRules = function() {
+
+ var constantLanguage = "true|false|null";
+ var variableLanguage = "this|super";
+ var keywordControl = "try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new";
+ var keywordDeclaration = "abstract|class|extends|external|factory|implements|interface|get|native|operator|set|typedef";
+ var storageModifier = "static|final|const";
+ var storageType = "void|bool|num|int|double|Dynamic|var|String";
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.dart": constantLanguage,
+ "variable.language.dart": variableLanguage,
+ "keyword.control.dart": keywordControl,
+ "keyword.declaration.dart": keywordDeclaration,
+ "storage.modifier.dart": storageModifier,
+ "storage.type.primitive.dart": storageType
+ }, "identifier");
+
+ var stringfill = {
+ token : "string",
+ regex : ".+"
+ };
+
+ this.$rules =
+ {
+ "start": [
+ {
+ "token" : "comment",
+ "regex" : /\/\/.*$/
+ },
+ {
+ "token" : "comment", // multi line comment
+ "regex" : /\/\*/,
+ "next" : "comment"
+ },
+ {
+ "token": ["meta.preprocessor.script.dart"],
+ "regex": "^(#!.*)$"
+ },
+ {
+ "token": [ "keyword.other.import.dart", "meta.declaration.dart"],
+ "regex": "#(?:\\b)(?:library|import|source|resource)(?:\\b)"
+ },
+ {
+ "token" : ["keyword.other.import.dart", "text"],
+ "regex" : "(?:\\b)(prefix)(\\s*:)"
+ },
+ {
+ "regex": "\\bas\\b",
+ "token": "keyword.cast.dart"
+ },
+ {
+ "regex": "\\?|:",
+ "token": "keyword.control.ternary.dart"
+ },
+ {
+ "regex": "(?:\\b)(is\\!?)(?:\\b)",
+ "token": ["keyword.operator.dart"]
+ },
+ {
+ "regex": "(<<|>>>?|~|\\^|\\||&)",
+ "token": ["keyword.operator.bitwise.dart"]
+ },
+ {
+ "regex": "((?:&|\\^|\\||<<|>>>?)=)",
+ "token": ["keyword.operator.assignment.bitwise.dart"]
+ },
+ {
+ "regex": "(===?|!==?|<=?|>=?)",
+ "token": ["keyword.operator.comparison.dart"]
+ },
+ {
+ "regex": "((?:[+*/%-]|\\~)=)",
+ "token": ["keyword.operator.assignment.arithmetic.dart"]
+ },
+ {
+ "regex": "=",
+ "token": "keyword.operator.assignment.dart"
+ },
+ {
+ "token" : "string",
+ "regex" : "'''",
+ "next" : "qdoc"
+ },
+ {
+ "token" : "string",
+ "regex" : '"""',
+ "next" : "qqdoc"
+ },
+ {
+ "token" : "string",
+ "regex" : "'",
+ "next" : "qstring"
+ },
+ {
+ "token" : "string",
+ "regex" : '"',
+ "next" : "qqstring"
+ },
+ {
+ "regex": "(\\-\\-|\\+\\+)",
+ "token": ["keyword.operator.increment-decrement.dart"]
+ },
+ {
+ "regex": "(\\-|\\+|\\*|\\/|\\~\\/|%)",
+ "token": ["keyword.operator.arithmetic.dart"]
+ },
+ {
+ "regex": "(!|&&|\\|\\|)",
+ "token": ["keyword.operator.logical.dart"]
+ },
+ {
+ "token" : "constant.numeric", // hex
+ "regex" : "0[xX][0-9a-fA-F]+\\b"
+ },
+ {
+ "token" : "constant.numeric", // float
+ "regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ },
+ {
+ "token" : keywordMapper,
+ "regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qdoc" : [
+ {
+ "token" : "string",
+ "regex" : ".*?'''",
+ "next" : "start"
+ }, stringfill],
+
+ "qqdoc" : [
+ {
+ "token" : "string",
+ "regex" : '.*?"""',
+ "next" : "start"
+ }, stringfill],
+
+ "qstring" : [
+ {
+ "token" : "string",
+ "regex" : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
+ "next" : "start"
+ }, stringfill],
+
+ "qqstring" : [
+ {
+ "token" : "string",
+ "regex" : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
+ "next" : "start"
+ }, stringfill]
+}
+
+};
+
+oop.inherits(DartHighlightRules, TextHighlightRules);
+
+exports.DartHighlightRules = DartHighlightRules;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-diff.js b/contexts/data/lib/ace/mode-diff.js
new file mode 100644
index 0000000..aa73df0
--- /dev/null
+++ b/contexts/data/lib/ace/mode-diff.js
@@ -0,0 +1,163 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/diff', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/diff_highlight_rules', 'ace/mode/folding/diff'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules;
+var FoldMode = require("./folding/diff").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new HighlightRules().getRules(), "i");
+ this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/diff_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DiffHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [{
+ "regex": "^(?:\\*{15}|={67}|-{3}|\\+{3})$",
+ "token": "punctuation.definition.separator.diff",
+ "name": "keyword"
+ }, { //diff.range.unified
+ "regex": "^(@@)(\\s*.+?\\s*)(@@)(.*)$",
+ "token": [
+ "constant",
+ "constant.numeric",
+ "constant",
+ "comment.doc.tag"
+ ]
+ }, { //diff.range.normal
+ "regex": "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",
+ "token": [
+ "constant.numeric",
+ "punctuation.definition.range.diff",
+ "constant.function",
+ "constant.numeric",
+ "punctuation.definition.range.diff",
+ "invalid"
+ ],
+ "name": "meta."
+ }, {
+ "regex": "^(?:(\\-{3}|\\+{3}|\\*{3})( .+))$",
+ "token": [
+ "constant.numeric",
+ "meta.tag"
+ ]
+ }, { // added
+ "regex": "^([!+>])(.*?)(\\s*)$",
+ "token": [
+ "support.constant",
+ "text",
+ "invalid"
+ ]
+ }, { // removed
+ "regex": "^([<\\-])(.*?)(\\s*)$",
+ "token": [
+ "support.function",
+ "string",
+ "invalid"
+ ]
+ }, {
+ "regex": "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
+ "token": ["variable", "variable", "keyword", "variable"]
+ }, {
+ "regex": "^Index.+$",
+ "token": "variable"
+ }, {
+ "regex": "^(.*?)(\\s*)$",
+ "token": ["invisible", "invalid"]
+ }
+ ]
+ };
+};
+
+oop.inherits(DiffHighlightRules, TextHighlightRules);
+
+exports.DiffHighlightRules = DiffHighlightRules;
+});
+
+ace.define('ace/mode/folding/diff', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function(levels, flag) {
+ this.regExpList = levels;
+ this.flag = flag;
+ this.foldingStartMarker = RegExp("^(" + levels.join("|") + ")", this.flag);
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var start = {row: row, column: line.length};
+
+ var regList = this.regExpList;
+ for (var i = 1; i <= regList.length; i++) {
+ var re = RegExp("^(" + regList.slice(0, i).join("|") + ")", this.flag);
+ if (re.test(line))
+ break;
+ }
+
+ for (var l = session.getLength(); ++row < l; ) {
+ line = session.getLine(row);
+ if (re.test(line))
+ break;
+ }
+ if (row == start.row + 1)
+ return;
+ return Range.fromPoints(start, {row: row - 1, column: line.length});
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-dot.js b/contexts/data/lib/ace/mode-dot.js
new file mode 100644
index 0000000..cfff3e8
--- /dev/null
+++ b/contexts/data/lib/ace/mode-dot.js
@@ -0,0 +1,348 @@
+ace.define('ace/mode/dot', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/matching_brace_outdent', 'ace/mode/dot_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules;
+var DotFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ var highlighter = new DotHighlightRules();
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new DotFoldMode();
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+ace.define('ace/mode/dot_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/doc_comment_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+
+var DotHighlightRules = function() {
+
+ var keywords = lang.arrayToMap(
+ ("strict|node|edge|graph|digraph|subgraph").split("|")
+ );
+
+ var attributes = lang.arrayToMap(
+ ("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z").split("|")
+ );
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ }, {
+ token : "comment",
+ regex : /#.*$/
+ }, {
+ token : "comment", // multi line comment
+ merge : true,
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric",
+ regex : /[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/
+ }, {
+ token : "keyword.operator",
+ regex : /\+|=|\->/
+ }, {
+ token : "punctuation.operator",
+ regex : /,|;/
+ }, {
+ token : "paren.lparen",
+ regex : /[\[{]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\]}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token: function(value) {
+ if (keywords.hasOwnProperty(value.toLowerCase())) {
+ return "keyword";
+ }
+ else if (attributes.hasOwnProperty(value.toLowerCase())) {
+ return "variable";
+ }
+ else {
+ return "text";
+ }
+ },
+ regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ merge : true,
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ merge : true,
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '[^"\\\\]+',
+ merge : true
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ merge : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ merge : true
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "[^'\\\\]+",
+ merge : true
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ merge : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ merge : true
+ }
+ ]
+ };
+};
+
+oop.inherits(DotHighlightRules, TextHighlightRules);
+
+exports.DotHighlightRules = DotHighlightRules;
+
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-glsl.js b/contexts/data/lib/ace/mode-glsl.js
new file mode 100644
index 0000000..7fae2d3
--- /dev/null
+++ b/contexts/data/lib/ace/mode-glsl.js
@@ -0,0 +1,838 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/glsl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp', 'ace/tokenizer', 'ace/mode/glsl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var glslHighlightRules = require("./glsl_highlight_rules").glslHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new glslHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/c_cpp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new c_cppHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
+
+var c_cppHighlightRules = function() {
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
+ "return|switch|while|catch|operator|try|throw|using"
+ );
+
+ var storageType = (
+ "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
+ "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
+ "class|wchar_t|template"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private:|" +
+ "protected:|public:|friend|explicit|virtual|export|mutable|typename"
+ );
+
+ var keywordOperators = (
+ "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
+ "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
+ );
+
+ var builtinConstants = (
+ "NULL|true|false|TRUE|FALSE"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "storage.modifier" : storageModifiers,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "this",
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "(?:#endif)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ token : "constant.other",
+ regex : "\\s*<.+?>",
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
+ next : "start"
+ },
+ {
+ token : "constant.other.multiline",
+ regex : /.*\\/
+ },
+ {
+ token : "constant.other",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/glsl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+
+var glslHighlightRules = function() {
+
+ var keywords = (
+ "attribute|const|uniform|varying|break|continue|do|for|while|" +
+ "if|else|in|out|inout|float|int|void|bool|true|false|" +
+ "lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|" +
+ "mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|" +
+ "samplerCube|struct"
+ );
+
+ var buildinConstants = (
+ "radians|degrees|sin|cos|tan|asin|acos|atan|pow|" +
+ "exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|" +
+ "min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|" +
+ "normalize|faceforward|reflect|refract|matrixCompMult|lessThan|" +
+ "lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|" +
+ "not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|" +
+ "texture2DProjLod|textureCube|textureCubeLod|" +
+ "gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|" +
+ "gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|" +
+ "gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|" +
+ "gl_DepthRangeParameters|gl_DepthRange|" +
+ "gl_Position|gl_PointSize|" +
+ "gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ this.$rules = new c_cppHighlightRules().$rules;
+ this.$rules.start.forEach(function(rule) {
+ if (typeof rule.token == "function")
+ rule.token = keywordMapper;
+ })
+};
+
+oop.inherits(glslHighlightRules, c_cppHighlightRules);
+
+exports.glslHighlightRules = glslHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-golang.js b/contexts/data/lib/ace/mode-golang.js
new file mode 100644
index 0000000..54f3545
--- /dev/null
+++ b/contexts/data/lib/ace/mode-golang.js
@@ -0,0 +1,660 @@
+ace.define('ace/mode/golang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/golang_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var Tokenizer = require("../tokenizer").Tokenizer;
+ var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules;
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+ var Mode = function() {
+ this.$tokenizer = new Tokenizer(new GolangHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };//end getNextLineIndent
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ }).call(Mode.prototype);
+
+ exports.Mode = Mode;
+});
+ace.define('ace/mode/golang_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ var oop = require("../lib/oop");
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var GolangHighlightRules = function() {
+ var keywords = (
+ "true|else|false|break|case|return|goto|if|const|" +
+ "continue|struct|default|switch|for|" +
+ "func|import|package|chan|defer|fallthrough|go|interface|map|range" +
+ "select|type|var"
+ );
+ var buildinConstants = ("nil|true|false|iota");
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant", // <CONSTANT>
+ regex : "<[a-zA-Z0-9.]+>"
+ }, {
+ token : "keyword", // pre-compiler directivs
+ regex : "(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ }
+ oop.inherits(GolangHighlightRules, TextHighlightRules);
+
+ exports.GolangHighlightRules = GolangHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-groovy-noconflict.js b/contexts/data/lib/ace/mode-groovy-noconflict.js
deleted file mode 100644
index 1585ef3..0000000
--- a/contexts/data/lib/ace/mode-groovy-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/groovy_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./groovy_highlight_rules").GroovyHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),ace.define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("assert|with|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|def|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.GroovyHighlightRules=h}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-groovy-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-groovy-uncompressed-noconflict.js
deleted file mode 100644
index da14a12..0000000
--- a/contexts/data/lib/ace/mode-groovy-uncompressed-noconflict.js
+++ /dev/null
@@ -1,1462 +0,0 @@
-ace.define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
- this.$tokenizer = new Tokenizer(new GroovyHighlightRules().getRules());
-};
-oop.inherits(Mode, JavaScriptMode);
-
-(function() {
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-ace.define('ace/mode/groovy_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var GroovyHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("assert|with|abstract|continue|for|new|switch|" +
- "assert|default|goto|package|synchronized|" +
- "boolean|do|if|private|this|" +
- "break|double|implements|protected|throw|" +
- "byte|else|import|public|throws|" +
- "case|enum|instanceof|return|transient|" +
- "catch|extends|int|short|try|" +
- "char|final|interface|static|void|" +
- "class|finally|long|strictfp|volatile|" +
- "def|float|native|super|while").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var langClasses = lang.arrayToMap(
- ("AbstractMethodError|AssertionError|ClassCircularityError|"+
- "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
- "ExceptionInInitializerError|IllegalAccessError|"+
- "IllegalThreadStateException|InstantiationError|InternalError|"+
- "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
- "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
- "SuppressWarnings|TypeNotPresentException|UnknownError|"+
- "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
- "InstantiationException|IndexOutOfBoundsException|"+
- "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
- "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
- "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
- "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
- "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
- "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
- "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
- "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
- "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
- "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
- "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
- "ArrayStoreException|ClassCastException|LinkageError|"+
- "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
- "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
- "Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
- );
-
- var importClasses = lang.arrayToMap(
- ("").split("|")
- );
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (langClasses.hasOwnProperty(value))
- return "support.function";
- else if (importClasses.hasOwnProperty(value))
- return "support.function";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(GroovyHighlightRules, TextHighlightRules);
-
-exports.GroovyHighlightRules = GroovyHighlightRules;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-groovy-uncompressed.js b/contexts/data/lib/ace/mode-groovy-uncompressed.js
deleted file mode 100644
index b6067e8..0000000
--- a/contexts/data/lib/ace/mode-groovy-uncompressed.js
+++ /dev/null
@@ -1,1462 +0,0 @@
-define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
- this.$tokenizer = new Tokenizer(new GroovyHighlightRules().getRules());
-};
-oop.inherits(Mode, JavaScriptMode);
-
-(function() {
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-define('ace/mode/groovy_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var GroovyHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("assert|with|abstract|continue|for|new|switch|" +
- "assert|default|goto|package|synchronized|" +
- "boolean|do|if|private|this|" +
- "break|double|implements|protected|throw|" +
- "byte|else|import|public|throws|" +
- "case|enum|instanceof|return|transient|" +
- "catch|extends|int|short|try|" +
- "char|final|interface|static|void|" +
- "class|finally|long|strictfp|volatile|" +
- "def|float|native|super|while").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var langClasses = lang.arrayToMap(
- ("AbstractMethodError|AssertionError|ClassCircularityError|"+
- "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
- "ExceptionInInitializerError|IllegalAccessError|"+
- "IllegalThreadStateException|InstantiationError|InternalError|"+
- "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
- "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
- "SuppressWarnings|TypeNotPresentException|UnknownError|"+
- "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
- "InstantiationException|IndexOutOfBoundsException|"+
- "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
- "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
- "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
- "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
- "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
- "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
- "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
- "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
- "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
- "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
- "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
- "ArrayStoreException|ClassCastException|LinkageError|"+
- "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
- "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
- "Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
- );
-
- var importClasses = lang.arrayToMap(
- ("").split("|")
- );
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (langClasses.hasOwnProperty(value))
- return "support.function";
- else if (importClasses.hasOwnProperty(value))
- return "support.function";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(GroovyHighlightRules, TextHighlightRules);
-
-exports.GroovyHighlightRules = GroovyHighlightRules;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-groovy.js b/contexts/data/lib/ace/mode-groovy.js
index c71ada2..f6e4c89 100644
--- a/contexts/data/lib/ace/mode-groovy.js
+++ b/contexts/data/lib/ace/mode-groovy.js
@@ -1 +1,1082 @@
-define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/groovy_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./groovy_highlight_rules").GroovyHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("assert|with|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|def|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.GroovyHighlightRules=h}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+ace.define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.$tokenizer = new Tokenizer(new GroovyHighlightRules().getRules());
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+ace.define('ace/mode/groovy_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var GroovyHighlightRules = function() {
+
+ var keywords = (
+ "assert|with|abstract|continue|for|new|switch|" +
+ "assert|default|goto|package|synchronized|" +
+ "boolean|do|if|private|this|" +
+ "break|double|implements|protected|throw|" +
+ "byte|else|import|public|throws|" +
+ "case|enum|instanceof|return|transient|" +
+ "catch|extends|int|short|try|" +
+ "char|final|interface|static|void|" +
+ "class|finally|long|strictfp|volatile|" +
+ "def|float|native|super|while"
+ );
+
+ var buildinConstants = (
+ "null|Infinity|NaN|undefined"
+ );
+
+ var langClasses = (
+ "AbstractMethodError|AssertionError|ClassCircularityError|"+
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
+ "ExceptionInInitializerError|IllegalAccessError|"+
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
+ "InstantiationException|IndexOutOfBoundsException|"+
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
+ "ArrayStoreException|ClassCastException|LinkageError|"+
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
+ "Cloneable|Class|CharSequence|Comparable|String|Object"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "support.function": langClasses,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string",
+ regex : '"""',
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : "'''",
+ next : "qstring"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/
+ }, {
+ token : "constant.language.escape",
+ regex : /\$[\w\d]+/
+ }, {
+ token : "constant.language.escape",
+ regex : /\$\{[^"\}]+\}?/
+ }, {
+ token : "string",
+ regex : '"{3,5}',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+?'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/
+ }, {
+ token : "string",
+ regex : "'{3,5}",
+ next : "start"
+ }, {
+ token : "string",
+ regex : ".+?"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(GroovyHighlightRules, TextHighlightRules);
+
+exports.GroovyHighlightRules = GroovyHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-haml.js b/contexts/data/lib/ace/mode-haml.js
new file mode 100644
index 0000000..e499c97
--- /dev/null
+++ b/contexts/data/lib/ace/mode-haml.js
@@ -0,0 +1,440 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian < gjtorikian AT gmail DOT com >
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/haml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haml_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ var highlighter = new HamlHighlightRules();
+ this.foldingRules = new FoldMode();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});ace.define('ace/mode/haml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/ruby_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var RubyExports = require("./ruby_highlight_rules");
+var RubyHighlightRules = RubyExports.RubyHighlightRules;
+
+var HamlHighlightRules = function() {
+
+ this.$rules =
+ {
+ "start": [
+ {
+ "token" : "punctuation.section.comment",
+ "regex" : /^\s*\/.*/
+ },
+ {
+ "token" : "punctuation.section.comment",
+ "regex" : /^\s*#.*/
+ },
+ {
+ "token": "string.quoted.double",
+ "regex": "==.+?=="
+ },
+ {
+ "token": "keyword.other.doctype",
+ "regex": "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
+ },
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+ {
+ "token": ["entity.name.tag.haml"],
+ "regex": /^\s*%[\w:]+/,
+ "next": "tag_single"
+ },
+ {
+ "token": [ "meta.escape.haml" ],
+ "regex": "^\\s*\\\\."
+ },
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+
+ RubyExports.constantOtherSymbol,
+ {
+ "token": "text",
+ "regex": "=|-|~",
+ "next": "embedded_ruby"
+ }
+ ],
+ "tag_single": [
+ {
+ "token": "entity.other.attribute-name.class.haml",
+ "regex": "\\.[\\w-]+"
+ },
+ {
+ "token": "entity.other.attribute-name.id.haml",
+ "regex": "#[\\w-]+"
+ },
+ {
+ "token": "punctuation.section",
+ "regex": "\\{",
+ "next": "section"
+ },
+
+ RubyExports.constantOtherSymbol,
+
+ {
+ "token": "text",
+ "regex": /\s/,
+ "next": "start"
+ },
+ {
+ "token": ["text", "punctuation"],
+ "regex": "($)|((?!\\.|#|\\{|\\[|=|-|~|\\/))",
+ "next": "start"
+ }
+ ],
+ "section": [
+ RubyExports.constantOtherSymbol,
+
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ {
+ "token": "punctuation.section",
+ "regex": "\\}",
+ "next": "start"
+ }
+ ],
+ "embedded_ruby": [
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ {
+ token : "support.class", // class name
+ regex : "[A-Z][a-zA-Z_\\d]+"
+ },
+ {
+ "token" : new RubyHighlightRules().getKeywords(),
+ "regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ "token" : ["keyword", "text", "text"],
+ "regex" : "(?:do|\\{)(?: \\|[^|]+\\|)?$",
+ "next" : "start"
+ },
+ {
+ "token" : ["text"],
+ "regex" : "^$",
+ "next" : "start"
+ },
+ {
+ "token" : ["text"],
+ "regex" : "^(?!.*\\|\\s*$)",
+ "next" : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(HamlHighlightRules, TextHighlightRules);
+
+exports.HamlHighlightRules = HamlHighlightRules;
+});
+
+ace.define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var constantOtherSymbol = exports.constantOtherSymbol = {
+ token : "constant.other.symbol.ruby", // symbol
+ regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
+ };
+
+var qString = exports.qString = {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ };
+
+var qqString = exports.qqString = {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ };
+
+var tString = exports.tString = {
+ token : "string", // backtick string
+ regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
+ };
+
+var constantNumericHex = exports.constantNumericHex = {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
+ };
+
+var constantNumericFloat = exports.constantNumericFloat = {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
+ };
+
+var RubyHighlightRules = function() {
+
+ var builtinFunctions = (
+ "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
+ "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
+ "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
+ "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
+ "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
+ "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
+ "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
+ "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
+ "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
+ "gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|" +
+ "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
+ "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
+ "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
+ "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
+ "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
+ "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
+ "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
+ "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
+ "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
+ "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
+ "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
+ "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
+ "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
+ "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
+ "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
+ "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
+ "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
+ "translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|" +
+ "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
+ "has_many|has_one|belongs_to|has_and_belongs_to_many"
+ );
+
+ var keywords = (
+ "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
+ "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
+ );
+
+ var buildinConstants = (
+ "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
+ );
+
+ var builtinVariables = (
+ "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" +
+ "$!|root_url|flash|session|cookies|params|request|response|logger|self"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "variable.language": builtinVariables,
+ "support.function": builtinFunctions,
+ "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "comment", // multi line comment
+ regex : "^=begin\\s",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ },
+
+ qString,
+ qqString,
+ tString,
+
+ {
+ token : "text", // namespaces aren't symbols
+ regex : "::"
+ }, {
+ token : "variable.instance", // instance variable
+ regex : "@{1,2}[a-zA-Z_\\d]+"
+ }, {
+ token : "support.class", // class name
+ regex : "[A-Z][a-zA-Z_\\d]+"
+ },
+
+ constantOtherSymbol,
+ constantNumericHex,
+ constantNumericFloat,
+
+ {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "punctuation.separator.key-value",
+ regex : "=>"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "^=end\\s.*$",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+};
+
+oop.inherits(RubyHighlightRules, TextHighlightRules);
+
+exports.RubyHighlightRules = RubyHighlightRules;
+});
+
+ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-haxe-noconflict.js b/contexts/data/lib/ace/mode-haxe-noconflict.js
deleted file mode 100644
index 17a18c0..0000000
--- a/contexts/data/lib/ace/mode-haxe-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./haxe_highlight_rules").HaxeHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){return null}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std".split("|")),b=e.arrayToMap("null|true|false".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",merge:!0,next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({<]"},{token:"paren.rparen",regex:"[\\])}>]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.HaxeHighlightRules=h}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-haxe-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-haxe-uncompressed-noconflict.js
deleted file mode 100644
index 9f2c6a5..0000000
--- a/contexts/data/lib/ace/mode-haxe-uncompressed-noconflict.js
+++ /dev/null
@@ -1,778 +0,0 @@
-ace.define('ace/mode/haxe', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haxe_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new HaxeHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-ace.define('ace/mode/haxe_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var HaxeHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("null|true|false").split("|")
- );
-
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- merge : true,
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
- }, {
- token : "paren.lparen",
- regex : "[[({<]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}>]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(HaxeHighlightRules, TextHighlightRules);
-
-exports.HaxeHighlightRules = HaxeHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-haxe-uncompressed.js b/contexts/data/lib/ace/mode-haxe-uncompressed.js
deleted file mode 100644
index 5496580..0000000
--- a/contexts/data/lib/ace/mode-haxe-uncompressed.js
+++ /dev/null
@@ -1,778 +0,0 @@
-define('ace/mode/haxe', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haxe_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new HaxeHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-define('ace/mode/haxe_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var HaxeHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("null|true|false").split("|")
- );
-
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- merge : true,
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
- }, {
- token : "paren.lparen",
- regex : "[[({<]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}>]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(HaxeHighlightRules, TextHighlightRules);
-
-exports.HaxeHighlightRules = HaxeHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-haxe.js b/contexts/data/lib/ace/mode-haxe.js
index 88818b1..1262df3 100644
--- a/contexts/data/lib/ace/mode-haxe.js
+++ b/contexts/data/lib/ace/mode-haxe.js
@@ -1 +1,610 @@
-define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./haxe_highlight_rules").HaxeHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){return null}}.call(k.prototype),b.Mode=k}),define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std".split("|")),b=e.arrayToMap("null|true|false".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",merge:!0,next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({<]"},{token:"paren.rparen",regex:"[\\])}>]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.HaxeHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+ace.define('ace/mode/haxe', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haxe_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new HaxeHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/haxe_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var HaxeHighlightRules = function() {
+
+ var keywords = (
+ "break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std"
+ );
+
+ var buildinConstants = (
+ "null|true|false"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({<]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}>]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(HaxeHighlightRules, TextHighlightRules);
+
+exports.HaxeHighlightRules = HaxeHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-html-noconflict.js b/contexts/data/lib/ace/mode-html-noconflict.js
deleted file mode 100644
index 989e1a5..0000000
--- a/contexts/data/lib/ace/mode-html-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./html_highlight_rules").HtmlHighlightRules,j=a("./behaviour/xml").XmlBehaviour,k=a("./folding/html").FoldMode,l=function(){var a=new i;this.$tokenizer=new h(a.getRules()),this.$behaviour=new j,this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g}),this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){return 0},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1}}.call(l.prototype),b.Mode=l}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./xml_util"),h=a("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=s*script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=s*style\\b)",next:"css"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},g.tag(this.$rules,"tag","start"),g.tag(this.$rules,"css","css-start"),g.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,h),b.HtmlHighlightRules=i}),ace.define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),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(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./mixed").FoldMode,f=a("./xml").FoldMode,g=a("./cstyle").FoldMode,h=b.FoldMode=function(){e.call(this,new f({area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,li:1,dt:1,dd:1,p:1,rt:1,rp:1,optgroup:1,option:1,colgroup:1,td:1,th:1}),{"js-":new g,"css-":new g})};d.inherits(h,e)}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a,b){this.defaultMode=a,this.subModes=b};d.inherits(f,e),function(){this.$getMode=function(a){for(var b in this.subModes)if(a.indexOf(b)===0)return this.subModes[b];return null},this.$tryMode=function(a,b,c,d){var e=this.$getMode(a);return e?e.getFoldWidget(b,c,d):""},this.getFoldWidget=function(a,b,c){return this.$tryMode(a.getState(c-1),a,b,c)||this.$tryMode(a.getState(c),a,b,c)||this.defaultMode.getFoldWidget(a,b,c)},this.getFoldWidgetRange=function(a,b,c){var d=this.$getMode(a.getState(c-1));if(!d||!d.getFoldWidget(a,b,c))d=this.$getMode(a.getState(c));if(!d||!d.getFoldWidget(a,b,c))d=this.defaultMode;return d.getFoldWidgetRange(a,b,c)}}.call(f.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-html-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-html-uncompressed-noconflict.js
deleted file mode 100644
index df5bdb5..0000000
--- a/contexts/data/lib/ace/mode-html-uncompressed-noconflict.js
+++ /dev/null
@@ -1,2558 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/html'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new XmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- return 0;
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- var errors = [];
- e.data.forEach(function(message) {
- errors.push({
- row: message.line - 1,
- column: message.col - 1,
- text: message.message,
- type: message.type,
- lint: message
- });
- });
-
- session.setAnnotations(errors);
- });
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CssHighlightRules = function() {
-
- var properties = lang.arrayToMap(
- ("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
- "appearance|azimuth|background-attachment|background-color|background-image|" +
- "background-origin|background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|")
- );
-
- var functions = lang.arrayToMap(
- ("rgb|rgba|url|attr|counter|counters").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- var base_ruleset = [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "ruleset_comment"
- },{
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase())) {
- return "support.type";
- }
- else if (functions.hasOwnProperty(value.toLowerCase())) {
- return "support.function";
- }
- else if (constants.hasOwnProperty(value.toLowerCase())) {
- return "support.constant";
- }
- else if (colors.hasOwnProperty(value.toLowerCase())) {
- return "support.constant.color";
- }
- else {
- return "text";
- }
- },
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }
- ];
-
- var ruleset = lang.copyArray(base_ruleset);
- ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "start"
- });
-
- var media_ruleset = lang.copyArray( base_ruleset );
- media_ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "media"
- });
-
- var base_comment = [{
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }];
-
- var comment = lang.copyArray(base_comment);
- comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- });
-
- var media_comment = lang.copyArray(base_comment);
- media_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "media"
- });
-
- var ruleset_comment = lang.copyArray(base_comment);
- ruleset_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "ruleset"
- });
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- next: "media"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "media" : [ {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "media_comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "media_ruleset"
- },{
- token: "string",
- regex: "\\}",
- next: "start"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "comment" : comment,
-
- "ruleset" : ruleset,
- "ruleset_comment" : ruleset_comment,
-
- "media_ruleset" : media_ruleset,
- "media_comment" : media_comment
- };
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var HtmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- merge : true,
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*script\\b)",
- next : "script"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*style\\b)",
- next : "css"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- } ],
-
- cdata : [ {
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- merge : true,
- regex : "\\s+"
- }, {
- token : "text",
- merge : true,
- regex : ".+"
- } ],
-
- comment : [ {
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- } ]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
- xmlUtil.tag(this.$rules, "css", "css-start");
- xmlUtil.tag(this.$rules, "script", "js-start");
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "comment",
- regex: "\\/\\/.*(?=<\\/script>)",
- next: "tag"
- }, {
- token: "meta.tag",
- regex: "<\\/(?=script)",
- next: "tag"
- }]);
-
- this.embedRules(CssHighlightRules, "css-", [{
- token: "meta.tag",
- regex: "<\\/(?=style)",
- next: "tag"
- }]);
-};
-
-oop.inherits(HtmlHighlightRules, TextHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- // void elements
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
-
- // optional tags
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
- });
-};
-
-oop.inherits(FoldMode, MixedFoldMode);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
- this.defaultMode = defaultMode;
- this.subModes = subModes;
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
-
- this.$getMode = function(state) {
- for (var key in this.subModes) {
- if (state.indexOf(key) === 0)
- return this.subModes[key];
- }
- return null;
- };
-
- this.$tryMode = function(state, session, foldStyle, row) {
- var mode = this.$getMode(state);
- return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
- };
-
- this.getFoldWidget = function(session, foldStyle, row) {
- return (
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
- this.$tryMode(session.getState(row), session, foldStyle, row) ||
- this.defaultMode.getFoldWidget(session, foldStyle, row)
- );
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var mode = this.$getMode(session.getState(row-1));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.$getMode(session.getState(row));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.defaultMode;
-
- return mode.getFoldWidgetRange(session, foldStyle, row);
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-html-uncompressed.js b/contexts/data/lib/ace/mode-html-uncompressed.js
deleted file mode 100644
index e994e2e..0000000
--- a/contexts/data/lib/ace/mode-html-uncompressed.js
+++ /dev/null
@@ -1,2558 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/html'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new XmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- return 0;
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- var errors = [];
- e.data.forEach(function(message) {
- errors.push({
- row: message.line - 1,
- column: message.col - 1,
- text: message.message,
- type: message.type,
- lint: message
- });
- });
-
- session.setAnnotations(errors);
- });
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CssHighlightRules = function() {
-
- var properties = lang.arrayToMap(
- ("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
- "appearance|azimuth|background-attachment|background-color|background-image|" +
- "background-origin|background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|")
- );
-
- var functions = lang.arrayToMap(
- ("rgb|rgba|url|attr|counter|counters").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- var base_ruleset = [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "ruleset_comment"
- },{
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase())) {
- return "support.type";
- }
- else if (functions.hasOwnProperty(value.toLowerCase())) {
- return "support.function";
- }
- else if (constants.hasOwnProperty(value.toLowerCase())) {
- return "support.constant";
- }
- else if (colors.hasOwnProperty(value.toLowerCase())) {
- return "support.constant.color";
- }
- else {
- return "text";
- }
- },
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }
- ];
-
- var ruleset = lang.copyArray(base_ruleset);
- ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "start"
- });
-
- var media_ruleset = lang.copyArray( base_ruleset );
- media_ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "media"
- });
-
- var base_comment = [{
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }];
-
- var comment = lang.copyArray(base_comment);
- comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- });
-
- var media_comment = lang.copyArray(base_comment);
- media_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "media"
- });
-
- var ruleset_comment = lang.copyArray(base_comment);
- ruleset_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "ruleset"
- });
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- next: "media"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "media" : [ {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "media_comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "media_ruleset"
- },{
- token: "string",
- regex: "\\}",
- next: "start"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "comment" : comment,
-
- "ruleset" : ruleset,
- "ruleset_comment" : ruleset_comment,
-
- "media_ruleset" : media_ruleset,
- "media_comment" : media_comment
- };
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var HtmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- merge : true,
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*script\\b)",
- next : "script"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*style\\b)",
- next : "css"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- } ],
-
- cdata : [ {
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- merge : true,
- regex : "\\s+"
- }, {
- token : "text",
- merge : true,
- regex : ".+"
- } ],
-
- comment : [ {
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- } ]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
- xmlUtil.tag(this.$rules, "css", "css-start");
- xmlUtil.tag(this.$rules, "script", "js-start");
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "comment",
- regex: "\\/\\/.*(?=<\\/script>)",
- next: "tag"
- }, {
- token: "meta.tag",
- regex: "<\\/(?=script)",
- next: "tag"
- }]);
-
- this.embedRules(CssHighlightRules, "css-", [{
- token: "meta.tag",
- regex: "<\\/(?=style)",
- next: "tag"
- }]);
-};
-
-oop.inherits(HtmlHighlightRules, TextHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- // void elements
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
-
- // optional tags
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
- });
-};
-
-oop.inherits(FoldMode, MixedFoldMode);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
- this.defaultMode = defaultMode;
- this.subModes = subModes;
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
-
- this.$getMode = function(state) {
- for (var key in this.subModes) {
- if (state.indexOf(key) === 0)
- return this.subModes[key];
- }
- return null;
- };
-
- this.$tryMode = function(state, session, foldStyle, row) {
- var mode = this.$getMode(state);
- return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
- };
-
- this.getFoldWidget = function(session, foldStyle, row) {
- return (
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
- this.$tryMode(session.getState(row), session, foldStyle, row) ||
- this.defaultMode.getFoldWidget(session, foldStyle, row)
- );
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var mode = this.$getMode(session.getState(row-1));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.$getMode(session.getState(row));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.defaultMode;
-
- return mode.getFoldWidgetRange(session, foldStyle, row);
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-html.js b/contexts/data/lib/ace/mode-html.js
index f4f8060..1374231 100644
--- a/contexts/data/lib/ace/mode-html.js
+++ b/contexts/data/lib/ace/mode-html.js
@@ -1 +1,1850 @@
-define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./html_highlight_rules").HtmlHighlightRules,j=a("./behaviour/xml").XmlBehaviour,k=a("./folding/html").FoldMode,l=function(){var a=new i;this.$tokenizer=new h(a.getRules()),this.$behaviour=new j,this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g}),this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){return 0},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1}}.call(l.prototype),b.Mode=l}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./xml_util"),h=a("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=s*script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=s*style\\b)",next:"css"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},g.tag(this.$rules,"tag","start"),g.tag(this.$rules,"css","css-start"),g.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,h),b.HtmlHighlightRules=i}),define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./mixed").FoldMode,f=a("./xml").FoldMode,g=a("./cstyle").FoldMode,h=b.FoldMode=function(){e.call(this,new f({area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,li:1,dt:1,dd:1,p:1,rt:1,rp:1,optgroup:1,option:1,colgroup:1,td:1,th:1}),{"js-":new g,"css-":new g})};d.inherits(h,e)}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a,b){this.defaultMode=a,this.subModes=b};d.inherits(f,e),function(){this.$getMode=function(a){for(var b in this.subModes)if(a.indexOf(b)===0)return this.subModes[b];return null},this.$tryMode=function(a,b,c,d){var e=this.$getMode(a);return e?e.getFoldWidget(b,c,d):""},this.getFoldWidget=function(a,b,c){return this.$tryMode(a.getState(c-1),a,b,c)||this.$tryMode(a.getState(c),a,b,c)||this.defaultMode.getFoldWidget(a,b,c)},this.getFoldWidgetRange=function(a,b,c){var d=this.$getMode(a.getState(c-1));if(!d||!d.getFoldWidget(a,b,c))d=this.$getMode(a.getState(c));if(!d||!d.getFoldWidget(a,b,c))d=this.defaultMode;return d.getFoldWidgetRange(a,b,c)}}.call(f.prototype)}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+
+var Mode = function() {
+ var highlighter = new HtmlHighlightRules();
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$behaviour = new HtmlBehaviour();
+
+ this.$embeds = highlighter.getEmbeds();
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ return 0;
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("csslint", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ this.$rules = {
+ start : [{
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "xml-pe",
+ regex : "<\\!.*?>"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=script\\b)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=style\\b)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start", tagMap);
+ xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
+ xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(HtmlHighlightRules, TextHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var HtmlBehaviour = function () {
+
+ this.inherit(XmlBehaviour); // Get xml behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var element = token.value;
+ if (atCursor){
+ var element = element.substring(0, position.column - token.start);
+ }
+ if (voidElements.indexOf(element) !== -1){
+ return;
+ }
+ return {
+ text: '>' + '</' + element + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+}
+oop.inherits(HtmlBehaviour, XmlBehaviour);
+
+exports.HtmlBehaviour = HtmlBehaviour;
+});
+
+ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var XmlBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var tag = token.value;
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
+ if (rightChars == '</') {
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
+
+ return {
+ text: '\n' + indent + '\n' + next_indent,
+ selection: [1, indent.length, 1, indent.length]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {
+ MixedFoldMode.call(this, new XmlFoldMode({
+ "area": 1,
+ "base": 1,
+ "br": 1,
+ "col": 1,
+ "command": 1,
+ "embed": 1,
+ "hr": 1,
+ "img": 1,
+ "input": 1,
+ "keygen": 1,
+ "link": 1,
+ "meta": 1,
+ "param": 1,
+ "source": 1,
+ "track": 1,
+ "wbr": 1,
+ "li": 1,
+ "dt": 1,
+ "dd": 1,
+ "p": 1,
+ "rt": 1,
+ "rp": 1,
+ "optgroup": 1,
+ "option": 1,
+ "colgroup": 1,
+ "td": 1,
+ "th": 1
+ }), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (tag.closing)
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ return "";
+
+ if (tag.selfClosing)
+ return "";
+
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ return "";
+
+ return "start";
+ };
+
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var value = "";
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type.indexOf("meta.tag") === 0)
+ value += token.value;
+ else
+ value += lang.stringRepeat(" ", token.value.length);
+ }
+
+ return this._parseTag(value);
+ };
+
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
+ this._parseTag = function(tag) {
+
+ var match = this.tagRe.exec(tag);
+ var column = this.tagRe.lastIndex || 0;
+ this.tagRe.lastIndex = 0;
+
+ return {
+ value: tag,
+ match: match ? match[2] : "",
+ closing: match ? !!match[3] : false,
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
+ tagName: match ? match[4] : "",
+ column: match[1] ? column + match[1].length : column
+ };
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var start;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!start) {
+ var start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ }
+ value += token.value;
+ if (value.indexOf(">") !== -1) {
+ var tag = this._parseTag(value);
+ tag.start = start;
+ tag.end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ iterator.stepForward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var end;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!end) {
+ end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ }
+ value = token.value + value;
+ if (value.indexOf("<") !== -1) {
+ var tag = this._parseTag(value);
+ tag.end = end;
+ tag.start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ iterator.stepBackward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.voidElements[tag.tagName]) {
+ return;
+ }
+ else if (this.voidElements[top.tagName]) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag.match)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.column);
+ var start = {
+ row: row,
+ column: firstTag.column + firstTag.tagName.length + 2
+ };
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var end = {
+ row: row,
+ column: firstTag.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-jade.js b/contexts/data/lib/ace/mode-jade.js
new file mode 100644
index 0000000..907f277
--- /dev/null
+++ b/contexts/data/lib/ace/mode-jade.js
@@ -0,0 +1,2035 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian <gjtorikian @ gmail DOT com>
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/jade', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jade_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ var highlighter = new JadeHighlightRules();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/jade_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/markdown_highlight_rules', 'ace/mode/scss_highlight_rules', 'ace/mode/less_highlight_rules', 'ace/mode/coffee_highlight_rules', 'ace/mode/javascript_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
+var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+function mixin_embed(tag, prefix) {
+ return {
+ token : "entity.name.function.jade",
+ regex : "^\\s*\\:" + tag,
+ next : prefix + "start"
+ };
+}
+
+var JadeHighlightRules = function() {
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules =
+ {
+ "start": [
+ {
+ "token": "keyword.control.import.include.jade",
+ "regex": "\\s*\\binclude\\b"
+ },
+ {
+ "token": "keyword.other.doctype.jade",
+ "regex": "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
+ },
+ {
+ "token" : "punctuation.section.comment",
+ "regex" : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"
+ },
+ {
+ "token" : function(space, text) {
+ return "punctuation.section.comment";
+ },
+ "regex" : "^((\\s*)\/\/)(?:\\s*$)",
+ "next": "comment_block"
+ },
+ mixin_embed("markdown", "markdown-"),
+ mixin_embed("sass", "sass-"),
+ mixin_embed("less", "less-"),
+ mixin_embed("coffee", "coffee-"),
+ {
+ "token": [ "storage.type.function.jade",
+ "entity.name.function.jade",
+ "punctuation.definition.parameters.begin.jade",
+ "variable.parameter.function.jade",
+ "punctuation.definition.parameters.end.jade"
+ ],
+ "regex": "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"
+ },
+ {
+ "token": [ "storage.type.function.jade", "entity.name.function.jade"],
+ "regex": "^(\\s*mixin)( [\\w\\-]+)"
+ },
+ {
+ "token": "source.js.embedded.jade",
+ "regex": "^\\s*(?:-|=|!=)",
+ "next": "js-start"
+ },
+ {
+ "token": "string.interpolated.jade",
+ "regex": "[#!]\\{[^\\}]+\\}"
+ },
+ {
+ "token": ["meta.tag.any.jade", "entity.variable.tag.jade"],
+ "regex": /^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/,
+ "next": "tag_single"
+ },
+ {
+ "token": "suport.type.attribute.id.jade",
+ "regex": "#\\w+"
+ },
+ {
+ "token": "suport.type.attribute.class.jade",
+ "regex": "\\.\\w+"
+ },
+ {
+ "token": "punctuation",
+ "regex": "\\s*(?:\\()",
+ "next": "tag_attributes"
+ }
+ ],
+ "comment_block": [
+ {
+ "token": function(text) {
+ return "text";
+ },
+ "regex": "^(\\1\\S|$)",
+ "captures": "1",
+ "next": "start"
+ },
+ {
+ "token": "comment.block.jade",
+ "regex" : ".+"
+ }
+ ],
+ "tag_single": [
+ {
+ "token": "entity.other.attribute-name.class.jade",
+ "regex": "\\.[\\w-]+"
+ },
+ {
+ "token": "entity.other.attribute-name.id.jade",
+ "regex": "#[\\w-]+"
+ },
+ {
+ "token": ["text", "punctuation"],
+ "regex": "($)|((?!\\.|#|=|-))",
+ "next": "start"
+ }
+ ],
+ "tag_attributes": [
+ {
+ "token" : "string",
+ "regex" : "'(?=.)",
+ "next" : "qstring"
+ },
+ {
+ "token" : "string",
+ "regex" : '"(?=.)',
+ "next" : "qqstring"
+ },
+ {
+ "token": "entity.other.attribute-name.jade",
+ "regex": "\\b[a-zA-Z\\-:]+"
+ },
+ {
+ "token": ["entity.other.attribute-name.jade", "punctuation"],
+ "regex": "\\b([a-zA-Z:\\.-]+)(=)",
+ "next": "attribute_strings"
+ },
+ {
+ "token": "punctuation",
+ "regex": "\\)",
+ "next": "start"
+ }
+ ],
+ "attribute_strings": [
+ {
+ "token" : "string",
+ "regex" : "'(?=.)",
+ "next" : "qstring"
+ },
+ {
+ "token" : "string",
+ "regex" : '"(?=.)',
+ "next" : "qqstring"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+',
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "tag_attributes",
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "[^'\\\\]+",
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "tag_attributes",
+ }
+ ]
+};
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "text",
+ regex: ".$",
+ next: "start"
+ }]);
+};
+
+oop.inherits(JadeHighlightRules, TextHighlightRules);
+
+exports.JadeHighlightRules = JadeHighlightRules;
+});
+
+ace.define('ace/mode/markdown_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+
+function github_embed(tag, prefix) {
+ return { // Github style block
+ token : "support.function",
+ regex : "^```" + tag + "\\s*$",
+ next : prefix + "start"
+ };
+}
+
+var MarkdownHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "empty_line",
+ regex : '^$'
+ }, { // code span `
+ token : ["support.function", "support.function", "support.function"],
+ regex : "(`+)([^\\r]*?[^`])(\\1)"
+ }, { // code block
+ token : "support.function",
+ regex : "^[ ]{4}.+"
+ }, { // h1
+ token: "markup.heading.1",
+ regex: "^=+(?=\\s*$)"
+ }, { // h2
+ token: "markup.heading.2",
+ regex: "^\\-+(?=\\s*$)"
+ }, { // header
+ token : function(value) {
+ return "markup.heading." + value.search(/[^#]/);
+ },
+ regex : "^#{1,6}(?:[^ #].*| +.*(?:[^ #].*|[^ ]+.* +#+ *))$"
+ }, github_embed("(?:javascript|js)", "js-"),
+ github_embed("xml", "xml-"),
+ github_embed("html", "html-"),
+ github_embed("css", "css-"),
+ { // Github style block
+ token : "support.function",
+ regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, { // block quote
+ token : "string",
+ regex : "^>[ ].+$",
+ next : "blockquote"
+ }, { // reference
+ token : ["text", "constant", "text", "url", "string", "text"],
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
+ }, { // link by reference
+ token : ["text", "string", "text", "constant", "text"],
+ regex : "(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"
+ }, { // link by url
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
+ regex : "(\\[)"+
+ "(\\[[^\\]]*\\]|[^\\[\\]]*)"+
+ "(\\]\\([ \\t]*)"+
+ "(<?(?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)"+
+ "((?:[ \t]*\"(?:.*?)\"[ \\t]*)?)"+
+ "(\\))"
+ }, { // HR *
+ token : "constant",
+ regex : "^[ ]{0,2}(?:[ ]?\\*[ ]?){3,}\\s*$"
+ }, { // HR -
+ token : "constant",
+ regex : "^[ ]{0,2}(?:[ ]?\\-[ ]?){3,}\\s*$"
+ }, { // HR _
+ token : "constant",
+ regex : "^[ ]{0,2}(?:[ ]?\\_[ ]?){3,}\\s*$"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock"
+ }, { // strong ** __
+ token : ["string", "string", "string"],
+ regex : "([*]{2}|[_]{2}(?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
+ }, { // emphasis * _
+ token : ["string", "string", "string"],
+ regex : "([*]|[_](?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
+ }, { //
+ token : ["text", "url", "text"],
+ regex : "(<)("+
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
+ "|"+
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
+ ")(>)"
+ }, {
+ token : "text",
+ regex : "[^\\*_%$`\\[#<>]+"
+ } ],
+
+ "listblock" : [ { // Lists only escape on completely blank lines.
+ token : "empty_line",
+ regex : "^$",
+ next : "start"
+ }, {
+ token : "markup.list",
+ regex : ".+"
+ } ],
+
+ "blockquote" : [ { // BLockquotes only escape on blank lines.
+ token : "empty_line",
+ regex : "^\\s*$",
+ next : "start"
+ }, {
+ token : "string",
+ regex : ".+"
+ } ],
+
+ "githubblock" : [ {
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }, {
+ token : "support.function",
+ regex : ".+"
+ } ]
+ };
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }]);
+
+ this.embedRules(HtmlHighlightRules, "html-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }]);
+
+ this.embedRules(XmlHighlightRules, "xml-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }]);
+
+ var html = new HtmlHighlightRules().getRules();
+ for (var i in html) {
+ if (this.$rules[i])
+ this.$rules[i] = this.$rules[i].concat(html[i]);
+ else
+ this.$rules[i] = html[i];
+ }
+
+};
+oop.inherits(MarkdownHighlightRules, TextHighlightRules);
+
+exports.MarkdownHighlightRules = MarkdownHighlightRules;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function() {
+ this.$rules = {
+ start : [
+ {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "xml-pe", regex : "<\\?.*?\\?>"},
+ {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "xml-pe", regex : "<\\!.*?>"},
+ {token : "meta.tag", regex : "<\\/?", next : "tag"},
+ {token : "text", regex : "\\s+"},
+ {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "text", regex : "[^<]+"}
+ ],
+
+ cdata : [
+ {token : "text", regex : "\\]\\]>", next : "start"},
+ {token : "text", regex : "\\s+"},
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment", regex : ".*?-->", next : "start"},
+ {token : "comment", regex : ".+"}
+ ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start");
+};
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+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_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ this.$rules = {
+ start : [{
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "xml-pe",
+ regex : "<\\!.*?>"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=script\\b)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=style\\b)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start", tagMap);
+ xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
+ xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(HtmlHighlightRules, TextHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ScssHighlightRules = function() {
+
+ var properties = lang.arrayToMap( (function () {
+
+ var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
+
+ var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
+ "background-size|binding|border-bottom-colors|border-left-colors|" +
+ "border-right-colors|border-top-colors|border-end|border-end-color|" +
+ "border-end-style|border-end-width|border-image|border-start|" +
+ "border-start-color|border-start-style|border-start-width|box-align|" +
+ "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
+ "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
+ "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
+ "font-feature-settings|font-language-override|force-broken-image-icon|" +
+ "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
+ "outline-offset|outline-radius|outline-radius-bottomleft|" +
+ "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
+ "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
+ "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
+ "text-decoration-style|transform|transform-origin|transition|" +
+ "transition-delay|transition-duration|transition-property|" +
+ "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
+ "window-shadow|border-radius").split("|");
+
+ var properties = ("azimuth|background-attachment|background-color|background-image|" +
+ "background-position|background-repeat|background|border-bottom-color|" +
+ "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
+ "border-color|border-left-color|border-left-style|border-left-width|" +
+ "border-left|border-right-color|border-right-style|border-right-width|" +
+ "border-right|border-spacing|border-style|border-top-color|" +
+ "border-top-style|border-top-width|border-top|border-width|border|" +
+ "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
+ "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
+ "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
+ "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
+ "letter-spacing|line-height|list-style-image|list-style-position|" +
+ "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
+ "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
+ "min-width|opacity|orphans|outline-color|" +
+ "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
+ "padding-left|padding-right|padding-top|padding|page-break-after|" +
+ "page-break-before|page-break-inside|page|pause-after|pause-before|" +
+ "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
+ "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
+ "stress|table-layout|text-align|text-decoration|text-indent|" +
+ "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
+ "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
+ "z-index").split("|");
+ var ret = [];
+ for (var i=0, ln=browserPrefix.length; i<ln; i++) {
+ Array.prototype.push.apply(
+ ret,
+ (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
+ );
+ }
+ Array.prototype.push.apply(ret, prefixProperties);
+ Array.prototype.push.apply(ret, properties);
+
+ return ret;
+
+ })() );
+
+
+
+ var functions = lang.arrayToMap(
+ ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
+ "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
+ "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
+ "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
+ "scale_color|transparentize|type_of|unit|unitless|unqoute").split("|")
+ );
+
+ var constants = lang.arrayToMap(
+ ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
+ "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
+ "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
+ "decimal-leading-zero|decimal|default|disabled|disc|" +
+ "distribute-all-lines|distribute-letter|distribute-space|" +
+ "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
+ "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
+ "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
+ "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
+ "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
+ "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
+ "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
+ "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
+ "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
+ "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
+ "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
+ "solid|square|static|strict|super|sw-resize|table-footer-group|" +
+ "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
+ "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
+ "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
+ "zero").split("|")
+ );
+
+ var colors = lang.arrayToMap(
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
+ "purple|red|silver|teal|white|yellow").split("|")
+ );
+
+ var keywords = lang.arrayToMap(
+ ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
+ )
+
+ var tags = lang.arrayToMap(
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
+ );
+
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric",
+ regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : function(value) {
+ if (properties.hasOwnProperty(value.toLowerCase()))
+ return "support.type";
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (constants.hasOwnProperty(value))
+ return "constant.language";
+ else if (functions.hasOwnProperty(value))
+ return "support.function";
+ else if (colors.hasOwnProperty(value.toLowerCase()))
+ return "support.constant.color";
+ else if (tags.hasOwnProperty(value.toLowerCase()))
+ return "variable.language";
+ else
+ return "text";
+ },
+ regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
+ }, {
+ token : "variable",
+ regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
+ }, {
+ token: "variable.language",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ token : "keyword.operator",
+ regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+};
+
+oop.inherits(ScssHighlightRules, TextHighlightRules);
+
+exports.ScssHighlightRules = ScssHighlightRules;
+
+});
+
+ace.define('ace/mode/less_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LessHighlightRules = function() {
+
+ var properties = lang.arrayToMap( (function () {
+
+ var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
+
+ var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
+ "background-size|binding|border-bottom-colors|border-left-colors|" +
+ "border-right-colors|border-top-colors|border-end|border-end-color|" +
+ "border-end-style|border-end-width|border-image|border-start|" +
+ "border-start-color|border-start-style|border-start-width|box-align|" +
+ "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
+ "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
+ "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
+ "font-feature-settings|font-language-override|force-broken-image-icon|" +
+ "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
+ "outline-offset|outline-radius|outline-radius-bottomleft|" +
+ "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
+ "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
+ "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
+ "text-decoration-style|transform|transform-origin|transition|" +
+ "transition-delay|transition-duration|transition-property|" +
+ "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
+ "window-shadow|border-radius").split("|");
+
+ var properties = ("azimuth|background-attachment|background-color|background-image|" +
+ "background-position|background-repeat|background|border-bottom-color|" +
+ "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
+ "border-color|border-left-color|border-left-style|border-left-width|" +
+ "border-left|border-right-color|border-right-style|border-right-width|" +
+ "border-right|border-spacing|border-style|border-top-color|" +
+ "border-top-style|border-top-width|border-top|border-width|border|" +
+ "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
+ "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
+ "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
+ "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
+ "letter-spacing|line-height|list-style-image|list-style-position|" +
+ "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
+ "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
+ "min-width|opacity|orphans|outline-color|" +
+ "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
+ "padding-left|padding-right|padding-top|padding|page-break-after|" +
+ "page-break-before|page-break-inside|page|pause-after|pause-before|" +
+ "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
+ "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
+ "stress|table-layout|text-align|text-decoration|text-indent|" +
+ "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
+ "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
+ "z-index").split("|");
+ var ret = [];
+ for (var i=0, ln=browserPrefix.length; i<ln; i++) {
+ Array.prototype.push.apply(
+ ret,
+ (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
+ );
+ }
+ Array.prototype.push.apply(ret, prefixProperties);
+ Array.prototype.push.apply(ret, properties);
+
+ return ret;
+
+ })() );
+
+
+
+ var functions = lang.arrayToMap(
+ ("hsl|hsla|rgb|rgba|url|attr|counter|counters|lighten|darken|saturate|" +
+ "desaturate|fadein|fadeout|fade|spin|mix|hue|saturation|lightness|" +
+ "alpha|round|ceil|floor|percentage|color|iscolor|isnumber|isstring|" +
+ "iskeyword|isurl|ispixel|ispercentage|isem").split("|")
+ );
+
+ var constants = lang.arrayToMap(
+ ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
+ "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
+ "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
+ "decimal-leading-zero|decimal|default|disabled|disc|" +
+ "distribute-all-lines|distribute-letter|distribute-space|" +
+ "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
+ "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
+ "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
+ "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
+ "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
+ "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
+ "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
+ "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
+ "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
+ "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
+ "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
+ "solid|square|static|strict|super|sw-resize|table-footer-group|" +
+ "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
+ "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
+ "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
+ "zero").split("|")
+ );
+
+ var colors = lang.arrayToMap(
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
+ "purple|red|silver|teal|white|yellow").split("|")
+ );
+
+ var keywords = lang.arrayToMap(
+ ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|" +
+ "@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|" +
+ "def|end|declare|when|not|and").split("|")
+ );
+
+ var tags = lang.arrayToMap(
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
+ );
+
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric",
+ regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else
+ return "variable";
+ },
+ regex : "@[a-z0-9_\\-@]*\\b"
+ }, {
+ token : function(value) {
+ if (properties.hasOwnProperty(value.toLowerCase()))
+ return "support.type";
+ else if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (constants.hasOwnProperty(value))
+ return "constant.language";
+ else if (functions.hasOwnProperty(value))
+ return "support.function";
+ else if (colors.hasOwnProperty(value.toLowerCase()))
+ return "support.constant.color";
+ else if (tags.hasOwnProperty(value.toLowerCase()))
+ return "variable.language";
+ else
+ return "text";
+ },
+ regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
+ }, {
+ token: "variable.language",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ token : "keyword.operator",
+ regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+};
+
+oop.inherits(LessHighlightRules, TextHighlightRules);
+
+exports.LessHighlightRules = LessHighlightRules;
+
+});
+
+ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ oop.inherits(CoffeeHighlightRules, TextHighlightRules);
+
+ function CoffeeHighlightRules() {
+ var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
+ var stringfill = {
+ token : "string",
+ regex : ".+"
+ };
+
+ var keywords = (
+ "this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|" +
+ "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
+ "or|on|unless|until|and|yes"
+ );
+
+ var langConstant = (
+ "true|false|null|undefined|NaN|Infinity"
+ );
+
+ var illegal = (
+ "case|const|default|function|var|void|with|enum|export|implements|" +
+ "interface|let|package|private|protected|public|static|yield|" +
+ "__hasProp|slice|bind|indexOf"
+ );
+
+ var supportClass = (
+ "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
+ "SyntaxError|TypeError|URIError|" +
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"
+ );
+
+ var supportFunction = (
+ "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
+ "encodeURIComponent|decodeURI|decodeURIComponent|String|"
+ );
+
+ var variableLanguage = (
+ "window|arguments|prototype|document"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": langConstant,
+ "invalid.illegal": illegal,
+ "language.support.class": supportClass,
+ "language.support.function": supportFunction,
+ "variable.language": variableLanguage
+ }, "identifier");
+
+ var functionRules = {
+ "({args})->": {
+ token: ["paren.lparen", "text", "paren.lparen", "text", "variable.parameter", "text", "paren.rparen", "text", "paren.rparen", "text", "storage.type"],
+ regex: "(\\()(\\s*)(\\{)(\\s*)([$@A-Za-z_\\x7f-\\uffff][$@\\w\\s,\\x7f-\\uffff]*)(\\s*)(\\})(\\s*)(\\))(\\s*)([\\-=]>)"
+ },
+ "({})->": {
+ token: ["paren.lparen", "text", "paren.lparen", "text", "paren.rparen", "text", "paren.rparen", "text", "storage.type"],
+ regex: "(\\()(\\s*)(\\{)(\\s*)(\\})(\\s*)(\\))(\\s*)([\\-=]>)"
+ },
+ "(args)->": {
+ token: ["paren.lparen", "text", "variable.parameter", "text", "paren.rparen", "text", "storage.type"],
+ regex: "(\\()(\\s*)([$@A-Za-z_\\x7f-\\uffff][\\s\\x21-\\uffff]*)(\\s*)(\\))(\\s*)([\\-=]>)"
+ },
+ "()->": {
+ token: ["paren.lparen", "text", "paren.rparen", "text", "storage.type"],
+ regex: "(\\()(\\s*)(\\))(\\s*)([\\-=]>)"
+ }
+ };
+
+ this.$rules = {
+ start : [
+ {
+ token : "constant.numeric",
+ regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
+ }, {
+ token : "string",
+ regex : "'''",
+ next : "qdoc"
+ }, {
+ token : "string",
+ regex : '"""',
+ next : "qqdoc"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"',
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : "`",
+ next : "js"
+ }, {
+ token : "string.regex",
+ regex : "///",
+ next : "heregex"
+ }, {
+ token : "string.regex",
+ regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/
+ }, {
+ token : "comment",
+ regex : "###(?!#)",
+ next : "comment"
+ }, {
+ token : "comment",
+ regex : "#.*"
+ }, {
+ token : [
+ "punctuation.operator", "identifier"
+ ],
+ regex : "(\\.)(" + illegal + ")"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\."
+ }, {
+ token : [
+ "keyword", "text", "language.support.class", "text", "keyword", "text", "language.support.class"
+ ],
+ regex : "(class)(\\s+)(" + identifier + ")(\\s+)(extends)(\\s+)(" + identifier + ")"
+ }, {
+ token : [
+ "keyword", "text", "language.support.class"
+ ],
+ regex : "(class)(\\s+)(" + identifier + ")"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text"
+ ].concat(functionRules["({args})->"].token),
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["({args})->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text"
+ ].concat(functionRules["({args})->"].token),
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["({args})->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text"
+ ].concat(functionRules["({})->"].token),
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["({})->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text"
+ ].concat(functionRules["({})->"].token),
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["({})->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text"
+ ].concat(functionRules["(args)->"].token),
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["(args)->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text"
+ ].concat(functionRules["(args)->"].token),
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["(args)->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text"
+ ].concat(functionRules["()->"].token),
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["()->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text"
+ ].concat(functionRules["()->"].token),
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["()->"].regex
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type"
+ ],
+ regex : "(" + identifier + ")(\\s*)(=)(\\s*)([\\-=]>)"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator", "text", "storage.type"
+ ],
+ regex : "(" + identifier + ")(\\s*)(:)(\\s*)([\\-=]>)"
+ },
+ functionRules["({args})->"],
+ functionRules["({})->"],
+ functionRules["(args)->"],
+ functionRules["()->"]
+ , {
+ token : "identifier",
+ regex : "(?:(?:\\.|::)\\s*)" + identifier
+ }, {
+ token : "variable",
+ regex : "@(?:" + identifier + ")?"
+ }, {
+ token: keywordMapper,
+ regex : identifier
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\."
+ }, {
+ token : "storage.type",
+ regex : "[\\-=]>"
+ }, {
+ token : "keyword.operator",
+ regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"
+ }, {
+ token : "paren.lparen",
+ regex : "[({[]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]})]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }],
+
+ qdoc : [{
+ token : "string",
+ regex : ".*?'''",
+ next : "start"
+ }, stringfill],
+
+ qqdoc : [{
+ token : "string",
+ regex : '.*?"""',
+ next : "start"
+ }, stringfill],
+
+ qstring : [{
+ token : "string",
+ regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
+ next : "start"
+ }, stringfill],
+
+ qqstring : [{
+ token : "string",
+ regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
+ next : "start"
+ }, stringfill],
+
+ js : [{
+ token : "string",
+ regex : "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
+ next : "start"
+ }, stringfill],
+
+ heregex : [{
+ token : "string.regex",
+ regex : '.*?///[imgy]{0,4}',
+ next : "start"
+ }, {
+ token : "comment.regex",
+ regex : "\\s+(?:#.*)?"
+ }, {
+ token : "string.regex",
+ regex : "\\S+"
+ }],
+
+ comment : [{
+ token : "comment",
+ regex : '.*?###',
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ }]
+ };
+ }
+
+ exports.CoffeeHighlightRules = CoffeeHighlightRules;
+});
+
+ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-java-noconflict.js b/contexts/data/lib/ace/mode-java-noconflict.js
deleted file mode 100644
index afdbcc6..0000000
--- a/contexts/data/lib/ace/mode-java-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/java_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./java_highlight_rules").JavaHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.JavaHighlightRules=h}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-java-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-java-uncompressed-noconflict.js
deleted file mode 100644
index bbe904c..0000000
--- a/contexts/data/lib/ace/mode-java-uncompressed-noconflict.js
+++ /dev/null
@@ -1,1464 +0,0 @@
-ace.define('ace/mode/java', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/java_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
-
- this.$tokenizer = new Tokenizer(new JavaHighlightRules().getRules());
-};
-oop.inherits(Mode, JavaScriptMode);
-
-(function() {
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-ace.define('ace/mode/java_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaHighlightRules = function() {
-
- // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
- var keywords = lang.arrayToMap(
- ("abstract|continue|for|new|switch|" +
- "assert|default|goto|package|synchronized|" +
- "boolean|do|if|private|this|" +
- "break|double|implements|protected|throw|" +
- "byte|else|import|public|throws|" +
- "case|enum|instanceof|return|transient|" +
- "catch|extends|int|short|try|" +
- "char|final|interface|static|void|" +
- "class|finally|long|strictfp|volatile|" +
- "const|float|native|super|while").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var langClasses = lang.arrayToMap(
- ("AbstractMethodError|AssertionError|ClassCircularityError|"+
- "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
- "ExceptionInInitializerError|IllegalAccessError|"+
- "IllegalThreadStateException|InstantiationError|InternalError|"+
- "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
- "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
- "SuppressWarnings|TypeNotPresentException|UnknownError|"+
- "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
- "InstantiationException|IndexOutOfBoundsException|"+
- "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
- "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
- "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
- "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
- "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
- "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
- "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
- "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
- "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
- "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
- "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
- "ArrayStoreException|ClassCastException|LinkageError|"+
- "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
- "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
- "Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
- );
-
- var importClasses = lang.arrayToMap(
- ("").split("|")
- );
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (langClasses.hasOwnProperty(value))
- return "support.function";
- else if (importClasses.hasOwnProperty(value))
- return "support.function";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaHighlightRules, TextHighlightRules);
-
-exports.JavaHighlightRules = JavaHighlightRules;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-java-uncompressed.js b/contexts/data/lib/ace/mode-java-uncompressed.js
deleted file mode 100644
index 7263df5..0000000
--- a/contexts/data/lib/ace/mode-java-uncompressed.js
+++ /dev/null
@@ -1,1464 +0,0 @@
-define('ace/mode/java', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/java_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
-
- this.$tokenizer = new Tokenizer(new JavaHighlightRules().getRules());
-};
-oop.inherits(Mode, JavaScriptMode);
-
-(function() {
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-define('ace/mode/java_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaHighlightRules = function() {
-
- // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
- var keywords = lang.arrayToMap(
- ("abstract|continue|for|new|switch|" +
- "assert|default|goto|package|synchronized|" +
- "boolean|do|if|private|this|" +
- "break|double|implements|protected|throw|" +
- "byte|else|import|public|throws|" +
- "case|enum|instanceof|return|transient|" +
- "catch|extends|int|short|try|" +
- "char|final|interface|static|void|" +
- "class|finally|long|strictfp|volatile|" +
- "const|float|native|super|while").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var langClasses = lang.arrayToMap(
- ("AbstractMethodError|AssertionError|ClassCircularityError|"+
- "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
- "ExceptionInInitializerError|IllegalAccessError|"+
- "IllegalThreadStateException|InstantiationError|InternalError|"+
- "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
- "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
- "SuppressWarnings|TypeNotPresentException|UnknownError|"+
- "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
- "InstantiationException|IndexOutOfBoundsException|"+
- "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
- "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
- "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
- "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
- "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
- "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
- "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
- "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
- "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
- "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
- "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
- "ArrayStoreException|ClassCastException|LinkageError|"+
- "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
- "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
- "Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
- );
-
- var importClasses = lang.arrayToMap(
- ("").split("|")
- );
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (langClasses.hasOwnProperty(value))
- return "support.function";
- else if (importClasses.hasOwnProperty(value))
- return "support.function";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaHighlightRules, TextHighlightRules);
-
-exports.JavaHighlightRules = JavaHighlightRules;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-java.js b/contexts/data/lib/ace/mode-java.js
index 84c21da..8582917 100644
--- a/contexts/data/lib/ace/mode-java.js
+++ b/contexts/data/lib/ace/mode-java.js
@@ -1 +1,1041 @@
-define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/java_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./java_highlight_rules").JavaHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.JavaHighlightRules=h}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+ace.define('ace/mode/java', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/java_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+
+ this.$tokenizer = new Tokenizer(new JavaHighlightRules().getRules());
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+ace.define('ace/mode/java_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaHighlightRules = function() {
+ var keywords = (
+ "abstract|continue|for|new|switch|" +
+ "assert|default|goto|package|synchronized|" +
+ "boolean|do|if|private|this|" +
+ "break|double|implements|protected|throw|" +
+ "byte|else|import|public|throws|" +
+ "case|enum|instanceof|return|transient|" +
+ "catch|extends|int|short|try|" +
+ "char|final|interface|static|void|" +
+ "class|finally|long|strictfp|volatile|" +
+ "const|float|native|super|while"
+ );
+
+ var buildinConstants = ("null|Infinity|NaN|undefined");
+
+
+ var langClasses = (
+ "AbstractMethodError|AssertionError|ClassCircularityError|"+
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
+ "ExceptionInInitializerError|IllegalAccessError|"+
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
+ "InstantiationException|IndexOutOfBoundsException|"+
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
+ "ArrayStoreException|ClassCastException|LinkageError|"+
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
+ "Cloneable|Class|CharSequence|Comparable|String|Object"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": langClasses
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaHighlightRules, TextHighlightRules);
+
+exports.JavaHighlightRules = JavaHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-javascript-noconflict.js b/contexts/data/lib/ace/mode-javascript-noconflict.js
deleted file mode 100644
index 5cfc89b..0000000
--- a/contexts/data/lib/ace/mode-javascript-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-javascript-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-javascript-uncompressed-noconflict.js
deleted file mode 100644
index 36ee054..0000000
--- a/contexts/data/lib/ace/mode-javascript-uncompressed-noconflict.js
+++ /dev/null
@@ -1,1295 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-javascript-uncompressed.js b/contexts/data/lib/ace/mode-javascript-uncompressed.js
deleted file mode 100644
index ba30b9e..0000000
--- a/contexts/data/lib/ace/mode-javascript-uncompressed.js
+++ /dev/null
@@ -1,1295 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-javascript.js b/contexts/data/lib/ace/mode-javascript.js
index 2f24238..23de0c5 100644
--- a/contexts/data/lib/ace/mode-javascript.js
+++ b/contexts/data/lib/ace/mode-javascript.js
@@ -1 +1,921 @@
-define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-json-noconflict.js b/contexts/data/lib/ace/mode-json-noconflict.js
deleted file mode 100644
index 88331e5..0000000
--- a/contexts/data/lib/ace/mode-json-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./json_highlight_rules").JsonHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b);if(a=="start"){var e=b.match(/^.*[\{\(\[]\s*$/);e&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]}};d.inherits(f,e),b.JsonHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-json-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-json-uncompressed-noconflict.js
deleted file mode 100644
index abec600..0000000
--- a/contexts/data/lib/ace/mode-json-uncompressed-noconflict.js
+++ /dev/null
@@ -1,689 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/json', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/json_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new HighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/json_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JsonHighlightRules = function() {
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
- this.$rules = {
- "start" : [
- {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "invalid.illegal", // single quoted strings are not allowed
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "invalid.illegal", // comments are not allowed
- regex : "\\/\\/.*$"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ]
- };
-
-};
-
-oop.inherits(JsonHighlightRules, TextHighlightRules);
-
-exports.JsonHighlightRules = JsonHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-json-uncompressed.js b/contexts/data/lib/ace/mode-json-uncompressed.js
deleted file mode 100644
index 19dc612..0000000
--- a/contexts/data/lib/ace/mode-json-uncompressed.js
+++ /dev/null
@@ -1,689 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/json', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/json_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new HighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/json_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JsonHighlightRules = function() {
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
- this.$rules = {
- "start" : [
- {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "invalid.illegal", // single quoted strings are not allowed
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "invalid.illegal", // comments are not allowed
- regex : "\\/\\/.*$"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ]
- };
-
-};
-
-oop.inherits(JsonHighlightRules, TextHighlightRules);
-
-exports.JsonHighlightRules = JsonHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-json.js b/contexts/data/lib/ace/mode-json.js
index d0dd59f..6fce5ca 100644
--- a/contexts/data/lib/ace/mode-json.js
+++ b/contexts/data/lib/ace/mode-json.js
@@ -1 +1,574 @@
-define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./json_highlight_rules").JsonHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b);if(a=="start"){var e=b.match(/^.*[\{\(\[]\s*$/);e&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(k.prototype),b.Mode=k}),define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]}};d.inherits(f,e),b.JsonHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/json', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/json_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/worker/worker_client'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new HighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations([e.data]);
+ });
+
+ worker.on("ok", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/json_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JsonHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "variable", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
+ }, {
+ token : "string", // single line
+ regex : '"',
+ next : "string"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : "invalid.illegal", // single quoted strings are not allowed
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "invalid.illegal", // comments are not allowed
+ regex : "\\/\\/.*$"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "string" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+',
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start",
+ }, {
+ token : "string",
+ regex : "",
+ next : "start",
+ }
+ ]
+ };
+
+};
+
+oop.inherits(JsonHighlightRules, TextHighlightRules);
+
+exports.JsonHighlightRules = JsonHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-jsp.js b/contexts/data/lib/ace/mode-jsp.js
new file mode 100644
index 0000000..ad01453
--- /dev/null
+++ b/contexts/data/lib/ace/mode-jsp.js
@@ -0,0 +1,1371 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/jsp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jsp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ var highlighter = new JspHighlightRules();
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/jsp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/java_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+
+var JspHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token : "meta.tag", // jsp open tag
+ regex : "<%@?|<%=?|<jsp:[^>]+>",
+ next : "jsp-start"
+ });
+ }
+
+ var builtinVariables = 'request|response|out|session|' +
+ 'application|config|pageContext|page|Exception';
+
+ var keywords = 'page|include|taglib';
+
+ this.embedRules(JavaHighlightRules, "jsp-");
+
+ this.$rules["start"].unshift({
+ token : "comment",
+ regex : "<%--",
+ next : "comment"
+ });
+
+ this.$rules["jsp-start"].unshift({
+ token : "meta.tag", // jsp close tag
+ regex : "%>|<\\/jsp:[^>]+>",
+ next : "start"
+ },
+ {
+ token: "variable.language",
+ regex : builtinVariables
+ }, {
+ token: "keyword",
+ regex : keywords
+ });
+
+ this.$rules.comment.unshift({
+ token : "comment",
+ regex : ".*?--%>",
+ next : "start"
+ });
+};
+
+oop.inherits(JspHighlightRules, HtmlHighlightRules);
+
+exports.JspHighlightRules = JspHighlightRules;
+});
+
+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_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ this.$rules = {
+ start : [{
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "xml-pe",
+ regex : "<\\!.*?>"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=script\\b)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=style\\b)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start", tagMap);
+ xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
+ xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(HtmlHighlightRules, TextHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+ace.define('ace/mode/java_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaHighlightRules = function() {
+ var keywords = (
+ "abstract|continue|for|new|switch|" +
+ "assert|default|goto|package|synchronized|" +
+ "boolean|do|if|private|this|" +
+ "break|double|implements|protected|throw|" +
+ "byte|else|import|public|throws|" +
+ "case|enum|instanceof|return|transient|" +
+ "catch|extends|int|short|try|" +
+ "char|final|interface|static|void|" +
+ "class|finally|long|strictfp|volatile|" +
+ "const|float|native|super|while"
+ );
+
+ var buildinConstants = ("null|Infinity|NaN|undefined");
+
+
+ var langClasses = (
+ "AbstractMethodError|AssertionError|ClassCircularityError|"+
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
+ "ExceptionInInitializerError|IllegalAccessError|"+
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
+ "InstantiationException|IndexOutOfBoundsException|"+
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
+ "ArrayStoreException|ClassCastException|LinkageError|"+
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
+ "Cloneable|Class|CharSequence|Comparable|String|Object"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": langClasses
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaHighlightRules, TextHighlightRules);
+
+exports.JavaHighlightRules = JavaHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-jsx.js b/contexts/data/lib/ace/mode-jsx.js
new file mode 100644
index 0000000..998f988
--- /dev/null
+++ b/contexts/data/lib/ace/mode-jsx.js
@@ -0,0 +1,635 @@
+ace.define('ace/mode/jsx', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jsx_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+function Mode() {
+ this.$tokenizer = new Tokenizer(new JsxHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+}
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/jsx_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ var oop = require("../lib/oop");
+ var lang = require("../lib/lang");
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var JsxHighlightRules = function() {
+ var keywords = lang.arrayToMap(
+ ("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|" +
+ "if|throw|" +
+ "delete|in|try|" +
+ "class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|" +
+ "number|int|string|boolean|variant|" +
+ "log|assert").split("|")
+ );
+
+ var buildinConstants = lang.arrayToMap(
+ ("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined").split("|")
+ );
+
+ var reserved = lang.arrayToMap(
+ ("debugger|with|" +
+ "const|export|" +
+ "let|private|public|yield|protected|" +
+ "extern|native|as|operator|__fake__|__readonly__").split("|")
+ );
+
+ var identifierRe = "[a-zA-Z_][a-zA-Z0-9_]*\\b";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : [
+ "storage.type",
+ "text",
+ "entity.name.function"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")"
+ }, {
+ token : function(value) {
+ if (value == "this")
+ return "variable.language";
+ else if (value == "function")
+ return "storage.type";
+ else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value))
+ return "keyword";
+ else if (buildinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value))
+ return "language.support.class";
+ else
+ return "identifier";
+ },
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : "!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({<]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}>]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ };
+
+ oop.inherits(JsxHighlightRules, TextHighlightRules);
+
+ exports.JsxHighlightRules = JsxHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-latex-noconflict.js b/contexts/data/lib/ace/mode-latex-noconflict.js
deleted file mode 100644
index be67344..0000000
--- a/contexts/data/lib/ace/mode-latex-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/latex_highlight_rules","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./latex_highlight_rules").LatexHighlightRules,h=a("../range").Range,i=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(i,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\%/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var i=new h(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);i.start.row=g,i.end.row=g,i.end.column=k[0].length,b.replace(i,k[1])}}else b.indentRows(c,d,"%")},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(i.prototype),b.Mode=i}),ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"keyword",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"string",regex:"\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"},{token:"comment",regex:"%.*$"}]}};d.inherits(f,e),b.LatexHighlightRules=f}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-latex-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-latex-uncompressed-noconflict.js
deleted file mode 100644
index b7a3155..0000000
--- a/contexts/data/lib/ace/mode-latex-uncompressed-noconflict.js
+++ /dev/null
@@ -1,105 +0,0 @@
-ace.define('ace/mode/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/latex_highlight_rules', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function()
-{
- this.$tokenizer = new Tokenizer(new LatexHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- // This code is adapted from ruby.js
- var outdent = true;
-
- // LaTeX comments begin with % and go to the end of the line
- var commentRegEx = /^(\s*)\%/;
-
- for (var i = startRow; i <= endRow; i++) {
- if (!commentRegEx.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i = startRow; i <= endRow; i++) {
- var line = doc.getLine(i);
- var m = line.match(commentRegEx);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "%");
- }
- };
-
- // There is no universally accepted way of indenting a tex document
- // so just maintain the indentation of the previous line
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-ace.define('ace/mode/latex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var LatexHighlightRules = function() {
- this.$rules = {
- "start" : [{
- // A tex command e.g. \foo
- token : "keyword",
- regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)",
- }, {
- // Curly and square braces
- token : "lparen",
- regex : "[[({]"
- }, {
- // Curly and square braces
- token : "rparen",
- regex : "[\\])}]"
- }, {
- // Inline math between two $ symbols
- token : "string",
- regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
- }, {
- // A comment. Tex comments start with % and go to
- // the end of the line
- token : "comment",
- regex : "%.*$"
- }]
- };
-};
-
-oop.inherits(LatexHighlightRules, TextHighlightRules);
-
-exports.LatexHighlightRules = LatexHighlightRules;
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-latex-uncompressed.js b/contexts/data/lib/ace/mode-latex-uncompressed.js
deleted file mode 100644
index 864f28d..0000000
--- a/contexts/data/lib/ace/mode-latex-uncompressed.js
+++ /dev/null
@@ -1,105 +0,0 @@
-define('ace/mode/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/latex_highlight_rules', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function()
-{
- this.$tokenizer = new Tokenizer(new LatexHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- // This code is adapted from ruby.js
- var outdent = true;
-
- // LaTeX comments begin with % and go to the end of the line
- var commentRegEx = /^(\s*)\%/;
-
- for (var i = startRow; i <= endRow; i++) {
- if (!commentRegEx.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i = startRow; i <= endRow; i++) {
- var line = doc.getLine(i);
- var m = line.match(commentRegEx);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "%");
- }
- };
-
- // There is no universally accepted way of indenting a tex document
- // so just maintain the indentation of the previous line
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-define('ace/mode/latex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var LatexHighlightRules = function() {
- this.$rules = {
- "start" : [{
- // A tex command e.g. \foo
- token : "keyword",
- regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)",
- }, {
- // Curly and square braces
- token : "lparen",
- regex : "[[({]"
- }, {
- // Curly and square braces
- token : "rparen",
- regex : "[\\])}]"
- }, {
- // Inline math between two $ symbols
- token : "string",
- regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
- }, {
- // A comment. Tex comments start with % and go to
- // the end of the line
- token : "comment",
- regex : "%.*$"
- }]
- };
-};
-
-oop.inherits(LatexHighlightRules, TextHighlightRules);
-
-exports.LatexHighlightRules = LatexHighlightRules;
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-latex.js b/contexts/data/lib/ace/mode-latex.js
index 3498213..eb18c0b 100644
--- a/contexts/data/lib/ace/mode-latex.js
+++ b/contexts/data/lib/ace/mode-latex.js
@@ -1 +1,217 @@
-define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/latex_highlight_rules","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./latex_highlight_rules").LatexHighlightRules,h=a("../range").Range,i=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(i,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\%/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var i=new h(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);i.start.row=g,i.end.row=g,i.end.column=k[0].length,b.replace(i,k[1])}}else b.indentRows(c,d,"%")},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(i.prototype),b.Mode=i}),define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"keyword",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"string",regex:"\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"},{token:"comment",regex:"%.*$"}]}};d.inherits(f,e),b.LatexHighlightRules=f}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+ace.define('ace/mode/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/latex_highlight_rules', 'ace/mode/folding/latex', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
+var LatexFoldMode = require("./folding/latex").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new LatexHighlightRules().getRules());
+ this.foldingRules = new LatexFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var commentRegEx = /^(\s*)\%/;
+
+ for (var i = startRow; i <= endRow; i++) {
+ if (!commentRegEx.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i = startRow; i <= endRow; i++) {
+ var line = doc.getLine(i);
+ var m = line.match(commentRegEx);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "%");
+ }
+ };
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+ace.define('ace/mode/latex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LatexHighlightRules = function() {
+ this.$rules = {
+ "start" : [{
+ token : "keyword",
+ regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "string",
+ regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
+ }, {
+ token : "comment",
+ regex : "%.*$"
+ }]
+ };
+};
+
+oop.inherits(LatexHighlightRules, TextHighlightRules);
+
+exports.LatexHighlightRules = LatexHighlightRules;
+
+});
+
+ace.define('ace/mode/folding/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /^\s*\\(begin)|(section|subsection)\b|{\s*$/;
+ this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.doc.getLine(row);
+ var match = this.foldingStartMarker.exec(line);
+ if (match) {
+ if (match[1])
+ return this.latexBlock(session, row, match[0].length - 1);
+ if (match[2])
+ return this.latexSection(session, row, match[0].length - 1);
+
+ return this.openingBracketBlock(session, "{", row, match.index);
+ }
+
+ var match = this.foldingStopMarker.exec(line);
+ if (match) {
+ if (match[1])
+ return this.latexBlock(session, row, match[0].length - 1);
+
+ return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
+ }
+ };
+
+ this.latexBlock = function(session, row, column) {
+ var keywords = {
+ "\\begin": 1,
+ "\\end": -1
+ };
+
+ var stream = new TokenIterator(session, row, column);
+ var token = stream.getCurrentToken();
+ if (!token || token.type !== "keyword")
+ return;
+
+ var val = token.value;
+ var dir = keywords[val];
+
+ var getType = function() {
+ var token = stream.stepForward();
+ var type = token.type == "lparen" ?stream.stepForward().value : "";
+ if (dir === -1) {
+ stream.stepBackward();
+ if (type)
+ stream.stepBackward();
+ }
+ return type;
+ };
+ var stack = [getType()];
+ var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
+ var startRow = row;
+
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
+ while(token = stream.step()) {
+ if (token.type !== "keyword")
+ continue;
+ var level = keywords[token.value];
+ if (!level)
+ continue;
+ var type = getType();
+ if (level === dir)
+ stack.unshift(type);
+ else if (stack.shift() !== type || !stack.length)
+ break;
+ }
+
+ if (stack.length)
+ return;
+
+ var row = stream.getCurrentTokenRow();
+ if (dir === -1)
+ return new Range(row, session.getLine(row).length, startRow, startColumn);
+ else
+ return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
+ };
+
+ this.latexSection = function(session, row, column) {
+ var keywords = ["\\subsection", "\\section", "\\begin", "\\end"];
+
+ var stream = new TokenIterator(session, row, column);
+ var token = stream.getCurrentToken();
+ if (!token || token.type != "keyword")
+ return;
+
+ var startLevel = keywords.indexOf(token.value);
+ var stackDepth = 0
+ var endRow = row;
+
+ while(token = stream.stepForward()) {
+ if (token.type !== "keyword")
+ continue;
+ var level = keywords.indexOf(token.value);
+
+ if (level >= 2) {
+ if (!stackDepth)
+ endRow = stream.getCurrentTokenRow() - 1;
+ stackDepth += level == 2 ? 1 : - 1;
+ if (stackDepth < 0)
+ break
+ } else if (level >= startLevel)
+ break;
+ }
+
+ if (!stackDepth)
+ endRow = stream.getCurrentTokenRow() - 1;
+
+ while (endRow > row && !/\S/.test(session.getLine(endRow)))
+ endRow--;
+
+ return new Range(
+ row, session.getLine(row).length,
+ endRow, session.getLine(endRow).length
+ );
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-less.js b/contexts/data/lib/ace/mode-less.js
new file mode 100644
index 0000000..7935aab
--- /dev/null
+++ b/contexts/data/lib/ace/mode-less.js
@@ -0,0 +1,394 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/less', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/less_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new LessHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/less_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LessHighlightRules = function() {
+
+ var properties = lang.arrayToMap( (function () {
+
+ var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
+
+ var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
+ "background-size|binding|border-bottom-colors|border-left-colors|" +
+ "border-right-colors|border-top-colors|border-end|border-end-color|" +
+ "border-end-style|border-end-width|border-image|border-start|" +
+ "border-start-color|border-start-style|border-start-width|box-align|" +
+ "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
+ "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
+ "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
+ "font-feature-settings|font-language-override|force-broken-image-icon|" +
+ "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
+ "outline-offset|outline-radius|outline-radius-bottomleft|" +
+ "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
+ "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
+ "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
+ "text-decoration-style|transform|transform-origin|transition|" +
+ "transition-delay|transition-duration|transition-property|" +
+ "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
+ "window-shadow|border-radius").split("|");
+
+ var properties = ("azimuth|background-attachment|background-color|background-image|" +
+ "background-position|background-repeat|background|border-bottom-color|" +
+ "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
+ "border-color|border-left-color|border-left-style|border-left-width|" +
+ "border-left|border-right-color|border-right-style|border-right-width|" +
+ "border-right|border-spacing|border-style|border-top-color|" +
+ "border-top-style|border-top-width|border-top|border-width|border|" +
+ "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
+ "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
+ "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
+ "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
+ "letter-spacing|line-height|list-style-image|list-style-position|" +
+ "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
+ "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
+ "min-width|opacity|orphans|outline-color|" +
+ "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
+ "padding-left|padding-right|padding-top|padding|page-break-after|" +
+ "page-break-before|page-break-inside|page|pause-after|pause-before|" +
+ "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
+ "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
+ "stress|table-layout|text-align|text-decoration|text-indent|" +
+ "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
+ "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
+ "z-index").split("|");
+ var ret = [];
+ for (var i=0, ln=browserPrefix.length; i<ln; i++) {
+ Array.prototype.push.apply(
+ ret,
+ (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
+ );
+ }
+ Array.prototype.push.apply(ret, prefixProperties);
+ Array.prototype.push.apply(ret, properties);
+
+ return ret;
+
+ })() );
+
+
+
+ var functions = lang.arrayToMap(
+ ("hsl|hsla|rgb|rgba|url|attr|counter|counters|lighten|darken|saturate|" +
+ "desaturate|fadein|fadeout|fade|spin|mix|hue|saturation|lightness|" +
+ "alpha|round|ceil|floor|percentage|color|iscolor|isnumber|isstring|" +
+ "iskeyword|isurl|ispixel|ispercentage|isem").split("|")
+ );
+
+ var constants = lang.arrayToMap(
+ ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
+ "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
+ "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
+ "decimal-leading-zero|decimal|default|disabled|disc|" +
+ "distribute-all-lines|distribute-letter|distribute-space|" +
+ "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
+ "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
+ "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
+ "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
+ "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
+ "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
+ "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
+ "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
+ "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
+ "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
+ "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
+ "solid|square|static|strict|super|sw-resize|table-footer-group|" +
+ "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
+ "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
+ "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
+ "zero").split("|")
+ );
+
+ var colors = lang.arrayToMap(
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
+ "purple|red|silver|teal|white|yellow").split("|")
+ );
+
+ var keywords = lang.arrayToMap(
+ ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|" +
+ "@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|" +
+ "def|end|declare|when|not|and").split("|")
+ );
+
+ var tags = lang.arrayToMap(
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
+ );
+
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric",
+ regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else
+ return "variable";
+ },
+ regex : "@[a-z0-9_\\-@]*\\b"
+ }, {
+ token : function(value) {
+ if (properties.hasOwnProperty(value.toLowerCase()))
+ return "support.type";
+ else if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (constants.hasOwnProperty(value))
+ return "constant.language";
+ else if (functions.hasOwnProperty(value))
+ return "support.function";
+ else if (colors.hasOwnProperty(value.toLowerCase()))
+ return "support.constant.color";
+ else if (tags.hasOwnProperty(value.toLowerCase()))
+ return "variable.language";
+ else
+ return "text";
+ },
+ regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
+ }, {
+ token: "variable.language",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ token : "keyword.operator",
+ regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+};
+
+oop.inherits(LessHighlightRules, TextHighlightRules);
+
+exports.LessHighlightRules = LessHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-liquid.js b/contexts/data/lib/ace/mode-liquid.js
new file mode 100644
index 0000000..060f6c4
--- /dev/null
+++ b/contexts/data/lib/ace/mode-liquid.js
@@ -0,0 +1,921 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/liquid', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/liquid_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new LiquidHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var outentedRows = [];
+ var re = /^(\s*)#/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "#");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/liquid_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LiquidHighlightRules = function() {
+ var functions = (
+ "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" +
+ "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" +
+ "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split"
+ );
+
+ var keywords = (
+ "capture|endcapture|case|endcase|when|comment|endcomment|" +
+ "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" +
+ "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow"
+ );
+
+ var builtinVariables = 'forloop|tablerowloop';
+
+ var definitions = ("assign");
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": builtinVariables,
+ "keyword": keywords,
+ "support.function": functions,
+ "keyword.definition": definitions
+ }, "identifier");
+
+ this.$rules = {
+ start : [{
+ token : "variable",
+ regex : "{%",
+ next : "liquid_start"
+ }, {
+ token : "variable",
+ regex : "{{",
+ next : "liquid_start"
+ }, {
+ token : "meta.tag",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=\\s*script\\b)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=\\s*style\\b)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ] ,
+
+ liquid_start : [{
+ token: "variable",
+ regex: "}}",
+ next: "start"
+ }, {
+ token: "variable",
+ regex: "%}",
+ next: "start"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\/|\\*|\\-|\\+|=|!=|\\?\\:"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[\({]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start");
+ xmlUtil.tag(this.$rules, "style", "css-start");
+ xmlUtil.tag(this.$rules, "script", "js-start");
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+oop.inherits(LiquidHighlightRules, TextHighlightRules);
+
+exports.LiquidHighlightRules = LiquidHighlightRules;
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
diff --git a/contexts/data/lib/ace/mode-lisp.js b/contexts/data/lib/ace/mode-lisp.js
new file mode 100644
index 0000000..e3f5bbc
--- /dev/null
+++ b/contexts/data/lib/ace/mode-lisp.js
@@ -0,0 +1,142 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/lisp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lisp_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules;
+
+var Mode = function() {
+ var highlighter = new LispHighlightRules();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+
+ace.define('ace/mode/lisp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LispHighlightRules = function() {
+ var keywordControl = "case|do|let|loop|if|else|when";
+ var keywordOperator = "eq|neq|and|or";
+ var constantLanguage = "null|nil";
+ var supportFunctions = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn";
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.control": keywordControl,
+ "keyword.operator": keywordOperator,
+ "constant.language": constantLanguage,
+ "support.function": supportFunctions
+ }, "identifier", true);
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token : "comment",
+ regex : ";.*$"
+ },
+ {
+ "token": ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"],
+ "regex": "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"
+ },
+ {
+ "token": ["punctuation.definition.constant.character.lisp", "constant.character.lisp"],
+ "regex": "(#)((?:\\w|[\\\\+-=<>'\"&#])+)"
+ },
+ {
+ "token": ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"],
+ "regex": "(\\*)(\\S*)(\\*)"
+ },
+ {
+ "token" : "constant.numeric", // hex
+ "regex" : "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ },
+ {
+ "token" : "constant.numeric", // float
+ "regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ },
+ {
+ "token" : keywordMapper,
+ "regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ "token" : "string",
+ "regex" : '"(?=.)',
+ "next" : "qqstring"
+ }
+ ],
+ "qqstring": [
+ {
+ "token": "constant.character.escape.lisp",
+ "regex": "\\\\."
+ },
+ {
+ "token" : "string",
+ "regex" : '[^"\\\\]+',
+ "merge" : true
+ }, {
+ "token" : "string",
+ "regex" : "\\\\$",
+ "next" : "qqstring",
+ "merge" : true
+ }, {
+ "token" : "string",
+ "regex" : '"|$',
+ "next" : "start",
+ "merge" : true
+ }
+ ]
+}
+
+};
+
+oop.inherits(LispHighlightRules, TextHighlightRules);
+
+exports.LispHighlightRules = LispHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-lua-noconflict.js b/contexts/data/lib/ace/mode-lua-noconflict.js
deleted file mode 100644
index b93e60f..0000000
--- a/contexts/data/lib/ace/mode-lua-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/lua_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./lua_highlight_rules").LuaHighlightRules,h=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=["function","then","do","repeat"];if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);if(h)d+=c;else for(var i in f){var j=f[i];if(j.type!="keyword")continue;var k=g.indexOf(j.value);if(k!=-1){d+=c;break}}}return d}}.call(h.prototype),b.Mode=h}),ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not".split("|")),b=e.arrayToMap("true|false|nil|_G|_VERSION".split("|")),c=e.arrayToMap("string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running".split("|")),d=e.arrayToMap("string|package|os|io|math|debug|table|coroutine".split("|")),f=e.arrayToMap("__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber".split("|")),g=e.arrayToMap("".split("|")),h=e.arrayToMap("setn|foreach|foreachi|gcinfo|log10|maxn".split("|")),i="",j="(?:(?:[1-9]\\d*)|(?:0))",k="(?:0[xX][\\dA-Fa-f]+)",l="(?:"+j+"|"+k+")",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:"+o+")",q=[];this.$rules={start:[{token:"comment",regex:i+"\\-\\-\\[\\[.*\\]\\]"},{token:"comment",regex:i+"\\-\\-\\[\\=\\[.*\\]\\=\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]"},{token:"comment",regex:i+"\\-\\-\\[\\[.*$",merge:!0,next:"qcomment"},{token:"comment",regex:i+"\\-\\-\\[\\=\\[.*$",merge:!0,next:"qcomment1"},{token:"comment",regex:i+"\\-\\-\\[\\={2}\\[.*$",merge:!0,next:"qcomment2"},{token:"comment",regex:i+"\\-\\-\\[\\={3}\\[.*$",merge:!0,next:"qcomment3"},{token:"comment",regex:i+"\\-\\-\\[\\={4}\\[.*$",merge:!0,next:"qcomment4"},{token:function(a){var b=/\-\-\[(\=+)\[/,c;return(c=b.exec(a))!=null&&(c=c[1])!=undefined&&q.push(c.length),"comment"},regex:i+"\\-\\-\\[\\={5}\\=*\\[.*$",merge:!0,next:"qcomment5"},{token:"comment",regex:"\\-\\-.*$"},{token:"string",regex:i+"\\[\\[.*\\]\\]"},{token:"string",regex:i+"\\[\\=\\[.*\\]\\=\\]"},{token:"string",regex:i+"\\[\\={2}\\[.*\\]\\={2}\\]"},{token:"string",regex:i+"\\[\\={3}\\[.*\\]\\={3}\\]"},{token:"string",regex:i+"\\[\\={4}\\[.*\\]\\={4}\\]"},{token:"string",regex:i+"\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]"},{token:"string",regex:i+"\\[\\[.*$",merge:!0,next:"qstring"},{token:"string",regex:i+"\\[\\=\\[.*$",merge:!0,next:"qstring1"},{token:"string",regex:i+"\\[\\={2}\\[.*$",merge:!0,next:"qstring2"},{token:"string",regex:i+"\\[\\={3}\\[.*$",merge:!0,next:"qstring3"},{token:"string",regex:i+"\\[\\={4}\\[.*$",merge:!0,next:"qstring4"},{token:function(a){var b=/\[(\=+)\[/,c;return(c=b.exec(a))!=null&&(c=c[1])!=undefined&&q.push(c.length),"string"},regex:i+"\\[\\={5}\\=*\\[.*$",merge:!0,next:"qstring5"},{token:"string",regex:i+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:i+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:l+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":g.hasOwnProperty(e)?"invalid.illegal":d.hasOwnProperty(e)?"constant.library":h.hasOwnProperty(e)?"invalid.deprecated":c.hasOwnProperty(e)?"support.function":f.hasOwnProperty(e)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qcomment:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment1:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\=\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment2:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment3:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment4:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment5:[{token:function(a){var b=/\](\=+)\]/,c=this.rules.qcomment5[0],d;c.next="start";if((d=b.exec(a))!=null&&(d=d[1])!=undefined){var e=d.length,f;(f=q.pop())!=e&&(q.push(f),c.next="qcomment5")}return"comment"},regex:"(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring1:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\=\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring2:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring3:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring4:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring5:[{token:function(a){var b=/\](\=+)\]/,c=this.rules.qstring5[0],d;c.next="start";if((d=b.exec(a))!=null&&(d=d[1])!=undefined){var e=d.length,f;(f=q.pop())!=e&&(q.push(f),c.next="qstring5")}return"string"},regex:"(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.LuaHighlightRules=g}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-lua-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-lua-uncompressed-noconflict.js
deleted file mode 100644
index 4b37404..0000000
--- a/contexts/data/lib/ace/mode-lua-uncompressed-noconflict.js
+++ /dev/null
@@ -1,533 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* Version: MPL 1.1/GPL 2.0/LGPL 2.1
-*
-* The contents of this file are subject to the Mozilla Public License Version
-* 1.1 (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-* http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS IS" basis,
-* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-* for the specific language governing rights and limitations under the
-* License.
-*
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* The Initial Developer of the Original Code is
-* Ajax.org B.V.
-* Portions created by the Initial Developer are Copyright (C) 2010
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-* Fabian Jakobs <fabian AT ajax DOT org>
-* Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
-* Lee Gao
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new LuaHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- var chunks = ["function", "then", "do", "repeat"];
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- } else {
- for (var i in tokens){
- var token = tokens[i];
- if (token.type != "keyword") continue;
- var chunk_i = chunks.indexOf(token.value);
- if (chunk_i != -1){
- indent += tab;
- break;
- }
- }
- }
- }
-
- return indent;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-
-/* ***** BEGIN LICENSE BLOCK *****
-* Version: MPL 1.1/GPL 2.0/LGPL 2.1
-*
-* The contents of this file are subject to the Mozilla Public License Version
-* 1.1 (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-* http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS IS" basis,
-* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-* for the specific language governing rights and limitations under the
-* License.
-*
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* The Initial Developer of the Original Code is
-* Ajax.org B.V.
-* Portions created by the Initial Developer are Copyright (C) 2010
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-* Fabian Jakobs <fabian AT ajax DOT org>
-* Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
-* Lee Gao
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/lua_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var LuaHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("break|do|else|elseif|end|for|function|if|in|local|repeat|"+
- "return|then|until|while|or|and|not").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("true|false|nil|_G|_VERSION").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("string|xpcall|package|tostring|print|os|unpack|require|"+
- "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
- "collectgarbage|getmetatable|module|rawset|math|debug|"+
- "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
- "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
- "load|error|loadfile|"+
-
- "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
- "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
- "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
- "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
- "lines|write|close|flush|open|output|type|read|stderr|"+
- "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
- "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
- "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
- "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
- "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
- "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
- "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
- "status|wrap|create|running").split("|")
- );
-
- var stdLibaries = lang.arrayToMap(
- ("string|package|os|io|math|debug|table|coroutine").split("|")
- );
-
- var metatableMethods = lang.arrayToMap(
- ("__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
- "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("").split("|")
- );
-
- var deprecatedIn5152 = lang.arrayToMap(
- ("setn|foreach|foreachi|gcinfo|log10|maxn").split("|")
- );
-
- var strPre = "";
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
-
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var floatNumber = "(?:" + pointFloat + ")";
-
- var comment_stack = [];
-
- this.$rules = {
- "start" :
-
-
- // bracketed comments
- [{
- token : "comment", // --[[ comment
- regex : strPre + '\\-\\-\\[\\[.*\\]\\]'
- }, {
- token : "comment", // --[=[ comment
- regex : strPre + '\\-\\-\\[\\=\\[.*\\]\\=\\]'
- }, {
- token : "comment", // --[==[ comment
- regex : strPre + '\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]'
- }, {
- token : "comment", // --[===[ comment
- regex : strPre + '\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]'
- }, {
- token : "comment", // --[====[ comment
- regex : strPre + '\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]'
- }, {
- token : "comment", // --[====+[ comment
- regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
- },
-
- // multiline bracketed comments
- {
- token : "comment", // --[[ comment
- regex : strPre + '\\-\\-\\[\\[.*$',
- merge : true,
- next : "qcomment"
- }, {
- token : "comment", // --[=[ comment
- regex : strPre + '\\-\\-\\[\\=\\[.*$',
- merge : true,
- next : "qcomment1"
- }, {
- token : "comment", // --[==[ comment
- regex : strPre + '\\-\\-\\[\\={2}\\[.*$',
- merge : true,
- next : "qcomment2"
- }, {
- token : "comment", // --[===[ comment
- regex : strPre + '\\-\\-\\[\\={3}\\[.*$',
- merge : true,
- next : "qcomment3"
- }, {
- token : "comment", // --[====[ comment
- regex : strPre + '\\-\\-\\[\\={4}\\[.*$',
- merge : true,
- next : "qcomment4"
- }, {
- token : function(value){ // --[====+[ comment
- // WARNING: EXTREMELY SLOW, but this is the only way to circumvent the
- // limits imposed by the current automaton.
- // I've never personally seen any practical code where 5 or more '='s are
- // used for string or commenting, so this will rarely be invoked.
- var pattern = /\-\-\[(\=+)\[/, match;
- // you can never be too paranoid ;)
- if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
- comment_stack.push(match.length);
-
- return "comment";
- },
- regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*$',
- merge : true,
- next : "qcomment5"
- },
-
- // single line comments
- {
- token : "comment",
- regex : "\\-\\-.*$"
- },
-
- // bracketed strings
- {
- token : "string", // [[ string
- regex : strPre + '\\[\\[.*\\]\\]'
- }, {
- token : "string", // [=[ string
- regex : strPre + '\\[\\=\\[.*\\]\\=\\]'
- }, {
- token : "string", // [==[ string
- regex : strPre + '\\[\\={2}\\[.*\\]\\={2}\\]'
- }, {
- token : "string", // [===[ string
- regex : strPre + '\\[\\={3}\\[.*\\]\\={3}\\]'
- }, {
- token : "string", // [====[ string
- regex : strPre + '\\[\\={4}\\[.*\\]\\={4}\\]'
- }, {
- token : "string", // [====+[ string
- regex : strPre + '\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
- },
-
- // multiline bracketed strings
- {
- token : "string", // [[ string
- regex : strPre + '\\[\\[.*$',
- merge : true,
- next : "qstring"
- }, {
- token : "string", // [=[ string
- regex : strPre + '\\[\\=\\[.*$',
- merge : true,
- next : "qstring1"
- }, {
- token : "string", // [==[ string
- regex : strPre + '\\[\\={2}\\[.*$',
- merge : true,
- next : "qstring2"
- }, {
- token : "string", // [===[ string
- regex : strPre + '\\[\\={3}\\[.*$',
- merge : true,
- next : "qstring3"
- }, {
- token : "string", // [====[ string
- regex : strPre + '\\[\\={4}\\[.*$',
- merge : true,
- next : "qstring4"
- }, {
- token : function(value){ // --[====+[ string
- // WARNING: EXTREMELY SLOW, see above.
- var pattern = /\[(\=+)\[/, match;
- if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
- comment_stack.push(match.length);
-
- return "string";
- },
- regex : strPre + '\\[\\={5}\\=*\\[.*$',
- merge : true,
- next : "qstring5"
- },
-
- {
- token : "string", // " string
- regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
- }, {
- token : "string", // ' string
- regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
- }, {
- token : "constant.numeric", // float
- regex : floatNumber
- }, {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (stdLibaries.hasOwnProperty(value))
- return "constant.library";
- else if (deprecatedIn5152.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (metatableMethods.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
- }, {
- token : "paren.lparen",
- regex : "[\\[\\(\\{]"
- }, {
- token : "paren.rparen",
- regex : "[\\]\\)\\}]"
- }, {
- token : "text",
- regex : "\\s+"
- } ],
-
- "qcomment": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment1": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment2": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment3": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment4": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment5": [ {
- token : function(value){
- // very hackish, mutates the qcomment5 field on the fly.
- var pattern = /\](\=+)\]/, rule = this.rules.qcomment5[0], match;
- rule.next = "start";
- if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
- var found = match.length, expected;
- if ((expected = comment_stack.pop()) != found){
- comment_stack.push(expected);
- rule.next = "qcomment5";
- }
- }
-
- return "comment";
- },
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
-
- "qstring": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring1": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring2": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring3": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring4": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring5": [ {
- token : function(value){
- // very hackish, mutates the qstring5 field on the fly.
- var pattern = /\](\=+)\]/, rule = this.rules.qstring5[0], match;
- rule.next = "start";
- if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
- var found = match.length, expected;
- if ((expected = comment_stack.pop()) != found){
- comment_stack.push(expected);
- rule.next = "qstring5";
- }
- }
-
- return "string";
- },
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ]
-
- };
-
-}
-
-oop.inherits(LuaHighlightRules, TextHighlightRules);
-
-exports.LuaHighlightRules = LuaHighlightRules;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-lua-uncompressed.js b/contexts/data/lib/ace/mode-lua-uncompressed.js
deleted file mode 100644
index 454108c..0000000
--- a/contexts/data/lib/ace/mode-lua-uncompressed.js
+++ /dev/null
@@ -1,533 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* Version: MPL 1.1/GPL 2.0/LGPL 2.1
-*
-* The contents of this file are subject to the Mozilla Public License Version
-* 1.1 (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-* http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS IS" basis,
-* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-* for the specific language governing rights and limitations under the
-* License.
-*
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* The Initial Developer of the Original Code is
-* Ajax.org B.V.
-* Portions created by the Initial Developer are Copyright (C) 2010
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-* Fabian Jakobs <fabian AT ajax DOT org>
-* Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
-* Lee Gao
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new LuaHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- var chunks = ["function", "then", "do", "repeat"];
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- } else {
- for (var i in tokens){
- var token = tokens[i];
- if (token.type != "keyword") continue;
- var chunk_i = chunks.indexOf(token.value);
- if (chunk_i != -1){
- indent += tab;
- break;
- }
- }
- }
- }
-
- return indent;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-
-/* ***** BEGIN LICENSE BLOCK *****
-* Version: MPL 1.1/GPL 2.0/LGPL 2.1
-*
-* The contents of this file are subject to the Mozilla Public License Version
-* 1.1 (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-* http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS IS" basis,
-* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-* for the specific language governing rights and limitations under the
-* License.
-*
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* The Initial Developer of the Original Code is
-* Ajax.org B.V.
-* Portions created by the Initial Developer are Copyright (C) 2010
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-* Fabian Jakobs <fabian AT ajax DOT org>
-* Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
-* Lee Gao
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/lua_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var LuaHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("break|do|else|elseif|end|for|function|if|in|local|repeat|"+
- "return|then|until|while|or|and|not").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("true|false|nil|_G|_VERSION").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("string|xpcall|package|tostring|print|os|unpack|require|"+
- "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
- "collectgarbage|getmetatable|module|rawset|math|debug|"+
- "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
- "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
- "load|error|loadfile|"+
-
- "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
- "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
- "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
- "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
- "lines|write|close|flush|open|output|type|read|stderr|"+
- "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
- "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
- "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
- "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
- "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
- "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
- "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
- "status|wrap|create|running").split("|")
- );
-
- var stdLibaries = lang.arrayToMap(
- ("string|package|os|io|math|debug|table|coroutine").split("|")
- );
-
- var metatableMethods = lang.arrayToMap(
- ("__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
- "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("").split("|")
- );
-
- var deprecatedIn5152 = lang.arrayToMap(
- ("setn|foreach|foreachi|gcinfo|log10|maxn").split("|")
- );
-
- var strPre = "";
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
-
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var floatNumber = "(?:" + pointFloat + ")";
-
- var comment_stack = [];
-
- this.$rules = {
- "start" :
-
-
- // bracketed comments
- [{
- token : "comment", // --[[ comment
- regex : strPre + '\\-\\-\\[\\[.*\\]\\]'
- }, {
- token : "comment", // --[=[ comment
- regex : strPre + '\\-\\-\\[\\=\\[.*\\]\\=\\]'
- }, {
- token : "comment", // --[==[ comment
- regex : strPre + '\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]'
- }, {
- token : "comment", // --[===[ comment
- regex : strPre + '\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]'
- }, {
- token : "comment", // --[====[ comment
- regex : strPre + '\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]'
- }, {
- token : "comment", // --[====+[ comment
- regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
- },
-
- // multiline bracketed comments
- {
- token : "comment", // --[[ comment
- regex : strPre + '\\-\\-\\[\\[.*$',
- merge : true,
- next : "qcomment"
- }, {
- token : "comment", // --[=[ comment
- regex : strPre + '\\-\\-\\[\\=\\[.*$',
- merge : true,
- next : "qcomment1"
- }, {
- token : "comment", // --[==[ comment
- regex : strPre + '\\-\\-\\[\\={2}\\[.*$',
- merge : true,
- next : "qcomment2"
- }, {
- token : "comment", // --[===[ comment
- regex : strPre + '\\-\\-\\[\\={3}\\[.*$',
- merge : true,
- next : "qcomment3"
- }, {
- token : "comment", // --[====[ comment
- regex : strPre + '\\-\\-\\[\\={4}\\[.*$',
- merge : true,
- next : "qcomment4"
- }, {
- token : function(value){ // --[====+[ comment
- // WARNING: EXTREMELY SLOW, but this is the only way to circumvent the
- // limits imposed by the current automaton.
- // I've never personally seen any practical code where 5 or more '='s are
- // used for string or commenting, so this will rarely be invoked.
- var pattern = /\-\-\[(\=+)\[/, match;
- // you can never be too paranoid ;)
- if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
- comment_stack.push(match.length);
-
- return "comment";
- },
- regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*$',
- merge : true,
- next : "qcomment5"
- },
-
- // single line comments
- {
- token : "comment",
- regex : "\\-\\-.*$"
- },
-
- // bracketed strings
- {
- token : "string", // [[ string
- regex : strPre + '\\[\\[.*\\]\\]'
- }, {
- token : "string", // [=[ string
- regex : strPre + '\\[\\=\\[.*\\]\\=\\]'
- }, {
- token : "string", // [==[ string
- regex : strPre + '\\[\\={2}\\[.*\\]\\={2}\\]'
- }, {
- token : "string", // [===[ string
- regex : strPre + '\\[\\={3}\\[.*\\]\\={3}\\]'
- }, {
- token : "string", // [====[ string
- regex : strPre + '\\[\\={4}\\[.*\\]\\={4}\\]'
- }, {
- token : "string", // [====+[ string
- regex : strPre + '\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
- },
-
- // multiline bracketed strings
- {
- token : "string", // [[ string
- regex : strPre + '\\[\\[.*$',
- merge : true,
- next : "qstring"
- }, {
- token : "string", // [=[ string
- regex : strPre + '\\[\\=\\[.*$',
- merge : true,
- next : "qstring1"
- }, {
- token : "string", // [==[ string
- regex : strPre + '\\[\\={2}\\[.*$',
- merge : true,
- next : "qstring2"
- }, {
- token : "string", // [===[ string
- regex : strPre + '\\[\\={3}\\[.*$',
- merge : true,
- next : "qstring3"
- }, {
- token : "string", // [====[ string
- regex : strPre + '\\[\\={4}\\[.*$',
- merge : true,
- next : "qstring4"
- }, {
- token : function(value){ // --[====+[ string
- // WARNING: EXTREMELY SLOW, see above.
- var pattern = /\[(\=+)\[/, match;
- if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
- comment_stack.push(match.length);
-
- return "string";
- },
- regex : strPre + '\\[\\={5}\\=*\\[.*$',
- merge : true,
- next : "qstring5"
- },
-
- {
- token : "string", // " string
- regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
- }, {
- token : "string", // ' string
- regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
- }, {
- token : "constant.numeric", // float
- regex : floatNumber
- }, {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (stdLibaries.hasOwnProperty(value))
- return "constant.library";
- else if (deprecatedIn5152.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (metatableMethods.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
- }, {
- token : "paren.lparen",
- regex : "[\\[\\(\\{]"
- }, {
- token : "paren.rparen",
- regex : "[\\]\\)\\}]"
- }, {
- token : "text",
- regex : "\\s+"
- } ],
-
- "qcomment": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment1": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment2": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment3": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment4": [ {
- token : "comment",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
- "qcomment5": [ {
- token : function(value){
- // very hackish, mutates the qcomment5 field on the fly.
- var pattern = /\](\=+)\]/, rule = this.rules.qcomment5[0], match;
- rule.next = "start";
- if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
- var found = match.length, expected;
- if ((expected = comment_stack.pop()) != found){
- comment_stack.push(expected);
- rule.next = "qcomment5";
- }
- }
-
- return "comment";
- },
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : '.+'
- } ],
-
- "qstring": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring1": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring2": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring3": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring4": [ {
- token : "string",
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring5": [ {
- token : function(value){
- // very hackish, mutates the qstring5 field on the fly.
- var pattern = /\](\=+)\]/, rule = this.rules.qstring5[0], match;
- rule.next = "start";
- if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
- var found = match.length, expected;
- if ((expected = comment_stack.pop()) != found){
- comment_stack.push(expected);
- rule.next = "qstring5";
- }
- }
-
- return "string";
- },
- regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ]
-
- };
-
-}
-
-oop.inherits(LuaHighlightRules, TextHighlightRules);
-
-exports.LuaHighlightRules = LuaHighlightRules;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-lua.js b/contexts/data/lib/ace/mode-lua.js
index 63b812c..1cc6a7a 100644
--- a/contexts/data/lib/ace/mode-lua.js
+++ b/contexts/data/lib/ace/mode-lua.js
@@ -1 +1,609 @@
-define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/lua_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./lua_highlight_rules").LuaHighlightRules,h=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=["function","then","do","repeat"];if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);if(h)d+=c;else for(var i in f){var j=f[i];if(j.type!="keyword")continue;var k=g.indexOf(j.value);if(k!=-1){d+=c;break}}}return d}}.call(h.prototype),b.Mode=h}),define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not".split("|")),b=e.arrayToMap("true|false|nil|_G|_VERSION".split("|")),c=e.arrayToMap("string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running".split("|")),d=e.arrayToMap("string|package|os|io|math|debug|table|coroutine".split("|")),f=e.arrayToMap("__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber".split("|")),g=e.arrayToMap("".split("|")),h=e.arrayToMap("setn|foreach|foreachi|gcinfo|log10|maxn".split("|")),i="",j="(?:(?:[1-9]\\d*)|(?:0))",k="(?:0[xX][\\dA-Fa-f]+)",l="(?:"+j+"|"+k+")",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:"+o+")",q=[];this.$rules={start:[{token:"comment",regex:i+"\\-\\-\\[\\[.*\\]\\]"},{token:"comment",regex:i+"\\-\\-\\[\\=\\[.*\\]\\=\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]"},{token:"comment",regex:i+"\\-\\-\\[\\[.*$",merge:!0,next:"qcomment"},{token:"comment",regex:i+"\\-\\-\\[\\=\\[.*$",merge:!0,next:"qcomment1"},{token:"comment",regex:i+"\\-\\-\\[\\={2}\\[.*$",merge:!0,next:"qcomment2"},{token:"comment",regex:i+"\\-\\-\\[\\={3}\\[.*$",merge:!0,next:"qcomment3"},{token:"comment",regex:i+"\\-\\-\\[\\={4}\\[.*$",merge:!0,next:"qcomment4"},{token:function(a){var b=/\-\-\[(\=+)\[/,c;return(c=b.exec(a))!=null&&(c=c[1])!=undefined&&q.push(c.length),"comment"},regex:i+"\\-\\-\\[\\={5}\\=*\\[.*$",merge:!0,next:"qcomment5"},{token:"comment",regex:"\\-\\-.*$"},{token:"string",regex:i+"\\[\\[.*\\]\\]"},{token:"string",regex:i+"\\[\\=\\[.*\\]\\=\\]"},{token:"string",regex:i+"\\[\\={2}\\[.*\\]\\={2}\\]"},{token:"string",regex:i+"\\[\\={3}\\[.*\\]\\={3}\\]"},{token:"string",regex:i+"\\[\\={4}\\[.*\\]\\={4}\\]"},{token:"string",regex:i+"\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]"},{token:"string",regex:i+"\\[\\[.*$",merge:!0,next:"qstring"},{token:"string",regex:i+"\\[\\=\\[.*$",merge:!0,next:"qstring1"},{token:"string",regex:i+"\\[\\={2}\\[.*$",merge:!0,next:"qstring2"},{token:"string",regex:i+"\\[\\={3}\\[.*$",merge:!0,next:"qstring3"},{token:"string",regex:i+"\\[\\={4}\\[.*$",merge:!0,next:"qstring4"},{token:function(a){var b=/\[(\=+)\[/,c;return(c=b.exec(a))!=null&&(c=c[1])!=undefined&&q.push(c.length),"string"},regex:i+"\\[\\={5}\\=*\\[.*$",merge:!0,next:"qstring5"},{token:"string",regex:i+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:i+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:l+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":g.hasOwnProperty(e)?"invalid.illegal":d.hasOwnProperty(e)?"constant.library":h.hasOwnProperty(e)?"invalid.deprecated":c.hasOwnProperty(e)?"support.function":f.hasOwnProperty(e)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qcomment:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment1:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\=\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment2:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment3:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment4:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment5:[{token:function(a){var b=/\](\=+)\]/,c=this.rules.qcomment5[0],d;c.next="start";if((d=b.exec(a))!=null&&(d=d[1])!=undefined){var e=d.length,f;(f=q.pop())!=e&&(q.push(f),c.next="qcomment5")}return"comment"},regex:"(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring1:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\=\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring2:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring3:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring4:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring5:[{token:function(a){var b=/\](\=+)\]/,c=this.rules.qstring5[0],d;c.next="start";if((d=b.exec(a))!=null&&(d=d[1])!=undefined){var e=d.length,f;(f=q.pop())!=e&&(q.push(f),c.next="qstring5")}return"string"},regex:"(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.LuaHighlightRules=g}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules', 'ace/mode/folding/lua', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+var LuaFoldMode = require("./folding/lua").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new LuaHighlightRules().getRules());
+ this.foldingRules = new LuaFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ var indentKeywords = {
+ "function": 1,
+ "then": 1,
+ "do": 1,
+ "else": 1,
+ "elseif": 1,
+ "repeat": 1,
+ "end": -1,
+ "until": -1
+ };
+ var outdentKeywords = [
+ "else",
+ "elseif",
+ "end",
+ "until"
+ ];
+
+ function getNetIndentLevel(tokens) {
+ var level = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type == "keyword") {
+ if (token.value in indentKeywords) {
+ level += indentKeywords[token.value];
+ }
+ } else if (token.type == "paren.lparen") {
+ level ++;
+ } else if (token.type == "paren.rparen") {
+ level --;
+ }
+ }
+ if (level < 0) {
+ return -1;
+ } else if (level > 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var level = 0;
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (state == "start") {
+ level = getNetIndentLevel(tokens);
+ }
+ if (level > 0) {
+ return indent + tab;
+ } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) {
+ if (!this.checkOutdent(state, line, "\n")) {
+ return indent.substr(0, indent.length - tab.length);
+ }
+ }
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input != "\n" && input != "\r" && input != "\r\n")
+ return false;
+
+ if (line.match(/^\s*[\)\}\]]$/))
+ return true;
+
+ var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens || !tokens.length)
+ return false;
+
+ return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine).length;
+ var prevTokens = this.$tokenizer.getLineTokens(prevLine, "start").tokens;
+ var tabLength = session.getTabString().length;
+ var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens);
+ var curIndent = this.$getIndent(session.getLine(row)).length;
+ if (curIndent < expectedIndent) {
+ return;
+ }
+ session.outdentRows(new Range(row, 0, row + 2, 0));
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/lua_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LuaHighlightRules = function() {
+
+ var keywords = (
+ "break|do|else|elseif|end|for|function|if|in|local|repeat|"+
+ "return|then|until|while|or|and|not"
+ );
+
+ var builtinConstants = ("true|false|nil|_G|_VERSION");
+
+ var functions = (
+ "string|xpcall|package|tostring|print|os|unpack|require|"+
+ "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
+ "collectgarbage|getmetatable|module|rawset|math|debug|"+
+ "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
+ "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
+ "load|error|loadfile|"+
+
+ "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
+ "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
+ "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
+ "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
+ "lines|write|close|flush|open|output|type|read|stderr|"+
+ "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
+ "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
+ "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
+ "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
+ "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
+ "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
+ "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
+ "status|wrap|create|running|"+
+ "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
+ "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"
+ );
+
+ var stdLibaries = ("string|package|os|io|math|debug|table|coroutine");
+
+ var futureReserved = "";
+
+ var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "support.function": functions,
+ "invalid.deprecated": deprecatedIn5152,
+ "constant.library": stdLibaries,
+ "constant.language": builtinConstants,
+ "invalid.illegal": futureReserved,
+ "variable.language": "this"
+ }, "identifier");
+
+ var strPre = "";
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
+
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var floatNumber = "(?:" + pointFloat + ")";
+
+ var comment_stack = [];
+
+ this.$rules = {
+ "start" :
+ [{
+ token : "comment", // --[[ comment
+ regex : strPre + '\\-\\-\\[\\[.*\\]\\]'
+ }, {
+ token : "comment", // --[=[ comment
+ regex : strPre + '\\-\\-\\[\\=\\[.*\\]\\=\\]'
+ }, {
+ token : "comment", // --[==[ comment
+ regex : strPre + '\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]'
+ }, {
+ token : "comment", // --[===[ comment
+ regex : strPre + '\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]'
+ }, {
+ token : "comment", // --[====[ comment
+ regex : strPre + '\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]'
+ }, {
+ token : "comment", // --[====+[ comment
+ regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
+ },
+ {
+ token : "comment", // --[[ comment
+ regex : strPre + '\\-\\-\\[\\[.*$',
+ next : "qcomment"
+ }, {
+ token : "comment", // --[=[ comment
+ regex : strPre + '\\-\\-\\[\\=\\[.*$',
+ next : "qcomment1"
+ }, {
+ token : "comment", // --[==[ comment
+ regex : strPre + '\\-\\-\\[\\={2}\\[.*$',
+ next : "qcomment2"
+ }, {
+ token : "comment", // --[===[ comment
+ regex : strPre + '\\-\\-\\[\\={3}\\[.*$',
+ next : "qcomment3"
+ }, {
+ token : "comment", // --[====[ comment
+ regex : strPre + '\\-\\-\\[\\={4}\\[.*$',
+ next : "qcomment4"
+ }, {
+ token : function(value){ // --[====+[ comment
+ var pattern = /\-\-\[(\=+)\[/, match;
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
+ comment_stack.push(match.length);
+
+ return "comment";
+ },
+ regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*$',
+ next : "qcomment5"
+ },
+ {
+ token : "comment",
+ regex : "\\-\\-.*$"
+ },
+ {
+ token : "string", // [[ string
+ regex : strPre + '\\[\\[.*\\]\\]'
+ }, {
+ token : "string", // [=[ string
+ regex : strPre + '\\[\\=\\[.*\\]\\=\\]'
+ }, {
+ token : "string", // [==[ string
+ regex : strPre + '\\[\\={2}\\[.*\\]\\={2}\\]'
+ }, {
+ token : "string", // [===[ string
+ regex : strPre + '\\[\\={3}\\[.*\\]\\={3}\\]'
+ }, {
+ token : "string", // [====[ string
+ regex : strPre + '\\[\\={4}\\[.*\\]\\={4}\\]'
+ }, {
+ token : "string", // [====+[ string
+ regex : strPre + '\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
+ },
+ {
+ token : "string", // [[ string
+ regex : strPre + '\\[\\[.*$',
+ next : "qstring"
+ }, {
+ token : "string", // [=[ string
+ regex : strPre + '\\[\\=\\[.*$',
+ next : "qstring1"
+ }, {
+ token : "string", // [==[ string
+ regex : strPre + '\\[\\={2}\\[.*$',
+ next : "qstring2"
+ }, {
+ token : "string", // [===[ string
+ regex : strPre + '\\[\\={3}\\[.*$',
+ next : "qstring3"
+ }, {
+ token : "string", // [====[ string
+ regex : strPre + '\\[\\={4}\\[.*$',
+ next : "qstring4"
+ }, {
+ token : function(value){ // --[====+[ string
+ var pattern = /\[(\=+)\[/, match;
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
+ comment_stack.push(match.length);
+
+ return "string";
+ },
+ regex : strPre + '\\[\\={5}\\=*\\[.*$',
+ next : "qstring5"
+ },
+
+ {
+ token : "string", // " string
+ regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ token : "string", // ' string
+ regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+
+ "qcomment": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment1": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment2": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment3": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment4": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment5": [ {
+ token : function(value){
+ var pattern = /\](\=+)\]/, rule = this.rules.qcomment5[0], match;
+ rule.next = "start";
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
+ var found = match.length, expected;
+ if ((expected = comment_stack.pop()) != found){
+ comment_stack.push(expected);
+ rule.next = "qcomment5";
+ }
+ }
+
+ return "comment";
+ },
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+
+ "qstring": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring1": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring2": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring3": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring4": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring5": [ {
+ token : function(value){
+ var pattern = /\](\=+)\]/, rule = this.rules.qstring5[0], match;
+ rule.next = "start";
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
+ var found = match.length, expected;
+ if ((expected = comment_stack.pop()) != found){
+ comment_stack.push(expected);
+ rule.next = "qstring5";
+ }
+ }
+
+ return "string";
+ },
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ]
+
+ };
+
+}
+
+oop.inherits(LuaHighlightRules, TextHighlightRules);
+
+exports.LuaHighlightRules = LuaHighlightRules;
+});
+
+ace.define('ace/mode/folding/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/;
+ this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var isStart = this.foldingStartMarker.test(line);
+ var isEnd = this.foldingStopMarker.test(line);
+
+ if (isStart && !isEnd) {
+ var match = line.match(this.foldingStartMarker);
+ if (match[1] == "then" && /\belseif\b/.test(line))
+ return;
+ if (match[1]) {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return "start";
+ } else if (match[2]) {
+ var type = session.bgTokenizer.getState(row) || "";
+ if (type.indexOf("comment") != -1 || type.indexOf("string") != -1)
+ return "start";
+ } else {
+ return "start";
+ }
+ }
+ if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd)
+ return "";
+
+ var match = line.match(this.foldingStopMarker);
+ if (match[0] === "end") {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return "end";
+ } else if (match[0][0] === "]") {
+ var type = session.bgTokenizer.getState(row - 1) || "";
+ if (type.indexOf("comment") != -1 || type.indexOf("string") != -1)
+ return "end";
+ } else
+ return "end";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.doc.getLine(row);
+ var match = this.foldingStartMarker.exec(line);
+ if (match) {
+ if (match[1])
+ return this.luaBlock(session, row, match.index + 1);
+
+ if (match[2])
+ return session.getCommentFoldRange(row, match.index + 1);
+
+ return this.openingBracketBlock(session, "{", row, match.index);
+ }
+
+ var match = this.foldingStopMarker.exec(line);
+ if (match) {
+ if (match[0] === "end") {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return this.luaBlock(session, row, match.index + 1);
+ }
+
+ if (match[0][0] === "]")
+ return session.getCommentFoldRange(row, match.index + 1);
+
+ return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
+ }
+ };
+
+ this.luaBlock = function(session, row, column) {
+ var stream = new TokenIterator(session, row, column);
+ var indentKeywords = {
+ "function": 1,
+ "do": 1,
+ "then": 1,
+ "elseif": -1,
+ "end": -1,
+ "repeat": 1,
+ "until": -1,
+ };
+
+ var token = stream.getCurrentToken();
+ if (!token || token.type != "keyword")
+ return;
+
+ var val = token.value;
+ var stack = [val];
+ var dir = indentKeywords[val];
+
+ if (!dir)
+ return;
+
+ var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
+ var startRow = row;
+
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
+ while(token = stream.step()) {
+ if (token.type !== "keyword")
+ continue;
+ var level = dir * indentKeywords[token.value];
+
+ if (level > 0) {
+ stack.unshift(token.value);
+ } else if (level <= 0) {
+ stack.shift();
+ if (!stack.length && token.value != "elseif")
+ break;
+ if (level === 0)
+ stack.unshift(token.value);
+ }
+ }
+
+ var row = stream.getCurrentTokenRow();
+ if (dir === -1)
+ return new Range(row, session.getLine(row).length, startRow, startColumn);
+ else
+ return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-luapage.js b/contexts/data/lib/ace/mode-luapage.js
new file mode 100644
index 0000000..a6411fd
--- /dev/null
+++ b/contexts/data/lib/ace/mode-luapage.js
@@ -0,0 +1,2463 @@
+ace.define('ace/mode/luapage', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/mode/lua', 'ace/tokenizer', 'ace/mode/luapage_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var LuaMode = require("./lua").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules;
+
+var Mode = function() {
+ var highlighter = new LuaPageHighlightRules();
+
+ this.$tokenizer = new Tokenizer(new LuaPageHighlightRules().getRules());
+ this.$embeds = highlighter.getEmbeds();
+ this.createModeDelegates({
+ "lua-": LuaMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+
+var Mode = function() {
+ var highlighter = new HtmlHighlightRules();
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$behaviour = new HtmlBehaviour();
+
+ this.$embeds = highlighter.getEmbeds();
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ return 0;
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("csslint", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ this.$rules = {
+ start : [{
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "xml-pe",
+ regex : "<\\!.*?>"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=script\\b)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=style\\b)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start", tagMap);
+ xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
+ xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(HtmlHighlightRules, TextHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var HtmlBehaviour = function () {
+
+ this.inherit(XmlBehaviour); // Get xml behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var element = token.value;
+ if (atCursor){
+ var element = element.substring(0, position.column - token.start);
+ }
+ if (voidElements.indexOf(element) !== -1){
+ return;
+ }
+ return {
+ text: '>' + '</' + element + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+}
+oop.inherits(HtmlBehaviour, XmlBehaviour);
+
+exports.HtmlBehaviour = HtmlBehaviour;
+});
+
+ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var XmlBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var tag = token.value;
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
+ if (rightChars == '</') {
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
+
+ return {
+ text: '\n' + indent + '\n' + next_indent,
+ selection: [1, indent.length, 1, indent.length]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {
+ MixedFoldMode.call(this, new XmlFoldMode({
+ "area": 1,
+ "base": 1,
+ "br": 1,
+ "col": 1,
+ "command": 1,
+ "embed": 1,
+ "hr": 1,
+ "img": 1,
+ "input": 1,
+ "keygen": 1,
+ "link": 1,
+ "meta": 1,
+ "param": 1,
+ "source": 1,
+ "track": 1,
+ "wbr": 1,
+ "li": 1,
+ "dt": 1,
+ "dd": 1,
+ "p": 1,
+ "rt": 1,
+ "rp": 1,
+ "optgroup": 1,
+ "option": 1,
+ "colgroup": 1,
+ "td": 1,
+ "th": 1
+ }), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (tag.closing)
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ return "";
+
+ if (tag.selfClosing)
+ return "";
+
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ return "";
+
+ return "start";
+ };
+
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var value = "";
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type.indexOf("meta.tag") === 0)
+ value += token.value;
+ else
+ value += lang.stringRepeat(" ", token.value.length);
+ }
+
+ return this._parseTag(value);
+ };
+
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
+ this._parseTag = function(tag) {
+
+ var match = this.tagRe.exec(tag);
+ var column = this.tagRe.lastIndex || 0;
+ this.tagRe.lastIndex = 0;
+
+ return {
+ value: tag,
+ match: match ? match[2] : "",
+ closing: match ? !!match[3] : false,
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
+ tagName: match ? match[4] : "",
+ column: match[1] ? column + match[1].length : column
+ };
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var start;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!start) {
+ var start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ }
+ value += token.value;
+ if (value.indexOf(">") !== -1) {
+ var tag = this._parseTag(value);
+ tag.start = start;
+ tag.end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ iterator.stepForward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var end;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!end) {
+ end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ }
+ value = token.value + value;
+ if (value.indexOf("<") !== -1) {
+ var tag = this._parseTag(value);
+ tag.end = end;
+ tag.start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ iterator.stepBackward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.voidElements[tag.tagName]) {
+ return;
+ }
+ else if (this.voidElements[top.tagName]) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag.match)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.column);
+ var start = {
+ row: row,
+ column: firstTag.column + firstTag.tagName.length + 2
+ };
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var end = {
+ row: row,
+ column: firstTag.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules', 'ace/mode/folding/lua', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+var LuaFoldMode = require("./folding/lua").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new LuaHighlightRules().getRules());
+ this.foldingRules = new LuaFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ var indentKeywords = {
+ "function": 1,
+ "then": 1,
+ "do": 1,
+ "else": 1,
+ "elseif": 1,
+ "repeat": 1,
+ "end": -1,
+ "until": -1
+ };
+ var outdentKeywords = [
+ "else",
+ "elseif",
+ "end",
+ "until"
+ ];
+
+ function getNetIndentLevel(tokens) {
+ var level = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type == "keyword") {
+ if (token.value in indentKeywords) {
+ level += indentKeywords[token.value];
+ }
+ } else if (token.type == "paren.lparen") {
+ level ++;
+ } else if (token.type == "paren.rparen") {
+ level --;
+ }
+ }
+ if (level < 0) {
+ return -1;
+ } else if (level > 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var level = 0;
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (state == "start") {
+ level = getNetIndentLevel(tokens);
+ }
+ if (level > 0) {
+ return indent + tab;
+ } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) {
+ if (!this.checkOutdent(state, line, "\n")) {
+ return indent.substr(0, indent.length - tab.length);
+ }
+ }
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input != "\n" && input != "\r" && input != "\r\n")
+ return false;
+
+ if (line.match(/^\s*[\)\}\]]$/))
+ return true;
+
+ var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens || !tokens.length)
+ return false;
+
+ return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine).length;
+ var prevTokens = this.$tokenizer.getLineTokens(prevLine, "start").tokens;
+ var tabLength = session.getTabString().length;
+ var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens);
+ var curIndent = this.$getIndent(session.getLine(row)).length;
+ if (curIndent < expectedIndent) {
+ return;
+ }
+ session.outdentRows(new Range(row, 0, row + 2, 0));
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/lua_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LuaHighlightRules = function() {
+
+ var keywords = (
+ "break|do|else|elseif|end|for|function|if|in|local|repeat|"+
+ "return|then|until|while|or|and|not"
+ );
+
+ var builtinConstants = ("true|false|nil|_G|_VERSION");
+
+ var functions = (
+ "string|xpcall|package|tostring|print|os|unpack|require|"+
+ "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
+ "collectgarbage|getmetatable|module|rawset|math|debug|"+
+ "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
+ "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
+ "load|error|loadfile|"+
+
+ "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
+ "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
+ "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
+ "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
+ "lines|write|close|flush|open|output|type|read|stderr|"+
+ "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
+ "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
+ "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
+ "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
+ "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
+ "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
+ "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
+ "status|wrap|create|running|"+
+ "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
+ "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"
+ );
+
+ var stdLibaries = ("string|package|os|io|math|debug|table|coroutine");
+
+ var futureReserved = "";
+
+ var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "support.function": functions,
+ "invalid.deprecated": deprecatedIn5152,
+ "constant.library": stdLibaries,
+ "constant.language": builtinConstants,
+ "invalid.illegal": futureReserved,
+ "variable.language": "this"
+ }, "identifier");
+
+ var strPre = "";
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
+
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var floatNumber = "(?:" + pointFloat + ")";
+
+ var comment_stack = [];
+
+ this.$rules = {
+ "start" :
+ [{
+ token : "comment", // --[[ comment
+ regex : strPre + '\\-\\-\\[\\[.*\\]\\]'
+ }, {
+ token : "comment", // --[=[ comment
+ regex : strPre + '\\-\\-\\[\\=\\[.*\\]\\=\\]'
+ }, {
+ token : "comment", // --[==[ comment
+ regex : strPre + '\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]'
+ }, {
+ token : "comment", // --[===[ comment
+ regex : strPre + '\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]'
+ }, {
+ token : "comment", // --[====[ comment
+ regex : strPre + '\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]'
+ }, {
+ token : "comment", // --[====+[ comment
+ regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
+ },
+ {
+ token : "comment", // --[[ comment
+ regex : strPre + '\\-\\-\\[\\[.*$',
+ next : "qcomment"
+ }, {
+ token : "comment", // --[=[ comment
+ regex : strPre + '\\-\\-\\[\\=\\[.*$',
+ next : "qcomment1"
+ }, {
+ token : "comment", // --[==[ comment
+ regex : strPre + '\\-\\-\\[\\={2}\\[.*$',
+ next : "qcomment2"
+ }, {
+ token : "comment", // --[===[ comment
+ regex : strPre + '\\-\\-\\[\\={3}\\[.*$',
+ next : "qcomment3"
+ }, {
+ token : "comment", // --[====[ comment
+ regex : strPre + '\\-\\-\\[\\={4}\\[.*$',
+ next : "qcomment4"
+ }, {
+ token : function(value){ // --[====+[ comment
+ var pattern = /\-\-\[(\=+)\[/, match;
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
+ comment_stack.push(match.length);
+
+ return "comment";
+ },
+ regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*$',
+ next : "qcomment5"
+ },
+ {
+ token : "comment",
+ regex : "\\-\\-.*$"
+ },
+ {
+ token : "string", // [[ string
+ regex : strPre + '\\[\\[.*\\]\\]'
+ }, {
+ token : "string", // [=[ string
+ regex : strPre + '\\[\\=\\[.*\\]\\=\\]'
+ }, {
+ token : "string", // [==[ string
+ regex : strPre + '\\[\\={2}\\[.*\\]\\={2}\\]'
+ }, {
+ token : "string", // [===[ string
+ regex : strPre + '\\[\\={3}\\[.*\\]\\={3}\\]'
+ }, {
+ token : "string", // [====[ string
+ regex : strPre + '\\[\\={4}\\[.*\\]\\={4}\\]'
+ }, {
+ token : "string", // [====+[ string
+ regex : strPre + '\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
+ },
+ {
+ token : "string", // [[ string
+ regex : strPre + '\\[\\[.*$',
+ next : "qstring"
+ }, {
+ token : "string", // [=[ string
+ regex : strPre + '\\[\\=\\[.*$',
+ next : "qstring1"
+ }, {
+ token : "string", // [==[ string
+ regex : strPre + '\\[\\={2}\\[.*$',
+ next : "qstring2"
+ }, {
+ token : "string", // [===[ string
+ regex : strPre + '\\[\\={3}\\[.*$',
+ next : "qstring3"
+ }, {
+ token : "string", // [====[ string
+ regex : strPre + '\\[\\={4}\\[.*$',
+ next : "qstring4"
+ }, {
+ token : function(value){ // --[====+[ string
+ var pattern = /\[(\=+)\[/, match;
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
+ comment_stack.push(match.length);
+
+ return "string";
+ },
+ regex : strPre + '\\[\\={5}\\=*\\[.*$',
+ next : "qstring5"
+ },
+
+ {
+ token : "string", // " string
+ regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ token : "string", // ' string
+ regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+
+ "qcomment": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment1": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment2": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment3": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment4": [ {
+ token : "comment",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+ "qcomment5": [ {
+ token : function(value){
+ var pattern = /\](\=+)\]/, rule = this.rules.qcomment5[0], match;
+ rule.next = "start";
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
+ var found = match.length, expected;
+ if ((expected = comment_stack.pop()) != found){
+ comment_stack.push(expected);
+ rule.next = "qcomment5";
+ }
+ }
+
+ return "comment";
+ },
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : '.+'
+ } ],
+
+ "qstring": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring1": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring2": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring3": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring4": [ {
+ token : "string",
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring5": [ {
+ token : function(value){
+ var pattern = /\](\=+)\]/, rule = this.rules.qstring5[0], match;
+ rule.next = "start";
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
+ var found = match.length, expected;
+ if ((expected = comment_stack.pop()) != found){
+ comment_stack.push(expected);
+ rule.next = "qstring5";
+ }
+ }
+
+ return "string";
+ },
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ]
+
+ };
+
+}
+
+oop.inherits(LuaHighlightRules, TextHighlightRules);
+
+exports.LuaHighlightRules = LuaHighlightRules;
+});
+
+ace.define('ace/mode/folding/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/;
+ this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var isStart = this.foldingStartMarker.test(line);
+ var isEnd = this.foldingStopMarker.test(line);
+
+ if (isStart && !isEnd) {
+ var match = line.match(this.foldingStartMarker);
+ if (match[1] == "then" && /\belseif\b/.test(line))
+ return;
+ if (match[1]) {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return "start";
+ } else if (match[2]) {
+ var type = session.bgTokenizer.getState(row) || "";
+ if (type.indexOf("comment") != -1 || type.indexOf("string") != -1)
+ return "start";
+ } else {
+ return "start";
+ }
+ }
+ if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd)
+ return "";
+
+ var match = line.match(this.foldingStopMarker);
+ if (match[0] === "end") {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return "end";
+ } else if (match[0][0] === "]") {
+ var type = session.bgTokenizer.getState(row - 1) || "";
+ if (type.indexOf("comment") != -1 || type.indexOf("string") != -1)
+ return "end";
+ } else
+ return "end";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.doc.getLine(row);
+ var match = this.foldingStartMarker.exec(line);
+ if (match) {
+ if (match[1])
+ return this.luaBlock(session, row, match.index + 1);
+
+ if (match[2])
+ return session.getCommentFoldRange(row, match.index + 1);
+
+ return this.openingBracketBlock(session, "{", row, match.index);
+ }
+
+ var match = this.foldingStopMarker.exec(line);
+ if (match) {
+ if (match[0] === "end") {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return this.luaBlock(session, row, match.index + 1);
+ }
+
+ if (match[0][0] === "]")
+ return session.getCommentFoldRange(row, match.index + 1);
+
+ return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
+ }
+ };
+
+ this.luaBlock = function(session, row, column) {
+ var stream = new TokenIterator(session, row, column);
+ var indentKeywords = {
+ "function": 1,
+ "do": 1,
+ "then": 1,
+ "elseif": -1,
+ "end": -1,
+ "repeat": 1,
+ "until": -1,
+ };
+
+ var token = stream.getCurrentToken();
+ if (!token || token.type != "keyword")
+ return;
+
+ var val = token.value;
+ var stack = [val];
+ var dir = indentKeywords[val];
+
+ if (!dir)
+ return;
+
+ var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
+ var startRow = row;
+
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
+ while(token = stream.step()) {
+ if (token.type !== "keyword")
+ continue;
+ var level = dir * indentKeywords[token.value];
+
+ if (level > 0) {
+ stack.unshift(token.value);
+ } else if (level <= 0) {
+ stack.shift();
+ if (!stack.length && token.value != "elseif")
+ break;
+ if (level === 0)
+ stack.unshift(token.value);
+ }
+ }
+
+ var row = stream.getCurrentTokenRow();
+ if (dir === -1)
+ return new Range(row, session.getLine(row).length, startRow, startColumn);
+ else
+ return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
+ };
+
+}).call(FoldMode.prototype);
+
+});
+ace.define('ace/mode/luapage_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/lua_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+
+var LuaPageHighlightRules = function() {
+ this.$rules = new HtmlHighlightRules().getRules();
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token: "keyword",
+ regex: "<\\%\\=?",
+ next: "lua-start"
+ }, {
+ token: "keyword",
+ regex: "<\\?lua\\=?",
+ next: "lua-start"
+ });
+ }
+ this.embedRules(LuaHighlightRules, "lua-", [
+ {
+ token: "keyword",
+ regex: "\\%>",
+ next: "start"
+ },
+ {
+ token: "keyword",
+ regex: "\\?>",
+ next: "start"
+ }
+ ]);
+};
+
+oop.inherits(LuaPageHighlightRules, HtmlHighlightRules);
+
+exports.LuaPageHighlightRules = LuaPageHighlightRules;
+
+}); \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-lucene.js b/contexts/data/lib/ace/mode-lucene.js
new file mode 100644
index 0000000..5fa60cf
--- /dev/null
+++ b/contexts/data/lib/ace/mode-lucene.js
@@ -0,0 +1,64 @@
+ace.define('ace/mode/lucene', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lucene_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new LuceneHighlightRules().getRules());
+};
+
+oop.inherits(Mode, TextMode);
+
+exports.Mode = Mode;
+});ace.define('ace/mode/lucene_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LuceneHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "constant.character.negation",
+ regex : "[\\-]"
+ }, {
+ token : "constant.character.interro",
+ regex : "[\\?]"
+ }, {
+ token : "constant.character.asterisk",
+ regex : "[\\*]"
+ }, {
+ token: 'constant.character.proximity',
+ regex: '~[0-9]+\\b'
+ }, {
+ token : 'keyword.operator',
+ regex: '(?:AND|OR|NOT)\\b'
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "keyword",
+ regex : "[\\S]+:"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ]
+ };
+};
+
+oop.inherits(LuceneHighlightRules, TextHighlightRules);
+
+exports.LuceneHighlightRules = LuceneHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-makefile.js b/contexts/data/lib/ace/mode-makefile.js
new file mode 100644
index 0000000..6a6073c
--- /dev/null
+++ b/contexts/data/lib/ace/mode-makefile.js
@@ -0,0 +1,314 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/makefile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/makefile_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ var highlighter = new MakefileHighlightRules();
+ this.foldingRules = new FoldMode();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});ace.define('ace/mode/makefile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/sh_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ShHighlightFile = require("./sh_highlight_rules");
+
+var MakefileHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": ShHighlightFile.reservedKeywords,
+ "support.function.builtin": ShHighlightFile.languageConstructs,
+ "invalid.deprecated": "debugger"
+ }, "string");
+
+ this.$rules =
+ {
+ "start": [
+ {
+ "token": "string.interpolated.backtick.makefile",
+ "regex": "`",
+ "next": "shell-start"
+ },
+ {
+ "token": "punctuation.definition.comment.makefile",
+ "regex": /#(?=.)/,
+ "next": "comment"
+ },
+ {
+ "token": [ "keyword.control.makefile"],
+ "regex": "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"
+ },
+ {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.*
+ "token": ["entity.name.function.makefile", "text"],
+ "regex": "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"
+ }
+ ],
+ "comment": [
+ {
+ "token" : "punctuation.definition.comment.makefile",
+ "regex" : /.+\\/
+ },
+ {
+ "token" : "punctuation.definition.comment.makefile",
+ "regex" : ".+",
+ "next" : "start"
+ }
+ ],
+ "shell-start": [
+ {
+ "token": keywordMapper,
+ "regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ "token": "string",
+ "regex" : "\\w+"
+ },
+ {
+ "token" : "string.interpolated.backtick.makefile",
+ "regex" : "`",
+ "next" : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(MakefileHighlightRules, TextHighlightRules);
+
+exports.MakefileHighlightRules = MakefileHighlightRules;
+});
+
+ace.define('ace/mode/sh_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var reservedKeywords = exports.reservedKeywords = (
+ '!|{|}|case|do|done|elif|else|'+
+ 'esac|fi|for|if|in|then|until|while|'+
+ '&|;|export|local|read|typeset|unset|'+
+ 'elif|select|set'
+ );
+
+var languageConstructs = exports.languageConstructs = (
+ '[|]|alias|bg|bind|break|builtin|'+
+ 'cd|command|compgen|complete|continue|'+
+ 'dirs|disown|echo|enable|eval|exec|'+
+ 'exit|fc|fg|getopts|hash|help|history|'+
+ 'jobs|kill|let|logout|popd|printf|pushd|'+
+ 'pwd|return|set|shift|shopt|source|'+
+ 'suspend|test|times|trap|type|ulimit|'+
+ 'umask|unalias|wait'
+);
+
+var ShHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": reservedKeywords,
+ "support.function.builtin": languageConstructs,
+ "invalid.deprecated": "debugger"
+ }, "identifier");
+
+ var integer = "(?:(?:[1-9]\\d*)|(?:0))";
+
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+ var fileDescriptor = "(?:&" + intPart + ")";
+
+ var variableName = "[a-zA-Z][a-zA-Z0-9_]*";
+ var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))";
+
+ var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
+
+ var func = "(?:" + variableName + "\\s*\\(\\))";
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string", // " string
+ regex : '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ token : "variable.language",
+ regex : builtinVariable
+ }, {
+ token : "variable",
+ regex : variable
+ }, {
+ token : "support.function",
+ regex : func
+ }, {
+ token : "support.function",
+ regex : fileDescriptor
+ }, {
+ token : "string", // ' string
+ regex : "'(?:[^\\\\]|\\\\.)*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(ShHighlightRules, TextHighlightRules);
+
+exports.ShHighlightRules = ShHighlightRules;
+});
+
+ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-markdown-noconflict.js b/contexts/data/lib/ace/mode-markdown-noconflict.js
deleted file mode 100644
index c697f75..0000000
--- a/contexts/data/lib/ace/mode-markdown-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/tokenizer","ace/mode/markdown_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("./javascript").Mode,g=a("./xml").Mode,h=a("./html").Mode,i=a("../tokenizer").Tokenizer,j=a("./markdown_highlight_rules").MarkdownHighlightRules,k=function(){var a=new j;this.$tokenizer=new i(a.getRules()),this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"xml-":g,"html-":h})};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){if(a=="listblock"){var d=/^((?:.+)?)([-+*][ ]+)/.exec(b);return d?(new Array(d[1].length+1)).join(" ")+d[2]:""}return this.$getIndent(b)}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),ace.define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./html_highlight_rules").HtmlHighlightRules,j=a("./behaviour/xml").XmlBehaviour,k=a("./folding/html").FoldMode,l=function(){var a=new i;this.$tokenizer=new h(a.getRules()),this.$behaviour=new j,this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g}),this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){return 0},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1}}.call(l.prototype),b.Mode=l}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./xml_util"),h=a("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=s*script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=s*style\\b)",next:"css"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},g.tag(this.$rules,"tag","start"),g.tag(this.$rules,"css","css-start"),g.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,h),b.HtmlHighlightRules=i}),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(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./mixed").FoldMode,f=a("./xml").FoldMode,g=a("./cstyle").FoldMode,h=b.FoldMode=function(){e.call(this,new f({area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,li:1,dt:1,dd:1,p:1,rt:1,rp:1,optgroup:1,option:1,colgroup:1,td:1,th:1}),{"js-":new g,"css-":new g})};d.inherits(h,e)}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a,b){this.defaultMode=a,this.subModes=b};d.inherits(f,e),function(){this.$getMode=function(a){for(var b in this.subModes)if(a.indexOf(b)===0)return this.subModes[b];return null},this.$tryMode=function(a,b,c,d){var e=this.$getMode(a);return e?e.getFoldWidget(b,c,d):""},this.getFoldWidget=function(a,b,c){return this.$tryMode(a.getState(c-1),a,b,c)||this.$tryMode(a.getState(c),a,b,c)||this.defaultMode.getFoldWidget(a,b,c)},this.getFoldWidgetRange=function(a,b,c){var d=this.$getMode(a.getState(c-1));if(!d||!d.getFoldWidget(a,b,c))d=this.$getMode(a.getState(c));if(!d||!d.getFoldWidget(a,b,c))d=this.defaultMode;return d.getFoldWidgetRange(a,b,c)}}.call(f.prototype)}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"],function(a,b,c){function j(a,b){return{token:"support.function",regex:"^```"+a+"\\s*$",next:b+"start"}}"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./html_highlight_rules").HtmlHighlightRules,i=a("./css_highlight_rules").CssHighlightRules,k=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{token:"support.function",regex:"(`+)([^\\r]*?[^`])(\\1)"},{token:"support.function",regex:"^[ ]{4}.+"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.1",regex:"^\\-+(?=\\s*$)"},{token:function(a){return"markup.heading."+a.length},regex:"^#{1,6}"},j("javascript","js-"),j("xml","xml-"),j("html","html-"),j("css","css-"),{token:"support.function",regex:"^```[a-zA-Z]+\\s*$",next:"githubblock"},{token:"string",regex:"^>[ ].+$",next:"blockquote"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?\\s*)$'},{token:["text","string","text","constant","text"],regex:"(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:'(\\[)(\\[[^\\]]*\\]|[^\\[\\]]*)(\\]\\([ \\t]*)(<?(?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)((?:[ \t]*"(?:.*?)"[ \\t]*)?)(\\))'},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\*[ ]?){3,}\\s*$"},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\-[ ]?){3,}\\s*$"},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\_[ ]?){3,}\\s*$"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock"},{token:"string",regex:"([*]{2}|[_]{2}(?=\\S))([^\\r]*?\\S[*_]*)(\\1)"},{token:"string",regex:"([*]|[_](?=\\S))([^\\r]*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"},{token:"text",regex:"[^\\*_%$`\\[#<>]+"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:".+"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string",regex:".+"}],githubblock:[{token:"support.function",regex:"^```",next:"start"},{token:"support.function",regex:".+"}]},this.embedRules(f,"js-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(h,"html-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(i,"css-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(g,"xml-",[{token:"support.function",regex:"^```",next:"start"}])};d.inherits(k,e),b.MarkdownHighlightRules=k}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-markdown-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-markdown-uncompressed-noconflict.js
deleted file mode 100644
index 7a81757..0000000
--- a/contexts/data/lib/ace/mode-markdown-uncompressed-noconflict.js
+++ /dev/null
@@ -1,3000 +0,0 @@
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/markdown', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/xml', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/markdown_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var XmlMode = require("./xml").Mode;
-var HtmlMode = require("./html").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
-
-var Mode = function() {
- var highlighter = new MarkdownHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "xml-": XmlMode,
- "html-": HtmlMode
- });
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "listblock") {
- var match = /^((?:.+)?)([-+*][ ]+)/.exec(line);
- if (match) {
- return new Array(match[1].length + 1).join(" ") + match[2];
- } else {
- return "";
- }
- } else {
- return this.$getIndent(line);
- }
- };
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- }],
-
- cdata : [{
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "(?:[^\\]]|\\](?!\\]>))+"
- }],
-
- comment : [{
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
-};
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/html'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new XmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- return 0;
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- var errors = [];
- e.data.forEach(function(message) {
- errors.push({
- row: message.line - 1,
- column: message.col - 1,
- text: message.message,
- type: message.type,
- lint: message
- });
- });
-
- session.setAnnotations(errors);
- });
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CssHighlightRules = function() {
-
- var properties = lang.arrayToMap(
- ("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
- "appearance|azimuth|background-attachment|background-color|background-image|" +
- "background-origin|background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|")
- );
-
- var functions = lang.arrayToMap(
- ("rgb|rgba|url|attr|counter|counters").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- var base_ruleset = [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "ruleset_comment"
- },{
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase())) {
- return "support.type";
- }
- else if (functions.hasOwnProperty(value.toLowerCase())) {
- return "support.function";
- }
- else if (constants.hasOwnProperty(value.toLowerCase())) {
- return "support.constant";
- }
- else if (colors.hasOwnProperty(value.toLowerCase())) {
- return "support.constant.color";
- }
- else {
- return "text";
- }
- },
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }
- ];
-
- var ruleset = lang.copyArray(base_ruleset);
- ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "start"
- });
-
- var media_ruleset = lang.copyArray( base_ruleset );
- media_ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "media"
- });
-
- var base_comment = [{
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }];
-
- var comment = lang.copyArray(base_comment);
- comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- });
-
- var media_comment = lang.copyArray(base_comment);
- media_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "media"
- });
-
- var ruleset_comment = lang.copyArray(base_comment);
- ruleset_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "ruleset"
- });
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- next: "media"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "media" : [ {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "media_comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "media_ruleset"
- },{
- token: "string",
- regex: "\\}",
- next: "start"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "comment" : comment,
-
- "ruleset" : ruleset,
- "ruleset_comment" : ruleset_comment,
-
- "media_ruleset" : media_ruleset,
- "media_comment" : media_comment
- };
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var HtmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- merge : true,
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*script\\b)",
- next : "script"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*style\\b)",
- next : "css"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- } ],
-
- cdata : [ {
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- merge : true,
- regex : "\\s+"
- }, {
- token : "text",
- merge : true,
- regex : ".+"
- } ],
-
- comment : [ {
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- } ]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
- xmlUtil.tag(this.$rules, "css", "css-start");
- xmlUtil.tag(this.$rules, "script", "js-start");
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "comment",
- regex: "\\/\\/.*(?=<\\/script>)",
- next: "tag"
- }, {
- token: "meta.tag",
- regex: "<\\/(?=script)",
- next: "tag"
- }]);
-
- this.embedRules(CssHighlightRules, "css-", [{
- token: "meta.tag",
- regex: "<\\/(?=style)",
- next: "tag"
- }]);
-};
-
-oop.inherits(HtmlHighlightRules, TextHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- // void elements
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
-
- // optional tags
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
- });
-};
-
-oop.inherits(FoldMode, MixedFoldMode);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
- this.defaultMode = defaultMode;
- this.subModes = subModes;
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
-
- this.$getMode = function(state) {
- for (var key in this.subModes) {
- if (state.indexOf(key) === 0)
- return this.subModes[key];
- }
- return null;
- };
-
- this.$tryMode = function(state, session, foldStyle, row) {
- var mode = this.$getMode(state);
- return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
- };
-
- this.getFoldWidget = function(session, foldStyle, row) {
- return (
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
- this.$tryMode(session.getState(row), session, foldStyle, row) ||
- this.defaultMode.getFoldWidget(session, foldStyle, row)
- );
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var mode = this.$getMode(session.getState(row-1));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.$getMode(session.getState(row));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.defaultMode;
-
- return mode.getFoldWidgetRange(session, foldStyle, row);
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/markdown_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-
-function github_embed(tag, prefix) {
- return { // Github style block
- token : "support.function",
- regex : "^```" + tag + "\\s*$",
- next : prefix + "start"
- };
-}
-
-var MarkdownHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [ {
- token : "empty_line",
- regex : '^$'
- }, { // code span `
- token : "support.function",
- regex : "(`+)([^\\r]*?[^`])(\\1)"
- }, { // code block
- token : "support.function",
- regex : "^[ ]{4}.+"
- }, { // h1
- token: "markup.heading.1",
- regex: "^=+(?=\\s*$)"
- }, { // h2
- token: "markup.heading.1",
- regex: "^\\-+(?=\\s*$)"
- }, { // header
- token : function(value) {
- return "markup.heading." + value.length;
- },
- regex : "^#{1,6}"
- }, github_embed("javascript", "js-"),
- github_embed("xml", "xml-"),
- github_embed("html", "html-"),
- github_embed("css", "css-"),
- { // Github style block
- token : "support.function",
- regex : "^```[a-zA-Z]+\\s*$",
- next : "githubblock"
- }, { // block quote
- token : "string",
- regex : "^>[ ].+$",
- next : "blockquote"
- }, { // reference
- token : ["text", "constant", "text", "url", "string", "text"],
- regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?\\s*)$"
- }, { // link by reference
- token : ["text", "string", "text", "constant", "text"],
- regex : "(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"
- }, { // link by url
- token : ["text", "string", "text", "markup.underline", "string", "text"],
- regex : "(\\[)"+
- "(\\[[^\\]]*\\]|[^\\[\\]]*)"+
- "(\\]\\([ \\t]*)"+
- "(<?(?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)"+
- "((?:[ \t]*\"(?:.*?)\"[ \\t]*)?)"+
- "(\\))"
- }, { // HR *
- token : "constant",
- regex : "^[ ]{0,2}(?:[ ]?\\*[ ]?){3,}\\s*$"
- }, { // HR -
- token : "constant",
- regex : "^[ ]{0,2}(?:[ ]?\\-[ ]?){3,}\\s*$"
- }, { // HR _
- token : "constant",
- regex : "^[ ]{0,2}(?:[ ]?\\_[ ]?){3,}\\s*$"
- }, { // list
- token : "markup.list",
- regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
- next : "listblock"
- }, { // strong ** __
- token : "string",
- regex : "([*]{2}|[_]{2}(?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
- }, { // emphasis * _
- token : "string",
- regex : "([*]|[_](?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
- }, { //
- token : ["text", "url", "text"],
- regex : "(<)("+
- "(?:https?|ftp|dict):[^'\">\\s]+"+
- "|"+
- "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
- ")(>)"
- }, {
- token : "text",
- regex : "[^\\*_%$`\\[#<>]+"
- } ],
-
- "listblock" : [ { // Lists only escape on completely blank lines.
- token : "empty_line",
- regex : "^$",
- next : "start"
- }, {
- token : "markup.list",
- regex : ".+"
- } ],
-
- "blockquote" : [ { // BLockquotes only escape on blank lines.
- token : "empty_line",
- regex : "^\\s*$",
- next : "start"
- }, {
- token : "string",
- regex : ".+"
- } ],
-
- "githubblock" : [ {
- token : "support.function",
- regex : "^```",
- next : "start"
- }, {
- token : "support.function",
- regex : ".+"
- } ]
- };
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token : "support.function",
- regex : "^```",
- next : "start"
- }]);
-
- this.embedRules(HtmlHighlightRules, "html-", [{
- token : "support.function",
- regex : "^```",
- next : "start"
- }]);
-
- this.embedRules(CssHighlightRules, "css-", [{
- token : "support.function",
- regex : "^```",
- next : "start"
- }]);
-
- this.embedRules(XmlHighlightRules, "xml-", [{
- token : "support.function",
- regex : "^```",
- next : "start"
- }]);
-};
-oop.inherits(MarkdownHighlightRules, TextHighlightRules);
-
-exports.MarkdownHighlightRules = MarkdownHighlightRules;
-});;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-markdown-uncompressed.js b/contexts/data/lib/ace/mode-markdown-uncompressed.js
deleted file mode 100644
index 0ddb789..0000000
--- a/contexts/data/lib/ace/mode-markdown-uncompressed.js
+++ /dev/null
@@ -1,3000 +0,0 @@
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/markdown', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/xml', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/markdown_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var XmlMode = require("./xml").Mode;
-var HtmlMode = require("./html").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
-
-var Mode = function() {
- var highlighter = new MarkdownHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "xml-": XmlMode,
- "html-": HtmlMode
- });
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "listblock") {
- var match = /^((?:.+)?)([-+*][ ]+)/.exec(line);
- if (match) {
- return new Array(match[1].length + 1).join(" ") + match[2];
- } else {
- return "";
- }
- } else {
- return this.$getIndent(line);
- }
- };
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- }],
-
- cdata : [{
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "(?:[^\\]]|\\](?!\\]>))+"
- }],
-
- comment : [{
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
-};
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/html'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new XmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- return 0;
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- var errors = [];
- e.data.forEach(function(message) {
- errors.push({
- row: message.line - 1,
- column: message.col - 1,
- text: message.message,
- type: message.type,
- lint: message
- });
- });
-
- session.setAnnotations(errors);
- });
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var CssHighlightRules = function() {
-
- var properties = lang.arrayToMap(
- ("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
- "appearance|azimuth|background-attachment|background-color|background-image|" +
- "background-origin|background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|")
- );
-
- var functions = lang.arrayToMap(
- ("rgb|rgba|url|attr|counter|counters").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- var base_ruleset = [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "ruleset_comment"
- },{
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase())) {
- return "support.type";
- }
- else if (functions.hasOwnProperty(value.toLowerCase())) {
- return "support.function";
- }
- else if (constants.hasOwnProperty(value.toLowerCase())) {
- return "support.constant";
- }
- else if (colors.hasOwnProperty(value.toLowerCase())) {
- return "support.constant.color";
- }
- else {
- return "text";
- }
- },
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }
- ];
-
- var ruleset = lang.copyArray(base_ruleset);
- ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "start"
- });
-
- var media_ruleset = lang.copyArray( base_ruleset );
- media_ruleset.unshift({
- token : "paren.rparen",
- regex : "\\}",
- next: "media"
- });
-
- var base_comment = [{
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }];
-
- var comment = lang.copyArray(base_comment);
- comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- });
-
- var media_comment = lang.copyArray(base_comment);
- media_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "media"
- });
-
- var ruleset_comment = lang.copyArray(base_comment);
- ruleset_comment.unshift({
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "ruleset"
- });
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- next: "media"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "media" : [ {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "media_comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- next: "media_ruleset"
- },{
- token: "string",
- regex: "\\}",
- next: "start"
- },{
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- },{
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- },{
- token: "string",
- regex: ":[a-z0-9-_]+"
- },{
- token: "constant",
- regex: "[a-z0-9-_]+"
- }],
-
- "comment" : comment,
-
- "ruleset" : ruleset,
- "ruleset_comment" : ruleset_comment,
-
- "media_ruleset" : media_ruleset,
- "media_comment" : media_comment
- };
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var HtmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- merge : true,
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*script\\b)",
- next : "script"
- }, {
- token : "meta.tag",
- regex : "<(?=\s*style\\b)",
- next : "css"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- } ],
-
- cdata : [ {
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- merge : true,
- regex : "\\s+"
- }, {
- token : "text",
- merge : true,
- regex : ".+"
- } ],
-
- comment : [ {
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- } ]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
- xmlUtil.tag(this.$rules, "css", "css-start");
- xmlUtil.tag(this.$rules, "script", "js-start");
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "comment",
- regex: "\\/\\/.*(?=<\\/script>)",
- next: "tag"
- }, {
- token: "meta.tag",
- regex: "<\\/(?=script)",
- next: "tag"
- }]);
-
- this.embedRules(CssHighlightRules, "css-", [{
- token: "meta.tag",
- regex: "<\\/(?=style)",
- next: "tag"
- }]);
-};
-
-oop.inherits(HtmlHighlightRules, TextHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- // void elements
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
-
- // optional tags
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
- });
-};
-
-oop.inherits(FoldMode, MixedFoldMode);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
- this.defaultMode = defaultMode;
- this.subModes = subModes;
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
-
- this.$getMode = function(state) {
- for (var key in this.subModes) {
- if (state.indexOf(key) === 0)
- return this.subModes[key];
- }
- return null;
- };
-
- this.$tryMode = function(state, session, foldStyle, row) {
- var mode = this.$getMode(state);
- return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
- };
-
- this.getFoldWidget = function(session, foldStyle, row) {
- return (
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
- this.$tryMode(session.getState(row), session, foldStyle, row) ||
- this.defaultMode.getFoldWidget(session, foldStyle, row)
- );
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var mode = this.$getMode(session.getState(row-1));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.$getMode(session.getState(row));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.defaultMode;
-
- return mode.getFoldWidgetRange(session, foldStyle, row);
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/markdown_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-
-function github_embed(tag, prefix) {
- return { // Github style block
- token : "support.function",
- regex : "^```" + tag + "\\s*$",
- next : prefix + "start"
- };
-}
-
-var MarkdownHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [ {
- token : "empty_line",
- regex : '^$'
- }, { // code span `
- token : "support.function",
- regex : "(`+)([^\\r]*?[^`])(\\1)"
- }, { // code block
- token : "support.function",
- regex : "^[ ]{4}.+"
- }, { // h1
- token: "markup.heading.1",
- regex: "^=+(?=\\s*$)"
- }, { // h2
- token: "markup.heading.1",
- regex: "^\\-+(?=\\s*$)"
- }, { // header
- token : function(value) {
- return "markup.heading." + value.length;
- },
- regex : "^#{1,6}"
- }, github_embed("javascript", "js-"),
- github_embed("xml", "xml-"),
- github_embed("html", "html-"),
- github_embed("css", "css-"),
- { // Github style block
- token : "support.function",
- regex : "^```[a-zA-Z]+\\s*$",
- next : "githubblock"
- }, { // block quote
- token : "string",
- regex : "^>[ ].+$",
- next : "blockquote"
- }, { // reference
- token : ["text", "constant", "text", "url", "string", "text"],
- regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?\\s*)$"
- }, { // link by reference
- token : ["text", "string", "text", "constant", "text"],
- regex : "(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"
- }, { // link by url
- token : ["text", "string", "text", "markup.underline", "string", "text"],
- regex : "(\\[)"+
- "(\\[[^\\]]*\\]|[^\\[\\]]*)"+
- "(\\]\\([ \\t]*)"+
- "(<?(?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)"+
- "((?:[ \t]*\"(?:.*?)\"[ \\t]*)?)"+
- "(\\))"
- }, { // HR *
- token : "constant",
- regex : "^[ ]{0,2}(?:[ ]?\\*[ ]?){3,}\\s*$"
- }, { // HR -
- token : "constant",
- regex : "^[ ]{0,2}(?:[ ]?\\-[ ]?){3,}\\s*$"
- }, { // HR _
- token : "constant",
- regex : "^[ ]{0,2}(?:[ ]?\\_[ ]?){3,}\\s*$"
- }, { // list
- token : "markup.list",
- regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
- next : "listblock"
- }, { // strong ** __
- token : "string",
- regex : "([*]{2}|[_]{2}(?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
- }, { // emphasis * _
- token : "string",
- regex : "([*]|[_](?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
- }, { //
- token : ["text", "url", "text"],
- regex : "(<)("+
- "(?:https?|ftp|dict):[^'\">\\s]+"+
- "|"+
- "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
- ")(>)"
- }, {
- token : "text",
- regex : "[^\\*_%$`\\[#<>]+"
- } ],
-
- "listblock" : [ { // Lists only escape on completely blank lines.
- token : "empty_line",
- regex : "^$",
- next : "start"
- }, {
- token : "markup.list",
- regex : ".+"
- } ],
-
- "blockquote" : [ { // BLockquotes only escape on blank lines.
- token : "empty_line",
- regex : "^\\s*$",
- next : "start"
- }, {
- token : "string",
- regex : ".+"
- } ],
-
- "githubblock" : [ {
- token : "support.function",
- regex : "^```",
- next : "start"
- }, {
- token : "support.function",
- regex : ".+"
- } ]
- };
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token : "support.function",
- regex : "^```",
- next : "start"
- }]);
-
- this.embedRules(HtmlHighlightRules, "html-", [{
- token : "support.function",
- regex : "^```",
- next : "start"
- }]);
-
- this.embedRules(CssHighlightRules, "css-", [{
- token : "support.function",
- regex : "^```",
- next : "start"
- }]);
-
- this.embedRules(XmlHighlightRules, "xml-", [{
- token : "support.function",
- regex : "^```",
- next : "start"
- }]);
-};
-oop.inherits(MarkdownHighlightRules, TextHighlightRules);
-
-exports.MarkdownHighlightRules = MarkdownHighlightRules;
-});;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-markdown.js b/contexts/data/lib/ace/mode-markdown.js
index 4cf7a4a..d17dce1 100644
--- a/contexts/data/lib/ace/mode-markdown.js
+++ b/contexts/data/lib/ace/mode-markdown.js
@@ -1 +1,2228 @@
-define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/tokenizer","ace/mode/markdown_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("./javascript").Mode,g=a("./xml").Mode,h=a("./html").Mode,i=a("../tokenizer").Tokenizer,j=a("./markdown_highlight_rules").MarkdownHighlightRules,k=function(){var a=new j;this.$tokenizer=new i(a.getRules()),this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"xml-":g,"html-":h})};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){if(a=="listblock"){var d=/^((?:.+)?)([-+*][ ]+)/.exec(b);return d?(new Array(d[1].length+1)).join(" ")+d[2]:""}return this.$getIndent(b)}}.call(k.prototype),b.Mode=k}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./html_highlight_rules").HtmlHighlightRules,j=a("./behaviour/xml").XmlBehaviour,k=a("./folding/html").FoldMode,l=function(){var a=new i;this.$tokenizer=new h(a.getRules()),this.$behaviour=new j,this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g}),this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){return 0},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1}}.call(l.prototype),b.Mode=l}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./xml_util"),h=a("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=s*script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=s*style\\b)",next:"css"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},g.tag(this.$rules,"tag","start"),g.tag(this.$rules,"css","css-start"),g.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,h),b.HtmlHighlightRules=i}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./mixed").FoldMode,f=a("./xml").FoldMode,g=a("./cstyle").FoldMode,h=b.FoldMode=function(){e.call(this,new f({area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,li:1,dt:1,dd:1,p:1,rt:1,rp:1,optgroup:1,option:1,colgroup:1,td:1,th:1}),{"js-":new g,"css-":new g})};d.inherits(h,e)}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a,b){this.defaultMode=a,this.subModes=b};d.inherits(f,e),function(){this.$getMode=function(a){for(var b in this.subModes)if(a.indexOf(b)===0)return this.subModes[b];return null},this.$tryMode=function(a,b,c,d){var e=this.$getMode(a);return e?e.getFoldWidget(b,c,d):""},this.getFoldWidget=function(a,b,c){return this.$tryMode(a.getState(c-1),a,b,c)||this.$tryMode(a.getState(c),a,b,c)||this.defaultMode.getFoldWidget(a,b,c)},this.getFoldWidgetRange=function(a,b,c){var d=this.$getMode(a.getState(c-1));if(!d||!d.getFoldWidget(a,b,c))d=this.$getMode(a.getState(c));if(!d||!d.getFoldWidget(a,b,c))d=this.defaultMode;return d.getFoldWidgetRange(a,b,c)}}.call(f.prototype)}),define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"],function(a,b,c){function j(a,b){return{token:"support.function",regex:"^```"+a+"\\s*$",next:b+"start"}}"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./html_highlight_rules").HtmlHighlightRules,i=a("./css_highlight_rules").CssHighlightRules,k=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{token:"support.function",regex:"(`+)([^\\r]*?[^`])(\\1)"},{token:"support.function",regex:"^[ ]{4}.+"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.1",regex:"^\\-+(?=\\s*$)"},{token:function(a){return"markup.heading."+a.length},regex:"^#{1,6}"},j("javascript","js-"),j("xml","xml-"),j("html","html-"),j("css","css-"),{token:"support.function",regex:"^```[a-zA-Z]+\\s*$",next:"githubblock"},{token:"string",regex:"^>[ ].+$",next:"blockquote"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?\\s*)$'},{token:["text","string","text","constant","text"],regex:"(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:'(\\[)(\\[[^\\]]*\\]|[^\\[\\]]*)(\\]\\([ \\t]*)(<?(?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)((?:[ \t]*"(?:.*?)"[ \\t]*)?)(\\))'},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\*[ ]?){3,}\\s*$"},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\-[ ]?){3,}\\s*$"},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\_[ ]?){3,}\\s*$"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock"},{token:"string",regex:"([*]{2}|[_]{2}(?=\\S))([^\\r]*?\\S[*_]*)(\\1)"},{token:"string",regex:"([*]|[_](?=\\S))([^\\r]*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"},{token:"text",regex:"[^\\*_%$`\\[#<>]+"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:".+"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string",regex:".+"}],githubblock:[{token:"support.function",regex:"^```",next:"start"},{token:"support.function",regex:".+"}]},this.embedRules(f,"js-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(h,"html-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(i,"css-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(g,"xml-",[{token:"support.function",regex:"^```",next:"start"}])};d.inherits(k,e),b.MarkdownHighlightRules=k}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/markdown', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/xml', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/markdown_highlight_rules', 'ace/mode/folding/markdown'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var XmlMode = require("./xml").Mode;
+var HtmlMode = require("./html").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var MarkdownFoldMode = require("./folding/markdown").FoldMode;
+
+var Mode = function() {
+ var highlighter = new MarkdownHighlightRules();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$embeds = highlighter.getEmbeds();
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "xml-": XmlMode,
+ "html-": HtmlMode
+ });
+
+ this.foldingRules = new MarkdownFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "listblock") {
+ var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
+ if (!match)
+ return "";
+ var marker = match[2];
+ if (!marker)
+ marker = parseInt(match[3], 10) + 1 + ".";
+ return match[1] + marker + match[4];
+ } else {
+ return this.$getIndent(line);
+ }
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function() {
+ this.$rules = {
+ start : [
+ {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "xml-pe", regex : "<\\?.*?\\?>"},
+ {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "xml-pe", regex : "<\\!.*?>"},
+ {token : "meta.tag", regex : "<\\/?", next : "tag"},
+ {token : "text", regex : "\\s+"},
+ {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "text", regex : "[^<]+"}
+ ],
+
+ cdata : [
+ {token : "text", regex : "\\]\\]>", next : "start"},
+ {token : "text", regex : "\\s+"},
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment", regex : ".*?-->", next : "start"},
+ {token : "comment", regex : ".+"}
+ ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start");
+};
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var XmlBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var tag = token.value;
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
+ if (rightChars == '</') {
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
+
+ return {
+ text: '\n' + indent + '\n' + next_indent,
+ selection: [1, indent.length, 1, indent.length]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (tag.closing)
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ return "";
+
+ if (tag.selfClosing)
+ return "";
+
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ return "";
+
+ return "start";
+ };
+
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var value = "";
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type.indexOf("meta.tag") === 0)
+ value += token.value;
+ else
+ value += lang.stringRepeat(" ", token.value.length);
+ }
+
+ return this._parseTag(value);
+ };
+
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
+ this._parseTag = function(tag) {
+
+ var match = this.tagRe.exec(tag);
+ var column = this.tagRe.lastIndex || 0;
+ this.tagRe.lastIndex = 0;
+
+ return {
+ value: tag,
+ match: match ? match[2] : "",
+ closing: match ? !!match[3] : false,
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
+ tagName: match ? match[4] : "",
+ column: match[1] ? column + match[1].length : column
+ };
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var start;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!start) {
+ var start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ }
+ value += token.value;
+ if (value.indexOf(">") !== -1) {
+ var tag = this._parseTag(value);
+ tag.start = start;
+ tag.end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ iterator.stepForward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var end;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!end) {
+ end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ }
+ value = token.value + value;
+ if (value.indexOf("<") !== -1) {
+ var tag = this._parseTag(value);
+ tag.end = end;
+ tag.start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ iterator.stepBackward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.voidElements[tag.tagName]) {
+ return;
+ }
+ else if (this.voidElements[top.tagName]) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag.match)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.column);
+ var start = {
+ row: row,
+ column: firstTag.column + firstTag.tagName.length + 2
+ };
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var end = {
+ row: row,
+ column: firstTag.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+
+var Mode = function() {
+ var highlighter = new HtmlHighlightRules();
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$behaviour = new HtmlBehaviour();
+
+ this.$embeds = highlighter.getEmbeds();
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ return 0;
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("csslint", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ this.$rules = {
+ start : [{
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "xml-pe",
+ regex : "<\\!.*?>"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=script\\b)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=style\\b)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start", tagMap);
+ xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
+ xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(HtmlHighlightRules, TextHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var HtmlBehaviour = function () {
+
+ this.inherit(XmlBehaviour); // Get xml behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var element = token.value;
+ if (atCursor){
+ var element = element.substring(0, position.column - token.start);
+ }
+ if (voidElements.indexOf(element) !== -1){
+ return;
+ }
+ return {
+ text: '>' + '</' + element + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+}
+oop.inherits(HtmlBehaviour, XmlBehaviour);
+
+exports.HtmlBehaviour = HtmlBehaviour;
+});
+
+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) {
+
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {
+ MixedFoldMode.call(this, new XmlFoldMode({
+ "area": 1,
+ "base": 1,
+ "br": 1,
+ "col": 1,
+ "command": 1,
+ "embed": 1,
+ "hr": 1,
+ "img": 1,
+ "input": 1,
+ "keygen": 1,
+ "link": 1,
+ "meta": 1,
+ "param": 1,
+ "source": 1,
+ "track": 1,
+ "wbr": 1,
+ "li": 1,
+ "dt": 1,
+ "dd": 1,
+ "p": 1,
+ "rt": 1,
+ "rp": 1,
+ "optgroup": 1,
+ "option": 1,
+ "colgroup": 1,
+ "td": 1,
+ "th": 1
+ }), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/markdown_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+
+function github_embed(tag, prefix) {
+ return { // Github style block
+ token : "support.function",
+ regex : "^```" + tag + "\\s*$",
+ next : prefix + "start"
+ };
+}
+
+var MarkdownHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "empty_line",
+ regex : '^$'
+ }, { // code span `
+ token : ["support.function", "support.function", "support.function"],
+ regex : "(`+)([^\\r]*?[^`])(\\1)"
+ }, { // code block
+ token : "support.function",
+ regex : "^[ ]{4}.+"
+ }, { // h1
+ token: "markup.heading.1",
+ regex: "^=+(?=\\s*$)"
+ }, { // h2
+ token: "markup.heading.2",
+ regex: "^\\-+(?=\\s*$)"
+ }, { // header
+ token : function(value) {
+ return "markup.heading." + value.search(/[^#]/);
+ },
+ regex : "^#{1,6}(?:[^ #].*| +.*(?:[^ #].*|[^ ]+.* +#+ *))$"
+ }, github_embed("(?:javascript|js)", "js-"),
+ github_embed("xml", "xml-"),
+ github_embed("html", "html-"),
+ github_embed("css", "css-"),
+ { // Github style block
+ token : "support.function",
+ regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, { // block quote
+ token : "string",
+ regex : "^>[ ].+$",
+ next : "blockquote"
+ }, { // reference
+ token : ["text", "constant", "text", "url", "string", "text"],
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
+ }, { // link by reference
+ token : ["text", "string", "text", "constant", "text"],
+ regex : "(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"
+ }, { // link by url
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
+ regex : "(\\[)"+
+ "(\\[[^\\]]*\\]|[^\\[\\]]*)"+
+ "(\\]\\([ \\t]*)"+
+ "(<?(?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)"+
+ "((?:[ \t]*\"(?:.*?)\"[ \\t]*)?)"+
+ "(\\))"
+ }, { // HR *
+ token : "constant",
+ regex : "^[ ]{0,2}(?:[ ]?\\*[ ]?){3,}\\s*$"
+ }, { // HR -
+ token : "constant",
+ regex : "^[ ]{0,2}(?:[ ]?\\-[ ]?){3,}\\s*$"
+ }, { // HR _
+ token : "constant",
+ regex : "^[ ]{0,2}(?:[ ]?\\_[ ]?){3,}\\s*$"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock"
+ }, { // strong ** __
+ token : ["string", "string", "string"],
+ regex : "([*]{2}|[_]{2}(?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
+ }, { // emphasis * _
+ token : ["string", "string", "string"],
+ regex : "([*]|[_](?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
+ }, { //
+ token : ["text", "url", "text"],
+ regex : "(<)("+
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
+ "|"+
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
+ ")(>)"
+ }, {
+ token : "text",
+ regex : "[^\\*_%$`\\[#<>]+"
+ } ],
+
+ "listblock" : [ { // Lists only escape on completely blank lines.
+ token : "empty_line",
+ regex : "^$",
+ next : "start"
+ }, {
+ token : "markup.list",
+ regex : ".+"
+ } ],
+
+ "blockquote" : [ { // BLockquotes only escape on blank lines.
+ token : "empty_line",
+ regex : "^\\s*$",
+ next : "start"
+ }, {
+ token : "string",
+ regex : ".+"
+ } ],
+
+ "githubblock" : [ {
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }, {
+ token : "support.function",
+ regex : ".+"
+ } ]
+ };
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }]);
+
+ this.embedRules(HtmlHighlightRules, "html-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }]);
+
+ this.embedRules(XmlHighlightRules, "xml-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }]);
+
+ var html = new HtmlHighlightRules().getRules();
+ for (var i in html) {
+ if (this.$rules[i])
+ this.$rules[i] = this.$rules[i].concat(html[i]);
+ else
+ this.$rules[i] = html[i];
+ }
+
+};
+oop.inherits(MarkdownHighlightRules, TextHighlightRules);
+
+exports.MarkdownHighlightRules = MarkdownHighlightRules;
+});
+
+ace.define('ace/mode/folding/markdown', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+ this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ if (!this.foldingStartMarker.test(line))
+ return "";
+
+ if (line[0] == "`") {
+ if (session.bgTokenizer.getState(row) == "start")
+ return "end";
+ return "start";
+ }
+
+ return "start";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+ if (!line.match(this.foldingStartMarker))
+ return;
+
+ if (line[0] == "`") {
+ if (session.bgTokenizer.getState(row) !== "start") {
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (line[0] == "`" & line.substring(0, 3) == "```")
+ break;
+ }
+ return new Range(startRow, startColumn, row, 0);
+ } else {
+ while (row -- > 0) {
+ line = session.getLine(row);
+ if (line[0] == "`" & line.substring(0, 3) == "```")
+ break;
+ }
+ return new Range(row, line.length, startRow, 0);
+ }
+ }
+
+ var token;
+ function isHeading(row) {
+ token = session.getTokens(row)[0];
+ return token && token.type.lastIndexOf(heading, 0) === 0;
+ }
+
+ var heading = "markup.heading";
+ function getLevel() {
+ var ch = token.value[0];
+ if (ch == "=") return 6;
+ if (ch == "-") return 5;
+ return 7 - token.value.search(/[^#]/);
+ }
+
+ if (isHeading(row)) {
+ var startHeadingLevel = getLevel();
+ while (++row < maxRow) {
+ if (!isHeading(row))
+ continue;
+ var level = getLevel();
+ if (level >= startHeadingLevel)
+ break;
+ }
+
+ endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2);
+
+ if (endRow > startRow) {
+ while (endRow > startRow && /^\s*$/.test(session.getLine(endRow)))
+ endRow--;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-objectivec.js b/contexts/data/lib/ace/mode-objectivec.js
new file mode 100644
index 0000000..67be768
--- /dev/null
+++ b/contexts/data/lib/ace/mode-objectivec.js
@@ -0,0 +1,655 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/objectivec', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/objectivec_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ObjectiveCHighlightRules = require("./objectivec_highlight_rules").ObjectiveCHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ var highlighter = new ObjectiveCHighlightRules();
+ this.foldingRules = new CStyleFoldMode();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});ace.define('ace/mode/objectivec_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/c_cpp_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var C_Highlight_File = require("./c_cpp_highlight_rules");
+var CHighlightRules = C_Highlight_File.c_cppHighlightRules;
+
+var ObjectiveCHighlightRules = function() {
+
+ var escapedConstRe = "\\\\(?:[abefnrtv'\"?\\\\]|" +
+ "[0-3]\\d{1,2}|" +
+ "[4-7]\\d?|" +
+ "222|" +
+ "x[a-zA-Z0-9]+)";
+
+ var specialVariables = [{
+ "regex": "\\b_cmd\\b",
+ "token": "variable.other.selector.objc"
+ }, {
+ "regex": "\\b(?:self|super)\\b",
+ "token": "variable.language.objc"
+ }
+ ];
+
+ var cObj = new CHighlightRules();
+ var cRules = cObj.getRules();
+
+ this.$rules = {
+ "start": [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ },
+ {
+ "token": [ "storage.type.objc", "punctuation.definition.storage.type.objc",
+ "entity.name.type.objc", "text", "entity.other.inherited-class.objc"
+ ],
+ "regex": "(@)(interface|protocol)(?!.+;)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*:\\s*)([A-Za-z]+)"
+ },
+ {
+ "token": [ "storage.type.objc" ],
+ "regex": "(@end)"
+ },
+ {
+ "token": [ "storage.type.objc", "entity.name.type.objc",
+ "entity.other.inherited-class.objc"
+ ],
+ "regex": "(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?"
+ },
+ {
+ "token": "string.begin.objc",
+ "regex": '@"',
+ "next": "constant_NSString"
+ },
+ {
+ "token": "storage.type.objc",
+ "regex": "\\bid\\s*<",
+ "next": "protocol_list"
+ },
+ {
+ "token": "keyword.control.macro.objc",
+ "regex": "\\bNS_DURING|NS_HANDLER|NS_ENDHANDLER\\b"
+ },
+ {
+ "token": ["punctuation.definition.keyword.objc", "keyword.control.exception.objc"],
+ "regex": "(@)(try|catch|finally|throw)\\b"
+ },
+ {
+ "token": ["punctuation.definition.keyword.objc", "keyword.other.objc"],
+ "regex": "(@)(defs|encode)\\b"
+ },
+ {
+ "token": ["storage.type.id.objc", "text"],
+ "regex": "(\\bid\\b)(\\s|\\n)?"
+ },
+ {
+ "token": "storage.type.objc",
+ "regex": "\\bIBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class\\b"
+ },
+ {
+ "token": [ "punctuation.definition.storage.type.objc", "storage.type.objc"],
+ "regex": "(@)(class|protocol)\\b"
+ },
+ {
+ "token": [ "punctuation.definition.storage.type.objc", "punctuation.definition.storage.type.objc", "punctuation"],
+ "regex": "(@)(selector)(\\s*\\()",
+ "next": "selectors"
+ },
+ {
+ "token": [ "punctuation.definition.storage.modifier.objc", "storage.modifier.objc"],
+ "regex": "(@)(synchronized|public|private|protected|package)\\b"
+ },
+ {
+ "token": "constant.language.objc",
+ "regex": "\\bYES|NO|Nil|nil\\b"
+ },
+ {
+ "token": "support.variable.foundation",
+ "regex": "\\bNSApp\\b"
+ },
+ {
+ "token": [ "support.function.cocoa.leopard"],
+ "regex": "(?:\\b)(NS(?:Rect(?:ToCGRect|FromCGRect)|MakeCollectable|S(?:tringFromProtocol|ize(?:ToCGSize|FromCGSize))|Draw(?:NinePartImage|ThreePartImage)|P(?:oint(?:ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))(?:\\b)"
+ },
+ {
+ "token": ["support.function.cocoa"],
+ "regex": "(?:\\b)(NS(?:R(?:ound(?:DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(?:CriticalAlertPanel(?:RelativeToWindow)?|InformationalAlertPanel(?:RelativeToWindow)?|AlertPanel(?:RelativeToWindow)?)|e(?:set(?:MapTable|HashTable)|c(?:ycleZone|t(?:Clip(?:List)?|F(?:ill(?:UsingOperation|List(?:UsingOperation|With(?:Grays|Colors(?:UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(?:dPixel|l(?:MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(?:SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(?:s)?|WindowServerMemory|AlertPanel)|M(?:i(?:n(?:X|Y)|d(?:X|Y))|ouseInRect|a(?:p(?:Remove|Get|Member|Insert(?:IfAbsent|KnownAbsent)?)|ke(?:R(?:ect|ange)|Size|Point)|x(?:Range|X|Y)))|B(?:itsPer(?:SampleFromDepth|PixelFromDepth)|e(?:stDepth|ep|gin(?:CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(?:ho(?:uldRetainWithZone|w(?:sServicesMenuItem|AnimationEffect))|tringFrom(?:R(?:ect|ange)|MapTable|S(?:ize|elector)|HashTable|Class|Point)|izeFromString|e(?:t(?:ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(?:Big(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|Short|Host(?:ShortTo(?:Big|Little)|IntTo(?:Big|Little)|DoubleTo(?:Big|Little)|FloatTo(?:Big|Little)|Long(?:To(?:Big|Little)|LongTo(?:Big|Little)))|Int|Double|Float|L(?:ittle(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|ong(?:Long)?)))|H(?:ighlightRect|o(?:stByteOrder|meDirectory(?:ForUser)?)|eight|ash(?:Remove|Get|Insert(?:IfAbsent|KnownAbsent)?)|FSType(?:CodeFromFileType|OfFile))|N(?:umberOfColorComponents|ext(?:MapEnumeratorPair|HashEnumeratorItem))|C(?:o(?:n(?:tainsRect|vert(?:GlyphsToPackedGlyphs|Swapped(?:DoubleToHost|FloatToHost)|Host(?:DoubleToSwapped|FloatToSwapped)))|unt(?:MapTable|HashTable|Frames|Windows(?:ForContext)?)|py(?:M(?:emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(?:MapTables|HashTables))|lassFromString|reate(?:MapTable(?:WithZone)?|HashTable(?:WithZone)?|Zone|File(?:namePboardType|ContentsPboardType)))|TemporaryDirectory|I(?:s(?:ControllerMarker|EmptyRect|FreedObject)|n(?:setRect|crementExtraRefCount|te(?:r(?:sect(?:sRect|ionR(?:ect|ange))|faceStyleForKey)|gralRect)))|Zone(?:Realloc|Malloc|Name|Calloc|Fr(?:omPointer|ee))|O(?:penStepRootDirectory|ffsetRect)|D(?:i(?:sableScreenUpdates|videRect)|ottedFrameRect|e(?:c(?:imal(?:Round|Multiply|S(?:tring|ubtract)|Normalize|Co(?:py|mpa(?:ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(?:MemoryPages|Object))|raw(?:Gr(?:oove|ayBezel)|B(?:itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(?:hiteBezel|indowBackground)|LightBezel))|U(?:serName|n(?:ionR(?:ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(?:Bundle(?:Setup|Cleanup)|Setup(?:VirtualMachine)?|Needs(?:ToLoadClasses|VirtualMachine)|ClassesF(?:orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(?:oint(?:InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(?:n(?:d(?:MapTableEnumeration|HashTableEnumeration)|umerate(?:MapTable|HashTable)|ableScreenUpdates)|qual(?:R(?:ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(?:ileTypeForHFSTypeCode|ullUserName|r(?:ee(?:MapTable|HashTable)|ame(?:Rect(?:WithWidth(?:UsingOperation)?)?|Address)))|Wi(?:ndowList(?:ForContext)?|dth)|Lo(?:cationInRange|g(?:v|PageSize)?)|A(?:ccessibility(?:R(?:oleDescription(?:ForUIElement)?|aiseBadArgumentException)|Unignored(?:Children(?:ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(?:Main|Load)|vailableWindowDepths|ll(?:MapTable(?:Values|Keys)|HashTableObjects|ocate(?:MemoryPages|Collectable|Object)))))(?:\\b)"
+ },
+ {
+ "token": ["support.class.cocoa.leopard"],
+ "regex": "(?:\\b)(NS(?:RuleEditor|G(?:arbageCollector|radient)|MapTable|HashTable|Co(?:ndition|llectionView(?:Item)?)|T(?:oolbarItemGroup|extInputClient|r(?:eeNode|ackingArea))|InvocationOperation|Operation(?:Queue)?|D(?:ictionaryController|ockTile)|P(?:ointer(?:Functions|Array)|athC(?:o(?:ntrol(?:Delegate)?|mponentCell)|ell(?:Delegate)?)|r(?:intPanelAccessorizing|edicateEditor(?:RowTemplate)?))|ViewController|FastEnumeration|Animat(?:ionContext|ablePropertyContainer)))(?:\\b)"
+ },
+ {
+ "token": ["support.class.cocoa"],
+ "regex": "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)",
+ },
+ {
+ "token": ["support.type.cocoa.leopard"],
+ "regex": "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)"
+ },
+ {
+ "token": ["support.class.quartz"],
+ "regex": "(?:\\b)(C(?:I(?:Sampler|Co(?:ntext|lor)|Image(?:Accumulator)?|PlugIn(?:Registration)?|Vector|Kernel|Filter(?:Generator|Shape)?)|A(?:Renderer|MediaTiming(?:Function)?|BasicAnimation|ScrollLayer|Constraint(?:LayoutManager)?|T(?:iledLayer|extLayer|rans(?:ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(?:nimation(?:Group)?|ction))))(?:\\b)"
+ },
+ {
+ "token": ["support.type.quartz"],
+ "regex": "(?:\\b)(C(?:G(?:Float|Point|Size|Rect)|IFormat|AConstraintAttribute))(?:\\b)"
+ },
+ {
+ "token": ["support.type.cocoa"],
+ "regex": "(?:\\b)(NS(?:R(?:ect(?:Edge)?|ange)|G(?:lyph(?:Relation|LayoutMode)?|radientType)|M(?:odalSession|a(?:trixMode|p(?:Table|Enumerator)))|B(?:itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(?:cr(?:oll(?:er(?:Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(?:Granularity|Direction|Affinity)|wapped(?:Double|Float)|aveOperationType)|Ha(?:sh(?:Table|Enumerator)|ndler(?:2)?)|C(?:o(?:ntrol(?:Size|Tint)|mp(?:ositingOperation|arisonResult))|ell(?:State|Type|ImagePosition|Attribute))|T(?:hreadPrivate|ypesetterGlyphInfo|i(?:ckMarkPosition|tlePosition|meInterval)|o(?:ol(?:TipTag|bar(?:SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(?:TabType|Alignment)|ab(?:State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(?:ContextAuxiliary|PixelFormatAuxiliary)|D(?:ocumentChangeType|atePickerElementFlags|ra(?:werState|gOperation))|UsableScrollerParts|P(?:oint|r(?:intingPageOrder|ogressIndicator(?:Style|Th(?:ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(?:nt(?:SymbolicTraits|TraitMask|Action)|cusRingType)|W(?:indow(?:OrderingMode|Depth)|orkspace(?:IconCreationOptions|LaunchOptions)|ritingDirection)|L(?:ineBreakMode|ayout(?:Status|Direction))|A(?:nimation(?:Progress|Effect)|ppl(?:ication(?:TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle)))(?:\\b)"
+ },
+ {
+ "token": ["support.constant.cocoa"],
+ "regex": "(?:\\b)(NS(?:NotFound|Ordered(?:Ascending|Descending|Same)))(?:\\b)"
+ },
+ {
+ "token": ["support.constant.notification.cocoa.leopard"],
+ "regex": "(?:\\b)(NS(?:MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification)(?:\\b)"
+ },
+ {
+ "token": ["support.constant.notification.cocoa"],
+ "regex": "(?:\\b)(NS(?:Menu(?:Did(?:RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(?:ystemColorsDidChange|plitView(?:DidResizeSubviews|WillResizeSubviews))|C(?:o(?:nt(?:extHelpModeDid(?:Deactivate|Activate)|rolT(?:intDidChange|extDid(?:BeginEditing|Change|EndEditing)))|lor(?:PanelColorDidChange|ListDidChange)|mboBox(?:Selection(?:IsChanging|DidChange)|Will(?:Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(?:oolbar(?:DidRemoveItem|WillAddItem)|ext(?:Storage(?:DidProcessEditing|WillProcessEditing)|Did(?:BeginEditing|Change|EndEditing)|View(?:DidChange(?:Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)))|ImageRepRegistryDidChange|OutlineView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)|Item(?:Did(?:Collapse|Expand)|Will(?:Collapse|Expand)))|Drawer(?:Did(?:Close|Open)|Will(?:Close|Open))|PopUpButton(?:CellWillPopUp|WillPopUp)|View(?:GlobalFrameDidChange|BoundsDidChange|F(?:ocusDidChange|rameDidChange))|FontSetChanged|W(?:indow(?:Did(?:Resi(?:ze|gn(?:Main|Key))|M(?:iniaturize|ove)|Become(?:Main|Key)|ChangeScreen(?:|Profile)|Deminiaturize|Update|E(?:ndSheet|xpose))|Will(?:M(?:iniaturize|ove)|BeginSheet|Close))|orkspace(?:SessionDid(?:ResignActive|BecomeActive)|Did(?:Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(?:Sleep|Unmount|PowerOff|LaunchApplication)))|A(?:ntialiasThresholdChanged|ppl(?:ication(?:Did(?:ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(?:nhide|pdate)|FinishLaunching)|Will(?:ResignActive|BecomeActive|Hide|Terminate|U(?:nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification)(?:\\b)"
+ },
+ {
+ "token": ["support.constant.cocoa.leopard"],
+ "regex": "(?:\\b)(NS(?:RuleEditor(?:RowType(?:Simple|Compound)|NestingMode(?:Si(?:ngle|mple)|Compound|List))|GradientDraws(?:BeforeStartingLocation|AfterEndingLocation)|M(?:inusSetExpressionType|a(?:chPortDeallocate(?:ReceiveRight|SendRight|None)|pTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(?:oxCustom|undleExecutableArchitecture(?:X86|I386|PPC(?:64)?)|etweenPredicateOperatorType|ackgroundStyle(?:Raised|Dark|L(?:ight|owered)))|S(?:tring(?:DrawingTruncatesLastVisibleLine|EncodingConversion(?:ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(?:e(?:ech(?:SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(?:GrammarFlag|SpellingFlag))|litViewDividerStyleThi(?:n|ck))|e(?:rvice(?:RequestTimedOutError|M(?:iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(?:inimum|aximum)|Application(?:NotFoundError|LaunchFailedError))|gmentStyle(?:Round(?:Rect|ed)|SmallSquare|Capsule|Textured(?:Rounded|Square)|Automatic)))|H(?:UDWindowMask|ashTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(?:oModeColorPanel|etServiceNoAutoRename)|C(?:hangeRedone|o(?:ntainsPredicateOperatorType|l(?:orRenderingIntent(?:RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(?:None|ContentArea|TrackableArea|EditableTextArea))|T(?:imeZoneNameStyle(?:S(?:hort(?:Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(?:Regular|SourceList)|racking(?:Mouse(?:Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(?:ssumeInside|ctive(?:In(?:KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(?:n(?:tersectSetExpressionType|dexedColorSpaceModel)|mageScale(?:None|Proportionally(?:Down|UpOrDown)|AxesIndependently))|Ope(?:nGLPFAAllowOfflineRenderers|rationQueue(?:DefaultMaxConcurrentOperationCount|Priority(?:High|Normal|Very(?:High|Low)|Low)))|D(?:iacriticInsensitiveSearch|ownloadsDirectory)|U(?:nionSetExpressionType|TF(?:16(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(?:ointerFunctions(?:Ma(?:chVirtualMemory|llocMemory)|Str(?:ongMemory|uctPersonality)|C(?:StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(?:paque(?:Memory|Personality)|bjectP(?:ointerPersonality|ersonality)))|at(?:hStyle(?:Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(?:Scaling|Copies|Orientation|P(?:a(?:perSize|ge(?:Range|SetupAccessory))|review)))|Executable(?:RuntimeMismatchError|NotLoadableError|ErrorM(?:inimum|aximum)|L(?:inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(?:Initial|Prior)|F(?:i(?:ndPanelSubstringMatchType(?:StartsWith|Contains|EndsWith|FullWord)|leRead(?:TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(?:ndow(?:BackingLocation(?:MainMemory|Default|VideoMemory)|Sharing(?:Read(?:Only|Write)|None)|CollectionBehavior(?:MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType))(?:\\b)"
+ },
+ {
+ "token": ["support.constant.cocoa"],
+ "regex": "(?:\\b)(NS(?:R(?:GB(?:ModeColorPanel|ColorSpaceModel)|ight(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey)|ound(?:RectBezelStyle|Bankers|ed(?:BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(?:CapStyle|JoinStyle))|un(?:StoppedResponse|ContinuesResponse|AbortedResponse)|e(?:s(?:izableWindowMask|et(?:CursorRectsRunLoopOrdering|FunctionKey))|ce(?:ssedBezelStyle|iver(?:sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(?:evancyLevelIndicatorStyle|ative(?:Before|After))|gular(?:SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(?:n(?:domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(?:ModeMatrix|Button)))|G(?:IFFileType|lyph(?:Below|Inscribe(?:B(?:elow|ase)|Over(?:strike|Below)|Above)|Layout(?:WithPrevious|A(?:tAPoint|gainstAPoint))|A(?:ttribute(?:BidiLevel|Soft|Inscribe|Elastic)|bove))|r(?:ooveBorder|eaterThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|a(?:y(?:ModeColorPanel|ColorSpaceModel)|dient(?:None|Con(?:cave(?:Strong|Weak)|vex(?:Strong|Weak)))|phiteControlTint)))|XML(?:N(?:o(?:tationDeclarationKind|de(?:CompactEmptyElement|IsCDATA|OptionsNone|Use(?:SingleQuotes|DoubleQuotes)|Pre(?:serve(?:NamespaceOrder|C(?:haracterReferences|DATA)|DTD|Prefixes|E(?:ntities|mptyElements)|Quotes|Whitespace|A(?:ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(?:ocument(?:X(?:MLKind|HTMLKind|Include)|HTMLKind|T(?:idy(?:XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(?:arser(?:GTRequiredError|XMLDeclNot(?:StartedError|FinishedError)|Mi(?:splaced(?:XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(?:StartedError|FinishedError))|S(?:t(?:andaloneValueError|ringNot(?:StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(?:MTOKENRequiredError|o(?:t(?:ationNot(?:StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(?:haracterRef(?:In(?:DTDError|PrologError|EpilogError)|AtEOFError)|o(?:nditionalSectionNot(?:StartedError|FinishedError)|mment(?:NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(?:ternalError|valid(?:HexCharacterRefError|C(?:haracter(?:RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(?:NameError|Error)))|OutOfMemoryError|D(?:ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(?:RI(?:RequiredError|FragmentError)|n(?:declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(?:CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(?:MissingSemiError|NoNameError|In(?:Internal(?:SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(?:ocessingInstructionNot(?:StartedError|FinishedError)|ematureDocumentEndError))|E(?:n(?:codingNotSupportedError|tity(?:Ref(?:In(?:DTDError|PrologError|EpilogError)|erence(?:MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(?:StartedError|FinishedError)|Is(?:ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(?:StartedError|FinishedError)|xt(?:ernalS(?:tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(?:iteralNot(?:StartedError|FinishedError)|T(?:RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(?:RedefinedError|HasNoValueError|Not(?:StartedError|FinishedError)|ListNot(?:StartedError|FinishedError)))|rocessingInstructionKind)|E(?:ntity(?:GeneralKind|DeclarationKind|UnparsedKind|P(?:ar(?:sedKind|ameterKind)|redefined))|lement(?:Declaration(?:MixedKind|UndefinedKind|E(?:lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(?:N(?:MToken(?:sKind|Kind)|otationKind)|CDATAKind|ID(?:Ref(?:sKind|Kind)|Kind)|DeclarationKind|En(?:tit(?:yKind|iesKind)|umerationKind)|Kind))|M(?:i(?:n(?:XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(?:nthCalendarUnit|deSwitchFunctionKey|use(?:Moved(?:Mask)?|E(?:ntered(?:Mask)?|ventSubtype|xited(?:Mask)?))|veToBezierPathElement|mentary(?:ChangeButton|Push(?:Button|InButton)|Light(?:Button)?))|enuFunctionKey|a(?:c(?:intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(?:XEdge|YEdge))|ACHOperatingSystem)|B(?:MPFileType|o(?:ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(?:Se(?:condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(?:zelBorder|velLineJoinStyle|low(?:Bottom|Top)|gin(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(?:spaceCharacter|tabTextMovement|ingStore(?:Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(?:owser(?:NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(?:h(?:ift(?:JISStringEncoding|KeyMask)|ow(?:ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(?:s(?:ReqFunctionKey|tem(?:D(?:omainMask|efined(?:Mask)?)|FunctionKey))|mbolStringEncoding)|c(?:a(?:nnedOption|le(?:None|ToFit|Proportionally))|r(?:oll(?:er(?:NoPart|Increment(?:Page|Line|Arrow)|Decrement(?:Page|Line|Arrow)|Knob(?:Slot)?|Arrows(?:M(?:inEnd|axEnd)|None|DefaultSetting))|Wheel(?:Mask)?|LockFunctionKey)|eenChangedEventType))|t(?:opFunctionKey|r(?:ingDrawing(?:OneShot|DisableScreenFontSubstitution|Uses(?:DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(?:Status(?:Reading|NotOpen|Closed|Open(?:ing)?|Error|Writing|AtEnd)|Event(?:Has(?:BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(?:ndEncountered|rrorOccurred)))))|i(?:ngle(?:DateMode|UnderlineStyle)|ze(?:DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(?:condCalendarUnit|lect(?:By(?:Character|Paragraph|Word)|i(?:ng(?:Next|Previous)|onAffinity(?:Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(?:Momentary|Select(?:One|Any)))|quareLineCapStyle|witchButton|ave(?:ToOperation|Op(?:tions(?:Yes|No|Ask)|eration)|AsOperation)|mall(?:SquareBezelStyle|C(?:ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(?:ighlightModeMatrix|SBModeColorPanel|o(?:ur(?:Minute(?:SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(?:Never|OnlyFromMainDocumentDomain|Always)|e(?:lp(?:ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(?:MonthDa(?:yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(?:o(?:n(?:StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(?:ification(?:SuspensionBehavior(?:Hold|Coalesce|D(?:eliverImmediately|rop))|NoCoalescing|CoalescingOn(?:Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(?:cr(?:iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(?:itle|opLevelContainersSpecifierError|abs(?:BezelBorder|NoBorder|LineBorder))|I(?:nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(?:ll(?:Glyph|CellType)|m(?:eric(?:Search|PadKeyMask)|berFormatter(?:Round(?:Half(?:Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(?:10|Default)|S(?:cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(?:ercentStyle|ad(?:Before(?:Suffix|Prefix)|After(?:Suffix|Prefix))))))|e(?:t(?:Services(?:BadArgumentError|NotFoundError|C(?:ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(?:StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(?:t(?:iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(?:hange(?:ReadOtherContents|GrayCell(?:Mask)?|BackgroundCell(?:Mask)?|Cleared|Done|Undone|Autosaved)|MYK(?:ModeColorPanel|ColorSpaceModel)|ircular(?:BezelStyle|Slider)|o(?:n(?:stantValueExpressionType|t(?:inuousCapacityLevelIndicatorStyle|entsCellMask|ain(?:sComparison|erSpecifierError)|rol(?:Glyph|KeyMask))|densedFontMask)|lor(?:Panel(?:RGBModeMask|GrayModeMask|HSBModeMask|C(?:MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(?:p(?:osite(?:XOR|Source(?:In|O(?:ut|ver)|Atop)|Highlight|C(?:opy|lear)|Destination(?:In|O(?:ut|ver)|Atop)|Plus(?:Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(?:stom(?:SelectorPredicateOperatorType|PaletteModeColorPanel)|r(?:sor(?:Update(?:Mask)?|PointingDevice)|veToBezierPathElement))|e(?:nterT(?:extAlignment|abStopType)|ll(?:State|H(?:ighlighted|as(?:Image(?:Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(?:Bordered|InsetButton)|Disabled|Editable|LightsBy(?:Gray|Background|Contents)|AllowsMixedState))|l(?:ipPagination|o(?:s(?:ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(?:ControlTint|DisplayFunctionKey|LineFunctionKey))|a(?:seInsensitive(?:Search|PredicateOption)|n(?:notCreateScriptCommandError|cel(?:Button|TextMovement))|chesDirectory|lculation(?:NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(?:itical(?:Request|AlertStyle)|ayonModeColorPanel))|T(?:hick(?:SquareBezelStyle|erSquareBezelStyle)|ypesetter(?:Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(?:ineBreakAction|atestBehavior))|i(?:ckMark(?:Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(?:olbarItemVisibilityPriority(?:Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(?:Compression(?:N(?:one|EXT)|CCITTFAX(?:3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(?:rminate(?:Now|Cancel|Later)|xt(?:Read(?:InapplicableDocumentTypeError|WriteErrorM(?:inimum|aximum))|Block(?:M(?:i(?:nimum(?:Height|Width)|ddleAlignment)|a(?:rgin|ximum(?:Height|Width)))|B(?:o(?:ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(?:ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(?:Characters|Attributes)|CellType|ured(?:RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(?:FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(?:RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(?:Character|TextMovement|le(?:tP(?:oint(?:Mask|EventSubtype)?|roximity(?:Mask|EventSubtype)?)|Column(?:NoResizing|UserResizingMask|AutoresizingMask)|View(?:ReverseSequentialColumnAutoresizingStyle|GridNone|S(?:olid(?:HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(?:n(?:sert(?:CharFunctionKey|FunctionKey|LineFunctionKey)|t(?:Type|ernalS(?:criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(?:Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(?:2022JPStringEncoding|Latin(?:1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(?:R(?:ight|ep(?:MatchesDevice|LoadStatus(?:ReadingHeader|Completed|InvalidData|Un(?:expectedEOF|knownType)|WillNeedAllData)))|Below|C(?:ellType|ache(?:BySize|Never|Default|Always))|Interpolation(?:High|None|Default|Low)|O(?:nly|verlaps)|Frame(?:Gr(?:oove|ayBezel)|Button|None|Photo)|L(?:oadStatus(?:ReadError|C(?:ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(?:lign(?:Right|Bottom(?:Right|Left)?|Center|Top(?:Right|Left)?|Left)|bove)))|O(?:n(?:State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|TextMovement)|SF1OperatingSystem|pe(?:n(?:GL(?:GO(?:Re(?:setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(?:R(?:obust|endererID)|M(?:inimumPolicy|ulti(?:sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(?:creenMask|te(?:ncilSize|reo)|ingleRenderer|upersample|ample(?:s|Buffers|Alpha))|NoRecovery|C(?:o(?:lor(?:Size|Float)|mpliant)|losestPolicy)|OffScreen|D(?:oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(?:cc(?:umSize|elerated)|ux(?:Buffers|DepthStencil)|l(?:phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(?:criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(?:B(?:itfield|oolType)|S(?:hortType|tr(?:ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(?:Type|longType)|ArrayType))|D(?:i(?:s(?:c(?:losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(?:Selection|PredicateModifier))|o(?:c(?:ModalWindowMask|ument(?:Directory|ationDirectory))|ubleType|wn(?:TextMovement|ArrowFunctionKey))|e(?:s(?:cendingPageOrder|ktopDirectory)|cimalTabStopType|v(?:ice(?:NColorSpaceModel|IndependentModifierFlagsMask)|eloper(?:Directory|ApplicationDirectory))|fault(?:ControlTint|TokenStyle)|lete(?:Char(?:acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(?:yCalendarUnit|teFormatter(?:MediumStyle|Behavior(?:10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(?:wer(?:Clos(?:ingState|edState)|Open(?:ingState|State))|gOperation(?:Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(?:ser(?:CancelledError|D(?:irectory|omainMask)|FunctionKey)|RL(?:Handle(?:NotLoaded|Load(?:Succeeded|InProgress|Failed))|CredentialPersistence(?:None|Permanent|ForSession))|n(?:scaledWindowMask|cachedRead|i(?:codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(?:o(?:CloseGroupingRunLoopOrdering|FunctionKey)|e(?:finedDateComponent|rline(?:Style(?:Single|None|Thick|Double)|Pattern(?:Solid|D(?:ot|ash(?:Dot(?:Dot)?)?)))))|known(?:ColorSpaceModel|P(?:ointingDevice|ageOrder)|KeyS(?:criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(?:dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(?:ustifiedTextAlignment|PEG(?:2000FileType|FileType)|apaneseEUC(?:GlyphPacking|StringEncoding))|P(?:o(?:s(?:t(?:Now|erFontMask|WhenIdle|ASAP)|iti(?:on(?:Replace|Be(?:fore|ginning)|End|After)|ve(?:IntType|DoubleType|FloatType)))|pUp(?:NoArrow|ArrowAt(?:Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(?:InCell(?:Mask)?|OnPushOffButton)|e(?:n(?:TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(?:Mask)?)|P(?:S(?:caleField|tatus(?:Title|Field)|aveButton)|N(?:ote(?:Title|Field)|ame(?:Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(?:a(?:perFeedButton|ge(?:Range(?:To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(?:useFunctionKey|ragraphSeparatorCharacter|ge(?:DownFunctionKey|UpFunctionKey))|r(?:int(?:ing(?:ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(?:NotFound|OK|Error)|FunctionKey)|o(?:p(?:ertyList(?:XMLFormat|MutableContainers(?:AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(?:BarStyle|SpinningStyle|Preferred(?:SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(?:ssedTab|vFunctionKey))|L(?:HeightForm|CancelButton|TitleField|ImageButton|O(?:KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(?:n(?:terCharacter|d(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|v(?:e(?:nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(?:Comparison|PredicateOperatorType)|ra(?:serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(?:clude(?:10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(?:i(?:ew(?:M(?:in(?:XMargin|YMargin)|ax(?:XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(?:lidationErrorM(?:inimum|aximum)|riableExpressionType))|Key(?:SpecifierEvaluationScriptError|Down(?:Mask)?|Up(?:Mask)?|PathExpressionType|Value(?:MinusSetMutation|SetSetMutation|Change(?:Re(?:placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(?:New|Old)|UnionSetMutation|ValidationError))|QTMovie(?:NormalPlayback|Looping(?:BackAndForthPlayback|Playback))|F(?:1(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(?:nd(?:PanelAction(?:Replace(?:A(?:ndFind|ll(?:InSelection)?))?|S(?:howFindPanel|e(?:tFindString|lectAll(?:InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(?:Read(?:No(?:SuchFileError|PermissionError)|CorruptFileError|In(?:validFileNameError|applicableStringEncodingError)|Un(?:supportedSchemeError|knownError))|HandlingPanel(?:CancelButton|OKButton)|NoSuchFileError|ErrorM(?:inimum|aximum)|Write(?:NoPermissionError|In(?:validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(?:supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(?:nt(?:Mo(?:noSpaceTrait|dernSerifsClass)|BoldTrait|S(?:ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(?:o(?:ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(?:ntegerAdvancementsRenderingMode|talicTrait)|O(?:ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(?:nknownClass|IOptimizedTrait)|Panel(?:S(?:hadowEffectModeMask|t(?:andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(?:ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(?:amilyClassMask|reeformSerifsClass)|Antialiased(?:RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(?:Below|Type(?:None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(?:attingError(?:M(?:inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(?:ExpressionType|KeyMask)|3(?:1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(?:RevertButton|S(?:ize(?:Title|Field)|etButton)|CurrentField|Preview(?:Button|Field))|l(?:oat(?:ingPointSamplesBitmapFormat|Type)|agsChanged(?:Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(?:heelModeColorPanel|indow(?:s(?:NTOperatingSystem|CP125(?:1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(?:InterfaceStyle|OperatingSystem))|M(?:iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(?:NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(?:ctivation|ddingToRecents)|A(?:sync|nd(?:Hide(?:Others)?|Print)|llowingClassicStartup))|eek(?:day(?:CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(?:ntsBidiLevels|rningAlertStyle)|r(?:itingDirection(?:RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(?:i(?:stModeMatrix|ne(?:Moves(?:Right|Down|Up|Left)|B(?:order|reakBy(?:C(?:harWrapping|lipping)|Truncating(?:Middle|Head|Tail)|WordWrapping))|S(?:eparatorCharacter|weep(?:Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(?:ssThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey))|a(?:yout(?:RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(?:sc(?:iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(?:y(?:Type|PredicateModifier|EventMask)|choredSearch|imation(?:Blocking|Nonblocking(?:Threaded)?|E(?:ffect(?:DisappearingItemDefault|Poof)|ase(?:In(?:Out)?|Out))|Linear)|dPredicateType)|t(?:Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(?:obe(?:GB1CharacterCollection|CNS1CharacterCollection|Japan(?:1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(?:saveOperation|Pagination)|pp(?:lication(?:SupportDirectory|D(?:irectory|e(?:fined(?:Mask)?|legateReply(?:Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(?:Mask)?)|l(?:ternateKeyMask|pha(?:ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(?:SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(?:ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(?:sWrongScriptError|EvaluationScriptError)|bove(?:Bottom|Top)|WTEventType)))(?:\\b)"
+ },
+ {
+ "token": "support.function.C99.c",
+ "regex": C_Highlight_File.cFunctions
+ },
+ {
+ "token" : cObj.getKeywords(),
+ "regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ "token": "punctuation.section.scope.begin.objc",
+ "regex": "\\[",
+ "next": "bracketed_content"
+ },
+ {
+ "token": "meta.function.objc",
+ "regex": "^(?:-|\\+)\\s*"
+ }
+ ],
+ "constant_NSString": [
+ {
+ "token": "constant.character.escape.objc",
+ "regex": escapedConstRe
+ },
+ {
+ "token": "invalid.illegal.unknown-escape.objc",
+ "regex": "\\\\."
+ },
+ {
+ "token": "string",
+ "regex": '[^"\\\\]+'
+ },
+ {
+ "token": "punctuation.definition.string.end",
+ "regex": "\"",
+ "next": "start"
+ }
+ ],
+ "protocol_list": [
+ {
+ "token": "punctuation.section.scope.end.objc",
+ "regex": ">",
+ "next": "start"
+ },
+ {
+ "token": "support.other.protocol.objc",
+ "regex": "\bNS(?:GlyphStorage|M(?:utableCopying|enuItem)|C(?:hangeSpelling|o(?:ding|pying|lorPicking(?:Custom|Default)))|T(?:oolbarItemValidations|ext(?:Input|AttachmentCell))|I(?:nputServ(?:iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(?:CTypeSerializationCallBack|ect)|D(?:ecimalNumberBehaviors|raggingInfo)|U(?:serInterfaceValidations|RL(?:HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(?:ToobarItem|UserInterfaceItem)|Locking)\b"
+ }
+ ],
+ "selectors": [
+ {
+ "token": "support.function.any-method.name-of-parameter.objc",
+ "regex": "\\b(?:[a-zA-Z_:][\\w]*)+"
+ },
+ {
+ "token": "punctuation",
+ "regex": "\\)",
+ "next": "start"
+ }
+ ],
+ "bracketed_content": [
+ {
+ "token": "punctuation.section.scope.end.objc",
+ "regex": "\]",
+ "next": "start"
+ },
+ {
+ "token": ["support.function.any-method.objc"],
+ "regex": "(?:predicateWithFormat:| NSPredicate predicateWithFormat:)",
+ "next": "start"
+ },
+ {
+ "token": ["support.function.any-method.objc", "punctuation.separator.arguments.objc"],
+ "regex": "\\w+(?::|(?=\]))",
+ "next": "start"
+ }
+ ],
+ "bracketed_strings": [
+ {
+ "token": "punctuation.section.scope.end.objc",
+ "regex": "\]",
+ "next": "start"
+ },
+ {
+ "token": "keyword.operator.logical.predicate.cocoa",
+ "regex": "\\b(?:AND|OR|NOT|IN)\\b"
+ },
+ {
+ "token": ["invalid.illegal.unknown-method.objc", "punctuation.separator.arguments.objc"],
+ "regex": "\\b(\w+)(:)"
+ },
+ {
+ "regex": "\\b(?:ALL|ANY|SOME|NONE)\\b",
+ "token": "constant.language.predicate.cocoa"
+ },
+ {
+ "regex": "\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",
+ "token": "constant.language.predicate.cocoa"
+ },
+ {
+ "regex": "\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",
+ "token": "keyword.operator.comparison.predicate.cocoa"
+ },
+ {
+ "regex": "\\bC(?:ASEINSENSITIVE|I)\\b",
+ "token": "keyword.other.modifier.predicate.cocoa"
+ },
+ {
+ "regex": "\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",
+ "token": "keyword.other.predicate.cocoa"
+ },
+ {
+ "regex": escapedConstRe,
+ "token": "constant.character.escape.objc"
+ },
+ {
+ "regex": "\\\\.",
+ "token": "invalid.illegal.unknown-escape.objc"
+ },
+ {
+ "token": "string",
+ "regex": '[^"\\\\]'
+ },
+ {
+ "token": "punctuation.definition.string.end.objc",
+ "regex": "\"",
+ "next": "predicates"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "methods" : [
+ {
+ token : "meta.function.objc",
+ regex : "(?=\\{|#)|;",
+ next : "start"
+ }
+ ]
+}
+ for (var r in cRules) {
+ if (this.$rules[r]) {
+ if (this.$rules[r].push)
+ this.$rules[r].push.apply(this.$rules[r], cRules[r]);
+ } else {
+ this.$rules[r] = cRules[r];
+ }
+ }
+
+ this.$rules.bracketed_content = this.$rules.bracketed_content.concat(
+ this.$rules.start, specialVariables
+ );
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(ObjectiveCHighlightRules, CHighlightRules);
+
+exports.ObjectiveCHighlightRules = ObjectiveCHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+ace.define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
+
+var c_cppHighlightRules = function() {
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
+ "return|switch|while|catch|operator|try|throw|using"
+ );
+
+ var storageType = (
+ "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
+ "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
+ "class|wchar_t|template"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private:|" +
+ "protected:|public:|friend|explicit|virtual|export|mutable|typename"
+ );
+
+ var keywordOperators = (
+ "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
+ "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
+ );
+
+ var builtinConstants = (
+ "NULL|true|false|TRUE|FALSE"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "storage.modifier" : storageModifiers,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "this",
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "(?:#endif)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ token : "constant.other",
+ regex : "\\s*<.+?>",
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
+ next : "start"
+ },
+ {
+ token : "constant.other.multiline",
+ regex : /.*\\/
+ },
+ {
+ token : "constant.other",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-ocaml-noconflict.js b/contexts/data/lib/ace/mode-ocaml-noconflict.js
deleted file mode 100644
index 0e3c11c..0000000
--- a/contexts/data/lib/ace/mode-ocaml-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./ocaml_highlight_rules").OcamlHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e);var k=/(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;((function(){this.toggleCommentLines=function(a,b,c,d){var e,f,g=!0,h=/^\s*\(\*(.*)\*\)/;for(e=c;e<=d;e++)if(!h.test(b.getLine(e))){g=!1;break}var j=new i(0,0,0,0);for(e=c;e<=d;e++)f=b.getLine(e),j.start.row=e,j.end.row=e,j.end.column=f.length,b.replace(j,g?f.match(h)[1]:"(*"+f+"*)")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;return(!e.length||e[e.length-1].type!=="comment")&&a==="start"&&k.test(b)&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}})).call(j.prototype),b.Mode=j}),ace.define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|or|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with".split("|")),b=e.arrayToMap("true|false".split("|")),c=e.arrayToMap("abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|add_available_units|add_big_int|add_buffer|add_channel|add_char|add_initializer|add_int_big_int|add_interfaces|add_num|add_string|add_substitute|add_substring|alarm|allocated_bytes|allow_only|allow_unsafe_modules|always|append|appname_get|appname_set|approx_num_exp|approx_num_fix|arg|argv|arith_status|array|array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|chown|chr|chroot|classify_float|clear|clear_available_units|clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|close_out|close_out_noerr|close_process|close_process|close_process_full|close_process_in|close_process_out|close_subwindow|close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|combine|combine|command|compact|compare|compare_big_int|compare_num|complex32|complex64|concat|conj|connect|contains|contains_from|contents|copy|cos|cosh|count|count|counters|create|create_alarm|create_image|create_matrix|create_matrix|create_matrix|create_object|create_object_and_run_initializers|create_object_opt|create_process|create_process|create_process_env|create_process_env|create_table|current|current_dir_name|current_point|current_x|current_y|curveto|custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|error_message|escaped|establish_server|executable_name|execv|execve|execvp|execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|float|float32|float64|float_of_big_int|float_of_bits|float_of_int|float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|for_all|for_all2|force|force_newline|force_val|foreground|fork|format_of_string|formatter_of_buffer|formatter_of_out_channel|fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|genarray_of_array1|genarray_of_array2|genarray_of_array3|get|get_all_formatter_output_functions|get_approx_printing|get_copy|get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|get_formatter_output_functions|get_formatter_tag_functions|get_image|get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|global_replace|global_substitute|gmtime|green|grid|group_beginning|group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|marshal|match_beginning|match_end|matched_group|matched_string|max|max_array_length|max_big_int|max_elt|max_float|max_int|max_num|max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|output_char|output_string|output_value|over_max_boxes|pack|params|parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|power_big_int_positive_big_int|power_big_int_positive_int|power_int_positive_big_int|power_int_positive_int|power_num|pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|pp_get_all_formatter_output_functions|pp_get_ellipsis_text|pp_get_formatter_output_functions|pp_get_formatter_tag_functions|pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|pp_set_all_formatter_output_functions|pp_set_ellipsis_text|pp_set_formatter_out_channel|pp_set_formatter_output_functions|pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|print_bool|print_break|print_char|print_cut|print_endline|print_float|print_flush|print_if_newline|print_int|print_newline|print_space|print_stat|print_string|print_tab|print_tbreak|printf|prohibit|public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|regexp_string_case_fold|register|register_exception|rem|remember_mode|remove|remove_assoc|remove_assq|rename|replace|replace_first|replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|run_initializers|run_initializers_opt|scanf|search_backward|search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|set_all_formatter_output_functions|set_approx_printing|set_binary_mode_in|set_binary_mode_out|set_close_on_exec|set_close_on_exec|set_color|set_ellipsis_text|set_error_when_null_denominator|set_field|set_floating_precision|set_font|set_formatter_out_channel|set_formatter_output_functions|set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|str_formatter|string|string_after|string_before|string_match|string_of_big_int|string_of_bool|string_of_float|string_of_format|string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|sub_right|subset|subset|substitute_first|substring|succ|succ|succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|temp_file|text_size|time|time|time|timed_read|timed_write|times|times|tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|wait_timed_read|wait_timed_write|wait_write|waitpid|white|widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak".split("|")),d="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",g="(?:0[xX][\\dA-Fa-f]+)",h="(?:0[bB][01]+)",i="(?:"+d+"|"+f+"|"+g+"|"+h+")",j="(?:[eE][+-]?\\d+)",k="(?:\\.\\d+)",l="(?:\\d+)",m="(?:(?:"+l+"?"+k+")|(?:"+l+"\\.))",n="(?:(?:"+m+"|"+l+")"+j+")",o="(?:"+n+"|"+m+")";this.$rules={start:[{token:"comment",regex:"\\(\\*.*?\\*\\)\\s*?$"},{token:"comment",merge:!0,regex:"\\(\\*.*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"'.'"},{token:"string",merge:!0,regex:'"',next:"qstring"},{token:"constant.numeric",regex:"(?:"+o+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:o},{token:"constant.numeric",regex:i+"\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\)",next:"start"},{token:"comment",merge:!0,regex:".+"}],qstring:[{token:"string",regex:'"',next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.OcamlHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-ocaml-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-ocaml-uncompressed-noconflict.js
deleted file mode 100644
index 9c846de..0000000
--- a/contexts/data/lib/ace/mode-ocaml-uncompressed-noconflict.js
+++ /dev/null
@@ -1,549 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sergi Mansilla <sergi AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/ocaml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ocaml_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new OcamlHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var i, line;
- var outdent = true;
- var re = /^\s*\(\*(.*)\*\)/;
-
- for (i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- var range = new Range(0, 0, 0, 0);
- for (i=startRow; i<= endRow; i++) {
- line = doc.getLine(i);
- range.start.row = i;
- range.end.row = i;
- range.end.column = line.length;
-
- doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
-
- if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
- state === 'start' && indenter.test(line))
- indent += tab;
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sergi Mansilla <sergi AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- */
-
-ace.define('ace/mode/ocaml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var OcamlHighlightRules = function() {
-
- var keywords = lang.arrayToMap((
- "and|as|assert|begin|class|constraint|do|done|downto|else|end|" +
- "exception|external|for|fun|function|functor|if|in|include|" +
- "inherit|initializer|lazy|let|match|method|module|mutable|new|" +
- "object|of|open|or|private|rec|sig|struct|then|to|try|type|val|" +
- "virtual|when|while|with").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("true|false").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap((
- "abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|" +
- "add_available_units|add_big_int|add_buffer|add_channel|add_char|" +
- "add_initializer|add_int_big_int|add_interfaces|add_num|add_string|" +
- "add_substitute|add_substring|alarm|allocated_bytes|allow_only|" +
- "allow_unsafe_modules|always|append|appname_get|appname_set|" +
- "approx_num_exp|approx_num_fix|arg|argv|arith_status|array|" +
- "array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|" +
- "assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|" +
- "beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|" +
- "bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|" +
- "bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|" +
- "bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|" +
- "cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|" +
- "chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|" +
- "chown|chr|chroot|classify_float|clear|clear_available_units|" +
- "clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|" +
- "close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|" +
- "close_out|close_out_noerr|close_process|close_process|" +
- "close_process_full|close_process_in|close_process_out|close_subwindow|" +
- "close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|" +
- "combine|combine|command|compact|compare|compare_big_int|compare_num|" +
- "complex32|complex64|concat|conj|connect|contains|contains_from|contents|" +
- "copy|cos|cosh|count|count|counters|create|create_alarm|create_image|" +
- "create_matrix|create_matrix|create_matrix|create_object|" +
- "create_object_and_run_initializers|create_object_opt|create_process|" +
- "create_process|create_process_env|create_process_env|create_table|" +
- "current|current_dir_name|current_point|current_x|current_y|curveto|" +
- "custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|" +
- "delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|" +
- "dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|" +
- "double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|" +
- "draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|" +
- "dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|" +
- "environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|" +
- "error_message|escaped|establish_server|executable_name|execv|execve|execvp|" +
- "execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|" +
- "file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|" +
- "filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|" +
- "float|float32|float64|float_of_big_int|float_of_bits|float_of_int|" +
- "float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|" +
- "flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|" +
- "for_all|for_all2|force|force_newline|force_val|foreground|fork|" +
- "format_of_string|formatter_of_buffer|formatter_of_out_channel|" +
- "fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|" +
- "from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|" +
- "full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|" +
- "genarray_of_array1|genarray_of_array2|genarray_of_array3|get|" +
- "get_all_formatter_output_functions|get_approx_printing|get_copy|" +
- "get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|" +
- "get_formatter_output_functions|get_formatter_tag_functions|get_image|" +
- "get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|" +
- "get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|" +
- "get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|" +
- "getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|" +
- "getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|" +
- "getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|" +
- "getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|" +
- "getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|" +
- "global_replace|global_substitute|gmtime|green|grid|group_beginning|" +
- "group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|" +
- "hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|" +
- "incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|" +
- "infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|" +
- "input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|" +
- "int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|" +
- "int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|" +
- "is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|" +
- "is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|" +
- "kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|" +
- "lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|" +
- "lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|" +
- "loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|" +
- "logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|" +
- "lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|" +
- "make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|" +
- "marshal|match_beginning|match_end|matched_group|matched_string|max|" +
- "max_array_length|max_big_int|max_elt|max_float|max_int|max_num|" +
- "max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|" +
- "min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|" +
- "minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|" +
- "mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|" +
- "nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|" +
- "new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|" +
- "nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|" +
- "num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|" +
- "of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|" +
- "of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|" +
- "open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|" +
- "open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|" +
- "open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|" +
- "open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|" +
- "out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|" +
- "output_char|output_string|output_value|over_max_boxes|pack|params|" +
- "parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|" +
- "place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|" +
- "power_big_int_positive_big_int|power_big_int_positive_int|" +
- "power_int_positive_big_int|power_int_positive_int|power_num|" +
- "pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|" +
- "pp_get_all_formatter_output_functions|pp_get_ellipsis_text|" +
- "pp_get_formatter_output_functions|pp_get_formatter_tag_functions|" +
- "pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|" +
- "pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|" +
- "pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|" +
- "pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|" +
- "pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|" +
- "pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|" +
- "pp_set_all_formatter_output_functions|pp_set_ellipsis_text|" +
- "pp_set_formatter_out_channel|pp_set_formatter_output_functions|" +
- "pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|" +
- "pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|" +
- "pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|" +
- "prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|" +
- "print_bool|print_break|print_char|print_cut|print_endline|print_float|" +
- "print_flush|print_if_newline|print_int|print_newline|print_space|" +
- "print_stat|print_string|print_tab|print_tbreak|printf|prohibit|" +
- "public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|" +
- "raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|" +
- "read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|" +
- "recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|" +
- "regexp_string_case_fold|register|register_exception|rem|remember_mode|" +
- "remove|remove_assoc|remove_assq|rename|replace|replace_first|" +
- "replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|" +
- "rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|" +
- "rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|" +
- "run_initializers|run_initializers_opt|scanf|search_backward|" +
- "search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|" +
- "set_all_formatter_output_functions|set_approx_printing|" +
- "set_binary_mode_in|set_binary_mode_out|set_close_on_exec|" +
- "set_close_on_exec|set_color|set_ellipsis_text|" +
- "set_error_when_null_denominator|set_field|set_floating_precision|" +
- "set_font|set_formatter_out_channel|set_formatter_output_functions|" +
- "set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|" +
- "set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|" +
- "set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|" +
- "set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|" +
- "set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|" +
- "setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|" +
- "setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|" +
- "shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|" +
- "shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|" +
- "shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|" +
- "sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|" +
- "sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|" +
- "sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|" +
- "sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|" +
- "sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|" +
- "slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|" +
- "slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|" +
- "split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|" +
- "square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|" +
- "stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|" +
- "stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|" +
- "str_formatter|string|string_after|string_before|string_match|" +
- "string_of_big_int|string_of_bool|string_of_float|string_of_format|" +
- "string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|" +
- "string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|" +
- "sub_right|subset|subset|substitute_first|substring|succ|succ|" +
- "succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|" +
- "symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|" +
- "tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|" +
- "tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|" +
- "temp_file|text_size|time|time|time|timed_read|timed_write|times|times|" +
- "tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|" +
- "to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|" +
- "to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|" +
- "truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|" +
- "uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|" +
- "unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|" +
- "update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|" +
- "wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|" +
- "wait_timed_read|wait_timed_write|wait_write|waitpid|white|" +
- "widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|" +
-
- "Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|" +
- "Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|" +
- "Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|" +
- "Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|" +
- "MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|" +
- "Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|" +
- "Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak"
- ).split("|"));
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var octInteger = "(?:0[oO]?[0-7]+)";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var binInteger = "(?:0[bB][01]+)";
- var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
-
- var exponent = "(?:[eE][+-]?\\d+)";
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
- var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : '\\(\\*.*?\\*\\)\\s*?$'
- },
- {
- token : "comment",
- merge : true,
- regex : '\\(\\*.*',
- next : "comment"
- },
- {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- },
- {
- token : "string", // single char
- regex : "'.'"
- },
- {
- token : "string", // " string
- merge : true,
- regex : '"',
- next : "qstring"
- },
- {
- token : "constant.numeric", // imaginary
- regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
- },
- {
- token : "constant.numeric", // float
- regex : floatNumber
- },
- {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- },
- {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- },
- {
- token : "keyword.operator",
- regex : "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="
- },
- {
- token : "paren.lparen",
- regex : "[[({]"
- },
- {
- token : "paren.rparen",
- regex : "[\\])}]"
- },
- {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\)",
- next : "start"
- },
- {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "qstring" : [
- {
- token : "string",
- regex : '"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-};
-
-oop.inherits(OcamlHighlightRules, TextHighlightRules);
-
-exports.OcamlHighlightRules = OcamlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-ocaml-uncompressed.js b/contexts/data/lib/ace/mode-ocaml-uncompressed.js
deleted file mode 100644
index b91107d..0000000
--- a/contexts/data/lib/ace/mode-ocaml-uncompressed.js
+++ /dev/null
@@ -1,549 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sergi Mansilla <sergi AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/ocaml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ocaml_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new OcamlHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var i, line;
- var outdent = true;
- var re = /^\s*\(\*(.*)\*\)/;
-
- for (i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- var range = new Range(0, 0, 0, 0);
- for (i=startRow; i<= endRow; i++) {
- line = doc.getLine(i);
- range.start.row = i;
- range.end.row = i;
- range.end.column = line.length;
-
- doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
-
- if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
- state === 'start' && indenter.test(line))
- indent += tab;
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sergi Mansilla <sergi AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- */
-
-define('ace/mode/ocaml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var OcamlHighlightRules = function() {
-
- var keywords = lang.arrayToMap((
- "and|as|assert|begin|class|constraint|do|done|downto|else|end|" +
- "exception|external|for|fun|function|functor|if|in|include|" +
- "inherit|initializer|lazy|let|match|method|module|mutable|new|" +
- "object|of|open|or|private|rec|sig|struct|then|to|try|type|val|" +
- "virtual|when|while|with").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("true|false").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap((
- "abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|" +
- "add_available_units|add_big_int|add_buffer|add_channel|add_char|" +
- "add_initializer|add_int_big_int|add_interfaces|add_num|add_string|" +
- "add_substitute|add_substring|alarm|allocated_bytes|allow_only|" +
- "allow_unsafe_modules|always|append|appname_get|appname_set|" +
- "approx_num_exp|approx_num_fix|arg|argv|arith_status|array|" +
- "array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|" +
- "assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|" +
- "beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|" +
- "bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|" +
- "bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|" +
- "bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|" +
- "cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|" +
- "chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|" +
- "chown|chr|chroot|classify_float|clear|clear_available_units|" +
- "clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|" +
- "close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|" +
- "close_out|close_out_noerr|close_process|close_process|" +
- "close_process_full|close_process_in|close_process_out|close_subwindow|" +
- "close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|" +
- "combine|combine|command|compact|compare|compare_big_int|compare_num|" +
- "complex32|complex64|concat|conj|connect|contains|contains_from|contents|" +
- "copy|cos|cosh|count|count|counters|create|create_alarm|create_image|" +
- "create_matrix|create_matrix|create_matrix|create_object|" +
- "create_object_and_run_initializers|create_object_opt|create_process|" +
- "create_process|create_process_env|create_process_env|create_table|" +
- "current|current_dir_name|current_point|current_x|current_y|curveto|" +
- "custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|" +
- "delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|" +
- "dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|" +
- "double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|" +
- "draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|" +
- "dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|" +
- "environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|" +
- "error_message|escaped|establish_server|executable_name|execv|execve|execvp|" +
- "execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|" +
- "file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|" +
- "filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|" +
- "float|float32|float64|float_of_big_int|float_of_bits|float_of_int|" +
- "float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|" +
- "flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|" +
- "for_all|for_all2|force|force_newline|force_val|foreground|fork|" +
- "format_of_string|formatter_of_buffer|formatter_of_out_channel|" +
- "fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|" +
- "from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|" +
- "full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|" +
- "genarray_of_array1|genarray_of_array2|genarray_of_array3|get|" +
- "get_all_formatter_output_functions|get_approx_printing|get_copy|" +
- "get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|" +
- "get_formatter_output_functions|get_formatter_tag_functions|get_image|" +
- "get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|" +
- "get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|" +
- "get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|" +
- "getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|" +
- "getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|" +
- "getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|" +
- "getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|" +
- "getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|" +
- "global_replace|global_substitute|gmtime|green|grid|group_beginning|" +
- "group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|" +
- "hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|" +
- "incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|" +
- "infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|" +
- "input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|" +
- "int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|" +
- "int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|" +
- "is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|" +
- "is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|" +
- "kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|" +
- "lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|" +
- "lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|" +
- "loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|" +
- "logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|" +
- "lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|" +
- "make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|" +
- "marshal|match_beginning|match_end|matched_group|matched_string|max|" +
- "max_array_length|max_big_int|max_elt|max_float|max_int|max_num|" +
- "max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|" +
- "min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|" +
- "minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|" +
- "mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|" +
- "nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|" +
- "new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|" +
- "nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|" +
- "num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|" +
- "of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|" +
- "of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|" +
- "open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|" +
- "open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|" +
- "open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|" +
- "open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|" +
- "out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|" +
- "output_char|output_string|output_value|over_max_boxes|pack|params|" +
- "parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|" +
- "place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|" +
- "power_big_int_positive_big_int|power_big_int_positive_int|" +
- "power_int_positive_big_int|power_int_positive_int|power_num|" +
- "pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|" +
- "pp_get_all_formatter_output_functions|pp_get_ellipsis_text|" +
- "pp_get_formatter_output_functions|pp_get_formatter_tag_functions|" +
- "pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|" +
- "pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|" +
- "pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|" +
- "pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|" +
- "pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|" +
- "pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|" +
- "pp_set_all_formatter_output_functions|pp_set_ellipsis_text|" +
- "pp_set_formatter_out_channel|pp_set_formatter_output_functions|" +
- "pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|" +
- "pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|" +
- "pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|" +
- "prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|" +
- "print_bool|print_break|print_char|print_cut|print_endline|print_float|" +
- "print_flush|print_if_newline|print_int|print_newline|print_space|" +
- "print_stat|print_string|print_tab|print_tbreak|printf|prohibit|" +
- "public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|" +
- "raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|" +
- "read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|" +
- "recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|" +
- "regexp_string_case_fold|register|register_exception|rem|remember_mode|" +
- "remove|remove_assoc|remove_assq|rename|replace|replace_first|" +
- "replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|" +
- "rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|" +
- "rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|" +
- "run_initializers|run_initializers_opt|scanf|search_backward|" +
- "search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|" +
- "set_all_formatter_output_functions|set_approx_printing|" +
- "set_binary_mode_in|set_binary_mode_out|set_close_on_exec|" +
- "set_close_on_exec|set_color|set_ellipsis_text|" +
- "set_error_when_null_denominator|set_field|set_floating_precision|" +
- "set_font|set_formatter_out_channel|set_formatter_output_functions|" +
- "set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|" +
- "set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|" +
- "set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|" +
- "set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|" +
- "set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|" +
- "setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|" +
- "setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|" +
- "shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|" +
- "shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|" +
- "shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|" +
- "sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|" +
- "sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|" +
- "sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|" +
- "sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|" +
- "sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|" +
- "slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|" +
- "slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|" +
- "split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|" +
- "square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|" +
- "stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|" +
- "stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|" +
- "str_formatter|string|string_after|string_before|string_match|" +
- "string_of_big_int|string_of_bool|string_of_float|string_of_format|" +
- "string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|" +
- "string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|" +
- "sub_right|subset|subset|substitute_first|substring|succ|succ|" +
- "succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|" +
- "symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|" +
- "tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|" +
- "tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|" +
- "temp_file|text_size|time|time|time|timed_read|timed_write|times|times|" +
- "tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|" +
- "to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|" +
- "to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|" +
- "truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|" +
- "uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|" +
- "unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|" +
- "update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|" +
- "wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|" +
- "wait_timed_read|wait_timed_write|wait_write|waitpid|white|" +
- "widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|" +
-
- "Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|" +
- "Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|" +
- "Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|" +
- "Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|" +
- "MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|" +
- "Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|" +
- "Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak"
- ).split("|"));
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var octInteger = "(?:0[oO]?[0-7]+)";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var binInteger = "(?:0[bB][01]+)";
- var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
-
- var exponent = "(?:[eE][+-]?\\d+)";
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
- var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : '\\(\\*.*?\\*\\)\\s*?$'
- },
- {
- token : "comment",
- merge : true,
- regex : '\\(\\*.*',
- next : "comment"
- },
- {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- },
- {
- token : "string", // single char
- regex : "'.'"
- },
- {
- token : "string", // " string
- merge : true,
- regex : '"',
- next : "qstring"
- },
- {
- token : "constant.numeric", // imaginary
- regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
- },
- {
- token : "constant.numeric", // float
- regex : floatNumber
- },
- {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- },
- {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- },
- {
- token : "keyword.operator",
- regex : "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="
- },
- {
- token : "paren.lparen",
- regex : "[[({]"
- },
- {
- token : "paren.rparen",
- regex : "[\\])}]"
- },
- {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\)",
- next : "start"
- },
- {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "qstring" : [
- {
- token : "string",
- regex : '"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-};
-
-oop.inherits(OcamlHighlightRules, TextHighlightRules);
-
-exports.OcamlHighlightRules = OcamlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-ocaml.js b/contexts/data/lib/ace/mode-ocaml.js
index 0e3e15f..a38925d 100644
--- a/contexts/data/lib/ace/mode-ocaml.js
+++ b/contexts/data/lib/ace/mode-ocaml.js
@@ -1 +1,448 @@
-define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./ocaml_highlight_rules").OcamlHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e);var k=/(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;((function(){this.toggleCommentLines=function(a,b,c,d){var e,f,g=!0,h=/^\s*\(\*(.*)\*\)/;for(e=c;e<=d;e++)if(!h.test(b.getLine(e))){g=!1;break}var j=new i(0,0,0,0);for(e=c;e<=d;e++)f=b.getLine(e),j.start.row=e,j.end.row=e,j.end.column=f.length,b.replace(j,g?f.match(h)[1]:"(*"+f+"*)")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;return(!e.length||e[e.length-1].type!=="comment")&&a==="start"&&k.test(b)&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}})).call(j.prototype),b.Mode=j}),define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|or|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with".split("|")),b=e.arrayToMap("true|false".split("|")),c=e.arrayToMap("abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|add_available_units|add_big_int|add_buffer|add_channel|add_char|add_initializer|add_int_big_int|add_interfaces|add_num|add_string|add_substitute|add_substring|alarm|allocated_bytes|allow_only|allow_unsafe_modules|always|append|appname_get|appname_set|approx_num_exp|approx_num_fix|arg|argv|arith_status|array|array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|chown|chr|chroot|classify_float|clear|clear_available_units|clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|close_out|close_out_noerr|close_process|close_process|close_process_full|close_process_in|close_process_out|close_subwindow|close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|combine|combine|command|compact|compare|compare_big_int|compare_num|complex32|complex64|concat|conj|connect|contains|contains_from|contents|copy|cos|cosh|count|count|counters|create|create_alarm|create_image|create_matrix|create_matrix|create_matrix|create_object|create_object_and_run_initializers|create_object_opt|create_process|create_process|create_process_env|create_process_env|create_table|current|current_dir_name|current_point|current_x|current_y|curveto|custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|error_message|escaped|establish_server|executable_name|execv|execve|execvp|execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|float|float32|float64|float_of_big_int|float_of_bits|float_of_int|float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|for_all|for_all2|force|force_newline|force_val|foreground|fork|format_of_string|formatter_of_buffer|formatter_of_out_channel|fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|genarray_of_array1|genarray_of_array2|genarray_of_array3|get|get_all_formatter_output_functions|get_approx_printing|get_copy|get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|get_formatter_output_functions|get_formatter_tag_functions|get_image|get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|global_replace|global_substitute|gmtime|green|grid|group_beginning|group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|marshal|match_beginning|match_end|matched_group|matched_string|max|max_array_length|max_big_int|max_elt|max_float|max_int|max_num|max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|output_char|output_string|output_value|over_max_boxes|pack|params|parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|power_big_int_positive_big_int|power_big_int_positive_int|power_int_positive_big_int|power_int_positive_int|power_num|pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|pp_get_all_formatter_output_functions|pp_get_ellipsis_text|pp_get_formatter_output_functions|pp_get_formatter_tag_functions|pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|pp_set_all_formatter_output_functions|pp_set_ellipsis_text|pp_set_formatter_out_channel|pp_set_formatter_output_functions|pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|print_bool|print_break|print_char|print_cut|print_endline|print_float|print_flush|print_if_newline|print_int|print_newline|print_space|print_stat|print_string|print_tab|print_tbreak|printf|prohibit|public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|regexp_string_case_fold|register|register_exception|rem|remember_mode|remove|remove_assoc|remove_assq|rename|replace|replace_first|replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|run_initializers|run_initializers_opt|scanf|search_backward|search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|set_all_formatter_output_functions|set_approx_printing|set_binary_mode_in|set_binary_mode_out|set_close_on_exec|set_close_on_exec|set_color|set_ellipsis_text|set_error_when_null_denominator|set_field|set_floating_precision|set_font|set_formatter_out_channel|set_formatter_output_functions|set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|str_formatter|string|string_after|string_before|string_match|string_of_big_int|string_of_bool|string_of_float|string_of_format|string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|sub_right|subset|subset|substitute_first|substring|succ|succ|succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|temp_file|text_size|time|time|time|timed_read|timed_write|times|times|tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|wait_timed_read|wait_timed_write|wait_write|waitpid|white|widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak".split("|")),d="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",g="(?:0[xX][\\dA-Fa-f]+)",h="(?:0[bB][01]+)",i="(?:"+d+"|"+f+"|"+g+"|"+h+")",j="(?:[eE][+-]?\\d+)",k="(?:\\.\\d+)",l="(?:\\d+)",m="(?:(?:"+l+"?"+k+")|(?:"+l+"\\.))",n="(?:(?:"+m+"|"+l+")"+j+")",o="(?:"+n+"|"+m+")";this.$rules={start:[{token:"comment",regex:"\\(\\*.*?\\*\\)\\s*?$"},{token:"comment",merge:!0,regex:"\\(\\*.*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"'.'"},{token:"string",merge:!0,regex:'"',next:"qstring"},{token:"constant.numeric",regex:"(?:"+o+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:o},{token:"constant.numeric",regex:i+"\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\)",next:"start"},{token:"comment",merge:!0,regex:".+"}],qstring:[{token:"string",regex:'"',next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.OcamlHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/ocaml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ocaml_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new OcamlHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var i, line;
+ var outdent = true;
+ var re = /^\s*\(\*(.*)\*\)/;
+
+ for (i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ var range = new Range(0, 0, 0, 0);
+ for (i=startRow; i<= endRow; i++) {
+ line = doc.getLine(i);
+ range.start.row = i;
+ range.end.row = i;
+ range.end.column = line.length;
+
+ doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
+ state === 'start' && indenter.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/ocaml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var OcamlHighlightRules = function() {
+
+ var keywords = (
+ "and|as|assert|begin|class|constraint|do|done|downto|else|end|" +
+ "exception|external|for|fun|function|functor|if|in|include|" +
+ "inherit|initializer|lazy|let|match|method|module|mutable|new|" +
+ "object|of|open|or|private|rec|sig|struct|then|to|try|type|val|" +
+ "virtual|when|while|with"
+ );
+
+ var builtinConstants = ("true|false");
+
+ var builtinFunctions = (
+ "abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|" +
+ "add_available_units|add_big_int|add_buffer|add_channel|add_char|" +
+ "add_initializer|add_int_big_int|add_interfaces|add_num|add_string|" +
+ "add_substitute|add_substring|alarm|allocated_bytes|allow_only|" +
+ "allow_unsafe_modules|always|append|appname_get|appname_set|" +
+ "approx_num_exp|approx_num_fix|arg|argv|arith_status|array|" +
+ "array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|" +
+ "assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|" +
+ "beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|" +
+ "bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|" +
+ "bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|" +
+ "bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|" +
+ "cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|" +
+ "chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|" +
+ "chown|chr|chroot|classify_float|clear|clear_available_units|" +
+ "clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|" +
+ "close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|" +
+ "close_out|close_out_noerr|close_process|close_process|" +
+ "close_process_full|close_process_in|close_process_out|close_subwindow|" +
+ "close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|" +
+ "combine|combine|command|compact|compare|compare_big_int|compare_num|" +
+ "complex32|complex64|concat|conj|connect|contains|contains_from|contents|" +
+ "copy|cos|cosh|count|count|counters|create|create_alarm|create_image|" +
+ "create_matrix|create_matrix|create_matrix|create_object|" +
+ "create_object_and_run_initializers|create_object_opt|create_process|" +
+ "create_process|create_process_env|create_process_env|create_table|" +
+ "current|current_dir_name|current_point|current_x|current_y|curveto|" +
+ "custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|" +
+ "delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|" +
+ "dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|" +
+ "double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|" +
+ "draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|" +
+ "dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|" +
+ "environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|" +
+ "error_message|escaped|establish_server|executable_name|execv|execve|execvp|" +
+ "execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|" +
+ "file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|" +
+ "filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|" +
+ "float|float32|float64|float_of_big_int|float_of_bits|float_of_int|" +
+ "float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|" +
+ "flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|" +
+ "for_all|for_all2|force|force_newline|force_val|foreground|fork|" +
+ "format_of_string|formatter_of_buffer|formatter_of_out_channel|" +
+ "fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|" +
+ "from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|" +
+ "full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|" +
+ "genarray_of_array1|genarray_of_array2|genarray_of_array3|get|" +
+ "get_all_formatter_output_functions|get_approx_printing|get_copy|" +
+ "get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|" +
+ "get_formatter_output_functions|get_formatter_tag_functions|get_image|" +
+ "get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|" +
+ "get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|" +
+ "get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|" +
+ "getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|" +
+ "getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|" +
+ "getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|" +
+ "getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|" +
+ "getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|" +
+ "global_replace|global_substitute|gmtime|green|grid|group_beginning|" +
+ "group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|" +
+ "hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|" +
+ "incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|" +
+ "infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|" +
+ "input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|" +
+ "int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|" +
+ "int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|" +
+ "is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|" +
+ "is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|" +
+ "kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|" +
+ "lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|" +
+ "lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|" +
+ "loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|" +
+ "logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|" +
+ "lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|" +
+ "make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|" +
+ "marshal|match_beginning|match_end|matched_group|matched_string|max|" +
+ "max_array_length|max_big_int|max_elt|max_float|max_int|max_num|" +
+ "max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|" +
+ "min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|" +
+ "minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|" +
+ "mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|" +
+ "nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|" +
+ "new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|" +
+ "nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|" +
+ "num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|" +
+ "of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|" +
+ "of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|" +
+ "open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|" +
+ "open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|" +
+ "open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|" +
+ "open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|" +
+ "out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|" +
+ "output_char|output_string|output_value|over_max_boxes|pack|params|" +
+ "parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|" +
+ "place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|" +
+ "power_big_int_positive_big_int|power_big_int_positive_int|" +
+ "power_int_positive_big_int|power_int_positive_int|power_num|" +
+ "pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|" +
+ "pp_get_all_formatter_output_functions|pp_get_ellipsis_text|" +
+ "pp_get_formatter_output_functions|pp_get_formatter_tag_functions|" +
+ "pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|" +
+ "pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|" +
+ "pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|" +
+ "pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|" +
+ "pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|" +
+ "pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|" +
+ "pp_set_all_formatter_output_functions|pp_set_ellipsis_text|" +
+ "pp_set_formatter_out_channel|pp_set_formatter_output_functions|" +
+ "pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|" +
+ "pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|" +
+ "pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|" +
+ "prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|" +
+ "print_bool|print_break|print_char|print_cut|print_endline|print_float|" +
+ "print_flush|print_if_newline|print_int|print_newline|print_space|" +
+ "print_stat|print_string|print_tab|print_tbreak|printf|prohibit|" +
+ "public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|" +
+ "raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|" +
+ "read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|" +
+ "recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|" +
+ "regexp_string_case_fold|register|register_exception|rem|remember_mode|" +
+ "remove|remove_assoc|remove_assq|rename|replace|replace_first|" +
+ "replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|" +
+ "rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|" +
+ "rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|" +
+ "run_initializers|run_initializers_opt|scanf|search_backward|" +
+ "search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|" +
+ "set_all_formatter_output_functions|set_approx_printing|" +
+ "set_binary_mode_in|set_binary_mode_out|set_close_on_exec|" +
+ "set_close_on_exec|set_color|set_ellipsis_text|" +
+ "set_error_when_null_denominator|set_field|set_floating_precision|" +
+ "set_font|set_formatter_out_channel|set_formatter_output_functions|" +
+ "set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|" +
+ "set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|" +
+ "set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|" +
+ "set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|" +
+ "set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|" +
+ "setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|" +
+ "setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|" +
+ "shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|" +
+ "shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|" +
+ "shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|" +
+ "sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|" +
+ "sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|" +
+ "sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|" +
+ "sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|" +
+ "sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|" +
+ "slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|" +
+ "slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|" +
+ "split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|" +
+ "square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|" +
+ "stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|" +
+ "stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|" +
+ "str_formatter|string|string_after|string_before|string_match|" +
+ "string_of_big_int|string_of_bool|string_of_float|string_of_format|" +
+ "string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|" +
+ "string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|" +
+ "sub_right|subset|subset|substitute_first|substring|succ|succ|" +
+ "succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|" +
+ "symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|" +
+ "tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|" +
+ "tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|" +
+ "temp_file|text_size|time|time|time|timed_read|timed_write|times|times|" +
+ "tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|" +
+ "to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|" +
+ "to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|" +
+ "truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|" +
+ "uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|" +
+ "unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|" +
+ "update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|" +
+ "wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|" +
+ "wait_timed_read|wait_timed_write|wait_write|waitpid|white|" +
+ "widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|" +
+
+ "Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|" +
+ "Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|" +
+ "Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|" +
+ "Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|" +
+ "MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|" +
+ "Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|" +
+ "Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": builtinConstants,
+ "support.function": builtinFunctions
+ }, "identifier");
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var octInteger = "(?:0[oO]?[0-7]+)";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var binInteger = "(?:0[bB][01]+)";
+ var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
+
+ var exponent = "(?:[eE][+-]?\\d+)";
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : '\\(\\*.*?\\*\\)\\s*?$'
+ },
+ {
+ token : "comment",
+ regex : '\\(\\*.*',
+ next : "comment"
+ },
+ {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ },
+ {
+ token : "string", // single char
+ regex : "'.'"
+ },
+ {
+ token : "string", // " string
+ regex : '"',
+ next : "qstring"
+ },
+ {
+ token : "constant.numeric", // imaginary
+ regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
+ },
+ {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ },
+ {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ },
+ {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ token : "keyword.operator",
+ regex : "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="
+ },
+ {
+ token : "paren.lparen",
+ regex : "[[({]"
+ },
+ {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ },
+ {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\)",
+ next : "start"
+ },
+ {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "qstring" : [
+ {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+};
+
+oop.inherits(OcamlHighlightRules, TextHighlightRules);
+
+exports.OcamlHighlightRules = OcamlHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
diff --git a/contexts/data/lib/ace/mode-perl-noconflict.js b/contexts/data/lib/ace/mode-perl-noconflict.js
deleted file mode 100644
index d4e9180..0000000
--- a/contexts/data/lib/ace/mode-perl-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./perl_highlight_rules").PerlHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[\:]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars".split("|")),b=e.arrayToMap("ARGV|ENV|INC|SIG".split("|")),c=e.arrayToMap("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PerlHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-perl-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-perl-uncompressed-noconflict.js
deleted file mode 100644
index c70a825..0000000
--- a/contexts/data/lib/ace/mode-perl-uncompressed-noconflict.js
+++ /dev/null
@@ -1,583 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Panagiotis Astithas <pastith AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/perl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/perl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new PerlHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "#");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Panagiotis Astithas <pastith AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/perl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PerlHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
- "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("ARGV|ENV|INC|SIG").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" +
- "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" +
- "getpeername|setpriority|getprotoent|setprotoent|getpriority|" +
- "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" +
- "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" +
- "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" +
- "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" +
- "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" +
- "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" +
- "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" +
- "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" +
- "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" +
- "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" +
- "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" +
- "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" +
- "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" +
- "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" +
- "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" +
- "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" +
- "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" +
- "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" +
- "map|die|uc|lc|do").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0x[0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-};
-
-oop.inherits(PerlHighlightRules, TextHighlightRules);
-
-exports.PerlHighlightRules = PerlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-perl-uncompressed.js b/contexts/data/lib/ace/mode-perl-uncompressed.js
deleted file mode 100644
index c8bf4c4..0000000
--- a/contexts/data/lib/ace/mode-perl-uncompressed.js
+++ /dev/null
@@ -1,583 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Panagiotis Astithas <pastith AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/perl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/perl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new PerlHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "#");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Panagiotis Astithas <pastith AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/perl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PerlHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
- "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("ARGV|ENV|INC|SIG").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" +
- "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" +
- "getpeername|setpriority|getprotoent|setprotoent|getpriority|" +
- "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" +
- "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" +
- "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" +
- "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" +
- "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" +
- "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" +
- "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" +
- "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" +
- "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" +
- "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" +
- "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" +
- "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" +
- "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" +
- "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" +
- "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" +
- "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" +
- "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" +
- "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" +
- "map|die|uc|lc|do").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0x[0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-};
-
-oop.inherits(PerlHighlightRules, TextHighlightRules);
-
-exports.PerlHighlightRules = PerlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-perl.js b/contexts/data/lib/ace/mode-perl.js
index 706bb93..0329b1b 100644
--- a/contexts/data/lib/ace/mode-perl.js
+++ b/contexts/data/lib/ace/mode-perl.js
@@ -1 +1,319 @@
-define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./perl_highlight_rules").PerlHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[\:]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(k.prototype),b.Mode=k}),define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars".split("|")),b=e.arrayToMap("ARGV|ENV|INC|SIG".split("|")),c=e.arrayToMap("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PerlHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/perl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/perl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new PerlHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)#/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "#");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/perl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PerlHighlightRules = function() {
+
+ var keywords = (
+ "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
+ "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars"
+ );
+
+ var buildinConstants = ("ARGV|ENV|INC|SIG");
+
+ var builtinFunctions = (
+ "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" +
+ "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" +
+ "getpeername|setpriority|getprotoent|setprotoent|getpriority|" +
+ "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" +
+ "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" +
+ "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" +
+ "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" +
+ "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" +
+ "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" +
+ "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" +
+ "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" +
+ "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" +
+ "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" +
+ "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" +
+ "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" +
+ "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" +
+ "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" +
+ "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" +
+ "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" +
+ "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" +
+ "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" +
+ "map|die|uc|lc|do"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": builtinFunctions
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0x[0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+};
+
+oop.inherits(PerlHighlightRules, TextHighlightRules);
+
+exports.PerlHighlightRules = PerlHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-pgsql-noconflict.js b/contexts/data/lib/ace/mode-pgsql-noconflict.js
deleted file mode 100644
index ae1e82c..0000000
--- a/contexts/data/lib/ace/mode-pgsql-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/pgsql_highlight_rules","ace/range"],function(a,b,c){var d=a("ace/lib/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/pgsql_highlight_rules").PgsqlHighlightRules,h=a("ace/range").Range,i=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(i,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)--/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var i=new h(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);i.start.row=g,i.end.row=g,i.end.column=k[0].length,b.replace(i,k[1])}}else b.indentRows(c,d,"--")},this.getNextLineIndent=function(a,b,c){return a=="start"||a=="keyword.statementEnd"?"":this.$getIndent(b)}}.call(i.prototype),b.Mode=i}),ace.define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules"],function(a,b,c){var d=a("ace/lib/oop"),e=a("ace/lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=a("./perl_highlight_rules").PerlHighlightRules,i=a("./python_highlight_rules").PythonHighlightRules,j=function(){var a=e.arrayToMap("abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|create|cross|cstring|csv|current|current_catalog|current_date|current_role|current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone".split("|")),b=e.arrayToMap("RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|has_function_privilege|has_language_privilege|has_schema_privilege|has_sequence_privilege|has_server_privilege|has_table_privilege|has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|pg_available_extension_versions|pg_available_extensions|pg_backend_pid|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|pg_stat_get_function_calls|pg_stat_get_function_self_time|pg_stat_get_function_time|pg_stat_get_last_analyze_time|pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists".split("|")),c=[{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"variable.language",regex:'".*?"'},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(c){return c=c.toLowerCase(),a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"support.function":"identifier"},regex:"[a-zA-Z_][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|~=|~>=~|~>~|~~|~~\\*"},{token:"lparen.paren",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}];this.$rules={start:[{token:"comment",regex:"--.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"keyword.statementBegin",regex:"^[a-zA-Z]+",next:"statement"},{token:"support.buildin",regex:"^\\\\[\\S]+.*$"}],statement:[{token:"comment",regex:"--.*$"},{token:"comment",merge:!0,regex:"\\/\\*",next:"commentStatement"},{token:"statementEnd",regex:";",next:"start"},{token:"string",regex:"\\$perl\\$",next:"perl-start"},{token:"string",regex:"\\$python\\$",next:"python-start"},{token:"string",regex:"\\$[\\w_0-9]*\\$$",next:"dollarSql"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarStatementString"}].concat(c),dollarSql:[{token:"comment",regex:"--.*$"},{token:"comment",merge:!0,regex:"\\/\\*",next:"commentDollarSql"},{token:"string",regex:"^\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarSqlString"}].concat(c),comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],commentStatement:[{token:"comment",regex:".*?\\*\\/",next:"statement"},{token:"comment",merge:!0,regex:".+"}],commentDollarSql:[{token:"comment",regex:".*?\\*\\/",next:"dollarSql"},{token:"comment",merge:!0,regex:".+"}],dollarStatementString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",merge:!0,regex:".+"}],dollarSqlString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"dollarSql"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")]),this.embedRules(h,"perl-",[{token:"string",regex:"\\$perl\\$",next:"statement"}]),this.embedRules(i,"python-",[{token:"string",regex:"\\$python\\$",next:"statement"}])};d.inherits(j,g),b.PgsqlHighlightRules=j}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars".split("|")),b=e.arrayToMap("ARGV|ENV|INC|SIG".split("|")),c=e.arrayToMap("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PerlHighlightRules=g}),ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")),b=e.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")),c=e.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),d=e.arrayToMap("".split("|")),f="(?:r|u|ur|R|U|UR|Ur|uR)?",g="(?:(?:[1-9]\\d*)|(?:0))",h="(?:0[oO]?[0-7]+)",i="(?:0[xX][\\dA-Fa-f]+)",j="(?:0[bB][01]+)",k="(?:"+g+"|"+h+"|"+i+"|"+j+")",l="(?:[eE][+-]?\\d+)",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:(?:"+o+"|"+n+")"+l+")",q="(?:"+p+"|"+o+")";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}(?:[^\\\\]|\\\\.)*?"{3}'},{token:"string",merge:!0,regex:f+'"{3}.*$',next:"qqstring"},{token:"string",regex:f+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:f+"'{3}(?:[^\\\\]|\\\\.)*?'{3}"},{token:"string",merge:!0,regex:f+"'{3}.*$",next:"qstring"},{token:"string",regex:f+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:"(?:"+q+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:q},{token:"constant.numeric",regex:k+"[lL]\\b"},{token:"constant.numeric",regex:k+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"invalid.illegal":c.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen.paren",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?"{3}',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?'{3}",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PythonHighlightRules=g}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-pgsql-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-pgsql-uncompressed-noconflict.js
deleted file mode 100644
index 4b071e8..0000000
--- a/contexts/data/lib/ace/mode-pgsql-uncompressed-noconflict.js
+++ /dev/null
@@ -1,1117 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* Contributor(s):
-* Jonathan Camile <jonathan.camile AT gmail DOT com>
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/pgsql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/pgsql_highlight_rules', 'ace/range'], function(require, exports, module) {
-
- var oop = require("ace/lib/oop");
- var TextMode = require("ace/mode/text").Mode;
- var Tokenizer = require("ace/tokenizer").Tokenizer;
- var PgsqlHighlightRules = require("ace/mode/pgsql_highlight_rules").PgsqlHighlightRules;
- var Range = require("ace/range").Range;
- // var EditSession = require("ace/edit_session").EditSession;
-
- var Mode = function() {
- this.$tokenizer = new Tokenizer(new PgsqlHighlightRules().getRules());
- };
- oop.inherits(Mode, TextMode);
-
- (function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- // var outentedRows = [];
- var re = /^(\s*)--/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "--");
- }
- };
-
-
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "start" || state == "keyword.statementEnd") {
- return "";
- } else {
- return this.$getIndent(line); // Keep whatever indent the previous line has
- }
- }
-
- }).call(Mode.prototype);
-
- exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * Contributor(s):
- * John DeSoi, Ph.D. <desoi AT pgedit DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- */
-
-
-ace.define('ace/mode/pgsql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/perl_highlight_rules', 'ace/mode/python_highlight_rules'], function(require, exports, module) {
-
-var oop = require("ace/lib/oop");
-var lang = require("ace/lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-// Supporting perl and python for now -- both in pg core and ace
-var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
-var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
-
-var PgsqlHighlightRules = function() {
-
- // Keywords, functions, operators last updated for pg 9.1.
- var keywords = lang.arrayToMap(
- ("abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" +
- "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|" +
- "assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|" +
- "binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" +
- "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" +
- "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" +
- "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" +
- "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" +
- "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" +
- "date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|" +
- "delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|" +
- "drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|" +
- "execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|" +
- "float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|" +
- "global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|" +
- "ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|" +
- "inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|" +
- "int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|" +
- "language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|" +
- "limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|" +
- "match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|" +
- "none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|" +
- "oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|" +
- "owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|" +
- "pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|" +
- "position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|" +
- "procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|" +
- "references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|" +
- "regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|" +
- "restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|" +
- "search|second|security|select|sequence|sequences|serializable|server|session|session_user|" +
- "set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|" +
- "statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|" +
- "tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|" +
- "tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|" +
- "txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" +
- "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" +
- "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" +
- "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" +
- "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone").split("|")
- );
-
-
- var builtinFunctions = lang.arrayToMap(
- ("RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" +
- "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" +
- "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" +
- "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" +
- "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|" +
- "aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|" +
- "anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|" +
- "anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|" +
- "array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|" +
- "array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|" +
- "array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|" +
- "array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|" +
- "ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|" +
- "big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|" +
- "bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|" +
- "bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|" +
- "boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|" +
- "box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|" +
- "box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|" +
- "box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|" +
- "box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|" +
- "bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|" +
- "bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|" +
- "bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|" +
- "bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|" +
- "bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|" +
- "btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|" +
- "btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|" +
- "btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|" +
- "btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|" +
- "btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|" +
- "bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|" +
- "bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|" +
- "cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|" +
- "cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|" +
- "cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|" +
- "center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|" +
- "charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|" +
- "cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|" +
- "circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|" +
- "circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|" +
- "circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|" +
- "circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|" +
- "clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|" +
- "close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|" +
- "convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|" +
- "cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|" +
- "current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|" +
- "cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|" +
- "database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|" +
- "date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|" +
- "date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|" +
- "date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|" +
- "date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|" +
- "date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|" +
- "date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|" +
- "diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|" +
- "dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|" +
- "dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|" +
- "dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|" +
- "enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|" +
- "enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|" +
- "euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|" +
- "euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|" +
- "euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|" +
- "float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|" +
- "float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|" +
- "float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|" +
- "float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|" +
- "float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|" +
- "float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|" +
- "float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|" +
- "float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|" +
- "float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|" +
- "float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|" +
- "float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|" +
- "flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|" +
- "fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|" +
- "generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|" +
- "getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|" +
- "gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|" +
- "ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|" +
- "gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|" +
- "ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|" +
- "gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|" +
- "gist_circle_compress|gist_circle_consistent|gist_point_compress|" +
- "gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|" +
- "gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|" +
- "gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|" +
- "gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|" +
- "gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|" +
- "gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|" +
- "gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" +
- "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" +
- "has_function_privilege|has_language_privilege|has_schema_privilege|" +
- "has_sequence_privilege|has_server_privilege|has_table_privilege|" +
- "has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|" +
- "hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|" +
- "hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|" +
- "hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|" +
- "hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|" +
- "hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|" +
- "icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|" +
- "inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|" +
- "inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|" +
- "int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|" +
- "int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|" +
- "int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|" +
- "int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|" +
- "int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|" +
- "int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|" +
- "int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|" +
- "int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|" +
- "int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|" +
- "int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|" +
- "int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|" +
- "int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|" +
- "int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|" +
- "int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|" +
- "int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|" +
- "int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|" +
- "int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|" +
- "interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|" +
- "interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|" +
- "interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|" +
- "interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|" +
- "interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|" +
- "intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|" +
- "iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|" +
- "isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|" +
- "koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|" +
- "koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|" +
- "latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|" +
- "length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|" +
- "line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|" +
- "line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|" +
- "lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|" +
- "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" +
- "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" +
- "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|" +
- "macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|" +
- "makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|" +
- "mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|" +
- "mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|" +
- "min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|" +
- "nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|" +
- "namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|" +
- "network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|" +
- "network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|" +
- "npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|" +
- "numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|" +
- "numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|" +
- "numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|" +
- "numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|" +
- "numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|" +
- "numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|" +
- "obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|" +
- "oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|" +
- "oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|" +
- "on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|" +
- "path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|" +
- "path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|" +
- "path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" +
- "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" +
- "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" +
- "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" +
- "pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|" +
- "pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" +
- "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" +
- "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" +
- "pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|" +
- "pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|" +
- "pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|" +
- "pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|" +
- "pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|" +
- "pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" +
- "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" +
- "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" +
- "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" +
- "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" +
- "pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|" +
- "pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|" +
- "pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|" +
- "pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|" +
- "pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|" +
- "pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|" +
- "pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|" +
- "pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|" +
- "pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|" +
- "pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|" +
- "pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|" +
- "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" +
- "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" +
- "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" +
- "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" +
- "pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|" +
- "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" +
- "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" +
- "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" +
- "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|" +
- "pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|" +
- "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" +
- "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" +
- "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" +
- "pg_stat_get_function_calls|pg_stat_get_function_self_time|" +
- "pg_stat_get_function_time|pg_stat_get_last_analyze_time|" +
- "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" +
- "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" +
- "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" +
- "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" +
- "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" +
- "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" +
- "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" +
- "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|" +
- "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" +
- "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" +
- "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" +
- "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" +
- "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" +
- "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" +
- "pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|" +
- "pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|" +
- "pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|" +
- "pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|" +
- "pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|" +
- "pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|" +
- "pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|" +
- "point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|" +
- "point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|" +
- "point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|" +
- "poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|" +
- "poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|" +
- "poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|" +
- "postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|" +
- "prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|" +
- "query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|" +
- "quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|" +
- "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" +
- "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" +
- "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" +
- "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" +
- "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" +
- "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" +
- "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" +
- "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" +
- "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" +
- "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" +
- "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|" +
- "scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" +
- "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" +
- "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" +
- "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" +
- "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" +
- "smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|" +
- "string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" +
- "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" +
- "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" +
- "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" +
- "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" +
- "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" +
- "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" +
- "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" +
- "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" +
- "time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" +
- "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" +
- "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" +
- "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" +
- "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" +
- "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" +
- "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" +
- "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" +
- "timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|" +
- "timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|" +
- "timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" +
- "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" +
- "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" +
- "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" +
- "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" +
- "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" +
- "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" +
- "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" +
- "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" +
- "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" +
- "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" +
- "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" +
- "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" +
- "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" +
- "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" +
- "to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" +
- "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" +
- "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" +
- "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" +
- "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" +
- "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|" +
- "tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|" +
- "tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|" +
- "tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|" +
- "txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|" +
- "txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|" +
- "uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|" +
- "upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|" +
- "utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|" +
- "utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|" +
- "utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|" +
- "uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|" +
- "varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" +
- "varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|" +
- "varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|" +
- "void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|" +
- "win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|" +
- "win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|" +
- "xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|" +
- "xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|" +
- "xpath_exists").split("|")
- );
-
- var sqlRules = [
- {
- token : "string", // single line string -- assume dollar strings if multi-line for now
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "variable.language", // pg identifier
- regex : '".*?"'
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : function(value) {
- value = value.toLowerCase();
- if (keywords.hasOwnProperty(value)) {
- return "keyword";
- } else if (builtinFunctions.hasOwnProperty(value)) {
- return "support.function";
- } else {
- return "identifier";
- }
- },
- regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers
- }, {
- token : "keyword.operator",
- regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" +
- "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" +
- "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" +
- "~=|~>=~|~>~|~~|~~\\*"
- }, {
- token : "lparen.paren",
- regex : "[\\(]"
- }, {
- token : "paren.rparen",
- regex : "[\\)]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ];
-
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "--.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi-line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- },{
- token : "keyword.statementBegin",
- regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
- next : "statement"
- },{
- token : "support.buildin", // psql directive
- regex : "^\\\\[\\S]+.*$"
- }
- ],
-
- "statement" : [
- {
- token : "comment",
- regex : "--.*$"
- }, {
- token : "comment", // multi-line comment
- merge : true,
- regex : "\\/\\*",
- next : "commentStatement"
- }, {
- token : "statementEnd",
- regex : ";",
- next : "start"
- }, {
- token : "string", // perl, python, tcl are in the pg default dist (no tcl highlighter)
- regex : "\\$perl\\$",
- next : "perl-start"
- }, {
- token : "string",
- regex : "\\$python\\$",
- next : "python-start"
- },{
- token : "string",
- regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line
- next : "dollarSql"
- }, {
- token : "string",
- regex : "\\$[\\w_0-9]*\\$",
- next : "dollarStatementString"
- }
- ].concat(sqlRules),
-
- "dollarSql" : [
- {
- token : "comment",
- regex : "--.*$"
- }, {
- token : "comment", // multi-line comment
- merge : true,
- regex : "\\/\\*",
- next : "commentDollarSql"
- }, {
- token : "string", // end quoting with dollar at the start of a line
- regex : "^\\$[\\w_0-9]*\\$",
- next : "statement"
- }, {
- token : "string",
- regex : "\\$[\\w_0-9]*\\$",
- next : "dollarSqlString"
- }
- ].concat(sqlRules),
-
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "commentStatement" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "statement"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "commentDollarSql" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "dollarSql"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "dollarStatementString" : [
- {
- token : "string", // closing dollarstring
- regex : ".*?\\$[\\w_0-9]*\\$",
- next : "statement"
- }, {
- token : "string", // dollarstring spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "dollarSqlString" : [
- {
- token : "string", // closing dollarstring
- regex : ".*?\\$[\\w_0-9]*\\$",
- next : "dollarSql"
- }, {
- token : "string", // dollarstring spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-", [ new DocCommentHighlightRules().getEndRule("start") ]);
- this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]);
- this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]);
-};
-
-oop.inherits(PgsqlHighlightRules, TextHighlightRules);
-
-exports.PgsqlHighlightRules = PgsqlHighlightRules;
-});
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Panagiotis Astithas <pastith AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/perl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PerlHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
- "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("ARGV|ENV|INC|SIG").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" +
- "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" +
- "getpeername|setpriority|getprotoent|setprotoent|getpriority|" +
- "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" +
- "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" +
- "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" +
- "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" +
- "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" +
- "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" +
- "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" +
- "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" +
- "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" +
- "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" +
- "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" +
- "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" +
- "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" +
- "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" +
- "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" +
- "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" +
- "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" +
- "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" +
- "map|die|uc|lc|do").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0x[0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-};
-
-oop.inherits(PerlHighlightRules, TextHighlightRules);
-
-exports.PerlHighlightRules = PerlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- * TODO: python delimiters
- */
-
-ace.define('ace/mode/python_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PythonHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
- "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
- "raise|return|try|while|with|yield").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("True|False|None|NotImplemented|Ellipsis|__debug__").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
- "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
- "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
- "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
- "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
- "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
- "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
- "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("").split("|")
- );
-
- var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var octInteger = "(?:0[oO]?[0-7]+)";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var binInteger = "(?:0[bB][01]+)";
- var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
-
- var exponent = "(?:[eE][+-]?\\d+)";
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
- var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
-
- this.$rules = {
- "start" : [ {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string", // """ string
- regex : strPre + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'
- }, {
- token : "string", // multi line """ string start
- merge : true,
- regex : strPre + '"{3}.*$',
- next : "qqstring"
- }, {
- token : "string", // " string
- regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
- }, {
- token : "string", // ''' string
- regex : strPre + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"
- }, {
- token : "string", // multi line ''' string start
- merge : true,
- regex : strPre + "'{3}.*$",
- next : "qstring"
- }, {
- token : "string", // ' string
- regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
- }, {
- token : "constant.numeric", // imaginary
- regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
- }, {
- token : "constant.numeric", // float
- regex : floatNumber
- }, {
- token : "constant.numeric", // long integer
- regex : integer + "[lL]\\b"
- }, {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
- }, {
- token : "lparen.paren",
- regex : "[\\[\\(\\{]"
- }, {
- token : "paren.rparen",
- regex : "[\\]\\)\\}]"
- }, {
- token : "text",
- regex : "\\s+"
- } ],
- "qqstring" : [ {
- token : "string", // multi line """ string end
- regex : '(?:[^\\\\]|\\\\.)*?"{3}',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring" : [ {
- token : "string", // multi line ''' string end
- regex : "(?:[^\\\\]|\\\\.)*?'{3}",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ]
- };
-};
-
-oop.inherits(PythonHighlightRules, TextHighlightRules);
-
-exports.PythonHighlightRules = PythonHighlightRules;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-pgsql-uncompressed.js b/contexts/data/lib/ace/mode-pgsql-uncompressed.js
deleted file mode 100644
index 1931c8e..0000000
--- a/contexts/data/lib/ace/mode-pgsql-uncompressed.js
+++ /dev/null
@@ -1,1117 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* Contributor(s):
-* Jonathan Camile <jonathan.camile AT gmail DOT com>
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/pgsql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/pgsql_highlight_rules', 'ace/range'], function(require, exports, module) {
-
- var oop = require("ace/lib/oop");
- var TextMode = require("ace/mode/text").Mode;
- var Tokenizer = require("ace/tokenizer").Tokenizer;
- var PgsqlHighlightRules = require("ace/mode/pgsql_highlight_rules").PgsqlHighlightRules;
- var Range = require("ace/range").Range;
- // var EditSession = require("ace/edit_session").EditSession;
-
- var Mode = function() {
- this.$tokenizer = new Tokenizer(new PgsqlHighlightRules().getRules());
- };
- oop.inherits(Mode, TextMode);
-
- (function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- // var outentedRows = [];
- var re = /^(\s*)--/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "--");
- }
- };
-
-
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "start" || state == "keyword.statementEnd") {
- return "";
- } else {
- return this.$getIndent(line); // Keep whatever indent the previous line has
- }
- }
-
- }).call(Mode.prototype);
-
- exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * Contributor(s):
- * John DeSoi, Ph.D. <desoi AT pgedit DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- */
-
-
-define('ace/mode/pgsql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/perl_highlight_rules', 'ace/mode/python_highlight_rules'], function(require, exports, module) {
-
-var oop = require("ace/lib/oop");
-var lang = require("ace/lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-// Supporting perl and python for now -- both in pg core and ace
-var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
-var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
-
-var PgsqlHighlightRules = function() {
-
- // Keywords, functions, operators last updated for pg 9.1.
- var keywords = lang.arrayToMap(
- ("abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" +
- "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|" +
- "assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|" +
- "binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" +
- "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" +
- "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" +
- "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" +
- "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" +
- "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" +
- "date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|" +
- "delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|" +
- "drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|" +
- "execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|" +
- "float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|" +
- "global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|" +
- "ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|" +
- "inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|" +
- "int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|" +
- "language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|" +
- "limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|" +
- "match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|" +
- "none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|" +
- "oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|" +
- "owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|" +
- "pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|" +
- "position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|" +
- "procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|" +
- "references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|" +
- "regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|" +
- "restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|" +
- "search|second|security|select|sequence|sequences|serializable|server|session|session_user|" +
- "set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|" +
- "statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|" +
- "tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|" +
- "tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|" +
- "txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" +
- "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" +
- "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" +
- "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" +
- "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone").split("|")
- );
-
-
- var builtinFunctions = lang.arrayToMap(
- ("RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" +
- "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" +
- "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" +
- "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" +
- "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|" +
- "aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|" +
- "anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|" +
- "anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|" +
- "array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|" +
- "array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|" +
- "array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|" +
- "array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|" +
- "ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|" +
- "big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|" +
- "bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|" +
- "bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|" +
- "boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|" +
- "box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|" +
- "box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|" +
- "box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|" +
- "box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|" +
- "bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|" +
- "bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|" +
- "bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|" +
- "bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|" +
- "bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|" +
- "btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|" +
- "btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|" +
- "btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|" +
- "btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|" +
- "btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|" +
- "bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|" +
- "bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|" +
- "cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|" +
- "cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|" +
- "cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|" +
- "center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|" +
- "charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|" +
- "cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|" +
- "circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|" +
- "circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|" +
- "circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|" +
- "circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|" +
- "clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|" +
- "close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|" +
- "convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|" +
- "cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|" +
- "current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|" +
- "cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|" +
- "database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|" +
- "date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|" +
- "date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|" +
- "date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|" +
- "date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|" +
- "date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|" +
- "date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|" +
- "diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|" +
- "dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|" +
- "dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|" +
- "dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|" +
- "enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|" +
- "enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|" +
- "euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|" +
- "euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|" +
- "euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|" +
- "float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|" +
- "float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|" +
- "float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|" +
- "float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|" +
- "float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|" +
- "float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|" +
- "float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|" +
- "float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|" +
- "float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|" +
- "float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|" +
- "float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|" +
- "flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|" +
- "fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|" +
- "generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|" +
- "getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|" +
- "gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|" +
- "ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|" +
- "gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|" +
- "ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|" +
- "gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|" +
- "gist_circle_compress|gist_circle_consistent|gist_point_compress|" +
- "gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|" +
- "gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|" +
- "gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|" +
- "gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|" +
- "gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|" +
- "gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|" +
- "gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" +
- "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" +
- "has_function_privilege|has_language_privilege|has_schema_privilege|" +
- "has_sequence_privilege|has_server_privilege|has_table_privilege|" +
- "has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|" +
- "hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|" +
- "hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|" +
- "hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|" +
- "hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|" +
- "hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|" +
- "icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|" +
- "inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|" +
- "inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|" +
- "int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|" +
- "int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|" +
- "int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|" +
- "int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|" +
- "int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|" +
- "int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|" +
- "int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|" +
- "int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|" +
- "int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|" +
- "int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|" +
- "int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|" +
- "int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|" +
- "int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|" +
- "int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|" +
- "int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|" +
- "int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|" +
- "int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|" +
- "interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|" +
- "interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|" +
- "interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|" +
- "interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|" +
- "interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|" +
- "intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|" +
- "iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|" +
- "isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|" +
- "koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|" +
- "koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|" +
- "latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|" +
- "length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|" +
- "line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|" +
- "line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|" +
- "lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|" +
- "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" +
- "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" +
- "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|" +
- "macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|" +
- "makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|" +
- "mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|" +
- "mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|" +
- "min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|" +
- "nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|" +
- "namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|" +
- "network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|" +
- "network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|" +
- "npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|" +
- "numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|" +
- "numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|" +
- "numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|" +
- "numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|" +
- "numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|" +
- "numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|" +
- "obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|" +
- "oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|" +
- "oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|" +
- "on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|" +
- "path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|" +
- "path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|" +
- "path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" +
- "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" +
- "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" +
- "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" +
- "pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|" +
- "pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" +
- "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" +
- "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" +
- "pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|" +
- "pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|" +
- "pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|" +
- "pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|" +
- "pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|" +
- "pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" +
- "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" +
- "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" +
- "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" +
- "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" +
- "pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|" +
- "pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|" +
- "pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|" +
- "pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|" +
- "pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|" +
- "pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|" +
- "pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|" +
- "pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|" +
- "pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|" +
- "pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|" +
- "pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|" +
- "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" +
- "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" +
- "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" +
- "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" +
- "pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|" +
- "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" +
- "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" +
- "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" +
- "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|" +
- "pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|" +
- "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" +
- "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" +
- "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" +
- "pg_stat_get_function_calls|pg_stat_get_function_self_time|" +
- "pg_stat_get_function_time|pg_stat_get_last_analyze_time|" +
- "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" +
- "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" +
- "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" +
- "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" +
- "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" +
- "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" +
- "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" +
- "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|" +
- "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" +
- "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" +
- "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" +
- "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" +
- "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" +
- "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" +
- "pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|" +
- "pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|" +
- "pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|" +
- "pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|" +
- "pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|" +
- "pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|" +
- "pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|" +
- "point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|" +
- "point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|" +
- "point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|" +
- "poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|" +
- "poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|" +
- "poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|" +
- "postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|" +
- "prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|" +
- "query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|" +
- "quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|" +
- "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" +
- "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" +
- "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" +
- "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" +
- "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" +
- "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" +
- "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" +
- "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" +
- "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" +
- "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" +
- "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|" +
- "scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" +
- "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" +
- "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" +
- "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" +
- "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" +
- "smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|" +
- "string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" +
- "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" +
- "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" +
- "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" +
- "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" +
- "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" +
- "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" +
- "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" +
- "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" +
- "time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" +
- "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" +
- "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" +
- "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" +
- "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" +
- "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" +
- "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" +
- "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" +
- "timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|" +
- "timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|" +
- "timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" +
- "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" +
- "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" +
- "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" +
- "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" +
- "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" +
- "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" +
- "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" +
- "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" +
- "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" +
- "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" +
- "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" +
- "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" +
- "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" +
- "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" +
- "to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" +
- "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" +
- "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" +
- "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" +
- "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" +
- "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|" +
- "tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|" +
- "tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|" +
- "tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|" +
- "txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|" +
- "txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|" +
- "uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|" +
- "upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|" +
- "utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|" +
- "utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|" +
- "utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|" +
- "uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|" +
- "varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" +
- "varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|" +
- "varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|" +
- "void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|" +
- "win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|" +
- "win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|" +
- "xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|" +
- "xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|" +
- "xpath_exists").split("|")
- );
-
- var sqlRules = [
- {
- token : "string", // single line string -- assume dollar strings if multi-line for now
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "variable.language", // pg identifier
- regex : '".*?"'
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : function(value) {
- value = value.toLowerCase();
- if (keywords.hasOwnProperty(value)) {
- return "keyword";
- } else if (builtinFunctions.hasOwnProperty(value)) {
- return "support.function";
- } else {
- return "identifier";
- }
- },
- regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers
- }, {
- token : "keyword.operator",
- regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" +
- "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" +
- "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" +
- "~=|~>=~|~>~|~~|~~\\*"
- }, {
- token : "lparen.paren",
- regex : "[\\(]"
- }, {
- token : "paren.rparen",
- regex : "[\\)]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ];
-
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "--.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi-line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- },{
- token : "keyword.statementBegin",
- regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
- next : "statement"
- },{
- token : "support.buildin", // psql directive
- regex : "^\\\\[\\S]+.*$"
- }
- ],
-
- "statement" : [
- {
- token : "comment",
- regex : "--.*$"
- }, {
- token : "comment", // multi-line comment
- merge : true,
- regex : "\\/\\*",
- next : "commentStatement"
- }, {
- token : "statementEnd",
- regex : ";",
- next : "start"
- }, {
- token : "string", // perl, python, tcl are in the pg default dist (no tcl highlighter)
- regex : "\\$perl\\$",
- next : "perl-start"
- }, {
- token : "string",
- regex : "\\$python\\$",
- next : "python-start"
- },{
- token : "string",
- regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line
- next : "dollarSql"
- }, {
- token : "string",
- regex : "\\$[\\w_0-9]*\\$",
- next : "dollarStatementString"
- }
- ].concat(sqlRules),
-
- "dollarSql" : [
- {
- token : "comment",
- regex : "--.*$"
- }, {
- token : "comment", // multi-line comment
- merge : true,
- regex : "\\/\\*",
- next : "commentDollarSql"
- }, {
- token : "string", // end quoting with dollar at the start of a line
- regex : "^\\$[\\w_0-9]*\\$",
- next : "statement"
- }, {
- token : "string",
- regex : "\\$[\\w_0-9]*\\$",
- next : "dollarSqlString"
- }
- ].concat(sqlRules),
-
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "commentStatement" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "statement"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "commentDollarSql" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "dollarSql"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "dollarStatementString" : [
- {
- token : "string", // closing dollarstring
- regex : ".*?\\$[\\w_0-9]*\\$",
- next : "statement"
- }, {
- token : "string", // dollarstring spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
-
- "dollarSqlString" : [
- {
- token : "string", // closing dollarstring
- regex : ".*?\\$[\\w_0-9]*\\$",
- next : "dollarSql"
- }, {
- token : "string", // dollarstring spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-", [ new DocCommentHighlightRules().getEndRule("start") ]);
- this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]);
- this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]);
-};
-
-oop.inherits(PgsqlHighlightRules, TextHighlightRules);
-
-exports.PgsqlHighlightRules = PgsqlHighlightRules;
-});
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Panagiotis Astithas <pastith AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/perl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PerlHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
- "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("ARGV|ENV|INC|SIG").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" +
- "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" +
- "getpeername|setpriority|getprotoent|setprotoent|getpriority|" +
- "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" +
- "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" +
- "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" +
- "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" +
- "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" +
- "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" +
- "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" +
- "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" +
- "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" +
- "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" +
- "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" +
- "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" +
- "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" +
- "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" +
- "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" +
- "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" +
- "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" +
- "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" +
- "map|die|uc|lc|do").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0x[0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-};
-
-oop.inherits(PerlHighlightRules, TextHighlightRules);
-
-exports.PerlHighlightRules = PerlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- * TODO: python delimiters
- */
-
-define('ace/mode/python_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PythonHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
- "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
- "raise|return|try|while|with|yield").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("True|False|None|NotImplemented|Ellipsis|__debug__").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
- "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
- "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
- "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
- "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
- "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
- "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
- "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("").split("|")
- );
-
- var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var octInteger = "(?:0[oO]?[0-7]+)";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var binInteger = "(?:0[bB][01]+)";
- var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
-
- var exponent = "(?:[eE][+-]?\\d+)";
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
- var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
-
- this.$rules = {
- "start" : [ {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string", // """ string
- regex : strPre + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'
- }, {
- token : "string", // multi line """ string start
- merge : true,
- regex : strPre + '"{3}.*$',
- next : "qqstring"
- }, {
- token : "string", // " string
- regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
- }, {
- token : "string", // ''' string
- regex : strPre + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"
- }, {
- token : "string", // multi line ''' string start
- merge : true,
- regex : strPre + "'{3}.*$",
- next : "qstring"
- }, {
- token : "string", // ' string
- regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
- }, {
- token : "constant.numeric", // imaginary
- regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
- }, {
- token : "constant.numeric", // float
- regex : floatNumber
- }, {
- token : "constant.numeric", // long integer
- regex : integer + "[lL]\\b"
- }, {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
- }, {
- token : "lparen.paren",
- regex : "[\\[\\(\\{]"
- }, {
- token : "paren.rparen",
- regex : "[\\]\\)\\}]"
- }, {
- token : "text",
- regex : "\\s+"
- } ],
- "qqstring" : [ {
- token : "string", // multi line """ string end
- regex : '(?:[^\\\\]|\\\\.)*?"{3}',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring" : [ {
- token : "string", // multi line ''' string end
- regex : "(?:[^\\\\]|\\\\.)*?'{3}",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ]
- };
-};
-
-oop.inherits(PythonHighlightRules, TextHighlightRules);
-
-exports.PythonHighlightRules = PythonHighlightRules;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-pgsql.js b/contexts/data/lib/ace/mode-pgsql.js
index a4a1a3c..5533114 100644
--- a/contexts/data/lib/ace/mode-pgsql.js
+++ b/contexts/data/lib/ace/mode-pgsql.js
@@ -1 +1,928 @@
-define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/pgsql_highlight_rules","ace/range"],function(a,b,c){var d=a("ace/lib/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/pgsql_highlight_rules").PgsqlHighlightRules,h=a("ace/range").Range,i=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(i,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)--/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var i=new h(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);i.start.row=g,i.end.row=g,i.end.column=k[0].length,b.replace(i,k[1])}}else b.indentRows(c,d,"--")},this.getNextLineIndent=function(a,b,c){return a=="start"||a=="keyword.statementEnd"?"":this.$getIndent(b)}}.call(i.prototype),b.Mode=i}),define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules"],function(a,b,c){var d=a("ace/lib/oop"),e=a("ace/lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=a("./perl_highlight_rules").PerlHighlightRules,i=a("./python_highlight_rules").PythonHighlightRules,j=function(){var a=e.arrayToMap("abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|create|cross|cstring|csv|current|current_catalog|current_date|current_role|current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone".split("|")),b=e.arrayToMap("RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|has_function_privilege|has_language_privilege|has_schema_privilege|has_sequence_privilege|has_server_privilege|has_table_privilege|has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|pg_available_extension_versions|pg_available_extensions|pg_backend_pid|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|pg_stat_get_function_calls|pg_stat_get_function_self_time|pg_stat_get_function_time|pg_stat_get_last_analyze_time|pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists".split("|")),c=[{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"variable.language",regex:'".*?"'},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(c){return c=c.toLowerCase(),a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"support.function":"identifier"},regex:"[a-zA-Z_][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|~=|~>=~|~>~|~~|~~\\*"},{token:"lparen.paren",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}];this.$rules={start:[{token:"comment",regex:"--.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"keyword.statementBegin",regex:"^[a-zA-Z]+",next:"statement"},{token:"support.buildin",regex:"^\\\\[\\S]+.*$"}],statement:[{token:"comment",regex:"--.*$"},{token:"comment",merge:!0,regex:"\\/\\*",next:"commentStatement"},{token:"statementEnd",regex:";",next:"start"},{token:"string",regex:"\\$perl\\$",next:"perl-start"},{token:"string",regex:"\\$python\\$",next:"python-start"},{token:"string",regex:"\\$[\\w_0-9]*\\$$",next:"dollarSql"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarStatementString"}].concat(c),dollarSql:[{token:"comment",regex:"--.*$"},{token:"comment",merge:!0,regex:"\\/\\*",next:"commentDollarSql"},{token:"string",regex:"^\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarSqlString"}].concat(c),comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],commentStatement:[{token:"comment",regex:".*?\\*\\/",next:"statement"},{token:"comment",merge:!0,regex:".+"}],commentDollarSql:[{token:"comment",regex:".*?\\*\\/",next:"dollarSql"},{token:"comment",merge:!0,regex:".+"}],dollarStatementString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",merge:!0,regex:".+"}],dollarSqlString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"dollarSql"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")]),this.embedRules(h,"perl-",[{token:"string",regex:"\\$perl\\$",next:"statement"}]),this.embedRules(i,"python-",[{token:"string",regex:"\\$python\\$",next:"statement"}])};d.inherits(j,g),b.PgsqlHighlightRules=j}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars".split("|")),b=e.arrayToMap("ARGV|ENV|INC|SIG".split("|")),c=e.arrayToMap("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PerlHighlightRules=g}),define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")),b=e.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")),c=e.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),d=e.arrayToMap("".split("|")),f="(?:r|u|ur|R|U|UR|Ur|uR)?",g="(?:(?:[1-9]\\d*)|(?:0))",h="(?:0[oO]?[0-7]+)",i="(?:0[xX][\\dA-Fa-f]+)",j="(?:0[bB][01]+)",k="(?:"+g+"|"+h+"|"+i+"|"+j+")",l="(?:[eE][+-]?\\d+)",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:(?:"+o+"|"+n+")"+l+")",q="(?:"+p+"|"+o+")";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}(?:[^\\\\]|\\\\.)*?"{3}'},{token:"string",merge:!0,regex:f+'"{3}.*$',next:"qqstring"},{token:"string",regex:f+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:f+"'{3}(?:[^\\\\]|\\\\.)*?'{3}"},{token:"string",merge:!0,regex:f+"'{3}.*$",next:"qstring"},{token:"string",regex:f+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:"(?:"+q+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:q},{token:"constant.numeric",regex:k+"[lL]\\b"},{token:"constant.numeric",regex:k+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"invalid.illegal":c.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen.paren",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?"{3}',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?'{3}",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PythonHighlightRules=g}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/pgsql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/pgsql_highlight_rules', 'ace/range'], function(require, exports, module) {
+
+ var oop = require("../lib/oop");
+ var TextMode = require("../mode/text").Mode;
+ var Tokenizer = require("../tokenizer").Tokenizer;
+ var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules;
+ var Range = require("../range").Range;
+
+ var Mode = function() {
+ this.$tokenizer = new Tokenizer(new PgsqlHighlightRules().getRules());
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)--/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "--");
+ }
+ };
+
+
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "start" || state == "keyword.statementEnd") {
+ return "";
+ } else {
+ return this.$getIndent(line); // Keep whatever indent the previous line has
+ }
+ }
+
+ }).call(Mode.prototype);
+
+ exports.Mode = Mode;
+});
+
+ace.define('ace/mode/pgsql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/perl_highlight_rules', 'ace/mode/python_highlight_rules'], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
+var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
+
+var PgsqlHighlightRules = function() {
+ var keywords = (
+ "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" +
+ "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|" +
+ "assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|" +
+ "binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" +
+ "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" +
+ "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" +
+ "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" +
+ "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" +
+ "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" +
+ "date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|" +
+ "delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|" +
+ "drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|" +
+ "execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|" +
+ "float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|" +
+ "global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|" +
+ "ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|" +
+ "inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|" +
+ "int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|" +
+ "language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|" +
+ "limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|" +
+ "match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|" +
+ "none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|" +
+ "oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|" +
+ "owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|" +
+ "pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|" +
+ "position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|" +
+ "procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|" +
+ "references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|" +
+ "regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|" +
+ "restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|" +
+ "search|second|security|select|sequence|sequences|serializable|server|session|session_user|" +
+ "set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|" +
+ "statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|" +
+ "tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|" +
+ "tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|" +
+ "txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" +
+ "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" +
+ "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" +
+ "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" +
+ "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone"
+ );
+
+
+ var builtinFunctions = (
+ "RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" +
+ "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" +
+ "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" +
+ "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" +
+ "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|" +
+ "aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|" +
+ "anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|" +
+ "anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|" +
+ "array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|" +
+ "array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|" +
+ "array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|" +
+ "array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|" +
+ "ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|" +
+ "big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|" +
+ "bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|" +
+ "bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|" +
+ "boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|" +
+ "box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|" +
+ "box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|" +
+ "box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|" +
+ "box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|" +
+ "bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|" +
+ "bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|" +
+ "bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|" +
+ "bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|" +
+ "bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|" +
+ "btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|" +
+ "btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|" +
+ "btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|" +
+ "btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|" +
+ "btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|" +
+ "bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|" +
+ "bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|" +
+ "cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|" +
+ "cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|" +
+ "cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|" +
+ "center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|" +
+ "charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|" +
+ "cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|" +
+ "circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|" +
+ "circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|" +
+ "circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|" +
+ "circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|" +
+ "clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|" +
+ "close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|" +
+ "convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|" +
+ "cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|" +
+ "current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|" +
+ "cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|" +
+ "database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|" +
+ "date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|" +
+ "date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|" +
+ "date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|" +
+ "date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|" +
+ "date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|" +
+ "date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|" +
+ "diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|" +
+ "dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|" +
+ "dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|" +
+ "dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|" +
+ "enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|" +
+ "enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|" +
+ "euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|" +
+ "euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|" +
+ "euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|" +
+ "float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|" +
+ "float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|" +
+ "float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|" +
+ "float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|" +
+ "float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|" +
+ "float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|" +
+ "float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|" +
+ "float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|" +
+ "float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|" +
+ "float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|" +
+ "float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|" +
+ "flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|" +
+ "fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|" +
+ "generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|" +
+ "getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|" +
+ "gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|" +
+ "ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|" +
+ "gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|" +
+ "ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|" +
+ "gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|" +
+ "gist_circle_compress|gist_circle_consistent|gist_point_compress|" +
+ "gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|" +
+ "gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|" +
+ "gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|" +
+ "gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|" +
+ "gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|" +
+ "gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|" +
+ "gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" +
+ "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" +
+ "has_function_privilege|has_language_privilege|has_schema_privilege|" +
+ "has_sequence_privilege|has_server_privilege|has_table_privilege|" +
+ "has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|" +
+ "hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|" +
+ "hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|" +
+ "hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|" +
+ "hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|" +
+ "hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|" +
+ "icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|" +
+ "inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|" +
+ "inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|" +
+ "int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|" +
+ "int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|" +
+ "int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|" +
+ "int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|" +
+ "int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|" +
+ "int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|" +
+ "int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|" +
+ "int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|" +
+ "int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|" +
+ "int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|" +
+ "int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|" +
+ "int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|" +
+ "int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|" +
+ "int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|" +
+ "int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|" +
+ "int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|" +
+ "int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|" +
+ "interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|" +
+ "interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|" +
+ "interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|" +
+ "interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|" +
+ "interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|" +
+ "intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|" +
+ "iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|" +
+ "isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|" +
+ "koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|" +
+ "koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|" +
+ "latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|" +
+ "length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|" +
+ "line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|" +
+ "line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|" +
+ "lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|" +
+ "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" +
+ "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" +
+ "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|" +
+ "macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|" +
+ "makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|" +
+ "mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|" +
+ "mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|" +
+ "min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|" +
+ "nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|" +
+ "namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|" +
+ "network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|" +
+ "network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|" +
+ "npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|" +
+ "numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|" +
+ "numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|" +
+ "numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|" +
+ "numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|" +
+ "numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|" +
+ "numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|" +
+ "obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|" +
+ "oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|" +
+ "oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|" +
+ "on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|" +
+ "path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|" +
+ "path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|" +
+ "path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" +
+ "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" +
+ "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" +
+ "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" +
+ "pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|" +
+ "pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" +
+ "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" +
+ "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" +
+ "pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|" +
+ "pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|" +
+ "pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|" +
+ "pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|" +
+ "pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|" +
+ "pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" +
+ "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" +
+ "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" +
+ "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" +
+ "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" +
+ "pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|" +
+ "pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|" +
+ "pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|" +
+ "pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|" +
+ "pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|" +
+ "pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|" +
+ "pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|" +
+ "pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|" +
+ "pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|" +
+ "pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|" +
+ "pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|" +
+ "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" +
+ "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" +
+ "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" +
+ "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" +
+ "pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|" +
+ "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" +
+ "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" +
+ "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" +
+ "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|" +
+ "pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|" +
+ "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" +
+ "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" +
+ "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" +
+ "pg_stat_get_function_calls|pg_stat_get_function_self_time|" +
+ "pg_stat_get_function_time|pg_stat_get_last_analyze_time|" +
+ "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" +
+ "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" +
+ "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" +
+ "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" +
+ "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" +
+ "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" +
+ "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" +
+ "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|" +
+ "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" +
+ "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" +
+ "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" +
+ "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" +
+ "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" +
+ "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" +
+ "pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|" +
+ "pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|" +
+ "pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|" +
+ "pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|" +
+ "pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|" +
+ "pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|" +
+ "pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|" +
+ "point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|" +
+ "point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|" +
+ "point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|" +
+ "poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|" +
+ "poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|" +
+ "poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|" +
+ "postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|" +
+ "prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|" +
+ "query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|" +
+ "quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|" +
+ "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" +
+ "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" +
+ "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" +
+ "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" +
+ "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" +
+ "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" +
+ "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" +
+ "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" +
+ "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" +
+ "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" +
+ "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|" +
+ "scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" +
+ "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" +
+ "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" +
+ "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" +
+ "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" +
+ "smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|" +
+ "string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" +
+ "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" +
+ "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" +
+ "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" +
+ "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" +
+ "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" +
+ "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" +
+ "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" +
+ "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" +
+ "time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" +
+ "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" +
+ "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" +
+ "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" +
+ "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" +
+ "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" +
+ "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" +
+ "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" +
+ "timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|" +
+ "timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|" +
+ "timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" +
+ "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" +
+ "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" +
+ "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" +
+ "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" +
+ "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" +
+ "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" +
+ "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" +
+ "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" +
+ "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" +
+ "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" +
+ "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" +
+ "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" +
+ "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" +
+ "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" +
+ "to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" +
+ "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" +
+ "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" +
+ "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" +
+ "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" +
+ "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|" +
+ "tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|" +
+ "tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|" +
+ "tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|" +
+ "txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|" +
+ "txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|" +
+ "uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|" +
+ "upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|" +
+ "utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|" +
+ "utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|" +
+ "utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|" +
+ "uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|" +
+ "varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" +
+ "varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|" +
+ "varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|" +
+ "void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|" +
+ "win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|" +
+ "win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|" +
+ "xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|" +
+ "xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|" +
+ "xpath_exists"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords
+ }, "identifier", true);
+
+
+ var sqlRules = [
+ {
+ token : "string", // single line string -- assume dollar strings if multi-line for now
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "variable.language", // pg identifier
+ regex : '".*?"'
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers
+ }, {
+ token : "keyword.operator",
+ regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" +
+ "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" +
+ "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" +
+ "~=|~>=~|~>~|~~|~~\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ];
+
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "--.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "comment"
+ },{
+ token : "keyword.statementBegin",
+ regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
+ next : "statement"
+ },{
+ token : "support.buildin", // psql directive
+ regex : "^\\\\[\\S]+.*$"
+ }
+ ],
+
+ "statement" : [
+ {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "commentStatement"
+ }, {
+ token : "statementEnd",
+ regex : ";",
+ next : "start"
+ }, {
+ token : "string", // perl, python, tcl are in the pg default dist (no tcl highlighter)
+ regex : "\\$perl\\$",
+ next : "perl-start"
+ }, {
+ token : "string",
+ regex : "\\$python\\$",
+ next : "python-start"
+ },{
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line
+ next : "dollarSql"
+ }, {
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$",
+ next : "dollarStatementString"
+ }
+ ].concat(sqlRules),
+
+ "dollarSql" : [
+ {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "commentDollarSql"
+ }, {
+ token : "string", // end quoting with dollar at the start of a line
+ regex : "^\\$[\\w_0-9]*\\$",
+ next : "statement"
+ }, {
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$",
+ next : "dollarSqlString"
+ }
+ ].concat(sqlRules),
+
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "commentStatement" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "statement"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "commentDollarSql" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "dollarSql"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "dollarStatementString" : [
+ {
+ token : "string", // closing dollarstring
+ regex : ".*?\\$[\\w_0-9]*\\$",
+ next : "statement"
+ }, {
+ token : "string", // dollarstring spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "dollarSqlString" : [
+ {
+ token : "string", // closing dollarstring
+ regex : ".*?\\$[\\w_0-9]*\\$",
+ next : "dollarSql"
+ }, {
+ token : "string", // dollarstring spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]);
+ this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]);
+};
+
+oop.inherits(PgsqlHighlightRules, TextHighlightRules);
+
+exports.PgsqlHighlightRules = PgsqlHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/perl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PerlHighlightRules = function() {
+
+ var keywords = (
+ "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
+ "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars"
+ );
+
+ var buildinConstants = ("ARGV|ENV|INC|SIG");
+
+ var builtinFunctions = (
+ "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" +
+ "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" +
+ "getpeername|setpriority|getprotoent|setprotoent|getpriority|" +
+ "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" +
+ "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" +
+ "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" +
+ "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" +
+ "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" +
+ "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" +
+ "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" +
+ "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" +
+ "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" +
+ "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" +
+ "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" +
+ "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" +
+ "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" +
+ "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" +
+ "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" +
+ "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" +
+ "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" +
+ "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" +
+ "map|die|uc|lc|do"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": builtinFunctions
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0x[0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+};
+
+oop.inherits(PerlHighlightRules, TextHighlightRules);
+
+exports.PerlHighlightRules = PerlHighlightRules;
+});
+
+ace.define('ace/mode/python_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PythonHighlightRules = function() {
+
+ var keywords = (
+ "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
+ "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
+ "raise|return|try|while|with|yield"
+ );
+
+ var builtinConstants = (
+ "True|False|None|NotImplemented|Ellipsis|__debug__"
+ );
+
+ var builtinFunctions = (
+ "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
+ "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
+ "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
+ "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
+ "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
+ "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
+ "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
+ "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern"
+ );
+ var keywordMapper = this.createKeywordMapper({
+ "invalid.deprecated": "debugger",
+ "support.function": builtinFunctions,
+ "constant.language": builtinConstants,
+ "keyword": keywords
+ }, "identifier");
+
+ var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var octInteger = "(?:0[oO]?[0-7]+)";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var binInteger = "(?:0[bB][01]+)";
+ var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
+
+ var exponent = "(?:[eE][+-]?\\d+)";
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string", // """ string
+ regex : strPre + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'
+ }, {
+ token : "string", // multi line """ string start
+ regex : strPre + '"{3}.*$',
+ next : "qqstring"
+ }, {
+ token : "string", // " string
+ regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ token : "string", // ''' string
+ regex : strPre + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"
+ }, {
+ token : "string", // multi line ''' string start
+ regex : strPre + "'{3}.*$",
+ next : "qstring"
+ }, {
+ token : "string", // ' string
+ regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
+ }, {
+ token : "constant.numeric", // imaginary
+ regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // long integer
+ regex : integer + "[lL]\\b"
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+ "qqstring" : [ {
+ token : "string", // multi line """ string end
+ regex : '(?:[^\\\\]|\\\\.)*?"{3}',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring" : [ {
+ token : "string", // multi line ''' string end
+ regex : "(?:[^\\\\]|\\\\.)*?'{3}",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ]
+ };
+};
+
+oop.inherits(PythonHighlightRules, TextHighlightRules);
+
+exports.PythonHighlightRules = PythonHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-php-noconflict.js b/contexts/data/lib/ace/mode-php-noconflict.js
deleted file mode 100644
index ba38544..0000000
--- a/contexts/data/lib/ace/mode-php-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./php_highlight_rules").PhpHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./behaviour/cstyle").CstyleBehaviour,k=a("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j,this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[\:]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(l.prototype),b.Mode=l}),ace.define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=new f,b=e.arrayToMap("abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type".split("|")),c=e.arrayToMap("abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|public|static|switch|throw|try|use|var|while|xor".split("|")),d=e.arrayToMap("die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")),g=e.arrayToMap("true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__".split("|")),h=e.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")),i=e.arrayToMap("key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")),j=e.arrayToMap("cfunction|old_function".split("|")),k=e.arrayToMap([]);this.$rules={start:[{token:"support.php_tag",regex:"<\\?(?:php|\\=)"},{token:"support.php_tag",regex:"\\?>"},{token:"comment",regex:"<\\!--",next:"htmlcomment"},{token:"meta.tag",regex:"<style",next:"css"},{token:"meta.tag",regex:"<\\/?[-_a-zA-Z0-9:]+",next:"htmltag"},{token:"meta.tag",regex:"<!DOCTYPE.*?>"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"#.*$"},a.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\b"},{token:"constant.language",regex:"\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"},{token:function(a){return c.hasOwnProperty(a)?"keyword":g.hasOwnProperty(a)?"constant.language":h.hasOwnProperty(a)?"variable.language":k.hasOwnProperty(a)?"invalid.illegal":b.hasOwnProperty(a)?"support.function":a=="debugger"?"invalid.deprecated":a.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/)?"variable":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}],htmlcomment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",regex:".+"}],htmltag:[{token:"meta.tag",regex:">",next:"start"},{token:"text",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"}],css:[{token:"meta.tag",regex:"</style>",next:"htmltag"},{token:"meta.tag",regex:">"},{token:"text",regex:"(?:media|type|href)"},{token:"string",regex:'=".*?"'},{token:"paren.lparen",regex:"{",next:"cssdeclaration"},{token:"keyword",regex:"#[A-Za-z0-9-_.]+"},{token:"variable",regex:"\\.[A-Za-z0-9-_.]+"},{token:"constant",regex:"[A-Za-z0-9]+"}],cssdeclaration:[{token:"support.type",regex:"[-a-zA-Z]+",next:"cssvalue"},{token:"paren.rparen",regex:"}",next:"css"}],cssvalue:[{token:"text",regex:":"},{token:"constant",regex:"#[0-9a-zA-Z]+"},{token:"text",regex:"[-_0-9a-zA-Z\"' ,%]+"},{token:"text",regex:";",next:"cssdeclaration"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.PhpHighlightRules=h}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-php-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-php-uncompressed-noconflict.js
deleted file mode 100644
index d0a4697..0000000
--- a/contexts/data/lib/ace/mode-php-uncompressed-noconflict.js
+++ /dev/null
@@ -1,1894 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* Version: MPL 1.1/GPL 2.0/LGPL 2.1
-*
-* The contents of this file are subject to the Mozilla Public License Version
-* 1.1 (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-* http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS IS" basis,
-* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-* for the specific language governing rights and limitations under the
-* License.
-*
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* The Initial Developer of the Original Code is
-* Ajax.org B.V.
-* Portions created by the Initial Developer are Copyright (C) 2010
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-* André Fiedler <fiedler dot andre a t gmail dot com>
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/php', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/php_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new PhpHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "#");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * André Fiedler <fiedler dot andre a t gmail dot com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- */
-
-ace.define('ace/mode/php_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PhpHighlightRules = function() {
- var docComment = new DocCommentHighlightRules();
- // http://php.net/quickref.php
- var builtinFunctions = lang.arrayToMap(
- ('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|' +
- 'aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|' +
- 'apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|' +
- 'apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|' +
- 'apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|' +
- 'apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|' +
- 'apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|' +
- 'apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|' +
- 'array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|' +
- 'array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|' +
- 'array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|' +
- 'array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|' +
- 'array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|' +
- 'array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|' +
- 'atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|' +
- 'bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|' +
- 'bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|' +
- 'bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|' +
- 'bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|' +
- 'bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|' +
- 'cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|' +
- 'cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|' +
- 'cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|' +
- 'cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|' +
- 'cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|' +
- 'cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|' +
- 'cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|' +
- 'cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|' +
- 'cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|' +
- 'cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|' +
- 'cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|' +
- 'cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|' +
- 'cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|' +
- 'cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|' +
- 'cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|' +
- 'cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|' +
- 'cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|' +
- 'cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|' +
- 'cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|' +
- 'cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|' +
- 'cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|' +
- 'cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|' +
- 'cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|' +
- 'cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|' +
- 'cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|' +
- 'cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|' +
- 'cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|' +
- 'cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|' +
- 'chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|' +
- 'class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|' +
- 'classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|' +
- 'com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|' +
- 'com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|' +
- 'convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|' +
- 'counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|' +
- 'crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|' +
- 'ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|' +
- 'cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|' +
- 'cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|' +
- 'cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|' +
- 'cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|' +
- 'cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|' +
- 'cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|' +
- 'cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|' +
- 'cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|' +
- 'cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|' +
- 'cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|' +
- 'cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|' +
- 'curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|' +
- 'curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|' +
- 'curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|' +
- 'date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|' +
- 'date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|' +
- 'date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|' +
- 'dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|' +
- 'db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|' +
- 'db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|' +
- 'db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|' +
- 'db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|' +
- 'db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|' +
- 'db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|' +
- 'dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|' +
- 'dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|' +
- 'dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|' +
- 'dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|' +
- 'dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|' +
- 'dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|' +
- 'dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|' +
- 'dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|' +
- 'dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|' +
- 'define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|' +
- 'dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|' +
- 'dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|' +
- 'domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|' +
- 'domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|' +
- 'domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|' +
- 'domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|' +
- 'domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|' +
- 'domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|' +
- 'domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|' +
- 'domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|' +
- 'domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|' +
- 'domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|' +
- 'domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|' +
- 'domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|' +
- 'domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|' +
- 'domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|' +
- 'domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|' +
- 'domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|' +
- 'domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|' +
- 'enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|' +
- 'enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|' +
- 'enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|' +
- 'enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|' +
- 'eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|' +
- 'event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|' +
- 'event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|' +
- 'event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|' +
- 'event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|' +
- 'expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|' +
- 'fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|' +
- 'fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|' +
- 'fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|' +
- 'fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|' +
- 'fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|' +
- 'fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|' +
- 'fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|' +
- 'fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|' +
- 'fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|' +
- 'fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|' +
- 'fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|' +
- 'fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|' +
- 'fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|' +
- 'file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|' +
- 'filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|' +
- 'filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|' +
- 'finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|' +
- 'forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|' +
- 'ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|' +
- 'ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|' +
- 'ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|' +
- 'func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|' +
- 'gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|' +
- 'geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|' +
- 'geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|' +
- 'get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|' +
- 'get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|' +
- 'get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|' +
- 'get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|' +
- 'getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|' +
- 'gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|' +
- 'getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|' +
- 'getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|' +
- 'gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|' +
- 'gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|' +
- 'gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|' +
- 'gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|' +
- 'gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|' +
- 'gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|' +
- 'gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|' +
- 'grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|' +
- 'gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|' +
- 'gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|' +
- 'gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|' +
- 'gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|' +
- 'gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|' +
- 'gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|' +
- 'gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|' +
- 'gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|' +
- 'gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|' +
- 'gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|' +
- 'halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|' +
- 'haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|' +
- 'harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|' +
- 'harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|' +
- 'harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|' +
- 'harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|' +
- 'harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|' +
- 'harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|' +
- 'harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|' +
- 'harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|' +
- 'haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|' +
- 'harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|' +
- 'harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|' +
- 'haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|' +
- 'haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|' +
- 'harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|' +
- 'harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|' +
- 'harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|' +
- 'harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|' +
- 'harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|' +
- 'harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|' +
- 'harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|' +
- 'harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|' +
- 'harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|' +
- 'harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|' +
- 'harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|' +
- 'harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|' +
- 'harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|' +
- 'harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|' +
- 'hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|' +
- 'header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|' +
- 'html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|' +
- 'http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|' +
- 'http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|' +
- 'http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|' +
- 'http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|' +
- 'http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|' +
- 'http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|' +
- 'http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|' +
- 'http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|' +
- 'httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|' +
- 'httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|' +
- 'httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|' +
- 'httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|' +
- 'httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|' +
- 'httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|' +
- 'httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|' +
- 'httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|' +
- 'httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|' +
- 'httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|' +
- 'httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|' +
- 'httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|' +
- 'httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|' +
- 'httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|' +
- 'httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|' +
- 'httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|' +
- 'httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|' +
- 'httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|' +
- 'httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|' +
- 'httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|' +
- 'httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|' +
- 'httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|' +
- 'httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|' +
- 'httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|' +
- 'httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|' +
- 'httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|' +
- 'httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|' +
- 'httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|' +
- 'httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|' +
- 'hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|' +
- 'hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|' +
- 'hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|' +
- 'hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|' +
- 'hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|' +
- 'hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|' +
- 'hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|' +
- 'hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|' +
- 'hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|' +
- 'hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|' +
- 'hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|' +
- 'hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|' +
- 'hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|' +
- 'hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|' +
- 'ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|' +
- 'ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|' +
- 'ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|' +
- 'ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|' +
- 'ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|' +
- 'ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|' +
- 'ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|' +
- 'iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|' +
- 'id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|' +
- 'idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|' +
- 'ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|' +
- 'ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|' +
- 'ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|' +
- 'ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|' +
- 'iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|' +
- 'iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|' +
- 'iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|' +
- 'imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|' +
- 'imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|' +
- 'imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|' +
- 'imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|' +
- 'imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|' +
- 'imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|' +
- 'imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|' +
- 'imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|' +
- 'imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|' +
- 'imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|' +
- 'imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|' +
- 'imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|' +
- 'imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|' +
- 'imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|' +
- 'imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|' +
- 'imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|' +
- 'imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|' +
- 'imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|' +
- 'imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|' +
- 'imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|' +
- 'imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|' +
- 'imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|' +
- 'imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|' +
- 'imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|' +
- 'imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|' +
- 'imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|' +
- 'imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|' +
- 'imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|' +
- 'imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|' +
- 'imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|' +
- 'imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|' +
- 'imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|' +
- 'imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|' +
- 'imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|' +
- 'imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|' +
- 'imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|' +
- 'imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|' +
- 'imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|' +
- 'imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|' +
- 'imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|' +
- 'imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|' +
- 'imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|' +
- 'imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|' +
- 'imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|' +
- 'imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|' +
- 'imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|' +
- 'imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|' +
- 'imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|' +
- 'imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|' +
- 'imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|' +
- 'imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|' +
- 'imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|' +
- 'imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|' +
- 'imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|' +
- 'imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|' +
- 'imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|' +
- 'imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|' +
- 'imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|' +
- 'imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|' +
- 'imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|' +
- 'imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|' +
- 'imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|' +
- 'imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|' +
- 'imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|' +
- 'imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|' +
- 'imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|' +
- 'imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|' +
- 'imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|' +
- 'imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|' +
- 'imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|' +
- 'imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|' +
- 'imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|' +
- 'imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|' +
- 'imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|' +
- 'imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|' +
- 'imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|' +
- 'imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|' +
- 'imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|' +
- 'imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|' +
- 'imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|' +
- 'imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|' +
- 'imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|' +
- 'imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|' +
- 'imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|' +
- 'imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|' +
- 'imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|' +
- 'imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|' +
- 'imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|' +
- 'imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|' +
- 'imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|' +
- 'imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|' +
- 'imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|' +
- 'imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|' +
- 'imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|' +
- 'imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|' +
- 'imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|' +
- 'imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|' +
- 'imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|' +
- 'imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|' +
- 'imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|' +
- 'imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|' +
- 'imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|' +
- 'imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|' +
- 'imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|' +
- 'imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|' +
- 'imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|' +
- 'imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|' +
- 'imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|' +
- 'imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|' +
- 'imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|' +
- 'include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|' +
- 'ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|' +
- 'ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|' +
- 'ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|' +
- 'ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|' +
- 'ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|' +
- 'inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|' +
- 'intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|' +
- 'is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|' +
- 'is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|' +
- 'iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|' +
- 'iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|' +
- 'jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|' +
- 'json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|' +
- 'kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|' +
- 'kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|' +
- 'ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|' +
- 'ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|' +
- 'ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|' +
- 'ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|' +
- 'ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|' +
- 'libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|' +
- 'limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|' +
- 'lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|' +
- 'm_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|' +
- 'm_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|' +
- 'm_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|' +
- 'm_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|' +
- 'mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|' +
- 'mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|' +
- 'mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|' +
- 'maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|' +
- 'maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|' +
- 'maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|' +
- 'maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|' +
- 'maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|' +
- 'maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|' +
- 'maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|' +
- 'maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|' +
- 'maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|' +
- 'maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|' +
- 'maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|' +
- 'maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|' +
- 'maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|' +
- 'maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|' +
- 'maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|' +
- 'mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|' +
- 'mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|' +
- 'mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|' +
- 'mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|' +
- 'mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|' +
- 'mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|' +
- 'mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|' +
- 'mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|' +
- 'mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|' +
- 'mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|' +
- 'mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|' +
- 'mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|' +
- 'mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|' +
- 'mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|' +
- 'mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|' +
- 'ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|' +
- 'mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|' +
- 'mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|' +
- 'mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|' +
- 'mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|' +
- 'mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|' +
- 'msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|' +
- 'msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|' +
- 'msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|' +
- 'msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|' +
- 'msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|' +
- 'msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|' +
- 'msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|' +
- 'mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|' +
- 'mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|' +
- 'mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|' +
- 'mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|' +
- 'mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|' +
- 'mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|' +
- 'mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|' +
- 'mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|' +
- 'mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|' +
- 'mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|' +
- 'mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|' +
- 'mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|' +
- 'mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|' +
- 'mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' +
- 'mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|' +
- 'mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|' +
- 'mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|' +
- 'ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|' +
- 'ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|' +
- 'ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|' +
- 'ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|' +
- 'ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|' +
- 'ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|' +
- 'ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|' +
- 'ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|' +
- 'ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|' +
- 'ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|' +
- 'ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|' +
- 'ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|' +
- 'ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|' +
- 'ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|' +
- 'ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|' +
- 'ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|' +
- 'ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|' +
- 'ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|' +
- 'ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|' +
- 'ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|' +
- 'ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|' +
- 'ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|' +
- 'newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|' +
- 'newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|' +
- 'newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|' +
- 'newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|' +
- 'newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|' +
- 'newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|' +
- 'newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|' +
- 'newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|' +
- 'newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|' +
- 'newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|' +
- 'newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|' +
- 'newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|' +
- 'newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|' +
- 'newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|' +
- 'newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|' +
- 'newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|' +
- 'newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|' +
- 'newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|' +
- 'newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|' +
- 'notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|' +
- 'notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|' +
- 'numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|' +
- 'ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|' +
- 'ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|' +
- 'oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|' +
- 'oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|' +
- 'oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|' +
- 'oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|' +
- 'oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|' +
- 'oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|' +
- 'oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|' +
- 'oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|' +
- 'oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|' +
- 'ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|' +
- 'ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|' +
- 'ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|' +
- 'ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|' +
- 'ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|' +
- 'octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|' +
- 'odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|' +
- 'odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|' +
- 'odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|' +
- 'odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|' +
- 'odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|' +
- 'openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|' +
- 'openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|' +
- 'openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|' +
- 'openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|' +
- 'openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|' +
- 'openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|' +
- 'openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|' +
- 'openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|' +
- 'openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|' +
- 'openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|' +
- 'openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|' +
- 'outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|' +
- 'ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|' +
- 'ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|' +
- 'ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|' +
- 'parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|' +
- 'pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|' +
- 'pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|' +
- 'pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|' +
- 'pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|' +
- 'pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|' +
- 'pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|' +
- 'pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|' +
- 'pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|' +
- 'pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|' +
- 'pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|' +
- 'pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|' +
- 'pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|' +
- 'pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|' +
- 'pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|' +
- 'pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|' +
- 'pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|' +
- 'pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|' +
- 'pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|' +
- 'pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|' +
- 'pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|' +
- 'pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|' +
- 'pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|' +
- 'pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|' +
- 'pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|' +
- 'pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|' +
- 'pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|' +
- 'pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|' +
- 'pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|' +
- 'pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|' +
- 'pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|' +
- 'pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|' +
- 'pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|' +
- 'pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|' +
- 'pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|' +
- 'pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|' +
- 'php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|' +
- 'png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|' +
- 'posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|' +
- 'posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|' +
- 'posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|' +
- 'preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|' +
- 'printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|' +
- 'printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|' +
- 'printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|' +
- 'printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|' +
- 'printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|' +
- 'ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|' +
- 'ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|' +
- 'ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|' +
- 'ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|' +
- 'ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|' +
- 'ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|' +
- 'ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|' +
- 'ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|' +
- 'ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|' +
- 'pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|' +
- 'pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|' +
- 'pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|' +
- 'px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|' +
- 'px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|' +
- 'px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|' +
- 'radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|' +
- 'radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|' +
- 'radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|' +
- 'radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|' +
- 'rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|' +
- 'readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|' +
- 'readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|' +
- 'readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|' +
- 'recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|' +
- 'recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|' +
- 'reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|' +
- 'regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|' +
- 'resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|' +
- 'rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|' +
- 'rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|' +
- 'runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|' +
- 'runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|' +
- 'runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|' +
- 'runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|' +
- 'samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|' +
- 'samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|' +
- 'sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|' +
- 'sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|' +
- 'sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|' +
- 'sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|' +
- 'sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|' +
- 'sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|' +
- 'sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|' +
- 'sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|' +
- 'sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|' +
- 'sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|' +
- 'sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|' +
- 'sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|' +
- 'sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|' +
- 'sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|' +
- 'sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|' +
- 'sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|' +
- 'sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|' +
- 'sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|' +
- 'sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|' +
- 'sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|' +
- 'session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|' +
- 'session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|' +
- 'session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|' +
- 'session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|' +
- 'set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|' +
- 'setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|' +
- 'shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|' +
- 'similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|' +
- 'snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|' +
- 'snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|' +
- 'snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|' +
- 'soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|' +
- 'socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|' +
- 'socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|' +
- 'socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|' +
- 'solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|' +
- 'solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|' +
- 'solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|' +
- 'spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|' +
- 'splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|' +
- 'splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|' +
- 'sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|' +
- 'sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|' +
- 'sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|' +
- 'sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|' +
- 'sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|' +
- 'sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|' +
- 'ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|' +
- 'ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|' +
- 'ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|' +
- 'ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|' +
- 'stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|' +
- 'stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|' +
- 'stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|' +
- 'stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|' +
- 'stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|' +
- 'stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|' +
- 'stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|' +
- 'stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|' +
- 'stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|' +
- 'stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|' +
- 'stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|' +
- 'stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|' +
- 'str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|' +
- 'stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|' +
- 'stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|' +
- 'stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|' +
- 'stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|' +
- 'stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|' +
- 'stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|' +
- 'stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|' +
- 'stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|' +
- 'stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|' +
- 'strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|' +
- 'svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|' +
- 'svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|' +
- 'svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|' +
- 'svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|' +
- 'svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|' +
- 'svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|' +
- 'swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|' +
- 'swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|' +
- 'swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|' +
- 'swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|' +
- 'swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|' +
- 'swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|' +
- 'swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|' +
- 'swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|' +
- 'swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|' +
- 'swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|' +
- 'swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|' +
- 'swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|' +
- 'swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|' +
- 'sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|' +
- 'sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|' +
- 'sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|' +
- 'sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|' +
- 'tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|' +
- 'tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|' +
- 'time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|' +
- 'timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|' +
- 'tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|' +
- 'ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|' +
- 'udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|' +
- 'udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|' +
- 'uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|' +
- 'urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|' +
- 'variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|' +
- 'variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|' +
- 'variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|' +
- 'vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|' +
- 'vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|' +
- 'vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|' +
- 'w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|' +
- 'wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|' +
- 'win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|' +
- 'win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|' +
- 'wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|' +
- 'wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|' +
- 'wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|' +
- 'wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|' +
- 'xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|' +
- 'xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|' +
- 'xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|' +
- 'xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|' +
- 'xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|' +
- 'xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|' +
- 'xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|' +
- 'xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|' +
- 'xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|' +
- 'xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|' +
- 'xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|' +
- 'xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|' +
- 'xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|' +
- 'xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|' +
- 'xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|' +
- 'xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|' +
- 'xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|' +
- 'xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|' +
- 'xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|' +
- 'xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|' +
- 'xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|' +
- 'xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|' +
- 'yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|' +
- 'yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|' +
- 'yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|' +
- 'yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|' +
- 'zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|' +
- 'ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|' +
- 'ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|' +
- 'ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|' +
- 'ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|' +
- 'ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|' +
- 'ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type').split('|')
- );
-
- // http://php.net/manual/en/reserved.keywords.php
- var keywords = lang.arrayToMap(
- ('abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|' +
- 'endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|' +
- 'public|static|switch|throw|try|use|var|while|xor').split('|')
- );
-
- // http://php.net/manual/en/reserved.keywords.php
- var languageConstructs = lang.arrayToMap(
- ('die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|')
- );
-
- var builtinConstants = lang.arrayToMap(
- ('true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__').split('|')
- );
-
- var builtinVariables = lang.arrayToMap(
- ('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' +
- '$http_response_header|$argc|$argv').split('|')
- );
-
- // Discovery done by downloading 'Many HTML files' from: http://php.net/download-docs.php
- // Then search for files containing 'deprecated' (case-insensitive) and look at each file that turns up.
- var builtinFunctionsDeprecated = lang.arrayToMap(
- ('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|' +
- 'com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|' +
- 'cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|' +
- 'hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|' +
- 'maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|' +
- 'mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|' +
- 'mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|' +
- 'mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|' +
- 'mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|' +
- 'mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' +
- 'mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|' +
- 'ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|' +
- 'ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|' +
- 'ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|' +
- 'ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|' +
- 'ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|' +
- 'PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|' +
- 'PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|' +
- 'PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|' +
- 'PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|' +
- 'PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|' +
- 'PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|' +
- 'PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|' +
- 'PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|' +
- 'px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister' +
- 'set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|' +
- 'sql_regcase').split('|')
- );
-
- var keywordsDeprecated = lang.arrayToMap(
- ('cfunction|old_function').split('|')
- );
-
- var futureReserved = lang.arrayToMap([]);
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "support.php_tag", // php open tag
- regex : "<\\?(?:php|\\=)"
- },
- {
- token : "support.php_tag", // php close tag
- regex : "\\?>"
- },
- {
- token : "comment",
- regex : "<\\!--",
- next : "htmlcomment"
- },
- {
- token : "meta.tag",
- regex : "<style",
- next : "css"
- },
- {
- token : "meta.tag", // opening tag
- regex : "<\\/?[-_a-zA-Z0-9:]+",
- next : "htmltag"
- },
- {
- token : 'meta.tag',
- regex : '<\!DOCTYPE.*?>'
- },
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- {
- token : "comment",
- regex : "#.*$"
- },
- docComment.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language", // constants
- regex : "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" +
- "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" +
- "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" +
- "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" +
- "VERSION))|__COMPILER_HALT_OFFSET__)\\b"
- }, {
- token : "constant.language", // constants
- regex : "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" +
- "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" +
- "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" +
- "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" +
- "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" +
- "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" +
- "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" +
- "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" +
- "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" +
- "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" +
- "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" +
- "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" +
- "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" +
- "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" +
- "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" +
- "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinVariables.hasOwnProperty(value))
- return "variable.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- if(value.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/))
- return "variable";
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- regex : '.+'
- }
- ],
- "htmlcomment" : [
- {
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- regex : ".+"
- }
- ],
- "htmltag" : [
- {
- token : "meta.tag",
- regex : ">",
- next : "start"
- }, {
- token : "text",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "string",
- regex : '".*?"'
- }, {
- token : "string",
- regex : "'.*?'"
- }
- ],
- "css" : [
- {
- token : "meta.tag",
- regex : "<\/style>",
- next : "htmltag"
- }, {
- token : "meta.tag",
- regex : ">",
- }, {
- token : 'text',
- regex : "(?:media|type|href)"
- }, {
- token : 'string',
- regex : '=".*?"'
- }, {
- token : "paren.lparen",
- regex : "\{",
- next : "cssdeclaration",
- }, {
- token : "keyword",
- regex : "#[A-Za-z0-9\-\_\.]+"
- }, {
- token : "variable",
- regex : "\\.[A-Za-z0-9\-\_\.]+"
- }, {
- token : "constant",
- regex : "[A-Za-z0-9]+"
- }
- ],
- "cssdeclaration" : [
- {
- token : "support.type",
- regex : "[\-a-zA-Z]+",
- next : "cssvalue"
- },
- {
- token : "paren.rparen",
- regex : '\}',
- next : "css"
- }
- ],
- "cssvalue" : [
- {
- token : "text",
- regex : "\:"
- },
- {
- token : "constant",
- regex : "#[0-9a-zA-Z]+"
- },
- {
- token : "text",
- regex : "[\-\_0-9a-zA-Z\"' ,%]+"
- },
- {
- token : "text",
- regex : ";",
- next : "cssdeclaration"
- }
- ],
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(PhpHighlightRules, TextHighlightRules);
-
-exports.PhpHighlightRules = PhpHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-php-uncompressed.js b/contexts/data/lib/ace/mode-php-uncompressed.js
deleted file mode 100644
index 58c9255..0000000
--- a/contexts/data/lib/ace/mode-php-uncompressed.js
+++ /dev/null
@@ -1,1894 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* Version: MPL 1.1/GPL 2.0/LGPL 2.1
-*
-* The contents of this file are subject to the Mozilla Public License Version
-* 1.1 (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-* http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS IS" basis,
-* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-* for the specific language governing rights and limitations under the
-* License.
-*
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* The Initial Developer of the Original Code is
-* Ajax.org B.V.
-* Portions created by the Initial Developer are Copyright (C) 2010
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-* André Fiedler <fiedler dot andre a t gmail dot com>
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/php', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/php_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new PhpHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "#");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * André Fiedler <fiedler dot andre a t gmail dot com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- */
-
-define('ace/mode/php_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PhpHighlightRules = function() {
- var docComment = new DocCommentHighlightRules();
- // http://php.net/quickref.php
- var builtinFunctions = lang.arrayToMap(
- ('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|' +
- 'aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|' +
- 'apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|' +
- 'apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|' +
- 'apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|' +
- 'apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|' +
- 'apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|' +
- 'apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|' +
- 'array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|' +
- 'array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|' +
- 'array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|' +
- 'array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|' +
- 'array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|' +
- 'array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|' +
- 'atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|' +
- 'bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|' +
- 'bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|' +
- 'bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|' +
- 'bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|' +
- 'bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|' +
- 'cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|' +
- 'cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|' +
- 'cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|' +
- 'cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|' +
- 'cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|' +
- 'cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|' +
- 'cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|' +
- 'cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|' +
- 'cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|' +
- 'cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|' +
- 'cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|' +
- 'cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|' +
- 'cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|' +
- 'cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|' +
- 'cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|' +
- 'cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|' +
- 'cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|' +
- 'cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|' +
- 'cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|' +
- 'cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|' +
- 'cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|' +
- 'cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|' +
- 'cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|' +
- 'cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|' +
- 'cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|' +
- 'cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|' +
- 'cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|' +
- 'cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|' +
- 'chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|' +
- 'class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|' +
- 'classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|' +
- 'com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|' +
- 'com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|' +
- 'convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|' +
- 'counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|' +
- 'crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|' +
- 'ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|' +
- 'cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|' +
- 'cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|' +
- 'cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|' +
- 'cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|' +
- 'cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|' +
- 'cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|' +
- 'cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|' +
- 'cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|' +
- 'cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|' +
- 'cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|' +
- 'cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|' +
- 'curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|' +
- 'curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|' +
- 'curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|' +
- 'date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|' +
- 'date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|' +
- 'date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|' +
- 'dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|' +
- 'db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|' +
- 'db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|' +
- 'db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|' +
- 'db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|' +
- 'db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|' +
- 'db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|' +
- 'dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|' +
- 'dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|' +
- 'dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|' +
- 'dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|' +
- 'dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|' +
- 'dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|' +
- 'dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|' +
- 'dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|' +
- 'dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|' +
- 'define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|' +
- 'dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|' +
- 'dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|' +
- 'domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|' +
- 'domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|' +
- 'domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|' +
- 'domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|' +
- 'domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|' +
- 'domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|' +
- 'domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|' +
- 'domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|' +
- 'domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|' +
- 'domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|' +
- 'domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|' +
- 'domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|' +
- 'domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|' +
- 'domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|' +
- 'domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|' +
- 'domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|' +
- 'domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|' +
- 'enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|' +
- 'enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|' +
- 'enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|' +
- 'enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|' +
- 'eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|' +
- 'event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|' +
- 'event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|' +
- 'event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|' +
- 'event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|' +
- 'expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|' +
- 'fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|' +
- 'fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|' +
- 'fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|' +
- 'fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|' +
- 'fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|' +
- 'fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|' +
- 'fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|' +
- 'fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|' +
- 'fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|' +
- 'fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|' +
- 'fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|' +
- 'fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|' +
- 'fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|' +
- 'file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|' +
- 'filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|' +
- 'filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|' +
- 'finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|' +
- 'forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|' +
- 'ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|' +
- 'ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|' +
- 'ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|' +
- 'func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|' +
- 'gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|' +
- 'geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|' +
- 'geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|' +
- 'get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|' +
- 'get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|' +
- 'get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|' +
- 'get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|' +
- 'getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|' +
- 'gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|' +
- 'getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|' +
- 'getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|' +
- 'gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|' +
- 'gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|' +
- 'gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|' +
- 'gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|' +
- 'gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|' +
- 'gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|' +
- 'gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|' +
- 'grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|' +
- 'gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|' +
- 'gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|' +
- 'gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|' +
- 'gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|' +
- 'gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|' +
- 'gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|' +
- 'gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|' +
- 'gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|' +
- 'gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|' +
- 'gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|' +
- 'halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|' +
- 'haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|' +
- 'harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|' +
- 'harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|' +
- 'harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|' +
- 'harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|' +
- 'harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|' +
- 'harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|' +
- 'harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|' +
- 'harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|' +
- 'haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|' +
- 'harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|' +
- 'harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|' +
- 'haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|' +
- 'haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|' +
- 'harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|' +
- 'harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|' +
- 'harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|' +
- 'harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|' +
- 'harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|' +
- 'harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|' +
- 'harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|' +
- 'harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|' +
- 'harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|' +
- 'harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|' +
- 'harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|' +
- 'harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|' +
- 'harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|' +
- 'harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|' +
- 'hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|' +
- 'header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|' +
- 'html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|' +
- 'http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|' +
- 'http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|' +
- 'http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|' +
- 'http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|' +
- 'http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|' +
- 'http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|' +
- 'http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|' +
- 'http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|' +
- 'httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|' +
- 'httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|' +
- 'httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|' +
- 'httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|' +
- 'httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|' +
- 'httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|' +
- 'httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|' +
- 'httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|' +
- 'httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|' +
- 'httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|' +
- 'httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|' +
- 'httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|' +
- 'httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|' +
- 'httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|' +
- 'httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|' +
- 'httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|' +
- 'httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|' +
- 'httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|' +
- 'httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|' +
- 'httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|' +
- 'httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|' +
- 'httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|' +
- 'httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|' +
- 'httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|' +
- 'httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|' +
- 'httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|' +
- 'httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|' +
- 'httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|' +
- 'httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|' +
- 'hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|' +
- 'hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|' +
- 'hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|' +
- 'hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|' +
- 'hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|' +
- 'hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|' +
- 'hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|' +
- 'hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|' +
- 'hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|' +
- 'hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|' +
- 'hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|' +
- 'hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|' +
- 'hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|' +
- 'hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|' +
- 'ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|' +
- 'ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|' +
- 'ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|' +
- 'ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|' +
- 'ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|' +
- 'ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|' +
- 'ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|' +
- 'iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|' +
- 'id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|' +
- 'idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|' +
- 'ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|' +
- 'ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|' +
- 'ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|' +
- 'ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|' +
- 'iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|' +
- 'iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|' +
- 'iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|' +
- 'imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|' +
- 'imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|' +
- 'imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|' +
- 'imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|' +
- 'imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|' +
- 'imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|' +
- 'imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|' +
- 'imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|' +
- 'imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|' +
- 'imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|' +
- 'imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|' +
- 'imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|' +
- 'imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|' +
- 'imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|' +
- 'imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|' +
- 'imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|' +
- 'imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|' +
- 'imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|' +
- 'imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|' +
- 'imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|' +
- 'imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|' +
- 'imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|' +
- 'imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|' +
- 'imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|' +
- 'imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|' +
- 'imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|' +
- 'imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|' +
- 'imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|' +
- 'imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|' +
- 'imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|' +
- 'imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|' +
- 'imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|' +
- 'imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|' +
- 'imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|' +
- 'imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|' +
- 'imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|' +
- 'imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|' +
- 'imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|' +
- 'imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|' +
- 'imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|' +
- 'imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|' +
- 'imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|' +
- 'imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|' +
- 'imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|' +
- 'imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|' +
- 'imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|' +
- 'imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|' +
- 'imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|' +
- 'imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|' +
- 'imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|' +
- 'imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|' +
- 'imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|' +
- 'imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|' +
- 'imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|' +
- 'imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|' +
- 'imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|' +
- 'imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|' +
- 'imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|' +
- 'imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|' +
- 'imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|' +
- 'imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|' +
- 'imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|' +
- 'imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|' +
- 'imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|' +
- 'imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|' +
- 'imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|' +
- 'imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|' +
- 'imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|' +
- 'imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|' +
- 'imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|' +
- 'imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|' +
- 'imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|' +
- 'imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|' +
- 'imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|' +
- 'imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|' +
- 'imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|' +
- 'imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|' +
- 'imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|' +
- 'imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|' +
- 'imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|' +
- 'imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|' +
- 'imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|' +
- 'imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|' +
- 'imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|' +
- 'imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|' +
- 'imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|' +
- 'imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|' +
- 'imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|' +
- 'imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|' +
- 'imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|' +
- 'imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|' +
- 'imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|' +
- 'imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|' +
- 'imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|' +
- 'imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|' +
- 'imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|' +
- 'imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|' +
- 'imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|' +
- 'imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|' +
- 'imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|' +
- 'imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|' +
- 'imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|' +
- 'imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|' +
- 'imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|' +
- 'imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|' +
- 'imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|' +
- 'imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|' +
- 'imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|' +
- 'imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|' +
- 'imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|' +
- 'include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|' +
- 'ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|' +
- 'ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|' +
- 'ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|' +
- 'ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|' +
- 'ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|' +
- 'inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|' +
- 'intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|' +
- 'is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|' +
- 'is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|' +
- 'iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|' +
- 'iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|' +
- 'jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|' +
- 'json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|' +
- 'kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|' +
- 'kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|' +
- 'ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|' +
- 'ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|' +
- 'ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|' +
- 'ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|' +
- 'ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|' +
- 'libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|' +
- 'limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|' +
- 'lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|' +
- 'm_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|' +
- 'm_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|' +
- 'm_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|' +
- 'm_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|' +
- 'mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|' +
- 'mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|' +
- 'mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|' +
- 'maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|' +
- 'maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|' +
- 'maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|' +
- 'maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|' +
- 'maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|' +
- 'maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|' +
- 'maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|' +
- 'maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|' +
- 'maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|' +
- 'maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|' +
- 'maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|' +
- 'maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|' +
- 'maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|' +
- 'maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|' +
- 'maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|' +
- 'mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|' +
- 'mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|' +
- 'mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|' +
- 'mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|' +
- 'mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|' +
- 'mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|' +
- 'mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|' +
- 'mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|' +
- 'mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|' +
- 'mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|' +
- 'mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|' +
- 'mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|' +
- 'mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|' +
- 'mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|' +
- 'mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|' +
- 'ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|' +
- 'mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|' +
- 'mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|' +
- 'mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|' +
- 'mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|' +
- 'mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|' +
- 'msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|' +
- 'msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|' +
- 'msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|' +
- 'msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|' +
- 'msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|' +
- 'msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|' +
- 'msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|' +
- 'mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|' +
- 'mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|' +
- 'mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|' +
- 'mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|' +
- 'mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|' +
- 'mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|' +
- 'mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|' +
- 'mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|' +
- 'mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|' +
- 'mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|' +
- 'mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|' +
- 'mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|' +
- 'mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|' +
- 'mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' +
- 'mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|' +
- 'mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|' +
- 'mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|' +
- 'ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|' +
- 'ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|' +
- 'ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|' +
- 'ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|' +
- 'ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|' +
- 'ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|' +
- 'ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|' +
- 'ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|' +
- 'ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|' +
- 'ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|' +
- 'ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|' +
- 'ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|' +
- 'ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|' +
- 'ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|' +
- 'ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|' +
- 'ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|' +
- 'ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|' +
- 'ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|' +
- 'ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|' +
- 'ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|' +
- 'ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|' +
- 'ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|' +
- 'newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|' +
- 'newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|' +
- 'newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|' +
- 'newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|' +
- 'newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|' +
- 'newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|' +
- 'newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|' +
- 'newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|' +
- 'newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|' +
- 'newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|' +
- 'newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|' +
- 'newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|' +
- 'newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|' +
- 'newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|' +
- 'newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|' +
- 'newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|' +
- 'newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|' +
- 'newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|' +
- 'newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|' +
- 'notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|' +
- 'notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|' +
- 'numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|' +
- 'ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|' +
- 'ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|' +
- 'oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|' +
- 'oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|' +
- 'oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|' +
- 'oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|' +
- 'oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|' +
- 'oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|' +
- 'oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|' +
- 'oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|' +
- 'oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|' +
- 'ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|' +
- 'ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|' +
- 'ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|' +
- 'ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|' +
- 'ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|' +
- 'octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|' +
- 'odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|' +
- 'odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|' +
- 'odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|' +
- 'odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|' +
- 'odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|' +
- 'openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|' +
- 'openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|' +
- 'openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|' +
- 'openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|' +
- 'openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|' +
- 'openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|' +
- 'openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|' +
- 'openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|' +
- 'openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|' +
- 'openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|' +
- 'openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|' +
- 'outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|' +
- 'ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|' +
- 'ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|' +
- 'ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|' +
- 'parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|' +
- 'pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|' +
- 'pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|' +
- 'pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|' +
- 'pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|' +
- 'pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|' +
- 'pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|' +
- 'pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|' +
- 'pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|' +
- 'pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|' +
- 'pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|' +
- 'pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|' +
- 'pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|' +
- 'pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|' +
- 'pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|' +
- 'pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|' +
- 'pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|' +
- 'pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|' +
- 'pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|' +
- 'pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|' +
- 'pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|' +
- 'pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|' +
- 'pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|' +
- 'pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|' +
- 'pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|' +
- 'pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|' +
- 'pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|' +
- 'pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|' +
- 'pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|' +
- 'pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|' +
- 'pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|' +
- 'pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|' +
- 'pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|' +
- 'pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|' +
- 'pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|' +
- 'pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|' +
- 'php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|' +
- 'png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|' +
- 'posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|' +
- 'posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|' +
- 'posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|' +
- 'preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|' +
- 'printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|' +
- 'printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|' +
- 'printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|' +
- 'printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|' +
- 'printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|' +
- 'ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|' +
- 'ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|' +
- 'ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|' +
- 'ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|' +
- 'ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|' +
- 'ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|' +
- 'ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|' +
- 'ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|' +
- 'ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|' +
- 'pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|' +
- 'pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|' +
- 'pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|' +
- 'px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|' +
- 'px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|' +
- 'px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|' +
- 'radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|' +
- 'radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|' +
- 'radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|' +
- 'radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|' +
- 'rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|' +
- 'readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|' +
- 'readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|' +
- 'readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|' +
- 'recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|' +
- 'recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|' +
- 'reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|' +
- 'regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|' +
- 'resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|' +
- 'rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|' +
- 'rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|' +
- 'runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|' +
- 'runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|' +
- 'runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|' +
- 'runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|' +
- 'samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|' +
- 'samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|' +
- 'sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|' +
- 'sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|' +
- 'sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|' +
- 'sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|' +
- 'sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|' +
- 'sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|' +
- 'sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|' +
- 'sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|' +
- 'sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|' +
- 'sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|' +
- 'sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|' +
- 'sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|' +
- 'sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|' +
- 'sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|' +
- 'sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|' +
- 'sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|' +
- 'sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|' +
- 'sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|' +
- 'sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|' +
- 'sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|' +
- 'session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|' +
- 'session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|' +
- 'session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|' +
- 'session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|' +
- 'set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|' +
- 'setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|' +
- 'shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|' +
- 'similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|' +
- 'snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|' +
- 'snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|' +
- 'snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|' +
- 'soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|' +
- 'socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|' +
- 'socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|' +
- 'socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|' +
- 'solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|' +
- 'solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|' +
- 'solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|' +
- 'spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|' +
- 'splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|' +
- 'splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|' +
- 'sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|' +
- 'sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|' +
- 'sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|' +
- 'sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|' +
- 'sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|' +
- 'sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|' +
- 'ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|' +
- 'ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|' +
- 'ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|' +
- 'ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|' +
- 'stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|' +
- 'stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|' +
- 'stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|' +
- 'stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|' +
- 'stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|' +
- 'stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|' +
- 'stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|' +
- 'stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|' +
- 'stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|' +
- 'stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|' +
- 'stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|' +
- 'stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|' +
- 'str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|' +
- 'stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|' +
- 'stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|' +
- 'stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|' +
- 'stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|' +
- 'stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|' +
- 'stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|' +
- 'stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|' +
- 'stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|' +
- 'stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|' +
- 'strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|' +
- 'svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|' +
- 'svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|' +
- 'svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|' +
- 'svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|' +
- 'svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|' +
- 'svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|' +
- 'swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|' +
- 'swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|' +
- 'swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|' +
- 'swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|' +
- 'swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|' +
- 'swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|' +
- 'swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|' +
- 'swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|' +
- 'swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|' +
- 'swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|' +
- 'swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|' +
- 'swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|' +
- 'swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|' +
- 'sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|' +
- 'sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|' +
- 'sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|' +
- 'sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|' +
- 'tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|' +
- 'tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|' +
- 'time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|' +
- 'timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|' +
- 'tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|' +
- 'ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|' +
- 'udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|' +
- 'udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|' +
- 'uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|' +
- 'urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|' +
- 'variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|' +
- 'variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|' +
- 'variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|' +
- 'vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|' +
- 'vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|' +
- 'vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|' +
- 'w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|' +
- 'wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|' +
- 'win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|' +
- 'win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|' +
- 'wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|' +
- 'wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|' +
- 'wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|' +
- 'wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|' +
- 'xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|' +
- 'xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|' +
- 'xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|' +
- 'xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|' +
- 'xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|' +
- 'xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|' +
- 'xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|' +
- 'xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|' +
- 'xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|' +
- 'xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|' +
- 'xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|' +
- 'xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|' +
- 'xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|' +
- 'xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|' +
- 'xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|' +
- 'xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|' +
- 'xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|' +
- 'xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|' +
- 'xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|' +
- 'xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|' +
- 'xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|' +
- 'xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|' +
- 'yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|' +
- 'yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|' +
- 'yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|' +
- 'yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|' +
- 'zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|' +
- 'ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|' +
- 'ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|' +
- 'ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|' +
- 'ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|' +
- 'ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|' +
- 'ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type').split('|')
- );
-
- // http://php.net/manual/en/reserved.keywords.php
- var keywords = lang.arrayToMap(
- ('abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|' +
- 'endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|' +
- 'public|static|switch|throw|try|use|var|while|xor').split('|')
- );
-
- // http://php.net/manual/en/reserved.keywords.php
- var languageConstructs = lang.arrayToMap(
- ('die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|')
- );
-
- var builtinConstants = lang.arrayToMap(
- ('true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__').split('|')
- );
-
- var builtinVariables = lang.arrayToMap(
- ('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' +
- '$http_response_header|$argc|$argv').split('|')
- );
-
- // Discovery done by downloading 'Many HTML files' from: http://php.net/download-docs.php
- // Then search for files containing 'deprecated' (case-insensitive) and look at each file that turns up.
- var builtinFunctionsDeprecated = lang.arrayToMap(
- ('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|' +
- 'com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|' +
- 'cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|' +
- 'hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|' +
- 'maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|' +
- 'mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|' +
- 'mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|' +
- 'mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|' +
- 'mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|' +
- 'mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' +
- 'mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|' +
- 'ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|' +
- 'ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|' +
- 'ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|' +
- 'ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|' +
- 'ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|' +
- 'PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|' +
- 'PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|' +
- 'PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|' +
- 'PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|' +
- 'PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|' +
- 'PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|' +
- 'PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|' +
- 'PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|' +
- 'px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister' +
- 'set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|' +
- 'sql_regcase').split('|')
- );
-
- var keywordsDeprecated = lang.arrayToMap(
- ('cfunction|old_function').split('|')
- );
-
- var futureReserved = lang.arrayToMap([]);
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "support.php_tag", // php open tag
- regex : "<\\?(?:php|\\=)"
- },
- {
- token : "support.php_tag", // php close tag
- regex : "\\?>"
- },
- {
- token : "comment",
- regex : "<\\!--",
- next : "htmlcomment"
- },
- {
- token : "meta.tag",
- regex : "<style",
- next : "css"
- },
- {
- token : "meta.tag", // opening tag
- regex : "<\\/?[-_a-zA-Z0-9:]+",
- next : "htmltag"
- },
- {
- token : 'meta.tag',
- regex : '<\!DOCTYPE.*?>'
- },
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- {
- token : "comment",
- regex : "#.*$"
- },
- docComment.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language", // constants
- regex : "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" +
- "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" +
- "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" +
- "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" +
- "VERSION))|__COMPILER_HALT_OFFSET__)\\b"
- }, {
- token : "constant.language", // constants
- regex : "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" +
- "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" +
- "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" +
- "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" +
- "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" +
- "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" +
- "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" +
- "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" +
- "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" +
- "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" +
- "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" +
- "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" +
- "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" +
- "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" +
- "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" +
- "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinVariables.hasOwnProperty(value))
- return "variable.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- if(value.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/))
- return "variable";
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- regex : '.+'
- }
- ],
- "htmlcomment" : [
- {
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- regex : ".+"
- }
- ],
- "htmltag" : [
- {
- token : "meta.tag",
- regex : ">",
- next : "start"
- }, {
- token : "text",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "string",
- regex : '".*?"'
- }, {
- token : "string",
- regex : "'.*?'"
- }
- ],
- "css" : [
- {
- token : "meta.tag",
- regex : "<\/style>",
- next : "htmltag"
- }, {
- token : "meta.tag",
- regex : ">",
- }, {
- token : 'text',
- regex : "(?:media|type|href)"
- }, {
- token : 'string',
- regex : '=".*?"'
- }, {
- token : "paren.lparen",
- regex : "\{",
- next : "cssdeclaration",
- }, {
- token : "keyword",
- regex : "#[A-Za-z0-9\-\_\.]+"
- }, {
- token : "variable",
- regex : "\\.[A-Za-z0-9\-\_\.]+"
- }, {
- token : "constant",
- regex : "[A-Za-z0-9]+"
- }
- ],
- "cssdeclaration" : [
- {
- token : "support.type",
- regex : "[\-a-zA-Z]+",
- next : "cssvalue"
- },
- {
- token : "paren.rparen",
- regex : '\}',
- next : "css"
- }
- ],
- "cssvalue" : [
- {
- token : "text",
- regex : "\:"
- },
- {
- token : "constant",
- regex : "#[0-9a-zA-Z]+"
- },
- {
- token : "text",
- regex : "[\-\_0-9a-zA-Z\"' ,%]+"
- },
- {
- token : "text",
- regex : ";",
- next : "cssdeclaration"
- }
- ],
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(PhpHighlightRules, TextHighlightRules);
-
-exports.PhpHighlightRules = PhpHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-php.js b/contexts/data/lib/ace/mode-php.js
index a60c8df..c3c0f68 100644
--- a/contexts/data/lib/ace/mode-php.js
+++ b/contexts/data/lib/ace/mode-php.js
@@ -1 +1,2299 @@
-define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./php_highlight_rules").PhpHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./behaviour/cstyle").CstyleBehaviour,k=a("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j,this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[\:]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(l.prototype),b.Mode=l}),define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=new f,b=e.arrayToMap("abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type".split("|")),c=e.arrayToMap("abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|public|static|switch|throw|try|use|var|while|xor".split("|")),d=e.arrayToMap("die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")),g=e.arrayToMap("true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__".split("|")),h=e.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")),i=e.arrayToMap("key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")),j=e.arrayToMap("cfunction|old_function".split("|")),k=e.arrayToMap([]);this.$rules={start:[{token:"support.php_tag",regex:"<\\?(?:php|\\=)"},{token:"support.php_tag",regex:"\\?>"},{token:"comment",regex:"<\\!--",next:"htmlcomment"},{token:"meta.tag",regex:"<style",next:"css"},{token:"meta.tag",regex:"<\\/?[-_a-zA-Z0-9:]+",next:"htmltag"},{token:"meta.tag",regex:"<!DOCTYPE.*?>"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"#.*$"},a.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\b"},{token:"constant.language",regex:"\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"},{token:function(a){return c.hasOwnProperty(a)?"keyword":g.hasOwnProperty(a)?"constant.language":h.hasOwnProperty(a)?"variable.language":k.hasOwnProperty(a)?"invalid.illegal":b.hasOwnProperty(a)?"support.function":a=="debugger"?"invalid.deprecated":a.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/)?"variable":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}],htmlcomment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",regex:".+"}],htmltag:[{token:"meta.tag",regex:">",next:"start"},{token:"text",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"}],css:[{token:"meta.tag",regex:"</style>",next:"htmltag"},{token:"meta.tag",regex:">"},{token:"text",regex:"(?:media|type|href)"},{token:"string",regex:'=".*?"'},{token:"paren.lparen",regex:"{",next:"cssdeclaration"},{token:"keyword",regex:"#[A-Za-z0-9-_.]+"},{token:"variable",regex:"\\.[A-Za-z0-9-_.]+"},{token:"constant",regex:"[A-Za-z0-9]+"}],cssdeclaration:[{token:"support.type",regex:"[-a-zA-Z]+",next:"cssvalue"},{token:"paren.rparen",regex:"}",next:"css"}],cssvalue:[{token:"text",regex:":"},{token:"constant",regex:"#[0-9a-zA-Z]+"},{token:"text",regex:"[-_0-9a-zA-Z\"' ,%]+"},{token:"text",regex:";",next:"cssdeclaration"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.PhpHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/php', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/php_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/unicode'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var unicode = require("../unicode");
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new PhpHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.tokenRe = new RegExp("^["
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\_]+", "g"
+ );
+
+ this.nonTokenRe = new RegExp("^(?:[^"
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\_]|\s])+", "g"
+ );
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)#/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "#");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "php-start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "php-doc-start") {
+ if (endState != "php-doc-start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/php_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/html_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var PhpLangHighlightRules = function() {
+ var docComment = DocCommentHighlightRules;
+ var builtinFunctions = lang.arrayToMap(
+ ('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|' +
+ 'aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|' +
+ 'apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|' +
+ 'apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|' +
+ 'apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|' +
+ 'apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|' +
+ 'apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|' +
+ 'apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|' +
+ 'array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|' +
+ 'array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|' +
+ 'array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|' +
+ 'array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|' +
+ 'array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|' +
+ 'array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|' +
+ 'atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|' +
+ 'bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|' +
+ 'bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|' +
+ 'bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|' +
+ 'bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|' +
+ 'bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|' +
+ 'cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|' +
+ 'cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|' +
+ 'cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|' +
+ 'cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|' +
+ 'cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|' +
+ 'cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|' +
+ 'cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|' +
+ 'cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|' +
+ 'cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|' +
+ 'cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|' +
+ 'cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|' +
+ 'cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|' +
+ 'cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|' +
+ 'cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|' +
+ 'cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|' +
+ 'cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|' +
+ 'cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|' +
+ 'cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|' +
+ 'cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|' +
+ 'cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|' +
+ 'cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|' +
+ 'cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|' +
+ 'cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|' +
+ 'cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|' +
+ 'cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|' +
+ 'cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|' +
+ 'cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|' +
+ 'cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|' +
+ 'chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|' +
+ 'class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|' +
+ 'classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|' +
+ 'com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|' +
+ 'com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|' +
+ 'convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|' +
+ 'counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|' +
+ 'crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|' +
+ 'ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|' +
+ 'cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|' +
+ 'cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|' +
+ 'cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|' +
+ 'cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|' +
+ 'cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|' +
+ 'cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|' +
+ 'cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|' +
+ 'cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|' +
+ 'cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|' +
+ 'cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|' +
+ 'cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|' +
+ 'curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|' +
+ 'curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|' +
+ 'curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|' +
+ 'date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|' +
+ 'date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|' +
+ 'date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|' +
+ 'dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|' +
+ 'db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|' +
+ 'db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|' +
+ 'db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|' +
+ 'db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|' +
+ 'db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|' +
+ 'db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|' +
+ 'dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|' +
+ 'dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|' +
+ 'dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|' +
+ 'dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|' +
+ 'dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|' +
+ 'dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|' +
+ 'dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|' +
+ 'dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|' +
+ 'dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|' +
+ 'define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|' +
+ 'dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|' +
+ 'dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|' +
+ 'domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|' +
+ 'domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|' +
+ 'domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|' +
+ 'domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|' +
+ 'domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|' +
+ 'domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|' +
+ 'domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|' +
+ 'domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|' +
+ 'domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|' +
+ 'domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|' +
+ 'domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|' +
+ 'domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|' +
+ 'domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|' +
+ 'domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|' +
+ 'domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|' +
+ 'domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|' +
+ 'domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|' +
+ 'enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|' +
+ 'enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|' +
+ 'enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|' +
+ 'enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|' +
+ 'eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|' +
+ 'event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|' +
+ 'event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|' +
+ 'event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|' +
+ 'event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|' +
+ 'expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|' +
+ 'fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|' +
+ 'fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|' +
+ 'fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|' +
+ 'fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|' +
+ 'fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|' +
+ 'fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|' +
+ 'fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|' +
+ 'fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|' +
+ 'fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|' +
+ 'fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|' +
+ 'fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|' +
+ 'fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|' +
+ 'fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|' +
+ 'file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|' +
+ 'filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|' +
+ 'filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|' +
+ 'finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|' +
+ 'forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|' +
+ 'ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|' +
+ 'ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|' +
+ 'ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|' +
+ 'func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|' +
+ 'gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|' +
+ 'geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|' +
+ 'geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|' +
+ 'get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|' +
+ 'get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|' +
+ 'get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|' +
+ 'get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|' +
+ 'getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|' +
+ 'gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|' +
+ 'getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|' +
+ 'getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|' +
+ 'gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|' +
+ 'gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|' +
+ 'gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|' +
+ 'gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|' +
+ 'gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|' +
+ 'gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|' +
+ 'gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|' +
+ 'grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|' +
+ 'gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|' +
+ 'gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|' +
+ 'gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|' +
+ 'gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|' +
+ 'gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|' +
+ 'gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|' +
+ 'gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|' +
+ 'gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|' +
+ 'gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|' +
+ 'gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|' +
+ 'halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|' +
+ 'haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|' +
+ 'harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|' +
+ 'harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|' +
+ 'harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|' +
+ 'harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|' +
+ 'harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|' +
+ 'harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|' +
+ 'harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|' +
+ 'harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|' +
+ 'haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|' +
+ 'harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|' +
+ 'harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|' +
+ 'haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|' +
+ 'haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|' +
+ 'harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|' +
+ 'harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|' +
+ 'harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|' +
+ 'harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|' +
+ 'harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|' +
+ 'harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|' +
+ 'harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|' +
+ 'harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|' +
+ 'harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|' +
+ 'harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|' +
+ 'harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|' +
+ 'harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|' +
+ 'harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|' +
+ 'harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|' +
+ 'hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|' +
+ 'header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|' +
+ 'html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|' +
+ 'http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|' +
+ 'http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|' +
+ 'http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|' +
+ 'http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|' +
+ 'http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|' +
+ 'http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|' +
+ 'http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|' +
+ 'http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|' +
+ 'httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|' +
+ 'httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|' +
+ 'httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|' +
+ 'httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|' +
+ 'httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|' +
+ 'httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|' +
+ 'httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|' +
+ 'httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|' +
+ 'httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|' +
+ 'httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|' +
+ 'httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|' +
+ 'httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|' +
+ 'httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|' +
+ 'httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|' +
+ 'httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|' +
+ 'httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|' +
+ 'httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|' +
+ 'httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|' +
+ 'httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|' +
+ 'httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|' +
+ 'httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|' +
+ 'httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|' +
+ 'httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|' +
+ 'httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|' +
+ 'httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|' +
+ 'httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|' +
+ 'httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|' +
+ 'httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|' +
+ 'httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|' +
+ 'hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|' +
+ 'hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|' +
+ 'hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|' +
+ 'hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|' +
+ 'hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|' +
+ 'hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|' +
+ 'hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|' +
+ 'hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|' +
+ 'hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|' +
+ 'hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|' +
+ 'hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|' +
+ 'hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|' +
+ 'hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|' +
+ 'hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|' +
+ 'ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|' +
+ 'ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|' +
+ 'ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|' +
+ 'ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|' +
+ 'ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|' +
+ 'ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|' +
+ 'ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|' +
+ 'iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|' +
+ 'id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|' +
+ 'idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|' +
+ 'ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|' +
+ 'ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|' +
+ 'ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|' +
+ 'ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|' +
+ 'iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|' +
+ 'iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|' +
+ 'iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|' +
+ 'imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|' +
+ 'imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|' +
+ 'imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|' +
+ 'imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|' +
+ 'imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|' +
+ 'imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|' +
+ 'imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|' +
+ 'imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|' +
+ 'imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|' +
+ 'imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|' +
+ 'imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|' +
+ 'imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|' +
+ 'imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|' +
+ 'imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|' +
+ 'imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|' +
+ 'imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|' +
+ 'imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|' +
+ 'imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|' +
+ 'imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|' +
+ 'imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|' +
+ 'imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|' +
+ 'imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|' +
+ 'imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|' +
+ 'imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|' +
+ 'imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|' +
+ 'imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|' +
+ 'imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|' +
+ 'imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|' +
+ 'imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|' +
+ 'imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|' +
+ 'imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|' +
+ 'imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|' +
+ 'imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|' +
+ 'imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|' +
+ 'imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|' +
+ 'imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|' +
+ 'imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|' +
+ 'imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|' +
+ 'imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|' +
+ 'imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|' +
+ 'imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|' +
+ 'imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|' +
+ 'imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|' +
+ 'imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|' +
+ 'imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|' +
+ 'imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|' +
+ 'imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|' +
+ 'imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|' +
+ 'imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|' +
+ 'imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|' +
+ 'imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|' +
+ 'imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|' +
+ 'imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|' +
+ 'imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|' +
+ 'imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|' +
+ 'imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|' +
+ 'imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|' +
+ 'imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|' +
+ 'imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|' +
+ 'imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|' +
+ 'imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|' +
+ 'imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|' +
+ 'imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|' +
+ 'imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|' +
+ 'imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|' +
+ 'imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|' +
+ 'imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|' +
+ 'imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|' +
+ 'imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|' +
+ 'imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|' +
+ 'imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|' +
+ 'imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|' +
+ 'imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|' +
+ 'imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|' +
+ 'imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|' +
+ 'imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|' +
+ 'imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|' +
+ 'imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|' +
+ 'imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|' +
+ 'imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|' +
+ 'imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|' +
+ 'imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|' +
+ 'imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|' +
+ 'imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|' +
+ 'imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|' +
+ 'imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|' +
+ 'imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|' +
+ 'imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|' +
+ 'imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|' +
+ 'imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|' +
+ 'imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|' +
+ 'imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|' +
+ 'imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|' +
+ 'imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|' +
+ 'imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|' +
+ 'imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|' +
+ 'imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|' +
+ 'imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|' +
+ 'imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|' +
+ 'imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|' +
+ 'imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|' +
+ 'imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|' +
+ 'imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|' +
+ 'imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|' +
+ 'imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|' +
+ 'imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|' +
+ 'imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|' +
+ 'imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|' +
+ 'imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|' +
+ 'imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|' +
+ 'include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|' +
+ 'ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|' +
+ 'ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|' +
+ 'ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|' +
+ 'ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|' +
+ 'ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|' +
+ 'inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|' +
+ 'intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|' +
+ 'is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|' +
+ 'is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|' +
+ 'iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|' +
+ 'iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|' +
+ 'jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|' +
+ 'json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|' +
+ 'kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|' +
+ 'kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|' +
+ 'ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|' +
+ 'ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|' +
+ 'ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|' +
+ 'ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|' +
+ 'ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|' +
+ 'libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|' +
+ 'limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|' +
+ 'lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|' +
+ 'm_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|' +
+ 'm_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|' +
+ 'm_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|' +
+ 'm_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|' +
+ 'mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|' +
+ 'mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|' +
+ 'mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|' +
+ 'maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|' +
+ 'maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|' +
+ 'maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|' +
+ 'maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|' +
+ 'maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|' +
+ 'maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|' +
+ 'maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|' +
+ 'maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|' +
+ 'maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|' +
+ 'maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|' +
+ 'maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|' +
+ 'maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|' +
+ 'maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|' +
+ 'maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|' +
+ 'maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|' +
+ 'mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|' +
+ 'mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|' +
+ 'mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|' +
+ 'mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|' +
+ 'mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|' +
+ 'mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|' +
+ 'mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|' +
+ 'mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|' +
+ 'mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|' +
+ 'mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|' +
+ 'mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|' +
+ 'mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|' +
+ 'mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|' +
+ 'mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|' +
+ 'mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|' +
+ 'ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|' +
+ 'mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|' +
+ 'mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|' +
+ 'mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|' +
+ 'mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|' +
+ 'mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|' +
+ 'msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|' +
+ 'msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|' +
+ 'msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|' +
+ 'msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|' +
+ 'msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|' +
+ 'msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|' +
+ 'msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|' +
+ 'mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|' +
+ 'mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|' +
+ 'mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|' +
+ 'mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|' +
+ 'mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|' +
+ 'mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|' +
+ 'mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|' +
+ 'mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|' +
+ 'mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|' +
+ 'mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|' +
+ 'mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|' +
+ 'mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|' +
+ 'mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|' +
+ 'mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' +
+ 'mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|' +
+ 'mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|' +
+ 'mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|' +
+ 'ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|' +
+ 'ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|' +
+ 'ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|' +
+ 'ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|' +
+ 'ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|' +
+ 'ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|' +
+ 'ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|' +
+ 'ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|' +
+ 'ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|' +
+ 'ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|' +
+ 'ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|' +
+ 'ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|' +
+ 'ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|' +
+ 'ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|' +
+ 'ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|' +
+ 'ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|' +
+ 'ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|' +
+ 'ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|' +
+ 'ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|' +
+ 'ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|' +
+ 'ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|' +
+ 'ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|' +
+ 'newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|' +
+ 'newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|' +
+ 'newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|' +
+ 'newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|' +
+ 'newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|' +
+ 'newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|' +
+ 'newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|' +
+ 'newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|' +
+ 'newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|' +
+ 'newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|' +
+ 'newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|' +
+ 'newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|' +
+ 'newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|' +
+ 'newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|' +
+ 'newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|' +
+ 'newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|' +
+ 'newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|' +
+ 'newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|' +
+ 'newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|' +
+ 'notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|' +
+ 'notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|' +
+ 'numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|' +
+ 'ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|' +
+ 'ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|' +
+ 'oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|' +
+ 'oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|' +
+ 'oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|' +
+ 'oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|' +
+ 'oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|' +
+ 'oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|' +
+ 'oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|' +
+ 'oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|' +
+ 'oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|' +
+ 'ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|' +
+ 'ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|' +
+ 'ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|' +
+ 'ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|' +
+ 'ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|' +
+ 'octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|' +
+ 'odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|' +
+ 'odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|' +
+ 'odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|' +
+ 'odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|' +
+ 'odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|' +
+ 'openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|' +
+ 'openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|' +
+ 'openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|' +
+ 'openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|' +
+ 'openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|' +
+ 'openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|' +
+ 'openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|' +
+ 'openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|' +
+ 'openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|' +
+ 'openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|' +
+ 'openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|' +
+ 'outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|' +
+ 'ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|' +
+ 'ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|' +
+ 'ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|' +
+ 'parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|' +
+ 'pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|' +
+ 'pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|' +
+ 'pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|' +
+ 'pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|' +
+ 'pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|' +
+ 'pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|' +
+ 'pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|' +
+ 'pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|' +
+ 'pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|' +
+ 'pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|' +
+ 'pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|' +
+ 'pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|' +
+ 'pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|' +
+ 'pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|' +
+ 'pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|' +
+ 'pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|' +
+ 'pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|' +
+ 'pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|' +
+ 'pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|' +
+ 'pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|' +
+ 'pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|' +
+ 'pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|' +
+ 'pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|' +
+ 'pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|' +
+ 'pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|' +
+ 'pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|' +
+ 'pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|' +
+ 'pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|' +
+ 'pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|' +
+ 'pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|' +
+ 'pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|' +
+ 'pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|' +
+ 'pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|' +
+ 'pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|' +
+ 'pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|' +
+ 'php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|' +
+ 'png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|' +
+ 'posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|' +
+ 'posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|' +
+ 'posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|' +
+ 'preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|' +
+ 'printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|' +
+ 'printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|' +
+ 'printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|' +
+ 'printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|' +
+ 'printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|' +
+ 'ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|' +
+ 'ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|' +
+ 'ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|' +
+ 'ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|' +
+ 'ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|' +
+ 'ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|' +
+ 'ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|' +
+ 'ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|' +
+ 'ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|' +
+ 'pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|' +
+ 'pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|' +
+ 'pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|' +
+ 'px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|' +
+ 'px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|' +
+ 'px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|' +
+ 'radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|' +
+ 'radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|' +
+ 'radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|' +
+ 'radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|' +
+ 'rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|' +
+ 'readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|' +
+ 'readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|' +
+ 'readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|' +
+ 'recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|' +
+ 'recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|' +
+ 'reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|' +
+ 'regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|' +
+ 'resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|' +
+ 'rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|' +
+ 'rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|' +
+ 'runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|' +
+ 'runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|' +
+ 'runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|' +
+ 'runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|' +
+ 'samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|' +
+ 'samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|' +
+ 'sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|' +
+ 'sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|' +
+ 'sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|' +
+ 'sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|' +
+ 'sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|' +
+ 'sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|' +
+ 'sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|' +
+ 'sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|' +
+ 'sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|' +
+ 'sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|' +
+ 'sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|' +
+ 'sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|' +
+ 'sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|' +
+ 'sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|' +
+ 'sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|' +
+ 'sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|' +
+ 'sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|' +
+ 'sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|' +
+ 'sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|' +
+ 'sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|' +
+ 'session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|' +
+ 'session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|' +
+ 'session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|' +
+ 'session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|' +
+ 'set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|' +
+ 'setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|' +
+ 'shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|' +
+ 'similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|' +
+ 'snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|' +
+ 'snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|' +
+ 'snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|' +
+ 'soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|' +
+ 'socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|' +
+ 'socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|' +
+ 'socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|' +
+ 'solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|' +
+ 'solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|' +
+ 'solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|' +
+ 'spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|' +
+ 'splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|' +
+ 'splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|' +
+ 'sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|' +
+ 'sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|' +
+ 'sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|' +
+ 'sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|' +
+ 'sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|' +
+ 'sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|' +
+ 'ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|' +
+ 'ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|' +
+ 'ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|' +
+ 'ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|' +
+ 'stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|' +
+ 'stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|' +
+ 'stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|' +
+ 'stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|' +
+ 'stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|' +
+ 'stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|' +
+ 'stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|' +
+ 'stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|' +
+ 'stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|' +
+ 'stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|' +
+ 'stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|' +
+ 'stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|' +
+ 'str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|' +
+ 'stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|' +
+ 'stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|' +
+ 'stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|' +
+ 'stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|' +
+ 'stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|' +
+ 'stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|' +
+ 'stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|' +
+ 'stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|' +
+ 'stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|' +
+ 'strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|' +
+ 'svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|' +
+ 'svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|' +
+ 'svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|' +
+ 'svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|' +
+ 'svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|' +
+ 'svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|' +
+ 'swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|' +
+ 'swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|' +
+ 'swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|' +
+ 'swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|' +
+ 'swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|' +
+ 'swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|' +
+ 'swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|' +
+ 'swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|' +
+ 'swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|' +
+ 'swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|' +
+ 'swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|' +
+ 'swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|' +
+ 'swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|' +
+ 'sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|' +
+ 'sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|' +
+ 'sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|' +
+ 'sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|' +
+ 'tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|' +
+ 'tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|' +
+ 'time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|' +
+ 'timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|' +
+ 'tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|' +
+ 'ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|' +
+ 'udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|' +
+ 'udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|' +
+ 'uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|' +
+ 'urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|' +
+ 'variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|' +
+ 'variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|' +
+ 'variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|' +
+ 'vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|' +
+ 'vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|' +
+ 'vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|' +
+ 'w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|' +
+ 'wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|' +
+ 'win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|' +
+ 'win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|' +
+ 'wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|' +
+ 'wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|' +
+ 'wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|' +
+ 'wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|' +
+ 'xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|' +
+ 'xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|' +
+ 'xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|' +
+ 'xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|' +
+ 'xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|' +
+ 'xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|' +
+ 'xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|' +
+ 'xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|' +
+ 'xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|' +
+ 'xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|' +
+ 'xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|' +
+ 'xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|' +
+ 'xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|' +
+ 'xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|' +
+ 'xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|' +
+ 'xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|' +
+ 'xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|' +
+ 'xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|' +
+ 'xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|' +
+ 'xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|' +
+ 'xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|' +
+ 'xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|' +
+ 'yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|' +
+ 'yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|' +
+ 'yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|' +
+ 'yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|' +
+ 'zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|' +
+ 'ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|' +
+ 'ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|' +
+ 'ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|' +
+ 'ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|' +
+ 'ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|' +
+ 'ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type').split('|')
+ );
+ var keywords = lang.arrayToMap(
+ ('abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|' +
+ 'endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|' +
+ 'public|static|switch|throw|try|use|var|while|xor').split('|')
+ );
+ var languageConstructs = lang.arrayToMap(
+ ('die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|')
+ );
+
+ var builtinConstants = lang.arrayToMap(
+ ('true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__').split('|')
+ );
+
+ var builtinVariables = lang.arrayToMap(
+ ('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' +
+ '$http_response_header|$argc|$argv').split('|')
+ );
+ var builtinFunctionsDeprecated = lang.arrayToMap(
+ ('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|' +
+ 'com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|' +
+ 'cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|' +
+ 'hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|' +
+ 'maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|' +
+ 'mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|' +
+ 'mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|' +
+ 'mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|' +
+ 'mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|' +
+ 'mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' +
+ 'mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|' +
+ 'ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|' +
+ 'ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|' +
+ 'ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|' +
+ 'ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|' +
+ 'ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|' +
+ 'PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|' +
+ 'PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|' +
+ 'PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|' +
+ 'PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|' +
+ 'PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|' +
+ 'PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|' +
+ 'PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|' +
+ 'PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|' +
+ 'px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister' +
+ 'set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|' +
+ 'sql_regcase').split('|')
+ );
+
+ var keywordsDeprecated = lang.arrayToMap(
+ ('cfunction|old_function').split('|')
+ );
+
+ var futureReserved = lang.arrayToMap([]);
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ {
+ token : "comment",
+ regex : "#.*$"
+ },
+ docComment.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // " string start
+ regex : '"',
+ next : "qqstring"
+ }, {
+ token : "string", // ' string start
+ regex : "'",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language", // constants
+ regex : "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" +
+ "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" +
+ "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" +
+ "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" +
+ "VERSION))|__COMPILER_HALT_OFFSET__)\\b"
+ }, {
+ token : "constant.language", // constants
+ regex : "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" +
+ "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" +
+ "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" +
+ "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" +
+ "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" +
+ "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" +
+ "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" +
+ "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" +
+ "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" +
+ "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" +
+ "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" +
+ "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" +
+ "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" +
+ "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" +
+ "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" +
+ "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (builtinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (builtinVariables.hasOwnProperty(value))
+ return "variable.language";
+ else if (futureReserved.hasOwnProperty(value))
+ return "invalid.illegal";
+ else if (builtinFunctions.hasOwnProperty(value))
+ return "support.function";
+ else if (value == "debugger")
+ return "invalid.deprecated";
+ else
+ if(value.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/))
+ return "variable";
+ return "identifier";
+ },
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'
+ }, {
+ token : "constant.language.escape",
+ regex : /\$[\w\d]+(?:\[[\w\d]+\])?/
+ }, {
+ token : "constant.language.escape",
+ regex : /\$\{[^"\}]+\}?/ // this is wrong but ok for now
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+?'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : "\\\\['\\\\]"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : ".+?"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(PhpLangHighlightRules, TextHighlightRules);
+
+
+var PhpHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token : "support.php_tag", // php open tag
+ regex : "<\\?(?:php|\\=)?",
+ next : "php-start"
+ });
+ }
+
+ this.embedRules(PhpLangHighlightRules, "php-");
+
+ this.$rules["php-start"].unshift({
+ token : "support.php_tag", // php close tag
+ regex : "\\?>",
+ next : "start"
+ });
+};
+
+oop.inherits(PhpHighlightRules, HtmlHighlightRules);
+
+exports.PhpHighlightRules = PhpHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+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_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ this.$rules = {
+ start : [{
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "xml-pe",
+ regex : "<\\!.*?>"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=script\\b)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=style\\b)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start", tagMap);
+ xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
+ xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(HtmlHighlightRules, TextHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-powershell-noconflict.js b/contexts/data/lib/ace/mode-powershell-noconflict.js
deleted file mode 100644
index c4515c4..0000000
--- a/contexts/data/lib/ace/mode-powershell-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./powershell_highlight_rules").PowershellHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){return null}}.call(k.prototype),b.Mode=k}),ace.define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("function|if|else|elseif|switch|while|default|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end".split("|")),b=e.arrayToMap("Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption".split("|")),c="eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|is|isnot|as|and|or|band|bor|not";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"[$](?:[Tt]rue|[Ff]alse)\\b"},{token:"constant.language",regex:"[$][Nn]ull\\b"},{token:"variable.instance",regex:"[$][a-zA-Z][a-zA-Z0-9_]*\\b"},{token:function(c){return a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"keyword.operator",regex:"\\-(?:"+c+")"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\=|\\+=|\\-="},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PowershellHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-powershell-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-powershell-uncompressed-noconflict.js
deleted file mode 100644
index 8cc1425..0000000
--- a/contexts/data/lib/ace/mode-powershell-uncompressed-noconflict.js
+++ /dev/null
@@ -1,716 +0,0 @@
-ace.define('ace/mode/powershell', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/powershell_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new PowershellHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-ace.define('ace/mode/powershell_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PowershellHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("function|if|else|elseif|switch|while|default|for|do|until|break|continue|" +
- "foreach|return|filter|in|trap|throw|param|begin|process|end").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|" +
- "Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|" +
- "Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|" +
- "Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|" +
- "Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|" +
- "ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|" +
- "Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|" +
- "Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|" +
- "Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|" +
- "Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|" +
- "Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|" +
- "Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|" +
- "Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|" +
- "Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|" +
- "Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|" +
- "Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|" +
- "Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|" +
- "Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|" +
- "Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|" +
- "Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|" +
- "Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|" +
- "Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|" +
- "Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|" +
- "Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|" +
- "Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|" +
- "Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|" +
- "Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|" +
- "New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|" +
- "Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|" +
- "Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|" +
- "Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|" +
- "Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|" +
- "ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|" +
- "Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|" +
- "Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|" +
- "Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|" +
- "Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|" +
- "Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|" +
- "Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|" +
- "Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|" +
- "Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption").split("|"));
-
- var binaryOperatorsRe = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|" +
- "ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|" +
- "is|isnot|as|" +
- "and|or|band|bor|not";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "[$](?:[Tt]rue|[Ff]alse)\\b"
- }, {
- token : "constant.language",
- regex : "[$][Nn]ull\\b"
- }, {
- token : "variable.instance",
- regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\-(?:" + binaryOperatorsRe + ")"
- }, {
- token : "keyword.operator",
- regex : "&|\\*|\\+|\\-|\\=|\\+=|\\-="
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-};
-
-oop.inherits(PowershellHighlightRules, TextHighlightRules);
-
-exports.PowershellHighlightRules = PowershellHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-powershell-uncompressed.js b/contexts/data/lib/ace/mode-powershell-uncompressed.js
deleted file mode 100644
index e5877f6..0000000
--- a/contexts/data/lib/ace/mode-powershell-uncompressed.js
+++ /dev/null
@@ -1,716 +0,0 @@
-define('ace/mode/powershell', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/powershell_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new PowershellHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-define('ace/mode/powershell_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PowershellHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("function|if|else|elseif|switch|while|default|for|do|until|break|continue|" +
- "foreach|return|filter|in|trap|throw|param|begin|process|end").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|" +
- "Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|" +
- "Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|" +
- "Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|" +
- "Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|" +
- "ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|" +
- "Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|" +
- "Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|" +
- "Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|" +
- "Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|" +
- "Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|" +
- "Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|" +
- "Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|" +
- "Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|" +
- "Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|" +
- "Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|" +
- "Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|" +
- "Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|" +
- "Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|" +
- "Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|" +
- "Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|" +
- "Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|" +
- "Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|" +
- "Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|" +
- "Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|" +
- "Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|" +
- "Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|" +
- "New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|" +
- "Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|" +
- "Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|" +
- "Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|" +
- "Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|" +
- "ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|" +
- "Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|" +
- "Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|" +
- "Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|" +
- "Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|" +
- "Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|" +
- "Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|" +
- "Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|" +
- "Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption").split("|"));
-
- var binaryOperatorsRe = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|" +
- "ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|" +
- "is|isnot|as|" +
- "and|or|band|bor|not";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "[$](?:[Tt]rue|[Ff]alse)\\b"
- }, {
- token : "constant.language",
- regex : "[$][Nn]ull\\b"
- }, {
- token : "variable.instance",
- regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\-(?:" + binaryOperatorsRe + ")"
- }, {
- token : "keyword.operator",
- regex : "&|\\*|\\+|\\-|\\=|\\+=|\\-="
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-};
-
-oop.inherits(PowershellHighlightRules, TextHighlightRules);
-
-exports.PowershellHighlightRules = PowershellHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-powershell.js b/contexts/data/lib/ace/mode-powershell.js
index 9bbdef6..a0c6f72 100644
--- a/contexts/data/lib/ace/mode-powershell.js
+++ b/contexts/data/lib/ace/mode-powershell.js
@@ -1 +1,611 @@
-define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./powershell_highlight_rules").PowershellHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){return null}}.call(k.prototype),b.Mode=k}),define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("function|if|else|elseif|switch|while|default|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end".split("|")),b=e.arrayToMap("Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption".split("|")),c="eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|is|isnot|as|and|or|band|bor|not";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"[$](?:[Tt]rue|[Ff]alse)\\b"},{token:"constant.language",regex:"[$][Nn]ull\\b"},{token:"variable.instance",regex:"[$][a-zA-Z][a-zA-Z0-9_]*\\b"},{token:function(c){return a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"keyword.operator",regex:"\\-(?:"+c+")"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\=|\\+=|\\-="},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PowershellHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+ace.define('ace/mode/powershell', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/powershell_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new PowershellHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/powershell_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PowershellHighlightRules = function() {
+
+ var keywords = (
+ "function|if|else|elseif|switch|while|default|for|do|until|break|continue|" +
+ "foreach|return|filter|in|trap|throw|param|begin|process|end"
+ );
+
+ var builtinFunctions = (
+ "Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|" +
+ "Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|" +
+ "Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|" +
+ "Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|" +
+ "Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|" +
+ "ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|" +
+ "Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|" +
+ "Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|" +
+ "Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|" +
+ "Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|" +
+ "Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|" +
+ "Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|" +
+ "Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|" +
+ "Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|" +
+ "Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|" +
+ "Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|" +
+ "Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|" +
+ "Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|" +
+ "Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|" +
+ "Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|" +
+ "Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|" +
+ "Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|" +
+ "Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|" +
+ "Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|" +
+ "Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|" +
+ "Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|" +
+ "Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|" +
+ "New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|" +
+ "Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|" +
+ "Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|" +
+ "Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|" +
+ "Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|" +
+ "ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|" +
+ "Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|" +
+ "Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|" +
+ "Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|" +
+ "Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|" +
+ "Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|" +
+ "Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|" +
+ "Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|" +
+ "Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords
+ }, "identifier");
+
+ var binaryOperatorsRe = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|" +
+ "ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|" +
+ "is|isnot|as|" +
+ "and|or|band|bor|not";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "comment.start",
+ regex : "<#",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "[$](?:[Tt]rue|[Ff]alse)\\b"
+ }, {
+ token : "constant.language",
+ regex : "[$][Nn]ull\\b"
+ }, {
+ token : "variable.instance",
+ regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\-(?:" + binaryOperatorsRe + ")"
+ }, {
+ token : "keyword.operator",
+ regex : "&|\\*|\\+|\\-|\\=|\\+=|\\-="
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment.end",
+ regex : "#>",
+ next : "start"
+ }, {
+ token : "doc.comment.tag",
+ regex : "^\\.\\w+"
+ }, {
+ token : "comment",
+ regex : "\\w+"
+ }, {
+ token : "comment",
+ regex : "."
+ }
+ ]
+ };
+};
+
+oop.inherits(PowershellHighlightRules, TextHighlightRules);
+
+exports.PowershellHighlightRules = PowershellHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-python-noconflict.js b/contexts/data/lib/ace/mode-python-noconflict.js
deleted file mode 100644
index 1a1bdcc..0000000
--- a/contexts/data/lib/ace/mode-python-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./python_highlight_rules").PythonHighlightRules,h=a("./folding/pythonic").FoldMode,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.foldingRules=new h("\\:")};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[\:]\s*$/);g&&(d+=c)}return d};var a={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(b,c,d){if(d!=="\r\n"&&d!=="\r"&&d!=="\n")return!1;var e=this.$tokenizer.getLineTokens(c.trim(),b).tokens;if(!e)return!1;do var f=e.pop();while(f&&(f.type=="comment"||f.type=="text"&&f.value.match(/^\s+$/)));return f?f.type=="keyword"&&a[f.value]:!1},this.autoOutdent=function(a,b,c){c+=1;var d=this.$getIndent(b.getLine(c)),e=b.getTabString();d.slice(-e.length)==e&&b.remove(new i(c,d.length-e.length,c,d.length))}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")),b=e.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")),c=e.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),d=e.arrayToMap("".split("|")),f="(?:r|u|ur|R|U|UR|Ur|uR)?",g="(?:(?:[1-9]\\d*)|(?:0))",h="(?:0[oO]?[0-7]+)",i="(?:0[xX][\\dA-Fa-f]+)",j="(?:0[bB][01]+)",k="(?:"+g+"|"+h+"|"+i+"|"+j+")",l="(?:[eE][+-]?\\d+)",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:(?:"+o+"|"+n+")"+l+")",q="(?:"+p+"|"+o+")";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}(?:[^\\\\]|\\\\.)*?"{3}'},{token:"string",merge:!0,regex:f+'"{3}.*$',next:"qqstring"},{token:"string",regex:f+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:f+"'{3}(?:[^\\\\]|\\\\.)*?'{3}"},{token:"string",merge:!0,regex:f+"'{3}.*$",next:"qstring"},{token:"string",regex:f+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:"(?:"+q+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:q},{token:"constant.numeric",regex:k+"[lL]\\b"},{token:"constant.numeric",regex:k+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"invalid.illegal":c.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen.paren",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?"{3}',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?'{3}",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PythonHighlightRules=g}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a){this.foldingStartMarker=new RegExp("(?:([\\[{])|("+a+"))(?:\\s*)(?:#.*)?$")};d.inherits(f,e),function(){this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),e=d.match(this.foldingStartMarker);if(e)return e[1]?this.openingBracketBlock(a,e[1],c,e.index):e[2]?this.indentationBlock(a,c,e.index+e[2].length):this.indentationBlock(a,c)}}.call(f.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-python-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-python-uncompressed-noconflict.js
deleted file mode 100644
index 3b9fe1e..0000000
--- a/contexts/data/lib/ace/mode-python-uncompressed-noconflict.js
+++ /dev/null
@@ -1,516 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* Version: MPL 1.1/GPL 2.0/LGPL 2.1
-*
-* The contents of this file are subject to the Mozilla Public License Version
-* 1.1 (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-* http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS IS" basis,
-* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-* for the specific language governing rights and limitations under the
-* License.
-*
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* The Initial Developer of the Original Code is
-* Ajax.org B.V.
-* Portions created by the Initial Developer are Copyright (C) 2010
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-* Fabian Jakobs <fabian AT ajax DOT org>
-* Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/python', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/python_highlight_rules', 'ace/mode/folding/pythonic', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
-var PythonFoldMode = require("./folding/pythonic").FoldMode;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new PythonHighlightRules().getRules());
- this.foldingRules = new PythonFoldMode("\\:");
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "#");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- var outdents = {
- "pass": 1,
- "return": 1,
- "raise": 1,
- "break": 1,
- "continue": 1
- };
-
- this.checkOutdent = function(state, line, input) {
- if (input !== "\r\n" && input !== "\r" && input !== "\n")
- return false;
-
- var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
-
- if (!tokens)
- return false;
-
- // ignore trailing comments
- do {
- var last = tokens.pop();
- } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
-
- if (!last)
- return false;
-
- return (last.type == "keyword" && outdents[last.value]);
- };
-
- this.autoOutdent = function(state, doc, row) {
- // outdenting in python is slightly different because it always applies
- // to the next line and only of a new line is inserted
-
- row += 1;
- var indent = this.$getIndent(doc.getLine(row));
- var tab = doc.getTabString();
- if (indent.slice(-tab.length) == tab)
- doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- * TODO: python delimiters
- */
-
-ace.define('ace/mode/python_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PythonHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
- "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
- "raise|return|try|while|with|yield").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("True|False|None|NotImplemented|Ellipsis|__debug__").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
- "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
- "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
- "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
- "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
- "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
- "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
- "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("").split("|")
- );
-
- var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var octInteger = "(?:0[oO]?[0-7]+)";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var binInteger = "(?:0[bB][01]+)";
- var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
-
- var exponent = "(?:[eE][+-]?\\d+)";
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
- var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
-
- this.$rules = {
- "start" : [ {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string", // """ string
- regex : strPre + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'
- }, {
- token : "string", // multi line """ string start
- merge : true,
- regex : strPre + '"{3}.*$',
- next : "qqstring"
- }, {
- token : "string", // " string
- regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
- }, {
- token : "string", // ''' string
- regex : strPre + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"
- }, {
- token : "string", // multi line ''' string start
- merge : true,
- regex : strPre + "'{3}.*$",
- next : "qstring"
- }, {
- token : "string", // ' string
- regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
- }, {
- token : "constant.numeric", // imaginary
- regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
- }, {
- token : "constant.numeric", // float
- regex : floatNumber
- }, {
- token : "constant.numeric", // long integer
- regex : integer + "[lL]\\b"
- }, {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
- }, {
- token : "lparen.paren",
- regex : "[\\[\\(\\{]"
- }, {
- token : "paren.rparen",
- regex : "[\\]\\)\\}]"
- }, {
- token : "text",
- regex : "\\s+"
- } ],
- "qqstring" : [ {
- token : "string", // multi line """ string end
- regex : '(?:[^\\\\]|\\\\.)*?"{3}',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring" : [ {
- token : "string", // multi line ''' string end
- regex : "(?:[^\\\\]|\\\\.)*?'{3}",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ]
- };
-};
-
-oop.inherits(PythonHighlightRules, TextHighlightRules);
-
-exports.PythonHighlightRules = PythonHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/pythonic', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(markers) {
- this.foldingStartMarker = new RegExp("(?:([\\[{])|(" + markers + "))(?:\\s*)(?:#.*)?$");
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, match.index);
- if (match[2])
- return this.indentationBlock(session, row, match.index + match[2].length);
- return this.indentationBlock(session, row);
- }
- }
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-python-uncompressed.js b/contexts/data/lib/ace/mode-python-uncompressed.js
deleted file mode 100644
index ad0add6..0000000
--- a/contexts/data/lib/ace/mode-python-uncompressed.js
+++ /dev/null
@@ -1,516 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* Version: MPL 1.1/GPL 2.0/LGPL 2.1
-*
-* The contents of this file are subject to the Mozilla Public License Version
-* 1.1 (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-* http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS IS" basis,
-* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-* for the specific language governing rights and limitations under the
-* License.
-*
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* The Initial Developer of the Original Code is
-* Ajax.org B.V.
-* Portions created by the Initial Developer are Copyright (C) 2010
-* the Initial Developer. All Rights Reserved.
-*
-* Contributor(s):
-* Fabian Jakobs <fabian AT ajax DOT org>
-* Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/python', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/python_highlight_rules', 'ace/mode/folding/pythonic', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
-var PythonFoldMode = require("./folding/pythonic").FoldMode;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new PythonHighlightRules().getRules());
- this.foldingRules = new PythonFoldMode("\\:");
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "#");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- var outdents = {
- "pass": 1,
- "return": 1,
- "raise": 1,
- "break": 1,
- "continue": 1
- };
-
- this.checkOutdent = function(state, line, input) {
- if (input !== "\r\n" && input !== "\r" && input !== "\n")
- return false;
-
- var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
-
- if (!tokens)
- return false;
-
- // ignore trailing comments
- do {
- var last = tokens.pop();
- } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
-
- if (!last)
- return false;
-
- return (last.type == "keyword" && outdents[last.value]);
- };
-
- this.autoOutdent = function(state, doc, row) {
- // outdenting in python is slightly different because it always applies
- // to the next line and only of a new line is inserted
-
- row += 1;
- var indent = this.$getIndent(doc.getLine(row));
- var tab = doc.getTabString();
- if (indent.slice(-tab.length) == tab)
- doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- * TODO: python delimiters
- */
-
-define('ace/mode/python_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var PythonHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
- "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
- "raise|return|try|while|with|yield").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("True|False|None|NotImplemented|Ellipsis|__debug__").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
- "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
- "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
- "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
- "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
- "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
- "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
- "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("").split("|")
- );
-
- var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var octInteger = "(?:0[oO]?[0-7]+)";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var binInteger = "(?:0[bB][01]+)";
- var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
-
- var exponent = "(?:[eE][+-]?\\d+)";
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
- var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
-
- this.$rules = {
- "start" : [ {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "string", // """ string
- regex : strPre + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'
- }, {
- token : "string", // multi line """ string start
- merge : true,
- regex : strPre + '"{3}.*$',
- next : "qqstring"
- }, {
- token : "string", // " string
- regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
- }, {
- token : "string", // ''' string
- regex : strPre + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"
- }, {
- token : "string", // multi line ''' string start
- merge : true,
- regex : strPre + "'{3}.*$",
- next : "qstring"
- }, {
- token : "string", // ' string
- regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
- }, {
- token : "constant.numeric", // imaginary
- regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
- }, {
- token : "constant.numeric", // float
- regex : floatNumber
- }, {
- token : "constant.numeric", // long integer
- regex : integer + "[lL]\\b"
- }, {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
- }, {
- token : "lparen.paren",
- regex : "[\\[\\(\\{]"
- }, {
- token : "paren.rparen",
- regex : "[\\]\\)\\}]"
- }, {
- token : "text",
- regex : "\\s+"
- } ],
- "qqstring" : [ {
- token : "string", // multi line """ string end
- regex : '(?:[^\\\\]|\\\\.)*?"{3}',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ],
- "qstring" : [ {
- token : "string", // multi line ''' string end
- regex : "(?:[^\\\\]|\\\\.)*?'{3}",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- } ]
- };
-};
-
-oop.inherits(PythonHighlightRules, TextHighlightRules);
-
-exports.PythonHighlightRules = PythonHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/pythonic', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(markers) {
- this.foldingStartMarker = new RegExp("(?:([\\[{])|(" + markers + "))(?:\\s*)(?:#.*)?$");
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, match.index);
- if (match[2])
- return this.indentationBlock(session, row, match.index + match[2].length);
- return this.indentationBlock(session, row);
- }
- }
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-python.js b/contexts/data/lib/ace/mode-python.js
index 116f838..cca3b36 100644
--- a/contexts/data/lib/ace/mode-python.js
+++ b/contexts/data/lib/ace/mode-python.js
@@ -1 +1,290 @@
-define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./python_highlight_rules").PythonHighlightRules,h=a("./folding/pythonic").FoldMode,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.foldingRules=new h("\\:")};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[\:]\s*$/);g&&(d+=c)}return d};var a={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(b,c,d){if(d!=="\r\n"&&d!=="\r"&&d!=="\n")return!1;var e=this.$tokenizer.getLineTokens(c.trim(),b).tokens;if(!e)return!1;do var f=e.pop();while(f&&(f.type=="comment"||f.type=="text"&&f.value.match(/^\s+$/)));return f?f.type=="keyword"&&a[f.value]:!1},this.autoOutdent=function(a,b,c){c+=1;var d=this.$getIndent(b.getLine(c)),e=b.getTabString();d.slice(-e.length)==e&&b.remove(new i(c,d.length-e.length,c,d.length))}}.call(j.prototype),b.Mode=j}),define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")),b=e.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")),c=e.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),d=e.arrayToMap("".split("|")),f="(?:r|u|ur|R|U|UR|Ur|uR)?",g="(?:(?:[1-9]\\d*)|(?:0))",h="(?:0[oO]?[0-7]+)",i="(?:0[xX][\\dA-Fa-f]+)",j="(?:0[bB][01]+)",k="(?:"+g+"|"+h+"|"+i+"|"+j+")",l="(?:[eE][+-]?\\d+)",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:(?:"+o+"|"+n+")"+l+")",q="(?:"+p+"|"+o+")";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}(?:[^\\\\]|\\\\.)*?"{3}'},{token:"string",merge:!0,regex:f+'"{3}.*$',next:"qqstring"},{token:"string",regex:f+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:f+"'{3}(?:[^\\\\]|\\\\.)*?'{3}"},{token:"string",merge:!0,regex:f+"'{3}.*$",next:"qstring"},{token:"string",regex:f+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:"(?:"+q+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:q},{token:"constant.numeric",regex:k+"[lL]\\b"},{token:"constant.numeric",regex:k+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"invalid.illegal":c.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen.paren",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?"{3}',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?'{3}",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PythonHighlightRules=g}),define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a){this.foldingStartMarker=new RegExp("(?:([\\[{])|("+a+"))(?:\\s*)(?:#.*)?$")};d.inherits(f,e),function(){this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),e=d.match(this.foldingStartMarker);if(e)return e[1]?this.openingBracketBlock(a,e[1],c,e.index):e[2]?this.indentationBlock(a,c,e.index+e[2].length):this.indentationBlock(a,c)}}.call(f.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/python', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/python_highlight_rules', 'ace/mode/folding/pythonic', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
+var PythonFoldMode = require("./folding/pythonic").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new PythonHighlightRules().getRules());
+ this.foldingRules = new PythonFoldMode("\\:");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)#/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "#");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/python_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PythonHighlightRules = function() {
+
+ var keywords = (
+ "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
+ "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
+ "raise|return|try|while|with|yield"
+ );
+
+ var builtinConstants = (
+ "True|False|None|NotImplemented|Ellipsis|__debug__"
+ );
+
+ var builtinFunctions = (
+ "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
+ "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
+ "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
+ "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
+ "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
+ "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
+ "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
+ "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern"
+ );
+ var keywordMapper = this.createKeywordMapper({
+ "invalid.deprecated": "debugger",
+ "support.function": builtinFunctions,
+ "constant.language": builtinConstants,
+ "keyword": keywords
+ }, "identifier");
+
+ var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var octInteger = "(?:0[oO]?[0-7]+)";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var binInteger = "(?:0[bB][01]+)";
+ var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
+
+ var exponent = "(?:[eE][+-]?\\d+)";
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string", // """ string
+ regex : strPre + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'
+ }, {
+ token : "string", // multi line """ string start
+ regex : strPre + '"{3}.*$',
+ next : "qqstring"
+ }, {
+ token : "string", // " string
+ regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ token : "string", // ''' string
+ regex : strPre + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"
+ }, {
+ token : "string", // multi line ''' string start
+ regex : strPre + "'{3}.*$",
+ next : "qstring"
+ }, {
+ token : "string", // ' string
+ regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
+ }, {
+ token : "constant.numeric", // imaginary
+ regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // long integer
+ regex : integer + "[lL]\\b"
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+ "qqstring" : [ {
+ token : "string", // multi line """ string end
+ regex : '(?:[^\\\\]|\\\\.)*?"{3}',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ],
+ "qstring" : [ {
+ token : "string", // multi line ''' string end
+ regex : "(?:[^\\\\]|\\\\.)*?'{3}",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ]
+ };
+};
+
+oop.inherits(PythonHighlightRules, TextHighlightRules);
+
+exports.PythonHighlightRules = PythonHighlightRules;
+});
+
+ace.define('ace/mode/folding/pythonic', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(markers) {
+ this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$");
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, match.index);
+ if (match[2])
+ return this.indentationBlock(session, row, match.index + match[2].length);
+ return this.indentationBlock(session, row);
+ }
+ }
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-r.js b/contexts/data/lib/ace/mode-r.js
new file mode 100644
index 0000000..acdef9d
--- /dev/null
+++ b/contexts/data/lib/ace/mode-r.js
@@ -0,0 +1,410 @@
+/*
+ * r.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * This program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+ace.define('ace/mode/r', ['require', 'exports', 'module' , 'ace/range', 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/r_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/unicode'], function(require, exports, module) {
+
+
+ var Range = require("../range").Range;
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var Tokenizer = require("../tokenizer").Tokenizer;
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+ var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+ var unicode = require("../unicode");
+
+ var Mode = function()
+ {
+ this.$tokenizer = new Tokenizer(new RHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function()
+ {
+ this.tokenRe = new RegExp("^["
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "._]+", "g"
+ );
+
+ this.nonTokenRe = new RegExp("^(?:[^"
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "._]|\s])+", "g"
+ );
+
+ this.$complements = {
+ "(": ")",
+ "[": "]",
+ '"': '"',
+ "'": "'",
+ "{": "}"
+ };
+ this.$reOpen = /^[(["'{]$/;
+ this.$reClose = /^[)\]"'}]$/;
+
+ this.getNextLineIndent = function(state, line, tab, tabSize, row)
+ {
+ return this.codeModel.getNextLineIndent(row, line, state, tab, tabSize);
+ };
+
+ this.allowAutoInsert = this.smartAllowAutoInsert;
+
+ this.checkOutdent = function(state, line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*[\{\}\)]/.test(input);
+ };
+
+ this.getIndentForOpenBrace = function(openBracePos)
+ {
+ return this.codeModel.getIndentForOpenBrace(openBracePos);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ if (row == 0)
+ return 0;
+
+ var line = doc.getLine(row);
+
+ var match = line.match(/^(\s*[\}\)])/);
+ if (match)
+ {
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.codeModel.getIndentForOpenBrace(openBracePos);
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ }
+
+ match = line.match(/^(\s*\{)/);
+ if (match)
+ {
+ var column = match[1].length;
+ var indent = this.codeModel.getBraceIndent(row-1);
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ }
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+ this.transformAction = function(state, action, editor, session, text) {
+ if (action === 'insertion' && text === "\n") {
+ var pos = editor.getSelectionRange().start;
+ var match = /^((\s*#+')\s*)/.exec(session.doc.getLine(pos.row));
+ if (match && editor.getSelectionRange().start.column >= match[2].length) {
+ return {text: "\n" + match[1]};
+ }
+ }
+ return false;
+ };
+ }).call(Mode.prototype);
+ exports.Mode = Mode;
+});
+ace.define('ace/mode/r_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules'], function(require, exports, module) {
+
+ var oop = require("../lib/oop");
+ var lang = require("../lib/lang");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+ var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
+
+ var RHighlightRules = function()
+ {
+
+ var keywords = lang.arrayToMap(
+ ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass")
+ .split("|")
+ );
+
+ var buildinConstants = lang.arrayToMap(
+ ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" +
+ "NA_complex_").split("|")
+ );
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment.sectionhead",
+ regex : "#+(?!').*(?:----|====|####)\\s*$"
+ },
+ {
+ token : "comment",
+ regex : "#+'",
+ next : "rd-start"
+ },
+ {
+ token : "comment",
+ regex : "#.*$"
+ },
+ {
+ token : "string", // multi line string start
+ regex : '["]',
+ next : "qqstring"
+ },
+ {
+ token : "string", // multi line string start
+ regex : "[']",
+ next : "qstring"
+ },
+ {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+[Li]?\\b"
+ },
+ {
+ token : "constant.numeric", // explicit integer
+ regex : "\\d+L\\b"
+ },
+ {
+ token : "constant.numeric", // number
+ regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"
+ },
+ {
+ token : "constant.numeric", // number with leading decimal
+ regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"
+ },
+ {
+ token : "constant.language.boolean",
+ regex : "(?:TRUE|FALSE|T|F)\\b"
+ },
+ {
+ token : "identifier",
+ regex : "`.*?`"
+ },
+ {
+ token : function(value)
+ {
+ if (keywords[value])
+ return "keyword";
+ else if (buildinConstants[value])
+ return "constant.language";
+ else if (value == '...' || value.match(/^\.\.\d+$/))
+ return "variable.language";
+ else
+ return "identifier";
+ },
+ regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b"
+ },
+ {
+ token : "keyword.operator",
+ regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"
+ },
+ {
+ token : "keyword.operator", // infix operators
+ regex : "%.*?%"
+ },
+ {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ },
+ {
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ },
+ {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+
+ var rdRules = new TexHighlightRules("comment").getRules();
+ for (var i = 0; i < rdRules["start"].length; i++) {
+ rdRules["start"][i].token += ".virtual-comment";
+ }
+
+ this.addRules(rdRules, "rd-");
+ this.$rules["rd-start"].unshift({
+ token: "text",
+ regex: "^",
+ next: "start"
+ });
+ this.$rules["rd-start"].unshift({
+ token : "keyword",
+ regex : "@(?!@)[^ ]*"
+ });
+ this.$rules["rd-start"].unshift({
+ token : "comment",
+ regex : "@@"
+ });
+ this.$rules["rd-start"].push({
+ token : "comment",
+ regex : "[^%\\\\[({\\])}]+"
+ });
+ };
+
+ oop.inherits(RHighlightRules, TextHighlightRules);
+
+ exports.RHighlightRules = RHighlightRules;
+});
+ace.define('ace/mode/tex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TexHighlightRules = function(textClass) {
+
+ if (!textClass)
+ textClass = "text";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
+ next : "nospell"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ }, {
+ token : textClass,
+ regex : "\\s+"
+ }
+ ],
+ "nospell" : [
+ {
+ token : "comment",
+ regex : "%.*$",
+ next : "start"
+ }, {
+ token : "nospell." + textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
+ next : "start"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "}",
+ next : "start"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\s+"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\w+"
+ }
+ ]
+ };
+};
+
+oop.inherits(TexHighlightRules, TextHighlightRules);
+
+exports.TexHighlightRules = TexHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
diff --git a/contexts/data/lib/ace/mode-rdoc.js b/contexts/data/lib/ace/mode-rdoc.js
new file mode 100644
index 0000000..8e0be16
--- /dev/null
+++ b/contexts/data/lib/ace/mode-rdoc.js
@@ -0,0 +1,189 @@
+/*
+ * rdoc.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * This program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+ace.define('ace/mode/rdoc', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/rdoc_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function(suppressHighlighting) {
+ this.$tokenizer = new Tokenizer(new RDocHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/rdoc_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/latex_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var LaTeXHighlightRules = require("./latex_highlight_rules");
+
+var RDocHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : "text", // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b",
+ next : "nospell"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "nospell" : [
+ {
+ token : "comment",
+ regex : "%.*$",
+ next : "start"
+ }, {
+ token : "nospell.text", // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
+ next : "start"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "}",
+ next : "start"
+ }, {
+ token : "nospell.text",
+ regex : "\\s+"
+ }, {
+ token : "nospell.text",
+ regex : "\\w+"
+ }
+ ]
+ };
+};
+
+oop.inherits(RDocHighlightRules, TextHighlightRules);
+
+exports.RDocHighlightRules = RDocHighlightRules;
+});
+ace.define('ace/mode/latex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LatexHighlightRules = function() {
+ this.$rules = {
+ "start" : [{
+ token : "keyword",
+ regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "string",
+ regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
+ }, {
+ token : "comment",
+ regex : "%.*$"
+ }]
+ };
+};
+
+oop.inherits(LatexHighlightRules, TextHighlightRules);
+
+exports.LatexHighlightRules = LatexHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
diff --git a/contexts/data/lib/ace/mode-rhtml.js b/contexts/data/lib/ace/mode-rhtml.js
new file mode 100644
index 0000000..ccf4a45
--- /dev/null
+++ b/contexts/data/lib/ace/mode-rhtml.js
@@ -0,0 +1,2138 @@
+/*
+ * rhtml.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * This program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+
+ace.define('ace/mode/rhtml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/rhtml_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+
+var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules;
+
+var Mode = function(doc, session) {
+ this.$session = session;
+ this.$tokenizer = new Tokenizer(new RHtmlHighlightRules().getRules());
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.insertChunkInfo = {
+ value: "<!--begin.rcode\n\nend.rcode-->\n",
+ position: {row: 0, column: 15}
+ };
+
+ this.getLanguageMode = function(position)
+ {
+ return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML';
+ };
+
+ this.getNextLineIndent = function(state, line, tab, tabSize, row)
+ {
+ return this.codeModel.getNextLineIndent(row, line, state, tab, tabSize);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+
+var Mode = function() {
+ var highlighter = new HtmlHighlightRules();
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$behaviour = new HtmlBehaviour();
+
+ this.$embeds = highlighter.getEmbeds();
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ return 0;
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("csslint", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ this.$rules = {
+ start : [{
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "xml-pe",
+ regex : "<\\!.*?>"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=script\\b)",
+ next : "script"
+ }, {
+ token : "meta.tag",
+ regex : "<(?=style\\b)",
+ next : "style"
+ }, {
+ token : "meta.tag", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }, {
+ token : "text",
+ regex : "[^<]+"
+ } ],
+
+ cdata : [ {
+ token : "text",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : ".+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start", tagMap);
+ xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
+ xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+
+ this.embedRules(CssHighlightRules, "css-", [{
+ token: "meta.tag",
+ regex: "<\\/(?=style)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(HtmlHighlightRules, TextHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var HtmlBehaviour = function () {
+
+ this.inherit(XmlBehaviour); // Get xml behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var element = token.value;
+ if (atCursor){
+ var element = element.substring(0, position.column - token.start);
+ }
+ if (voidElements.indexOf(element) !== -1){
+ return;
+ }
+ return {
+ text: '>' + '</' + element + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+}
+oop.inherits(HtmlBehaviour, XmlBehaviour);
+
+exports.HtmlBehaviour = HtmlBehaviour;
+});
+
+ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var XmlBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var tag = token.value;
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
+ if (rightChars == '</') {
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
+
+ return {
+ text: '\n' + indent + '\n' + next_indent,
+ selection: [1, indent.length, 1, indent.length]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {
+ MixedFoldMode.call(this, new XmlFoldMode({
+ "area": 1,
+ "base": 1,
+ "br": 1,
+ "col": 1,
+ "command": 1,
+ "embed": 1,
+ "hr": 1,
+ "img": 1,
+ "input": 1,
+ "keygen": 1,
+ "link": 1,
+ "meta": 1,
+ "param": 1,
+ "source": 1,
+ "track": 1,
+ "wbr": 1,
+ "li": 1,
+ "dt": 1,
+ "dd": 1,
+ "p": 1,
+ "rt": 1,
+ "rp": 1,
+ "optgroup": 1,
+ "option": 1,
+ "colgroup": 1,
+ "td": 1,
+ "th": 1
+ }), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (tag.closing)
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ return "";
+
+ if (tag.selfClosing)
+ return "";
+
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ return "";
+
+ return "start";
+ };
+
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var value = "";
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type.indexOf("meta.tag") === 0)
+ value += token.value;
+ else
+ value += lang.stringRepeat(" ", token.value.length);
+ }
+
+ return this._parseTag(value);
+ };
+
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
+ this._parseTag = function(tag) {
+
+ var match = this.tagRe.exec(tag);
+ var column = this.tagRe.lastIndex || 0;
+ this.tagRe.lastIndex = 0;
+
+ return {
+ value: tag,
+ match: match ? match[2] : "",
+ closing: match ? !!match[3] : false,
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
+ tagName: match ? match[4] : "",
+ column: match[1] ? column + match[1].length : column
+ };
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var start;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!start) {
+ var start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ }
+ value += token.value;
+ if (value.indexOf(">") !== -1) {
+ var tag = this._parseTag(value);
+ tag.start = start;
+ tag.end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ iterator.stepForward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var end;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!end) {
+ end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ }
+ value = token.value + value;
+ if (value.indexOf("<") !== -1) {
+ var tag = this._parseTag(value);
+ tag.end = end;
+ tag.start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ iterator.stepBackward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.voidElements[tag.tagName]) {
+ return;
+ }
+ else if (this.voidElements[top.tagName]) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag.match)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.column);
+ var start = {
+ row: row,
+ column: firstTag.column + firstTag.tagName.length + 2
+ };
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var end = {
+ row: row,
+ column: firstTag.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+ace.define('ace/mode/rhtml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/r_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var RHtmlHighlightRules = function() {
+
+ this.$rules = new HtmlHighlightRules().getRules();
+ this.$rules["start"].unshift({
+ token: "support.function.codebegin",
+ regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)",
+ next: "r-start"
+ });
+
+ var rRules = new RHighlightRules().getRules();
+ this.addRules(rRules, "r-");
+ this.$rules["r-start"].unshift({
+ token: "support.function.codeend",
+ regex: "^\\s*end.rcode\\s*-->",
+ next: "start"
+ });
+};
+oop.inherits(RHtmlHighlightRules, TextHighlightRules);
+
+exports.RHtmlHighlightRules = RHtmlHighlightRules;
+});
+ace.define('ace/mode/r_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules'], function(require, exports, module) {
+
+ var oop = require("../lib/oop");
+ var lang = require("../lib/lang");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+ var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
+
+ var RHighlightRules = function()
+ {
+
+ var keywords = lang.arrayToMap(
+ ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass")
+ .split("|")
+ );
+
+ var buildinConstants = lang.arrayToMap(
+ ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" +
+ "NA_complex_").split("|")
+ );
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment.sectionhead",
+ regex : "#+(?!').*(?:----|====|####)\\s*$"
+ },
+ {
+ token : "comment",
+ regex : "#+'",
+ next : "rd-start"
+ },
+ {
+ token : "comment",
+ regex : "#.*$"
+ },
+ {
+ token : "string", // multi line string start
+ regex : '["]',
+ next : "qqstring"
+ },
+ {
+ token : "string", // multi line string start
+ regex : "[']",
+ next : "qstring"
+ },
+ {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+[Li]?\\b"
+ },
+ {
+ token : "constant.numeric", // explicit integer
+ regex : "\\d+L\\b"
+ },
+ {
+ token : "constant.numeric", // number
+ regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"
+ },
+ {
+ token : "constant.numeric", // number with leading decimal
+ regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"
+ },
+ {
+ token : "constant.language.boolean",
+ regex : "(?:TRUE|FALSE|T|F)\\b"
+ },
+ {
+ token : "identifier",
+ regex : "`.*?`"
+ },
+ {
+ token : function(value)
+ {
+ if (keywords[value])
+ return "keyword";
+ else if (buildinConstants[value])
+ return "constant.language";
+ else if (value == '...' || value.match(/^\.\.\d+$/))
+ return "variable.language";
+ else
+ return "identifier";
+ },
+ regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b"
+ },
+ {
+ token : "keyword.operator",
+ regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"
+ },
+ {
+ token : "keyword.operator", // infix operators
+ regex : "%.*?%"
+ },
+ {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ },
+ {
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ },
+ {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+
+ var rdRules = new TexHighlightRules("comment").getRules();
+ for (var i = 0; i < rdRules["start"].length; i++) {
+ rdRules["start"][i].token += ".virtual-comment";
+ }
+
+ this.addRules(rdRules, "rd-");
+ this.$rules["rd-start"].unshift({
+ token: "text",
+ regex: "^",
+ next: "start"
+ });
+ this.$rules["rd-start"].unshift({
+ token : "keyword",
+ regex : "@(?!@)[^ ]*"
+ });
+ this.$rules["rd-start"].unshift({
+ token : "comment",
+ regex : "@@"
+ });
+ this.$rules["rd-start"].push({
+ token : "comment",
+ regex : "[^%\\\\[({\\])}]+"
+ });
+ };
+
+ oop.inherits(RHighlightRules, TextHighlightRules);
+
+ exports.RHighlightRules = RHighlightRules;
+});
+ace.define('ace/mode/tex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TexHighlightRules = function(textClass) {
+
+ if (!textClass)
+ textClass = "text";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
+ next : "nospell"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ }, {
+ token : textClass,
+ regex : "\\s+"
+ }
+ ],
+ "nospell" : [
+ {
+ token : "comment",
+ regex : "%.*$",
+ next : "start"
+ }, {
+ token : "nospell." + textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
+ next : "start"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "}",
+ next : "start"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\s+"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\w+"
+ }
+ ]
+ };
+};
+
+oop.inherits(TexHighlightRules, TextHighlightRules);
+
+exports.TexHighlightRules = TexHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-ruby-noconflict.js b/contexts/data/lib/ace/mode-ruby-noconflict.js
deleted file mode 100644
index a4f6b6b..0000000
--- a/contexts/data/lib/ace/mode-ruby-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./ruby_highlight_rules").RubyHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many".split("|")),b=e.arrayToMap("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield".split("|")),c=e.arrayToMap("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING".split("|")),d=e.arrayToMap("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",merge:!0,regex:"^=begin$",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},{token:"text",regex:"::"},{token:"variable.instancce",regex:"@{1,2}(?:[a-zA-Z_]|d)+"},{token:"variable.class",regex:"[A-Z](?:[a-zA-Z_]|d)+"},{token:"string",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},{token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="self"?"variable.language":b.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"variable.language":a.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.RubyHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-ruby-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-ruby-uncompressed-noconflict.js
deleted file mode 100644
index 3d6c6bd..0000000
--- a/contexts/data/lib/ace/mode-ruby-uncompressed-noconflict.js
+++ /dev/null
@@ -1,401 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Shlomo Zalman Heigh <shlomozalmanheigh AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/ruby', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new RubyHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "#");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Shlomo Zalman Heigh <shlomozalmanheigh AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var RubyHighlightRules = function() {
-
- var builtinFunctions = lang.arrayToMap(
- ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
- "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
- "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
- "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
- "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
- "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
- "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
- "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
- "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
- "gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|" +
- "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
- "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
- "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
- "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
- "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
- "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
- "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
- "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
- "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
- "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
- "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
- "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
- "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
- "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
- "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
- "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
- "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
- "translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|" +
- "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
- "has_many|has_one|belongs_to|has_and_belongs_to_many").split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
- "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
- "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
- "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING").split("|")
- );
-
- var builtinVariables = lang.arrayToMap(
- ("\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" +
- "$!|root_url|flash|session|cookies|params|request|response|logger").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "comment", // multi line comment
- merge : true,
- regex : "^\=begin$",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // backtick string
- regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
- }, {
- token : "text", // namespaces aren't symbols
- regex : "::"
- }, {
- token : "variable.instancce", // instance variable
- regex : "@{1,2}(?:[a-zA-Z_]|\d)+"
- }, {
- token : "variable.class", // class name
- regex : "[A-Z](?:[a-zA-Z_]|\d)+"
- }, {
- token : "string", // symbol
- regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "self")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinVariables.hasOwnProperty(value))
- return "variable.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : "^\=end$",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-};
-
-oop.inherits(RubyHighlightRules, TextHighlightRules);
-
-exports.RubyHighlightRules = RubyHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-ruby-uncompressed.js b/contexts/data/lib/ace/mode-ruby-uncompressed.js
deleted file mode 100644
index 96de75e..0000000
--- a/contexts/data/lib/ace/mode-ruby-uncompressed.js
+++ /dev/null
@@ -1,401 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Shlomo Zalman Heigh <shlomozalmanheigh AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/ruby', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new RubyHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)#/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "#");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Shlomo Zalman Heigh <shlomozalmanheigh AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var RubyHighlightRules = function() {
-
- var builtinFunctions = lang.arrayToMap(
- ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
- "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
- "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
- "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
- "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
- "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
- "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
- "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
- "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
- "gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|" +
- "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
- "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
- "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
- "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
- "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
- "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
- "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
- "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
- "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
- "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
- "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
- "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
- "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
- "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
- "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
- "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
- "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
- "translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|" +
- "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
- "has_many|has_one|belongs_to|has_and_belongs_to_many").split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
- "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
- "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
- "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING").split("|")
- );
-
- var builtinVariables = lang.arrayToMap(
- ("\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" +
- "$!|root_url|flash|session|cookies|params|request|response|logger").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "#.*$"
- }, {
- token : "comment", // multi line comment
- merge : true,
- regex : "^\=begin$",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // backtick string
- regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
- }, {
- token : "text", // namespaces aren't symbols
- regex : "::"
- }, {
- token : "variable.instancce", // instance variable
- regex : "@{1,2}(?:[a-zA-Z_]|\d)+"
- }, {
- token : "variable.class", // class name
- regex : "[A-Z](?:[a-zA-Z_]|\d)+"
- }, {
- token : "string", // symbol
- regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "self")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinVariables.hasOwnProperty(value))
- return "variable.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : "^\=end$",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-};
-
-oop.inherits(RubyHighlightRules, TextHighlightRules);
-
-exports.RubyHighlightRules = RubyHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-ruby.js b/contexts/data/lib/ace/mode-ruby.js
index 2eeb69f..2c60ae3 100644
--- a/contexts/data/lib/ace/mode-ruby.js
+++ b/contexts/data/lib/ace/mode-ruby.js
@@ -1 +1,410 @@
-define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./ruby_highlight_rules").RubyHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)#/;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many".split("|")),b=e.arrayToMap("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield".split("|")),c=e.arrayToMap("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING".split("|")),d=e.arrayToMap("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",merge:!0,regex:"^=begin$",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},{token:"text",regex:"::"},{token:"variable.instancce",regex:"@{1,2}(?:[a-zA-Z_]|d)+"},{token:"variable.class",regex:"[A-Z](?:[a-zA-Z_]|d)+"},{token:"string",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},{token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="self"?"variable.language":b.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"variable.language":a.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.RubyHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/ruby', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/coffee'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new RubyHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)#/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "#");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var constantOtherSymbol = exports.constantOtherSymbol = {
+ token : "constant.other.symbol.ruby", // symbol
+ regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
+ };
+
+var qString = exports.qString = {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ };
+
+var qqString = exports.qqString = {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ };
+
+var tString = exports.tString = {
+ token : "string", // backtick string
+ regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
+ };
+
+var constantNumericHex = exports.constantNumericHex = {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
+ };
+
+var constantNumericFloat = exports.constantNumericFloat = {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
+ };
+
+var RubyHighlightRules = function() {
+
+ var builtinFunctions = (
+ "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
+ "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
+ "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
+ "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
+ "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
+ "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
+ "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
+ "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
+ "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
+ "gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|" +
+ "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
+ "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
+ "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
+ "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
+ "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
+ "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
+ "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
+ "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
+ "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
+ "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
+ "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
+ "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
+ "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
+ "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
+ "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
+ "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
+ "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
+ "translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|" +
+ "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
+ "has_many|has_one|belongs_to|has_and_belongs_to_many"
+ );
+
+ var keywords = (
+ "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
+ "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
+ );
+
+ var buildinConstants = (
+ "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
+ );
+
+ var builtinVariables = (
+ "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" +
+ "$!|root_url|flash|session|cookies|params|request|response|logger|self"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "variable.language": builtinVariables,
+ "support.function": builtinFunctions,
+ "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "comment", // multi line comment
+ regex : "^=begin\\s",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ },
+
+ qString,
+ qqString,
+ tString,
+
+ {
+ token : "text", // namespaces aren't symbols
+ regex : "::"
+ }, {
+ token : "variable.instance", // instance variable
+ regex : "@{1,2}[a-zA-Z_\\d]+"
+ }, {
+ token : "support.class", // class name
+ regex : "[A-Z][a-zA-Z_\\d]+"
+ },
+
+ constantOtherSymbol,
+ constantNumericHex,
+ constantNumericFloat,
+
+ {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "punctuation.separator.key-value",
+ regex : "=>"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "^=end\\s.*$",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+};
+
+oop.inherits(RubyHighlightRules, TextHighlightRules);
+
+exports.RubyHighlightRules = RubyHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-scad-noconflict.js b/contexts/data/lib/ace/mode-scad-noconflict.js
deleted file mode 100644
index 29e8dd5..0000000
--- a/contexts/data/lib/ace/mode-scad-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./scad_highlight_rules").scadHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./behaviour/cstyle").CstyleBehaviour,k=a("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j,this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(l.prototype),b.Mode=l}),ace.define("ace/mode/scad_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("module|if|else|for".split("|")),b=e.arrayToMap("NULL".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:use|include)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.scadHighlightRules=h}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scad-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-scad-uncompressed-noconflict.js
deleted file mode 100644
index d5107c5..0000000
--- a/contexts/data/lib/ace/mode-scad-uncompressed-noconflict.js
+++ /dev/null
@@ -1,916 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Gastón Kleiman <gaston.kleiman AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/scad', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scad_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new scadHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Gastón Kleiman <gaston.kleiman AT gmail DOT com>
- *
- * Based on Bespin's C/C++ Syntax Plugin by Marc McIntyre.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/scad_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var scadHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("module|if|else|for").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("NULL").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant", // <CONSTANT>
- regex : "<[a-zA-Z0-9.]+>"
- }, {
- token : "keyword", // pre-compiler directivs
- regex : "(?:use|include)"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(scadHighlightRules, TextHighlightRules);
-
-exports.scadHighlightRules = scadHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scad-uncompressed.js b/contexts/data/lib/ace/mode-scad-uncompressed.js
deleted file mode 100644
index 07e3681..0000000
--- a/contexts/data/lib/ace/mode-scad-uncompressed.js
+++ /dev/null
@@ -1,916 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Gastón Kleiman <gaston.kleiman AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/scad', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scad_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new scadHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Gastón Kleiman <gaston.kleiman AT gmail DOT com>
- *
- * Based on Bespin's C/C++ Syntax Plugin by Marc McIntyre.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/scad_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var scadHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("module|if|else|for").split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("NULL").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant", // <CONSTANT>
- regex : "<[a-zA-Z0-9.]+>"
- }, {
- token : "keyword", // pre-compiler directivs
- regex : "(?:use|include)"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(scadHighlightRules, TextHighlightRules);
-
-exports.scadHighlightRules = scadHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scad.js b/contexts/data/lib/ace/mode-scad.js
index 1deeef1..9a286fc 100644
--- a/contexts/data/lib/ace/mode-scad.js
+++ b/contexts/data/lib/ace/mode-scad.js
@@ -1 +1,698 @@
-define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./scad_highlight_rules").scadHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./behaviour/cstyle").CstyleBehaviour,k=a("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j,this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(l.prototype),b.Mode=l}),define("ace/mode/scad_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("module|if|else|for".split("|")),b=e.arrayToMap("NULL".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:use|include)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.scadHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/scad', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scad_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new scadHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/scad_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var scadHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": "module|if|else|for",
+ "constant.language": "NULL"
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant", // <CONSTANT>
+ regex : "<[a-zA-Z0-9.]+>"
+ }, {
+ token : "keyword", // pre-compiler directivs
+ regex : "(?:use|include)"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(scadHighlightRules, TextHighlightRules);
+
+exports.scadHighlightRules = scadHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-scala-noconflict.js b/contexts/data/lib/ace/mode-scala-noconflict.js
deleted file mode 100644
index 7acbfbe..0000000
--- a/contexts/data/lib/ace/mode-scala-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/scala_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./scala_highlight_rules").ScalaHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),ace.define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|override|package|private|protected|sealed|super|this|trait|type|val|var|with".split("|")),b=e.arrayToMap("true|false".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object|Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|Option|Array|Char|Byte|Short|Int|Long|Nothing".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.ScalaHighlightRules=h}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scala-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-scala-uncompressed-noconflict.js
deleted file mode 100644
index 7f69ff2..0000000
--- a/contexts/data/lib/ace/mode-scala-uncompressed-noconflict.js
+++ /dev/null
@@ -1,1464 +0,0 @@
-ace.define('ace/mode/scala', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/scala_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
-
- this.$tokenizer = new Tokenizer(new ScalaHighlightRules().getRules());
-};
-oop.inherits(Mode, JavaScriptMode);
-
-(function() {
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-ace.define('ace/mode/scala_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var ScalaHighlightRules = function() {
-
- // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
- var keywords = lang.arrayToMap(
- (
- "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" +
- "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" +
- "override|package|private|protected|sealed|super|this|trait|type|val|var|with"
- ).split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("true|false").split("|")
- );
-
- var langClasses = lang.arrayToMap(
- ("AbstractMethodError|AssertionError|ClassCircularityError|"+
- "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
- "ExceptionInInitializerError|IllegalAccessError|"+
- "IllegalThreadStateException|InstantiationError|InternalError|"+
-
- "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
- "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
- "SuppressWarnings|TypeNotPresentException|UnknownError|"+
- "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
- "InstantiationException|IndexOutOfBoundsException|"+
- "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
- "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
- "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
- "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
- "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
- "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
- "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
- "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
- "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
- "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
- "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
- "ArrayStoreException|ClassCastException|LinkageError|"+
- "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
- "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
- "Cloneable|Class|CharSequence|Comparable|String|Object|" +
- "Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" +
- "Option|Array|Char|Byte|Short|Int|Long|Nothing"
-
- ).split("|")
- );
-
- var importClasses = lang.arrayToMap(
- ("").split("|")
- );
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (langClasses.hasOwnProperty(value))
- return "support.function";
- else if (importClasses.hasOwnProperty(value))
- return "support.function";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(ScalaHighlightRules, TextHighlightRules);
-
-exports.ScalaHighlightRules = ScalaHighlightRules;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scala-uncompressed.js b/contexts/data/lib/ace/mode-scala-uncompressed.js
deleted file mode 100644
index 098b14e..0000000
--- a/contexts/data/lib/ace/mode-scala-uncompressed.js
+++ /dev/null
@@ -1,1464 +0,0 @@
-define('ace/mode/scala', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/scala_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
-
- this.$tokenizer = new Tokenizer(new ScalaHighlightRules().getRules());
-};
-oop.inherits(Mode, JavaScriptMode);
-
-(function() {
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-define('ace/mode/scala_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var ScalaHighlightRules = function() {
-
- // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
- var keywords = lang.arrayToMap(
- (
- "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" +
- "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" +
- "override|package|private|protected|sealed|super|this|trait|type|val|var|with"
- ).split("|")
- );
-
- var buildinConstants = lang.arrayToMap(
- ("true|false").split("|")
- );
-
- var langClasses = lang.arrayToMap(
- ("AbstractMethodError|AssertionError|ClassCircularityError|"+
- "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
- "ExceptionInInitializerError|IllegalAccessError|"+
- "IllegalThreadStateException|InstantiationError|InternalError|"+
-
- "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
- "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
- "SuppressWarnings|TypeNotPresentException|UnknownError|"+
- "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
- "InstantiationException|IndexOutOfBoundsException|"+
- "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
- "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
- "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
- "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
- "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
- "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
- "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
- "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
- "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
- "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
- "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
- "ArrayStoreException|ClassCastException|LinkageError|"+
- "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
- "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
- "Cloneable|Class|CharSequence|Comparable|String|Object|" +
- "Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" +
- "Option|Array|Char|Byte|Short|Int|Long|Nothing"
-
- ).split("|")
- );
-
- var importClasses = lang.arrayToMap(
- ("").split("|")
- );
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (value == "this")
- return "variable.language";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (langClasses.hasOwnProperty(value))
- return "support.function";
- else if (importClasses.hasOwnProperty(value))
- return "support.function";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else
- return "identifier";
- },
- // TODO: Unicode escape sequences
- // TODO: Unicode identifiers
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(ScalaHighlightRules, TextHighlightRules);
-
-exports.ScalaHighlightRules = ScalaHighlightRules;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scala.js b/contexts/data/lib/ace/mode-scala.js
index c697fe1..2cb2d8e 100644
--- a/contexts/data/lib/ace/mode-scala.js
+++ b/contexts/data/lib/ace/mode-scala.js
@@ -1 +1,1070 @@
-define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/scala_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./scala_highlight_rules").ScalaHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|override|package|private|protected|sealed|super|this|trait|type|val|var|with".split("|")),b=e.arrayToMap("true|false".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object|Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|Option|Array|Char|Byte|Short|Int|Long|Nothing".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.ScalaHighlightRules=h}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+ace.define('ace/mode/scala', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/scala_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+
+ this.$tokenizer = new Tokenizer(new ScalaHighlightRules().getRules());
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+ace.define('ace/mode/scala_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ScalaHighlightRules = function() {
+ var keywords = (
+ "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" +
+ "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" +
+ "override|package|private|protected|sealed|super|this|trait|type|val|var|with"
+ );
+
+ var buildinConstants = ("true|false");
+
+ var langClasses = (
+ "AbstractMethodError|AssertionError|ClassCircularityError|"+
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
+ "ExceptionInInitializerError|IllegalAccessError|"+
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
+
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
+ "InstantiationException|IndexOutOfBoundsException|"+
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
+ "ArrayStoreException|ClassCastException|LinkageError|"+
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
+ "Cloneable|Class|CharSequence|Comparable|String|Object|" +
+ "Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" +
+ "Option|Array|Char|Byte|Short|Int|Long|Nothing"
+
+
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "support.function": langClasses,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string",
+ regex : '"""',
+ next : "tstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)', // " strings can't span multiple lines
+ next : "string"
+ }, {
+ token : "symbol.constant", // single line
+ regex : "'[\\w\\d_]+"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "string" : [
+ {
+ token : "escape",
+ regex : '\\\\"'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string.invalid",
+ regex : '[^"\\\\]*$',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }
+ ],
+ "tstring" : [
+ {
+ token : "string", // closing comment
+ regex : '"{3,5}',
+ next : "start"
+ }, {
+ token : "string", // comment spanning whole line
+ regex : ".+?"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(ScalaHighlightRules, TextHighlightRules);
+
+exports.ScalaHighlightRules = ScalaHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-scss-noconflict.js b/contexts/data/lib/ace/mode-scss-noconflict.js
deleted file mode 100644
index 841b752..0000000
--- a/contexts/data/lib/ace/mode-scss-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./scss_highlight_rules").ScssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./folding/cstyle").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap(function(){var a="-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"),b="appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"),c="azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"),d=[];for(var e=0,f=a.length;e<f;e++)Array.prototype.push.apply(d,(a[e]+b.join("|"+a[e])).split("|"));return Array.prototype.push.apply(d,b),Array.prototype.push.apply(d,c),d}()),b=e.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unqoute".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f=e.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")),g=e.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp".split("|")),h="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:h+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:h},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":f.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"constant.language":b.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":g.hasOwnProperty(e.toLowerCase())?"variable.language":"text"},regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable",regex:"[a-z_\\-$][a-z0-9_\\-$]*\\b"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.ScssHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scss-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-scss-uncompressed-noconflict.js
deleted file mode 100644
index 70940cb..0000000
--- a/contexts/data/lib/ace/mode-scss-uncompressed-noconflict.js
+++ /dev/null
@@ -1,688 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/scss', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scss_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new ScssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var ScssHighlightRules = function() {
-
- var properties = lang.arrayToMap( (function () {
-
- var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
-
- var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
- "background-size|binding|border-bottom-colors|border-left-colors|" +
- "border-right-colors|border-top-colors|border-end|border-end-color|" +
- "border-end-style|border-end-width|border-image|border-start|" +
- "border-start-color|border-start-style|border-start-width|box-align|" +
- "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
- "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
- "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
- "font-feature-settings|font-language-override|force-broken-image-icon|" +
- "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
- "outline-offset|outline-radius|outline-radius-bottomleft|" +
- "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
- "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
- "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
- "text-decoration-style|transform|transform-origin|transition|" +
- "transition-delay|transition-duration|transition-property|" +
- "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
- "window-shadow|border-radius").split("|");
-
- var properties = ("azimuth|background-attachment|background-color|background-image|" +
- "background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|opacity|orphans|outline-color|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|");
-
- //The return array
- var ret = [];
-
- //All prefixProperties will get the browserPrefix in
- //the begning by join the prefixProperties array with the value of browserPrefix
- for (var i=0, ln=browserPrefix.length; i<ln; i++) {
- Array.prototype.push.apply(
- ret,
- (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
- );
- }
-
- //Add also prefixProperties and properties without any browser prefix
- Array.prototype.push.apply(ret, prefixProperties);
- Array.prototype.push.apply(ret, properties);
-
- return ret;
-
- })() );
-
-
-
- var functions = lang.arrayToMap(
- ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
- "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
- "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
- "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
- "scale_color|transparentize|type_of|unit|unitless|unqoute").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
- )
-
- var tags = lang.arrayToMap(
- ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
- "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
- "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
- "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
- "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
- "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
- "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
- "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
- "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : "constant.numeric",
- regex : numRe
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase()))
- return "support.type";
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (constants.hasOwnProperty(value))
- return "constant.language";
- else if (functions.hasOwnProperty(value))
- return "support.function";
- else if (colors.hasOwnProperty(value.toLowerCase()))
- return "support.constant.color";
- else if (tags.hasOwnProperty(value.toLowerCase()))
- return "variable.language";
- else
- return "text";
- },
- regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
- }, {
- token : "variable",
- regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
- }, {
- token: "variable.language",
- regex: "#[a-z0-9-_]+"
- }, {
- token: "variable.language",
- regex: "\\.[a-z0-9-_]+"
- }, {
- token: "variable.language",
- regex: ":[a-z0-9-_]+"
- }, {
- token: "constant",
- regex: "[a-z0-9-_]+"
- }, {
- token : "keyword.operator",
- regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-};
-
-oop.inherits(ScssHighlightRules, TextHighlightRules);
-
-exports.ScssHighlightRules = ScssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scss-uncompressed.js b/contexts/data/lib/ace/mode-scss-uncompressed.js
deleted file mode 100644
index 9639f0d..0000000
--- a/contexts/data/lib/ace/mode-scss-uncompressed.js
+++ /dev/null
@@ -1,688 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/scss', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scss_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new ScssHighlightRules().getRules(), "i");
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- // ignore braces in comments
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var ScssHighlightRules = function() {
-
- var properties = lang.arrayToMap( (function () {
-
- var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
-
- var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
- "background-size|binding|border-bottom-colors|border-left-colors|" +
- "border-right-colors|border-top-colors|border-end|border-end-color|" +
- "border-end-style|border-end-width|border-image|border-start|" +
- "border-start-color|border-start-style|border-start-width|box-align|" +
- "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
- "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
- "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
- "font-feature-settings|font-language-override|force-broken-image-icon|" +
- "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
- "outline-offset|outline-radius|outline-radius-bottomleft|" +
- "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
- "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
- "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
- "text-decoration-style|transform|transform-origin|transition|" +
- "transition-delay|transition-duration|transition-property|" +
- "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
- "window-shadow|border-radius").split("|");
-
- var properties = ("azimuth|background-attachment|background-color|background-image|" +
- "background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|" +
- "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|opacity|orphans|outline-color|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|");
-
- //The return array
- var ret = [];
-
- //All prefixProperties will get the browserPrefix in
- //the begning by join the prefixProperties array with the value of browserPrefix
- for (var i=0, ln=browserPrefix.length; i<ln; i++) {
- Array.prototype.push.apply(
- ret,
- (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
- );
- }
-
- //Add also prefixProperties and properties without any browser prefix
- Array.prototype.push.apply(ret, prefixProperties);
- Array.prototype.push.apply(ret, properties);
-
- return ret;
-
- })() );
-
-
-
- var functions = lang.arrayToMap(
- ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
- "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
- "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
- "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
- "scale_color|transparentize|type_of|unit|unitless|unqoute").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
- )
-
- var tags = lang.arrayToMap(
- ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
- "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
- "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
- "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
- "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
- "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
- "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
- "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
- "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
- );
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric",
- regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : "constant.numeric",
- regex : numRe
- }, {
- token : function(value) {
- if (properties.hasOwnProperty(value.toLowerCase()))
- return "support.type";
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (constants.hasOwnProperty(value))
- return "constant.language";
- else if (functions.hasOwnProperty(value))
- return "support.function";
- else if (colors.hasOwnProperty(value.toLowerCase()))
- return "support.constant.color";
- else if (tags.hasOwnProperty(value.toLowerCase()))
- return "variable.language";
- else
- return "text";
- },
- regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
- }, {
- token : "variable",
- regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
- }, {
- token: "variable.language",
- regex: "#[a-z0-9-_]+"
- }, {
- token: "variable.language",
- regex: "\\.[a-z0-9-_]+"
- }, {
- token: "variable.language",
- regex: ":[a-z0-9-_]+"
- }, {
- token: "constant",
- regex: "[a-z0-9-_]+"
- }, {
- token : "keyword.operator",
- regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-};
-
-oop.inherits(ScssHighlightRules, TextHighlightRules);
-
-exports.ScssHighlightRules = ScssHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-scss.js b/contexts/data/lib/ace/mode-scss.js
index 3f63dc4..9dc5740 100644
--- a/contexts/data/lib/ace/mode-scss.js
+++ b/contexts/data/lib/ace/mode-scss.js
@@ -1 +1,416 @@
-define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./scss_highlight_rules").ScssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./folding/cstyle").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap(function(){var a="-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"),b="appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"),c="azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"),d=[];for(var e=0,f=a.length;e<f;e++)Array.prototype.push.apply(d,(a[e]+b.join("|"+a[e])).split("|"));return Array.prototype.push.apply(d,b),Array.prototype.push.apply(d,c),d}()),b=e.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unqoute".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f=e.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")),g=e.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp".split("|")),h="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:h+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:h},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":f.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"constant.language":b.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":g.hasOwnProperty(e.toLowerCase())?"variable.language":"text"},regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable",regex:"[a-z_\\-$][a-z0-9_\\-$]*\\b"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.ScssHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/scss', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scss_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new ScssHighlightRules().getRules(), "i");
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ScssHighlightRules = function() {
+
+ var properties = lang.arrayToMap( (function () {
+
+ var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
+
+ var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
+ "background-size|binding|border-bottom-colors|border-left-colors|" +
+ "border-right-colors|border-top-colors|border-end|border-end-color|" +
+ "border-end-style|border-end-width|border-image|border-start|" +
+ "border-start-color|border-start-style|border-start-width|box-align|" +
+ "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
+ "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
+ "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
+ "font-feature-settings|font-language-override|force-broken-image-icon|" +
+ "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
+ "outline-offset|outline-radius|outline-radius-bottomleft|" +
+ "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
+ "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
+ "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
+ "text-decoration-style|transform|transform-origin|transition|" +
+ "transition-delay|transition-duration|transition-property|" +
+ "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
+ "window-shadow|border-radius").split("|");
+
+ var properties = ("azimuth|background-attachment|background-color|background-image|" +
+ "background-position|background-repeat|background|border-bottom-color|" +
+ "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
+ "border-color|border-left-color|border-left-style|border-left-width|" +
+ "border-left|border-right-color|border-right-style|border-right-width|" +
+ "border-right|border-spacing|border-style|border-top-color|" +
+ "border-top-style|border-top-width|border-top|border-width|border|" +
+ "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
+ "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
+ "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
+ "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
+ "letter-spacing|line-height|list-style-image|list-style-position|" +
+ "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
+ "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
+ "min-width|opacity|orphans|outline-color|" +
+ "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
+ "padding-left|padding-right|padding-top|padding|page-break-after|" +
+ "page-break-before|page-break-inside|page|pause-after|pause-before|" +
+ "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
+ "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
+ "stress|table-layout|text-align|text-decoration|text-indent|" +
+ "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
+ "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
+ "z-index").split("|");
+ var ret = [];
+ for (var i=0, ln=browserPrefix.length; i<ln; i++) {
+ Array.prototype.push.apply(
+ ret,
+ (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
+ );
+ }
+ Array.prototype.push.apply(ret, prefixProperties);
+ Array.prototype.push.apply(ret, properties);
+
+ return ret;
+
+ })() );
+
+
+
+ var functions = lang.arrayToMap(
+ ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
+ "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
+ "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
+ "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
+ "scale_color|transparentize|type_of|unit|unitless|unqoute").split("|")
+ );
+
+ var constants = lang.arrayToMap(
+ ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
+ "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
+ "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
+ "decimal-leading-zero|decimal|default|disabled|disc|" +
+ "distribute-all-lines|distribute-letter|distribute-space|" +
+ "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
+ "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
+ "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
+ "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
+ "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
+ "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
+ "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
+ "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
+ "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
+ "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
+ "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
+ "solid|square|static|strict|super|sw-resize|table-footer-group|" +
+ "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
+ "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
+ "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
+ "zero").split("|")
+ );
+
+ var colors = lang.arrayToMap(
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
+ "purple|red|silver|teal|white|yellow").split("|")
+ );
+
+ var keywords = lang.arrayToMap(
+ ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
+ )
+
+ var tags = lang.arrayToMap(
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
+ );
+
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric",
+ regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : function(value) {
+ if (properties.hasOwnProperty(value.toLowerCase()))
+ return "support.type";
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (constants.hasOwnProperty(value))
+ return "constant.language";
+ else if (functions.hasOwnProperty(value))
+ return "support.function";
+ else if (colors.hasOwnProperty(value.toLowerCase()))
+ return "support.constant.color";
+ else if (tags.hasOwnProperty(value.toLowerCase()))
+ return "variable.language";
+ else
+ return "text";
+ },
+ regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
+ }, {
+ token : "variable",
+ regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
+ }, {
+ token: "variable.language",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ token : "keyword.operator",
+ regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+};
+
+oop.inherits(ScssHighlightRules, TextHighlightRules);
+
+exports.ScssHighlightRules = ScssHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-sh.js b/contexts/data/lib/ace/mode-sh.js
new file mode 100644
index 0000000..210685d
--- /dev/null
+++ b/contexts/data/lib/ace/mode-sh.js
@@ -0,0 +1,232 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/sh', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sh_highlight_rules', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new ShHighlightRules().getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)#/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "#");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/sh_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var reservedKeywords = exports.reservedKeywords = (
+ '!|{|}|case|do|done|elif|else|'+
+ 'esac|fi|for|if|in|then|until|while|'+
+ '&|;|export|local|read|typeset|unset|'+
+ 'elif|select|set'
+ );
+
+var languageConstructs = exports.languageConstructs = (
+ '[|]|alias|bg|bind|break|builtin|'+
+ 'cd|command|compgen|complete|continue|'+
+ 'dirs|disown|echo|enable|eval|exec|'+
+ 'exit|fc|fg|getopts|hash|help|history|'+
+ 'jobs|kill|let|logout|popd|printf|pushd|'+
+ 'pwd|return|set|shift|shopt|source|'+
+ 'suspend|test|times|trap|type|ulimit|'+
+ 'umask|unalias|wait'
+);
+
+var ShHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": reservedKeywords,
+ "support.function.builtin": languageConstructs,
+ "invalid.deprecated": "debugger"
+ }, "identifier");
+
+ var integer = "(?:(?:[1-9]\\d*)|(?:0))";
+
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+ var fileDescriptor = "(?:&" + intPart + ")";
+
+ var variableName = "[a-zA-Z][a-zA-Z0-9_]*";
+ var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))";
+
+ var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
+
+ var func = "(?:" + variableName + "\\s*\\(\\))";
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string", // " string
+ regex : '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ token : "variable.language",
+ regex : builtinVariable
+ }, {
+ token : "variable",
+ regex : variable
+ }, {
+ token : "support.function",
+ regex : func
+ }, {
+ token : "support.function",
+ regex : fileDescriptor
+ }, {
+ token : "string", // ' string
+ regex : "'(?:[^\\\\]|\\\\.)*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(ShHighlightRules, TextHighlightRules);
+
+exports.ShHighlightRules = ShHighlightRules;
+});
diff --git a/contexts/data/lib/ace/mode-sql-noconflict.js b/contexts/data/lib/ace/mode-sql-noconflict.js
deleted file mode 100644
index c631046..0000000
--- a/contexts/data/lib/ace/mode-sql-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/sql_highlight_rules","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./sql_highlight_rules").SqlHighlightRules,h=a("../range").Range,i=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(i,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)--/;for(var i=c;i<=d;i++)if(!g.test(b.getLine(i))){e=!1;break}if(e){var j=new h(0,0,0,0);for(var i=c;i<=d;i++){var k=b.getLine(i),l=k.match(g);j.start.row=i,j.end.row=i,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"--")}}.call(i.prototype),b.Mode=i}),ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("select|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc".split("|")),b=e.arrayToMap("true|false|null".split("|")),c=e.arrayToMap("count|min|max|avg|sum|rank|now|coalesce".split("|"));this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*"'},{token:"string",regex:"'.*'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return d=d.toLowerCase(),a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen.paren",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};d.inherits(g,f),b.SqlHighlightRules=g}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-sql-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-sql-uncompressed-noconflict.js
deleted file mode 100644
index ad14217..0000000
--- a/contexts/data/lib/ace/mode-sql-uncompressed-noconflict.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* Contributor(s):
-* Jonathan Camile <jonathan.camile AT gmail DOT com>
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/sql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sql_highlight_rules', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new SqlHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var outentedRows = [];
- var re = /^(\s*)--/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "--");
- }
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * Contributor(s):
- * Jonathan Camile <jonathan.camile AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/sql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var SqlHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("select|from|where|and|or|group|by|order|limit|offset|having|as|case|" +
- "when|else|end|type|left|right|join|on|outer|desc|asc").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("true|false|null").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("count|min|max|avg|sum|rank|now|coalesce").split("|")
- );
-
- this.$rules = {
- "start" : [ {
- token : "comment",
- regex : "--.*$"
- }, {
- token : "string", // " string
- regex : '".*"'
- }, {
- token : "string", // ' string
- regex : "'.*'"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : function(value) {
- value = value.toLowerCase();
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
- }, {
- token : "lparen.paren",
- regex : "[\\(]"
- }, {
- token : "paren.rparen",
- regex : "[\\)]"
- }, {
- token : "text",
- regex : "\\s+"
- } ]
- };
-};
-
-oop.inherits(SqlHighlightRules, TextHighlightRules);
-
-exports.SqlHighlightRules = SqlHighlightRules;
-});
-
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-sql-uncompressed.js b/contexts/data/lib/ace/mode-sql-uncompressed.js
deleted file mode 100644
index 6119598..0000000
--- a/contexts/data/lib/ace/mode-sql-uncompressed.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
-* The Original Code is Ajax.org Code Editor (ACE).
-*
-* Contributor(s):
-* Jonathan Camile <jonathan.camile AT gmail DOT com>
-*
-* Alternatively, the contents of this file may be used under the terms of
-* either the GNU General Public License Version 2 or later (the "GPL"), or
-* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-* in which case the provisions of the GPL or the LGPL are applicable instead
-* of those above. If you wish to allow use of your version of this file only
-* under the terms of either the GPL or the LGPL, and not to allow others to
-* use your version of this file under the terms of the MPL, indicate your
-* decision by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL or the LGPL. If you do not delete
-* the provisions above, a recipient may use your version of this file under
-* the terms of any one of the MPL, the GPL or the LGPL.
-*
-* ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/sql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sql_highlight_rules', 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new SqlHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var outentedRows = [];
- var re = /^(\s*)--/;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "--");
- }
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * Contributor(s):
- * Jonathan Camile <jonathan.camile AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/sql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var SqlHighlightRules = function() {
-
- var keywords = lang.arrayToMap(
- ("select|from|where|and|or|group|by|order|limit|offset|having|as|case|" +
- "when|else|end|type|left|right|join|on|outer|desc|asc").split("|")
- );
-
- var builtinConstants = lang.arrayToMap(
- ("true|false|null").split("|")
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("count|min|max|avg|sum|rank|now|coalesce").split("|")
- );
-
- this.$rules = {
- "start" : [ {
- token : "comment",
- regex : "--.*$"
- }, {
- token : "string", // " string
- regex : '".*"'
- }, {
- token : "string", // ' string
- regex : "'.*'"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : function(value) {
- value = value.toLowerCase();
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinFunctions.hasOwnProperty(value))
- return "support.function";
- else
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
- }, {
- token : "lparen.paren",
- regex : "[\\(]"
- }, {
- token : "paren.rparen",
- regex : "[\\)]"
- }, {
- token : "text",
- regex : "\\s+"
- } ]
- };
-};
-
-oop.inherits(SqlHighlightRules, TextHighlightRules);
-
-exports.SqlHighlightRules = SqlHighlightRules;
-});
-
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-sql.js b/contexts/data/lib/ace/mode-sql.js
index 3ca9535..0fb6deb 100644
--- a/contexts/data/lib/ace/mode-sql.js
+++ b/contexts/data/lib/ace/mode-sql.js
@@ -1 +1,145 @@
-define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/sql_highlight_rules","ace/range"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./sql_highlight_rules").SqlHighlightRules,h=a("../range").Range,i=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(i,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)--/;for(var i=c;i<=d;i++)if(!g.test(b.getLine(i))){e=!1;break}if(e){var j=new h(0,0,0,0);for(var i=c;i<=d;i++){var k=b.getLine(i),l=k.match(g);j.start.row=i,j.end.row=i,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"--")}}.call(i.prototype),b.Mode=i}),define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("select|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc".split("|")),b=e.arrayToMap("true|false|null".split("|")),c=e.arrayToMap("count|min|max|avg|sum|rank|now|coalesce".split("|"));this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*"'},{token:"string",regex:"'.*'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return d=d.toLowerCase(),a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen.paren",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};d.inherits(g,f),b.SqlHighlightRules=g}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/sql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sql_highlight_rules', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new SqlHighlightRules().getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var outentedRows = [];
+ var re = /^(\s*)--/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "--");
+ }
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/sql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SqlHighlightRules = function() {
+
+ var keywords = (
+ "select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|" +
+ "when|else|end|type|left|right|join|on|outer|desc|asc"
+ );
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+ var builtinFunctions = (
+ "count|min|max|avg|sum|rank|now|coalesce"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(SqlHighlightRules, TextHighlightRules);
+
+exports.SqlHighlightRules = SqlHighlightRules;
+});
+
diff --git a/contexts/data/lib/ace/mode-stylus.js b/contexts/data/lib/ace/mode-stylus.js
new file mode 100644
index 0000000..11fe3c1
--- /dev/null
+++ b/contexts/data/lib/ace/mode-stylus.js
@@ -0,0 +1,474 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/stylus', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/stylus_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ var highlighter = new StylusHighlightRules();
+ this.foldingRules = new FoldMode();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/stylus_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var CssHighlightRules = require("./css_highlight_rules");
+
+var StylusHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.type": CssHighlightRules.supportType,
+ "support.function": CssHighlightRules.supportFunction,
+ "support.constant": CssHighlightRules.supportConstant,
+ "support.constant.color": CssHighlightRules.supportConstantColor,
+ "support.constant.fonts": CssHighlightRules.supportConstantFonts
+ }, "text", true);
+
+ this.$rules = {
+ "start": [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ },
+ {
+ "token": ["entity.name.function.stylus", "text"],
+ "regex": "^([-a-zA-Z_][-\\w]*)?(\\()"
+ },
+ {
+ "token": ["entity.other.attribute-name.class.stylus"],
+ "regex": "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*"
+ },
+ {
+ "token": ["entity.language.stylus"],
+ "regex": "^ *&"
+ },
+ {
+ "token": ["variable.language.stylus"],
+ "regex": "(arguments)"
+ },
+ {
+ "token": ["keyword.stylus"],
+ "regex": "@[-\\w]+"
+ },
+ {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : CssHighlightRules.pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : CssHighlightRules.pseudoClasses
+ },
+ {
+ "token": ["entity.name.tag.stylus"],
+ "regex": "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)"
+ },
+ {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ },
+ {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ },
+ {
+ "token": ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"],
+ "regex": "(#)([a-zA-Z][a-zA-Z0-9_-]*)"
+ },
+ {
+ "token": "meta.vendor-prefix.stylus",
+ "regex": "-webkit-|-moz\\-|-ms-|-o-"
+ },
+ {
+ "token": "keyword.control.stylus",
+ "regex": "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b"
+ },
+ {
+ "token": "keyword.operator.stylus",
+ "regex": "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!="
+ },
+ {
+ "token": "keyword.operator.stylus",
+ "regex": "(?:in|is(?:nt)?|not)\\b"
+ },
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ },
+ {
+ token : "constant.numeric",
+ regex : CssHighlightRules.numRe
+ },
+ {
+ token : "keyword",
+ regex : "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b"
+ },
+ {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '[^"\\\\]+'
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ },
+ {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "[^'\\\\]+"
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ },
+ {
+ token : "string",
+ regex : "'|$",
+ next : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(StylusHighlightRules, TextHighlightRules);
+
+exports.StylusHighlightRules = StylusHighlightRules;
+});
+
+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) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+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";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ var base_ruleset = [
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "ruleset_comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ];
+
+ var ruleset = lang.copyArray(base_ruleset);
+ ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "start"
+ });
+
+ var media_ruleset = lang.copyArray( base_ruleset );
+ media_ruleset.unshift({
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "media"
+ });
+
+ var base_comment = [{
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }];
+
+ var comment = lang.copyArray(base_comment);
+ comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ });
+
+ var media_comment = lang.copyArray(base_comment);
+ media_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "media"
+ });
+
+ var ruleset_comment = lang.copyArray(base_comment);
+ ruleset_comment.unshift({
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "ruleset"
+ });
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ next: "media"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "media" : [ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "media_comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "media_ruleset"
+ },{
+ token: "string",
+ regex: "\\}",
+ next: "start"
+ },{
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ },{
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ },{
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ },{
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }],
+
+ "comment" : comment,
+
+ "ruleset" : ruleset,
+ "ruleset_comment" : ruleset_comment,
+
+ "media_ruleset" : media_ruleset,
+ "media_comment" : media_comment
+ };
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-svg-noconflict.js b/contexts/data/lib/ace/mode-svg-noconflict.js
deleted file mode 100644
index a2bb574..0000000
--- a/contexts/data/lib/ace/mode-svg-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/tokenizer","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml").Mode,f=a("./javascript").Mode,g=a("../tokenizer").Tokenizer,h=a("./svg_highlight_rules").SvgHighlightRules,i=a("./folding/mixed").FoldMode,j=a("./folding/xml").FoldMode,k=a("./folding/cstyle").FoldMode,l=function(){e.call(this),this.highlighter=new h,this.$tokenizer=new g(this.highlighter.getRules()),this.$embeds=this.highlighter.getEmbeds(),this.createModeDelegates({"js-":f}),this.foldingRules=new i(new j({}),{"js-":new k})};d.inherits(l,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(l.prototype),b.Mode=l}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),ace.define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/xml_util"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript_highlight_rules").JavaScriptHighlightRules,f=a("./xml_highlight_rules").XmlHighlightRules,g=a("./xml_util"),h=function(){f.call(this),this.$rules.start.splice(3,0,{token:"meta.tag",regex:"<(?=s*script)",next:"script"}),g.tag(this.$rules,"script","js-start"),this.embedRules(e,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}])};d.inherits(h,f),b.SvgHighlightRules=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a,b){this.defaultMode=a,this.subModes=b};d.inherits(f,e),function(){this.$getMode=function(a){for(var b in this.subModes)if(a.indexOf(b)===0)return this.subModes[b];return null},this.$tryMode=function(a,b,c,d){var e=this.$getMode(a);return e?e.getFoldWidget(b,c,d):""},this.getFoldWidget=function(a,b,c){return this.$tryMode(a.getState(c-1),a,b,c)||this.$tryMode(a.getState(c),a,b,c)||this.defaultMode.getFoldWidget(a,b,c)},this.getFoldWidgetRange=function(a,b,c){var d=this.$getMode(a.getState(c-1));if(!d||!d.getFoldWidget(a,b,c))d=this.$getMode(a.getState(c));if(!d||!d.getFoldWidget(a,b,c))d=this.defaultMode;return d.getFoldWidgetRange(a,b,c)}}.call(f.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-svg-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-svg-uncompressed-noconflict.js
deleted file mode 100644
index c9ff3cc..0000000
--- a/contexts/data/lib/ace/mode-svg-uncompressed-noconflict.js
+++ /dev/null
@@ -1,2197 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/svg', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/svg_highlight_rules', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var XmlMode = require("./xml").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
-var MixedFoldMode = require("./folding/mixed").FoldMode;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- XmlMode.call(this);
-
- this.highlighter = new SvgHighlightRules();
- this.$tokenizer = new Tokenizer(this.highlighter.getRules());
-
- this.$embeds = this.highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode
- });
-
- this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), {
- "js-": new CStyleFoldMode()
- });
-};
-
-oop.inherits(Mode, XmlMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- }],
-
- cdata : [{
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "(?:[^\\]]|\\](?!\\]>))+"
- }],
-
- comment : [{
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
-};
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-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";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/svg_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/xml_util'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var xmlUtil = require("./xml_util");
-
-var SvgHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.$rules.start.splice(3, 0, {
- token : "meta.tag",
- regex : "<(?=\s*script)",
- next : "script"
- });
-
- xmlUtil.tag(this.$rules, "script", "js-start");
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "comment",
- regex: "\\/\\/.*(?=<\\/script>)",
- next: "tag"
- }, {
- token: "meta.tag",
- regex: "<\\/(?=script)",
- next: "tag"
- }]);
-};
-
-oop.inherits(SvgHighlightRules, XmlHighlightRules);
-
-exports.SvgHighlightRules = SvgHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
- this.defaultMode = defaultMode;
- this.subModes = subModes;
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
-
- this.$getMode = function(state) {
- for (var key in this.subModes) {
- if (state.indexOf(key) === 0)
- return this.subModes[key];
- }
- return null;
- };
-
- this.$tryMode = function(state, session, foldStyle, row) {
- var mode = this.$getMode(state);
- return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
- };
-
- this.getFoldWidget = function(session, foldStyle, row) {
- return (
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
- this.$tryMode(session.getState(row), session, foldStyle, row) ||
- this.defaultMode.getFoldWidget(session, foldStyle, row)
- );
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var mode = this.$getMode(session.getState(row-1));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.$getMode(session.getState(row));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.defaultMode;
-
- return mode.getFoldWidgetRange(session, foldStyle, row);
- };
-
-}).call(FoldMode.prototype);
-
-});;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-svg-uncompressed.js b/contexts/data/lib/ace/mode-svg-uncompressed.js
deleted file mode 100644
index 8d3bb3b..0000000
--- a/contexts/data/lib/ace/mode-svg-uncompressed.js
+++ /dev/null
@@ -1,2197 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/svg', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/svg_highlight_rules', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var XmlMode = require("./xml").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
-var MixedFoldMode = require("./folding/mixed").FoldMode;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- XmlMode.call(this);
-
- this.highlighter = new SvgHighlightRules();
- this.$tokenizer = new Tokenizer(this.highlighter.getRules());
-
- this.$embeds = this.highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode
- });
-
- this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), {
- "js-": new CStyleFoldMode()
- });
-};
-
-oop.inherits(Mode, XmlMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- }],
-
- cdata : [{
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "(?:[^\\]]|\\](?!\\]>))+"
- }],
-
- comment : [{
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
-};
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var outdent = true;
- var re = /^(\s*)\/\//;
-
- for (var i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- if (outdent) {
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i=startRow; i<= endRow; i++)
- {
- var line = doc.getLine(i);
- var m = line.match(re);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = m[0].length;
- doc.replace(deleteRange, m[1]);
- }
- }
- else {
- doc.indentRows(startRow, endRow, "//");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "regex_allowed") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || state == "regex_allowed") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- var errors = [];
- for (var i=0; i<results.data.length; i++) {
- var error = results.data[i];
- if (error)
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: "warning",
- lint: error
- });
- }
- session.setAnnotations(errors);
- });
-
- worker.on("narcissus", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var unicode = require("../unicode");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
- var globals = lang.arrayToMap(
- // Constructors
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
- // E4X
- "Namespace|QName|XML|XMLList|" +
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- // Errors
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
- "SyntaxError|TypeError|URIError|" +
- // Non-constructor functions
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
- "isNaN|parseFloat|parseInt|" +
- // Other
- "JSON|Math|" +
- // Pseudo
- "this|arguments|prototype|window|document"
- ).split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
- "const|yield|import|get|set").split("|")
- );
-
- // keywords which can be followed by regular expressions
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
-
- var deprecated = lang.arrayToMap(
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
- );
-
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
-
- var buildinConstants = lang.arrayToMap(
- ("null|Infinity|NaN|undefined").split("|")
- );
-
- var futureReserved = lang.arrayToMap(
- ("class|enum|extends|super|export|implements|private|" +
- "public|interface|package|protected|static").split("|")
- );
-
- // TODO: Unicode escape sequences
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]*\\b";
-
- // regexp must not have capturing parentheses. Use (?:) instead.
- // regexps are ordered -> the first match is used
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- new DocCommentHighlightRules().getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : ["keyword.definition", "text", "entity.name.function"],
- regex : "(function)(\\s+)(" + identifierRe + ")"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "regex_allowed"
- }, {
- token : function(value) {
- if (globals.hasOwnProperty(value))
- return "variable.language";
- else if (deprecated.hasOwnProperty(value))
- return "invalid.deprecated";
- else if (definitions.hasOwnProperty(value))
- return "keyword.definition";
- else if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (buildinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (futureReserved.hasOwnProperty(value))
- return "invalid.illegal";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- return "identifier";
- },
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
- next : "regex_allowed"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\.",
- next : "regex_allowed"
- }, {
- token : "paren.lparen",
- regex : "[[({]",
- next : "regex_allowed"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "keyword.operator",
- regex : "\\/=?",
- next : "regex_allowed"
- }, {
- token: "comment",
- regex: "^#!.*$"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- // regular expressions are only allowed after certain tokens. This
- // makes sure we don't mix up regexps with the divison operator
- "regex_allowed": [
- {
- token : "comment", // multi line comment
- merge : true,
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/.*$"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex",
- merge: true
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- // immediately return to the start mode without matching
- // anything
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex"
- }, {
- // flag
- token: "string.regexp",
- regex: "/\\w*",
- next: "start",
- merge: true
- }, {
- token: "string.regexp",
- regex: "[^\\\\/\\[]+",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "\\[",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
- next: "regex_character_class"
- }, {
- token: "string.regexp.charachterclass",
- regex: "]",
- next: "regex",
- merge: true
- }, {
- token: "string.regexp.charachterclass",
- regex: "[^\\\\\\]]+",
- next: "regex_character_class",
- merge: true
- }, {
- token: "empty",
- regex: "",
- next: "start"
- }
- ],
- "comment_regex_allowed" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "regex_allowed"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- merge : true,
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- merge : true,
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ new DocCommentHighlightRules().getEndRule("start") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc",
- merge : true,
- regex : "\\s+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "TODO"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "[^@\\*]+"
- }, {
- token : "comment.doc",
- merge : true,
- regex : "."
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-(function() {
-
- this.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- merge : true,
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
-
- this.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- merge : true,
- regex : "\\*\\/",
- next : start
- };
- };
-
-}).call(DocCommentHighlightRules.prototype);
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
-
- this.changeListener = this.changeListener.bind(this);
-
- if (module.packaged) {
- var base = this.$guessBasePath();
- this.$worker = new Worker(base + packagedJs);
- }
- else {
- var workerUrl = this.$normalizePath(require.nameToUrl("ace/worker/worker", null, "_"));
- this.$worker = new Worker(workerUrl);
-
- var tlns = {};
- for (var i=0; i<topLevelNamespaces.length; i++) {
- var ns = topLevelNamespaces[i];
- var path = this.$normalizePath(require.nameToUrl(ns, null, "_").replace(/.js$/, ""));
-
- tlns[ns] = path;
- }
- }
-
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- var _self = this;
- this.$worker.onerror = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
- this.$worker.onmessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log(msg.data);
- break;
-
- case "event":
- _self._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = _self.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete _self.callbacks[msg.id];
- }
- break;
- }
- };
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$normalizePath = function(path) {
- path = path.replace(/^[a-z]+:\/\/[^\/]+\//, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- // paths starting with a slash are relative to the root (host)
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.$guessBasePath = function() {
- if (require.aceBaseUrl)
- return require.aceBaseUrl;
-
- var scripts = document.getElementsByTagName("script");
- for (var i=0; i<scripts.length; i++) {
- var script = scripts[i];
-
- var base = script.getAttribute("data-ace-base");
- if (base)
- return base.replace(/\/*$/, "/");
-
- var src = script.src || script.getAttribute("src");
- if (!src) {
- continue;
- }
- var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
- if (m)
- return m[1] || m[2];
- }
- return "";
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- // firefox refuses to clone objects which have function properties
- // TODO: cleanup event
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- e.range = {
- start: e.data.range.start,
- end: e.data.range.end
- };
- this.emit("change", e);
- };
-
-}).call(WorkerClient.prototype);
-
-exports.WorkerClient = WorkerClient;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length);
- range.end.column -= 2;
- return range;
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[2]) {
- var range = session.getCommentFoldRange(row, i);
- range.end.column -= 2;
- return range;
- }
-
- var end = {row: row, column: i};
- var start = session.$findOpeningBracket(match[1], end);
-
- if (!start)
- return;
-
- start.column++;
- end.column--;
-
- return Range.fromPoints(start, end);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/svg_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/xml_util'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var xmlUtil = require("./xml_util");
-
-var SvgHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.$rules.start.splice(3, 0, {
- token : "meta.tag",
- regex : "<(?=\s*script)",
- next : "script"
- });
-
- xmlUtil.tag(this.$rules, "script", "js-start");
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "comment",
- regex: "\\/\\/.*(?=<\\/script>)",
- next: "tag"
- }, {
- token: "meta.tag",
- regex: "<\\/(?=script)",
- next: "tag"
- }]);
-};
-
-oop.inherits(SvgHighlightRules, XmlHighlightRules);
-
-exports.SvgHighlightRules = SvgHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
- this.defaultMode = defaultMode;
- this.subModes = subModes;
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
-
- this.$getMode = function(state) {
- for (var key in this.subModes) {
- if (state.indexOf(key) === 0)
- return this.subModes[key];
- }
- return null;
- };
-
- this.$tryMode = function(state, session, foldStyle, row) {
- var mode = this.$getMode(state);
- return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
- };
-
- this.getFoldWidget = function(session, foldStyle, row) {
- return (
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
- this.$tryMode(session.getState(row), session, foldStyle, row) ||
- this.defaultMode.getFoldWidget(session, foldStyle, row)
- );
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var mode = this.$getMode(session.getState(row-1));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.$getMode(session.getState(row));
-
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
- mode = this.defaultMode;
-
- return mode.getFoldWidgetRange(session, foldStyle, row);
- };
-
-}).call(FoldMode.prototype);
-
-});;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-svg.js b/contexts/data/lib/ace/mode-svg.js
index e3865a7..90c4364 100644
--- a/contexts/data/lib/ace/mode-svg.js
+++ b/contexts/data/lib/ace/mode-svg.js
@@ -1 +1,1490 @@
-define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/tokenizer","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml").Mode,f=a("./javascript").Mode,g=a("../tokenizer").Tokenizer,h=a("./svg_highlight_rules").SvgHighlightRules,i=a("./folding/mixed").FoldMode,j=a("./folding/xml").FoldMode,k=a("./folding/cstyle").FoldMode,l=function(){e.call(this),this.highlighter=new h,this.$tokenizer=new g(this.highlighter.getRules()),this.$embeds=this.highlighter.getEmbeds(),this.createModeDelegates({"js-":f}),this.foldingRules=new i(new j({}),{"js-":new k})};d.inherits(l,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(l.prototype),b.Mode=l}),define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/event_emitter").EventEmitter,f=function(b,d,e,f){this.changeListener=this.changeListener.bind(this);if(c.packaged){var g=this.$guessBasePath();this.$worker=new Worker(g+d)}else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_"));this.$worker=new Worker(h);var i={};for(var j=0;j<b.length;j++){var k=b[j],l=this.$normalizePath(a.nameToUrl(k,null,"_").replace(/.js$/,""));i[k]=l}}this.$worker.postMessage({init:!0,tlns:i,module:e,classname:f}),this.callbackId=1,this.callbacks={};var m=this;this.$worker.onerror=function(a){throw window.console&&console.log&&console.log(a),a},this.$worker.onmessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log(b.data);break;case"event":m._emit(b.name,{data:b.data});break;case"call":var c=m.callbacks[b.id];c&&(c(b.data),delete m.callbacks[b.id])}}};((function(){d.implement(this,e),this.$normalizePath=function(a){return a=a.replace(/^[a-z]+:\/\/[^\/]+\//,""),a=location.protocol+"//"+location.host+(a.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,""),a},this.$guessBasePath=function(){if(a.aceBaseUrl)return a.aceBaseUrl;var b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++){var d=b[c],e=d.getAttribute("data-ace-base");if(e)return e.replace(/\/*$/,"/");var f=d.src||d.getAttribute("src");if(!f)continue;var g=f.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);if(g)return g[1]||g[2]}return""},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){a.range={start:a.data.range.start,end:a.data.range.end},this.emit("change",a)}})).call(f.prototype),b.WorkerClient=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/xml_util"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript_highlight_rules").JavaScriptHighlightRules,f=a("./xml_highlight_rules").XmlHighlightRules,g=a("./xml_util"),h=function(){f.call(this),this.$rules.start.splice(3,0,{token:"meta.tag",regex:"<(?=s*script)",next:"script"}),g.tag(this.$rules,"script","js-start"),this.embedRules(e,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}])};d.inherits(h,f),b.SvgHighlightRules=h}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a,b){this.defaultMode=a,this.subModes=b};d.inherits(f,e),function(){this.$getMode=function(a){for(var b in this.subModes)if(a.indexOf(b)===0)return this.subModes[b];return null},this.$tryMode=function(a,b,c,d){var e=this.$getMode(a);return e?e.getFoldWidget(b,c,d):""},this.getFoldWidget=function(a,b,c){return this.$tryMode(a.getState(c-1),a,b,c)||this.$tryMode(a.getState(c),a,b,c)||this.defaultMode.getFoldWidget(a,b,c)},this.getFoldWidgetRange=function(a,b,c){var d=this.$getMode(a.getState(c-1));if(!d||!d.getFoldWidget(a,b,c))d=this.$getMode(a.getState(c));if(!d||!d.getFoldWidget(a,b,c))d=this.defaultMode;return d.getFoldWidgetRange(a,b,c)}}.call(f.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/svg', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/svg_highlight_rules', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var XmlMode = require("./xml").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
+var MixedFoldMode = require("./folding/mixed").FoldMode;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ XmlMode.call(this);
+
+ this.highlighter = new SvgHighlightRules();
+ this.$tokenizer = new Tokenizer(this.highlighter.getRules());
+
+ this.$embeds = this.highlighter.getEmbeds();
+ this.createModeDelegates({
+ "js-": JavaScriptMode
+ });
+
+ this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), {
+ "js-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(Mode, XmlMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function() {
+ this.$rules = {
+ start : [
+ {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "xml-pe", regex : "<\\?.*?\\?>"},
+ {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "xml-pe", regex : "<\\!.*?>"},
+ {token : "meta.tag", regex : "<\\/?", next : "tag"},
+ {token : "text", regex : "\\s+"},
+ {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "text", regex : "[^<]+"}
+ ],
+
+ cdata : [
+ {token : "text", regex : "\\]\\]>", next : "start"},
+ {token : "text", regex : "\\s+"},
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment", regex : ".*?-->", next : "start"},
+ {token : "comment", regex : ".+"}
+ ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start");
+};
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var XmlBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var tag = token.value;
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
+ if (rightChars == '</') {
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
+
+ return {
+ text: '\n' + indent + '\n' + next_indent,
+ selection: [1, indent.length, 1, indent.length]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (tag.closing)
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ return "";
+
+ if (tag.selfClosing)
+ return "";
+
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ return "";
+
+ return "start";
+ };
+
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var value = "";
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type.indexOf("meta.tag") === 0)
+ value += token.value;
+ else
+ value += lang.stringRepeat(" ", token.value.length);
+ }
+
+ return this._parseTag(value);
+ };
+
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
+ this._parseTag = function(tag) {
+
+ var match = this.tagRe.exec(tag);
+ var column = this.tagRe.lastIndex || 0;
+ this.tagRe.lastIndex = 0;
+
+ return {
+ value: tag,
+ match: match ? match[2] : "",
+ closing: match ? !!match[3] : false,
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
+ tagName: match ? match[4] : "",
+ column: match[1] ? column + match[1].length : column
+ };
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var start;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!start) {
+ var start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ }
+ value += token.value;
+ if (value.indexOf(">") !== -1) {
+ var tag = this._parseTag(value);
+ tag.start = start;
+ tag.end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ iterator.stepForward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var end;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!end) {
+ end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ }
+ value = token.value + value;
+ if (value.indexOf("<") !== -1) {
+ var tag = this._parseTag(value);
+ tag.end = end;
+ tag.start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ iterator.stepBackward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.voidElements[tag.tagName]) {
+ return;
+ }
+ else if (this.voidElements[top.tagName]) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag.match)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.column);
+ var start = {
+ row: row,
+ column: firstTag.column + firstTag.tagName.length + 2
+ };
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var end = {
+ row: row,
+ column: firstTag.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/svg_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/xml_util'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var xmlUtil = require("./xml_util");
+
+var SvgHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.$rules.start.splice(3, 0, {
+ token : "meta.tag",
+ regex : "<(?=script)",
+ next : "script"
+ });
+
+ xmlUtil.tag(this.$rules, "script", "js-start");
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "comment",
+ regex: "\\/\\/.*(?=<\\/script>)",
+ next: "tag"
+ }, {
+ token: "meta.tag",
+ regex: "<\\/(?=script)",
+ next: "tag"
+ }]);
+};
+
+oop.inherits(SvgHighlightRules, XmlHighlightRules);
+
+exports.SvgHighlightRules = SvgHighlightRules;
+});
+
+ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-tcl.js b/contexts/data/lib/ace/mode-tcl.js
new file mode 100644
index 0000000..a6dfa45
--- /dev/null
+++ b/contexts/data/lib/ace/mode-tcl.js
@@ -0,0 +1,342 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/tcl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/folding/cstyle', 'ace/mode/tcl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var TclHighlightRules = require("./tcl_highlight_rules").TclHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new TclHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)#/;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "#");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define('ace/mode/tcl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TclHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*\\\\$",
+ next : "commentfollow"
+ }, {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "support.function",
+ regex : '[\\\\]$',
+ next : "splitlineStart"
+ }, {
+ token : "text",
+ regex : '[\\\\](?:["]|[{]|[}]|[[]|[]]|[$]|[\])'
+ }, {
+ token : "text", // last value before command
+ regex : '^|[^{][;][^}]|[/\r/]',
+ next : "commandItem"
+ }, {
+ token : "string", // single line
+ regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line """ string start
+ regex : '[ ]*["]',
+ next : "qqstring"
+ }, {
+ token : "variable.instancce", // variable xotcl with braces
+ regex : "[$]",
+ next : "variable"
+ }, {
+ token : "support.function",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"
+ }, {
+ token : "identifier",
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "paren.lparen",
+ regex : "[[{]",
+ next : "commandItem"
+ }, {
+ token : "paren.lparen",
+ regex : "[(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "commandItem" : [
+ {
+ token : "comment",
+ regex : "#.*\\\\$",
+ next : "commentfollow"
+ }, {
+ token : "comment",
+ regex : "#.*$",
+ next : "start"
+ }, {
+ token : "string", // single line
+ regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "variable.instancce", // variable xotcl with braces
+ regex : "[$]",
+ next : "variable"
+ }, {
+ token : "support.function",
+ regex : "(?:[:][:])[a-zA-Z0-9_/]+(?:[:][:])",
+ next : "commandItem"
+ }, {
+ token : "support.function",
+ regex : "[a-zA-Z0-9_/]+(?:[:][:])",
+ next : "commandItem"
+ }, {
+ token : "support.function",
+ regex : "(?:[:][:])",
+ next : "commandItem"
+ }, {
+ token : "support.function",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"
+ }, {
+ token : "keyword",
+ regex : "[a-zA-Z0-9_/]+",
+ next : "start"
+ } ],
+ "commentfollow" : [
+ {
+ token : "comment",
+ regex : ".*\\\\$",
+ next : "commentfollow"
+ }, {
+ token : "comment",
+ regex : '.+',
+ next : "start"
+ } ],
+ "splitlineStart" : [
+ {
+ token : "text",
+ regex : "^.",
+ next : "start"
+ }],
+ "variable" : [
+ {
+ token : "variable.instance", // variable xotcl with braces
+ regex : "(?:[:][:])?[a-zA-Z_\\d]+(?:(?:[:][:])?[a-zA-Z_\\d]+)?(?:[(][a-zA-Z_\\d]+[)])?",
+ next : "start"
+ }, {
+ token : "variable.instance", // variable tcl
+ regex : "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?",
+ next : "start"
+ }, {
+ token : "variable.instance", // variable tcl with braces
+ regex : "{?[a-zA-Z_\\d]+}?",
+ next : "start"
+ }],
+ "qqstring" : [ {
+ token : "string", // multi line """ string end
+ regex : '(?:[^\\\\]|\\\\.)*?["]',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ]
+ };
+};
+
+oop.inherits(TclHighlightRules, TextHighlightRules);
+
+exports.TclHighlightRules = TclHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
diff --git a/contexts/data/lib/ace/mode-tex.js b/contexts/data/lib/ace/mode-tex.js
new file mode 100644
index 0000000..78164af
--- /dev/null
+++ b/contexts/data/lib/ace/mode-tex.js
@@ -0,0 +1,171 @@
+/*
+ * tex.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * This program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+ace.define('ace/mode/tex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function(suppressHighlighting) {
+ if (suppressHighlighting)
+ this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
+ else
+ this.$tokenizer = new Tokenizer(new TexHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.allowAutoInsert = function() {
+ return false;
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/tex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TexHighlightRules = function(textClass) {
+
+ if (!textClass)
+ textClass = "text";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
+ next : "nospell"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ }, {
+ token : textClass,
+ regex : "\\s+"
+ }
+ ],
+ "nospell" : [
+ {
+ token : "comment",
+ regex : "%.*$",
+ next : "start"
+ }, {
+ token : "nospell." + textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
+ next : "start"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "}",
+ next : "start"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\s+"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\w+"
+ }
+ ]
+ };
+};
+
+oop.inherits(TexHighlightRules, TextHighlightRules);
+
+exports.TexHighlightRules = TexHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
diff --git a/contexts/data/lib/ace/mode-text.js b/contexts/data/lib/ace/mode-text.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/contexts/data/lib/ace/mode-text.js
diff --git a/contexts/data/lib/ace/mode-textile-noconflict.js b/contexts/data/lib/ace/mode-textile-noconflict.js
deleted file mode 100644
index f48f315..0000000
--- a/contexts/data/lib/ace/mode-textile-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./textile_highlight_rules").TextileHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(i,e),function(){this.getNextLineIndent=function(a,b,c){return a=="intag"?c:""},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(i.prototype),b.Mode=i}),ace.define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:function(a){return a.match(/^h\d$/)?"markup.heading."+a.charAt(1):"markup.heading"},regex:"h1|h2|h3|h4|h5|h6|bq|p|bc|pre",next:"blocktag"},{token:"keyword",regex:"[\\*]+|[#]+"},{token:"text",regex:".+"}],blocktag:[{token:"keyword",regex:"\\. ",next:"start"},{token:"keyword",regex:"\\(",next:"blocktagproperties"}],blocktagproperties:[{token:"keyword",regex:"\\)",next:"blocktag"},{token:"string",regex:"[a-zA-Z0-9\\-_]+"},{token:"keyword",regex:"#"}]}};d.inherits(f,e),b.TextileHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-textile-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-textile-uncompressed-noconflict.js
deleted file mode 100644
index 7258a9c..0000000
--- a/contexts/data/lib/ace/mode-textile-uncompressed-noconflict.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Kelley van Evert <kelley.vanevert@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/textile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/textile_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new TextileHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "intag")
- return tab;
-
- return "";
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Kelley van Evert <kelley.vanevert@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/textile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var TextileHighlightRules = function() {
- this.$rules = {
- "start" : [
- {
- token : function(value) {
- if (value.match(/^h\d$/))
- return "markup.heading." + value.charAt(1);
- else
- return "markup.heading";
- },
- regex : "h1|h2|h3|h4|h5|h6|bq|p|bc|pre",
- next : "blocktag"
- },
- {
- token : "keyword",
- regex : "[\\*]+|[#]+"
- },
- {
- token : "text",
- regex : ".+"
- }
- ],
- "blocktag" : [
- {
- token : "keyword",
- regex : "\\. ",
- next : "start"
- },
- {
- token : "keyword",
- regex : "\\(",
- next : "blocktagproperties"
- }
- ],
- "blocktagproperties" : [
- {
- token : "keyword",
- regex : "\\)",
- next : "blocktag"
- },
- {
- token : "string",
- regex : "[a-zA-Z0-9\\-_]+"
- },
- {
- token : "keyword",
- regex : "#"
- }
- ]
- };
-};
-
-oop.inherits(TextileHighlightRules, TextHighlightRules);
-
-exports.TextileHighlightRules = TextileHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-textile-uncompressed.js b/contexts/data/lib/ace/mode-textile-uncompressed.js
deleted file mode 100644
index 8512479..0000000
--- a/contexts/data/lib/ace/mode-textile-uncompressed.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Kelley van Evert <kelley.vanevert@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/textile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/textile_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new TextileHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "intag")
- return tab;
-
- return "";
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Kelley van Evert <kelley.vanevert@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/textile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var TextileHighlightRules = function() {
- this.$rules = {
- "start" : [
- {
- token : function(value) {
- if (value.match(/^h\d$/))
- return "markup.heading." + value.charAt(1);
- else
- return "markup.heading";
- },
- regex : "h1|h2|h3|h4|h5|h6|bq|p|bc|pre",
- next : "blocktag"
- },
- {
- token : "keyword",
- regex : "[\\*]+|[#]+"
- },
- {
- token : "text",
- regex : ".+"
- }
- ],
- "blocktag" : [
- {
- token : "keyword",
- regex : "\\. ",
- next : "start"
- },
- {
- token : "keyword",
- regex : "\\(",
- next : "blocktagproperties"
- }
- ],
- "blocktagproperties" : [
- {
- token : "keyword",
- regex : "\\)",
- next : "blocktag"
- },
- {
- token : "string",
- regex : "[a-zA-Z0-9\\-_]+"
- },
- {
- token : "keyword",
- regex : "#"
- }
- ]
- };
-};
-
-oop.inherits(TextileHighlightRules, TextHighlightRules);
-
-exports.TextileHighlightRules = TextileHighlightRules;
-
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- var match = line.match(/^(\s+)/);
- if (match) {
- return match[1];
- }
-
- return "";
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-textile.js b/contexts/data/lib/ace/mode-textile.js
index ad30c2d..fb70ddc 100644
--- a/contexts/data/lib/ace/mode-textile.js
+++ b/contexts/data/lib/ace/mode-textile.js
@@ -1 +1,175 @@
-define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./textile_highlight_rules").TextileHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(i,e),function(){this.getNextLineIndent=function(a,b,c){return a=="intag"?c:""},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(i.prototype),b.Mode=i}),define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:function(a){return a.match(/^h\d$/)?"markup.heading."+a.charAt(1):"markup.heading"},regex:"h1|h2|h3|h4|h5|h6|bq|p|bc|pre",next:"blocktag"},{token:"keyword",regex:"[\\*]+|[#]+"},{token:"text",regex:".+"}],blocktag:[{token:"keyword",regex:"\\. ",next:"start"},{token:"keyword",regex:"\\(",next:"blocktagproperties"}],blocktagproperties:[{token:"keyword",regex:"\\)",next:"blocktag"},{token:"string",regex:"[a-zA-Z0-9\\-_]+"},{token:"keyword",regex:"#"}]}};d.inherits(f,e),b.TextileHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/textile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/textile_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new TextileHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "intag")
+ return tab;
+
+ return "";
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/textile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TextileHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : function(value) {
+ if (value.charAt(0) == "h")
+ return "markup.heading." + value.charAt(1);
+ else
+ return "markup.heading";
+ },
+ regex : "h1|h2|h3|h4|h5|h6|bq|p|bc|pre",
+ next : "blocktag"
+ },
+ {
+ token : "keyword",
+ regex : "[\\*]+|[#]+"
+ },
+ {
+ token : "text",
+ regex : ".+"
+ }
+ ],
+ "blocktag" : [
+ {
+ token : "keyword",
+ regex : "\\. ",
+ next : "start"
+ },
+ {
+ token : "keyword",
+ regex : "\\(",
+ next : "blocktagproperties"
+ }
+ ],
+ "blocktagproperties" : [
+ {
+ token : "keyword",
+ regex : "\\)",
+ next : "blocktag"
+ },
+ {
+ token : "string",
+ regex : "[a-zA-Z0-9\\-_]+"
+ },
+ {
+ token : "keyword",
+ regex : "#"
+ }
+ ]
+ };
+};
+
+oop.inherits(TextileHighlightRules, TextHighlightRules);
+
+exports.TextileHighlightRules = TextileHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
diff --git a/contexts/data/lib/ace/mode-typescript.js b/contexts/data/lib/ace/mode-typescript.js
new file mode 100644
index 0000000..0ab7cc1
--- /dev/null
+++ b/contexts/data/lib/ace/mode-typescript.js
@@ -0,0 +1,1011 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/typescript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/typescript_highlight_rules', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var jsMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ var highlighter = new TypeScriptHighlightRules();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, jsMode);
+
+(function() {
+ this.createWorker = function(session) {
+ return null;
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var outdent = true;
+ var re = /^(\s*)\/\//;
+
+ for (var i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ if (outdent) {
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i=startRow; i<= endRow; i++)
+ {
+ var line = doc.getLine(i);
+ var m = line.match(re);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = m[0].length;
+ doc.replace(deleteRange, m[1]);
+ }
+ }
+ else {
+ doc.indentRows(startRow, endRow, "//");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "regex_allowed") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || state == "regex_allowed") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "constant.language.boolean",
+ regex : /(?:true|false)\b/
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "regex_allowed"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ 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/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "regex_allowed"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "regex_allowed"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "regex_allowed"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "regex_allowed"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "regex_allowed": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex",
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start",
+ }, {
+ token : "invalid",
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
+ }, {
+ token: "string.regexp",
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex",
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "string.regexp.charachterclass",
+ regex: /[^\]\-\\]+/,
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+",
+ }, {
+ token: "punctuation.operator",
+ regex: "$",
+ }, {
+ token: "empty",
+ regex: "",
+ next: "start"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "regex_allowed"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ }, {
+ token : "string",
+ regex : '.|\\w+|\\s+',
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc",
+ regex : "\\s+"
+ }, {
+ token : "comment.doc",
+ regex : "TODO"
+ }, {
+ token : "comment.doc",
+ regex : "[^@\\*]+"
+ }, {
+ token : "comment.doc",
+ regex : "."
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+
+ace.define('ace/mode/typescript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+var TypeScriptHighlightRules = function() {
+
+ var tsRules = [
+ {
+ "token": ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"],
+ "regex": "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)"
+ },
+ {
+ "token": ["storage.type.variable.ts", "text", "keyword.other.ts", "text"],
+ "regex": "(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))"
+ },
+ {
+ "token": ["entity.name.function.ts","paren.lparen", "paren.rparen"],
+ "regex": "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))"
+ },
+ {
+ "token": ["variable.parameter.function.ts", "text", "variable.parameter.function.ts"],
+ "regex": "([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)"
+ },
+ {
+ "token": ["keyword.operator.ts"],
+ "regex": "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)"
+ },
+ {
+ "token": ["storage.type.variable.ts"],
+ "regex": "(?:\\b(this\\.|string\\b|bool\\b|number)\\b)"
+ },
+ {
+ "token": ["keyword.operator.ts", "storage.type.variable.ts", "keyword.operator.ts", "storage.type.variable.ts"],
+ "regex": "(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?"
+ },
+ {
+ "token": "keyword",
+ "regex": "(?:super|export|class|extends|import)\\b"
+ }
+ ];
+
+ var JSRules = new JavaScriptHighlightRules().getRules();
+
+ JSRules.start = tsRules.concat(JSRules.start);
+ this.$rules = JSRules;
+};
+
+oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules);
+
+exports.TypeScriptHighlightRules = TypeScriptHighlightRules;
+}); \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-vbscript.js b/contexts/data/lib/ace/mode-vbscript.js
new file mode 100644
index 0000000..2554e15
--- /dev/null
+++ b/contexts/data/lib/ace/mode-vbscript.js
@@ -0,0 +1,278 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/vbscript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/vbscript_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules;
+
+var Mode = function() {
+ var highlighter = new VBScriptHighlightRules();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+
+ace.define('ace/mode/vbscript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var VBScriptHighlightRules = function() {
+
+ this.$rules = {
+ "start": [
+ {
+ token: [
+ "meta.ending-space"
+ ],
+ regex: "$"
+ },
+ {
+ token: [
+ null
+ ],
+ regex: "^(?=\\t)",
+ next: "state_3"
+ },
+ {
+ token: [null],
+ regex: "^(?= )",
+ next: "state_4"
+ },
+ {
+ token: [
+ "storage.type.function.asp",
+ "text",
+ "entity.name.function.asp",
+ "text",
+ "punctuation.definition.parameters.asp",
+ "variable.parameter.function.asp",
+ "punctuation.definition.parameters.asp"
+ ],
+ regex: "^\\s*((?:Function|Sub))(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\)).*\\n?"
+ },
+ {
+ token: "punctuation.definition.comment.asp",
+ regex: "'|REM",
+ next: "comment"
+ },
+ {
+ token: [
+ "keyword.control.asp"
+ ],
+ regex: "(?:\\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b)"
+ },
+ {
+ token: [
+ "keyword.operator.asp"
+ ],
+ regex: "(?:\\b(Mod|And|Not|Or|Xor|as)\\b)"
+ },
+ {
+ token: [
+ "storage.type.asp"
+ ],
+ regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo"
+ },
+ {
+ token: [
+ "storage.modifier.asp"
+ ],
+ regex: "(?:\\b(Private|Public|Default)\\b)"
+ },
+ {
+ token: [
+ "constant.language.asp"
+ ],
+ regex: "(?:\\s*\\b(Empty|False|Nothing|Null|True)\\b)"
+ },
+ {
+ token: [
+ "punctuation.definition.string.begin.asp"
+ ],
+ regex: '"',
+ next: "string"
+ },
+ {
+ token: [
+ "punctuation.definition.variable.asp"
+ ],
+ regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*"
+ },
+ {
+ token: [
+ "support.class.asp"
+ ],
+ regex: "(?:\\b(Application|ObjectContext|Request|Response|Server|Session)\\b)"
+ },
+ {
+ token: [
+ "support.class.collection.asp"
+ ],
+ regex: "(?:\\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b)"
+ },
+ {
+ token: [
+ "support.constant.asp"
+ ],
+ regex: "(?:\\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b)"
+ },
+ {
+ token: [
+ "support.function.asp"
+ ],
+ regex: "(?:\\b(Lock|Unlock|SetAbort|SetComplete|BianryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)"
+ },
+ {
+ token: [
+ "support.function.event.asp"
+ ],
+ regex: "(?:\\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b)"
+ },
+ {
+ token: [
+ "support.function.vb.asp"
+ ],
+ regex: "(?:\\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b)"
+ },
+ {
+ token: [
+ "constant.numeric.asp"
+ ],
+ regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"
+ },
+ {
+ token: [
+ "support.type.vb.asp"
+ ],
+ regex: "(?:\\b(vbtrue|fvbalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b)"
+ },
+ {
+ token: [
+ "entity.name.function.asp"
+ ],
+ regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))"
+ },
+ {
+ token: [
+ "keyword.operator.asp"
+ ],
+ regex: "\\-|\\+|\\*\\\/|\\>|\\<|\\=|\\&"
+ }
+ ],
+ "state_3": [
+ {
+ token: [
+ "meta.odd-tab.tabs",
+ "meta.even-tab.tabs"
+ ],
+ regex: "(\\t)(\\t)?"
+ },
+ {
+ token: "meta.leading-space",
+ regex: "(?=[^\\t])",
+ next: "start"
+ },
+ {
+ token: "meta.leading-space",
+ regex: ".",
+ next: "state_3"
+ }
+ ],
+ "state_4": [
+ {
+ token: [
+ "meta.odd-tab.spaces",
+ "meta.even-tab.spaces"
+ ],
+ regex: "( )( )?"
+ },
+ {
+ token: "meta.leading-space",
+ regex: "(?=[^ ])",
+ next: "start"
+ },
+ {
+ token: "meta.leading-space",
+ regex: ".",
+ next: "state_4"
+ }
+ ],
+ "comment": [
+ {
+ token: "comment.line.apostrophe.asp",
+ regex: "$|(?=(?:%>))",
+ next: "start"
+ },
+ {
+ token: "comment.line.apostrophe.asp",
+ regex: ".",
+ }
+ ],
+ "string": [
+ {
+ token: "constant.character.escape.apostrophe.asp",
+ regex: '""'
+ },
+ {
+ token: "string.quoted.double.asp",
+ regex: '"',
+ next: "start"
+ },
+ {
+ token: "string.quoted.double.asp",
+ regex: "."
+ }
+ ]
+}
+
+};
+
+oop.inherits(VBScriptHighlightRules, TextHighlightRules);
+
+exports.VBScriptHighlightRules = VBScriptHighlightRules;
+}); \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-xml-noconflict.js b/contexts/data/lib/ace/mode-xml-noconflict.js
deleted file mode 100644
index 17ccc59..0000000
--- a/contexts/data/lib/ace/mode-xml-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),ace.define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-xml-uncompressed-noconflict.js b/contexts/data/lib/ace/mode-xml-uncompressed-noconflict.js
deleted file mode 100644
index d15a0ae..0000000
--- a/contexts/data/lib/ace/mode-xml-uncompressed-noconflict.js
+++ /dev/null
@@ -1,1011 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- }],
-
- cdata : [{
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "(?:[^\\]]|\\](?!\\]>))+"
- }],
-
- comment : [{
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
-};
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-xml-uncompressed.js b/contexts/data/lib/ace/mode-xml-uncompressed.js
deleted file mode 100644
index bc27c17..0000000
--- a/contexts/data/lib/ace/mode-xml-uncompressed.js
+++ /dev/null
@@ -1,1011 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function() {
-
- // regexp must not have capturing parentheses
- // regexps are ordered -> the first match is used
- this.$rules = {
- start : [{
- token : "text",
- regex : "<\\!\\[CDATA\\[",
- next : "cdata"
- }, {
- token : "xml_pe",
- regex : "<\\?.*?\\?>"
- }, {
- token : "comment",
- merge : true,
- regex : "<\\!--",
- next : "comment"
- }, {
- token : "meta.tag", // opening tag
- regex : "<\\/?",
- next : "tag"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "[^<]+"
- }],
-
- cdata : [{
- token : "text",
- regex : "\\]\\]>",
- next : "start"
- }, {
- token : "text",
- regex : "\\s+"
- }, {
- token : "text",
- regex : "(?:[^\\]]|\\](?!\\]>))+"
- }],
-
- comment : [{
- token : "comment",
- regex : ".*?-->",
- next : "start"
- }, {
- token : "comment",
- merge : true,
- regex : ".+"
- }]
- };
-
- xmlUtil.tag(this.$rules, "tag", "start");
-};
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
-
-var lang = require("../lib/lang");
-
-var formTags = lang.arrayToMap(
- ("button|form|input|label|select|textarea").split("|")
-);
-
-var tableTags = lang.arrayToMap(
- ("table|tbody|td|tfoot|th|tr").split("|")
-);
-
-function string(state) {
- return [{
- token : "string",
- regex : '".*?"'
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : '["].*',
- next : state + "-qqstring"
- }, {
- token : "string",
- regex : "'.*?'"
- }, {
- token : "string", // multi line string start
- merge : true,
- regex : "['].*",
- next : state + "-qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [{
- token : "string",
- merge : true,
- regex : ".*?" + quote,
- next : state
- }, {
- token : "string",
- merge : true,
- regex : '.+'
- }];
-}
-
-exports.tag = function(states, name, nextState) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
- //token : "meta.tag",
-
- token : function(value) {
- if ( value==='a' ) {
- return "meta.tag.anchor";
- }
- else if ( value==='img' ) {
- return "meta.tag.image";
- }
- else if ( value==='script' ) {
- return "meta.tag.script";
- }
- else if ( value==='style' ) {
- return "meta.tag.style";
- }
- else if (formTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.form";
- }
- else if (tableTags.hasOwnProperty(value.toLowerCase())) {
- return "meta.tag.table";
- }
- else {
- return "meta.tag";
- }
- },
- merge : true,
- regex : "[-_a-zA-Z0-9:!]+",
- next : name + "embed-attribute-list"
- }, {
- token: "empty",
- regex: "",
- next : name + "embed-attribute-list"
- }];
-
- states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
- states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
-
- states[name + "embed-attribute-list"] = [{
- token : "meta.tag",
- merge : true,
- regex : "\/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '<') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return false;
- } else {
- return {
- text: '<>',
- selection: [1, 1]
- }
- }
- } else if (text == '>') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '>') { // need some kind of matching check here
- return {
- text: '',
- selection: [1, 1]
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var Behaviour = require('../behaviour').Behaviour;
-
-var CstyleBehaviour = function () {
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '{' + selected + '}',
- selection: false
- }
- } else {
- return {
- text: '{}',
- selection: [1, 1]
- }
- }
- } else if (text == '}') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- } else if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '(' + selected + ')',
- selection: false
- }
- } else {
- return {
- text: '()',
- selection: [1, 1]
- }
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null) {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "") {
- return {
- text: '"' + selected + '"',
- selection: false
- }
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
-
- // We're escaped.
- if (leftChar == '\\') {
- return null;
- }
-
- // Find what token we're inside.
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf('"');
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
-
- // Try and be smart about when we auto insert.
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
- return {
- text: '""',
- selection: [1,1]
- }
- } else if (token && token.type === "string") {
- // Ignore input and move right one if we're typing over the closing quote.
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '"') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '"') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == '"') {
- range.end.column++;
- return range;
- }
- }
- });
-
-}
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-"use strict";
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row, row)[0].tokens;
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.indexOf("meta.tag") === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = this.tagRe.exec(tag);
- var column = this.tagRe.lastIndex || 0;
- this.tagRe.lastIndex = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
-
- /**
- * reads a full tag and places the iterator after the tag
- */
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.indexOf("meta.tag") === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
- };
-
-}).call(FoldMode.prototype);
-
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-"use strict";
-
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-
-(function() {
-
- this.foldingStartMarker = null;
- this.foldingStopMarker = null;
-
- // must return "" if there's no fold, to enable caching
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- if (this.foldingStartMarker.test(line))
- return "start";
- if (foldStyle == "markbeginend"
- && this.foldingStopMarker
- && this.foldingStopMarker.test(line))
- return "end";
- return "";
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- return null;
- };
-
- this.indentationBlock = function(session, row, column) {
- var re = /^\s*/;
- var startRow = row;
- var endRow = row;
- var line = session.getLine(row);
- var startColumn = column || line.length;
- var startLevel = line.match(re)[0].length;
- var maxRow = session.getLength()
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.match(re)[0].length;
-
- if (level == line.length)
- continue;
-
- if (level <= startLevel)
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
-
- this.openingBracketBlock = function(session, bracket, row, column) {
- var start = {row: row, column: column + 1};
- var end = session.$findClosingBracket(bracket, start);
- if (!end)
- return;
-
- var fw = session.foldWidgets[end.row];
- if (fw == null)
- fw = this.getFoldWidget(session, end.row);
-
- if (fw == "start") {
- end.row --;
- end.column = session.getLine(end.row).length;
- }
- return Range.fromPoints(start, end);
- };
-
-}).call(FoldMode.prototype);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/mode-xml.js b/contexts/data/lib/ace/mode-xml.js
index 236ab24..2d879c1 100644
--- a/contexts/data/lib/ace/mode-xml.js
+++ b/contexts/data/lib/ace/mode-xml.js
@@ -1 +1,792 @@
-define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"-qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"-qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"embed-attribute-list"},{token:"empty",regex:"",next:b+"embed-attribute-list"}],a[b+"-qstring"]=h("'",b+"embed-attribute-list"),a[b+"-qqstring"]=h('"',b+"embed-attribute-list"),a[b+"embed-attribute-list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function() {
+ this.$rules = {
+ start : [
+ {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "xml-pe", regex : "<\\?.*?\\?>"},
+ {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "xml-pe", regex : "<\\!.*?>"},
+ {token : "meta.tag", regex : "<\\/?", next : "tag"},
+ {token : "text", regex : "\\s+"},
+ {
+ token : "constant.character.entity",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "text", regex : "[^<]+"}
+ ],
+
+ cdata : [
+ {token : "text", regex : "\\]\\]>", next : "start"},
+ {token : "text", regex : "\\s+"},
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment", regex : ".*?-->", next : "start"},
+ {token : "comment", regex : ".+"}
+ ]
+ };
+
+ xmlUtil.tag(this.$rules, "tag", "start");
+};
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {token : "string", regex : '\\w+|.|\\s+'}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
+
+ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+var XmlBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
+ return
+ }
+ var tag = token.value;
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
+ if (rightChars == '</') {
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
+
+ return {
+ text: '\n' + indent + '\n' + next_indent,
+ selection: [1, indent.length, 1, indent.length]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (tag.closing)
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ return "";
+
+ if (tag.selfClosing)
+ return "";
+
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ return "";
+
+ return "start";
+ };
+
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var value = "";
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type.indexOf("meta.tag") === 0)
+ value += token.value;
+ else
+ value += lang.stringRepeat(" ", token.value.length);
+ }
+
+ return this._parseTag(value);
+ };
+
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
+ this._parseTag = function(tag) {
+
+ var match = this.tagRe.exec(tag);
+ var column = this.tagRe.lastIndex || 0;
+ this.tagRe.lastIndex = 0;
+
+ return {
+ value: tag,
+ match: match ? match[2] : "",
+ closing: match ? !!match[3] : false,
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
+ tagName: match ? match[4] : "",
+ column: match[1] ? column + match[1].length : column
+ };
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var start;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!start) {
+ var start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ }
+ value += token.value;
+ if (value.indexOf(">") !== -1) {
+ var tag = this._parseTag(value);
+ tag.start = start;
+ tag.end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ iterator.stepForward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var end;
+
+ do {
+ if (token.type.indexOf("meta.tag") === 0) {
+ if (!end) {
+ end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ }
+ value = token.value + value;
+ if (value.indexOf("<") !== -1) {
+ var tag = this._parseTag(value);
+ tag.end = end;
+ tag.start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ iterator.stepBackward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.voidElements[tag.tagName]) {
+ return;
+ }
+ else if (this.voidElements[top.tagName]) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag.match)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.column);
+ var start = {
+ row: row,
+ column: firstTag.column + firstTag.tagName.length + 2
+ };
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var end = {
+ row: row,
+ column: firstTag.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-xquery.js b/contexts/data/lib/ace/mode-xquery.js
new file mode 100644
index 0000000..9f6df2c
--- /dev/null
+++ b/contexts/data/lib/ace/mode-xquery.js
@@ -0,0 +1,676 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+ace.define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xquery_highlight_rules', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var XQueryHighlightRules = require("./xquery_highlight_rules").XQueryHighlightRules;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+
+var Mode = function(parent) {
+ this.$tokenizer = new Tokenizer(new XQueryHighlightRules().getRules());
+ this.$behaviour = new CstyleBehaviour(parent);
+ this.foldingRules = new CStyleFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
+ if (match)
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*[\}\)]/.test(input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*[\}\)])/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var i, line;
+ var outdent = true;
+ var re = /^\s*\(:(.*):\)/;
+
+ for (i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ var range = new Range(0, 0, 0, 0);
+ for (i=startRow; i<= endRow; i++) {
+ line = doc.getLine(i);
+ range.start.row = i;
+ range.end.row = i;
+ range.end.column = line.length;
+
+ doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)");
+ }
+ };
+
+ this.createWorker = function(session) {
+ this.$deltas = [];
+ var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker");
+ var that = this;
+
+ session.getDocument().on('change', function(evt){
+ that.$deltas.push(evt.data);
+ });
+
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("start", function(e) {
+ that.$deltas = [];
+ });
+
+ worker.on("error", function(e) {
+ session.setAnnotations([e.data]);
+ });
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ worker.on("highlight", function(tokens) {
+ var firstRow = 0;
+ var lastRow = session.getLength() - 1;
+
+ var lines = tokens.data.lines;
+ var states = tokens.data.states;
+
+ for(var i=0; i < that.$deltas.length; i++)
+ {
+ var delta = that.$deltas[i];
+
+ if (delta.action === "insertLines")
+ {
+ var newLineCount = delta.lines.length;
+ for (var i = 0; i < newLineCount; i++) {
+ lines.splice(delta.range.start.row + i, 0, undefined);
+ states.splice(delta.range.start.row + i, 0, undefined);
+ }
+ }
+ else if (delta.action === "insertText")
+ {
+ if (session.getDocument().isNewLine(delta.text))
+ {
+ lines.splice(delta.range.end.row, 0, undefined);
+ states.splice(delta.range.end.row, 0, undefined);
+ } else {
+ lines[delta.range.start.row] = undefined;
+ states[delta.range.start.row] = undefined;
+ }
+ } else if (delta.action === "removeLines") {
+ var oldLineCount = delta.lines.length;
+ lines.splice(delta.range.start.row, oldLineCount);
+ states.splice(delta.range.start.row, oldLineCount);
+ } else if (delta.action === "removeText") {
+ if (session.getDocument().isNewLine(delta.text))
+ {
+ lines[delta.range.start.row] = undefined;
+ lines.splice(delta.range.end.row, 1);
+ states[delta.range.start.row] = undefined;
+ states.splice(delta.range.end.row, 1);
+ } else {
+ lines[delta.range.start.row] = undefined;
+ states[delta.range.start.row] = undefined;
+ }
+ }
+ }
+ session.bgTokenizer.lines = lines;
+ session.bgTokenizer.states = states;
+ session.bgTokenizer.fireUpdateEvent(firstRow, lastRow);
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+ace.define('ace/mode/xquery_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XQueryHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ keyword: "after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position"
+ }, "identifier");
+
+ this.$rules = {
+ start : [ {
+ token : "text",
+ regex : "<\\!\\[CDATA\\[",
+ next : "cdata"
+ }, {
+ token : "xml-pe",
+ regex : "<\\?.*?\\?>"
+ }, {
+ token : "comment",
+ regex : "<\\!--",
+ next : "comment"
+ }, {
+ token : "comment",
+ regex : "\\(:",
+ next : "comment"
+ }, {
+ token : "text", // opening tag
+ regex : "<\\/?",
+ next : "tag"
+ }, {
+ token : "constant", // number
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "variable", // variable
+ regex : "\\$[a-zA-Z_][a-zA-Z0-9_\\-:]*\\b"
+ }, {
+ token: "string",
+ regex : '".*?"'
+ }, {
+ token: "string",
+ regex : "'.*?'"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "support.function",
+ regex: "\\w[\\w+_\\-:]+(?=\\()"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token: "keyword.operator",
+ regex: "\\*|=|<|>|\\-|\\+"
+ }, {
+ token: "lparen",
+ regex: "[[({]"
+ }, {
+ token: "rparen",
+ regex: "[\\])}]"
+ } ],
+
+ tag : [ {
+ token : "text",
+ regex : ">",
+ next : "start"
+ }, {
+ token : "meta.tag",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "string",
+ regex : '".*?"'
+ }, {
+ token : "string",
+ regex : "'.*?'"
+ } ],
+
+ cdata : [ {
+ token : "comment",
+ regex : "\\]\\]>",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "\\s+"
+ }, {
+ token : "comment",
+ regex : "(?:[^\\]]|\\](?!\\]>))+"
+ } ],
+
+ comment : [ {
+ token : "comment",
+ regex : ".*?-->",
+ next : "start"
+ }, {
+ token: "comment",
+ regex : ".*:\\)",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : ".+"
+ } ]
+ };
+};
+
+oop.inherits(XQueryHighlightRules, TextHighlightRules);
+
+exports.XQueryHighlightRules = XQueryHighlightRules;
+});
+
+ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ if (leftChar == '\\') {
+ return null;
+ }
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == '"') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/mode-yaml.js b/contexts/data/lib/ace/mode-yaml.js
new file mode 100644
index 0000000..e56244a
--- /dev/null
+++ b/contexts/data/lib/ace/mode-yaml.js
@@ -0,0 +1,298 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/mode/yaml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/yaml_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/coffee'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new YamlHighlightRules().getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define('ace/mode/yaml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var YamlHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "list.markup",
+ regex : /^(?:-{3}|\.{3})\s*(?=#|$)/
+ }, {
+ token : "list.markup",
+ regex : /^\s*[\-?](?:$|\s)/
+ }, {
+ token: "constant",
+ regex: "!![\\w//]+"
+ }, {
+ token: "constant.language",
+ regex: "[&\\*][a-zA-Z0-9-_]+"
+ }, {
+ token: ["meta.tag", "keyword"],
+ regex: /^(\s*\w.*?)(\:(?:\s+|$))/
+ },{
+ token: ["meta.tag", "keyword"],
+ regex: /(\w+?)(\s*\:(?:\s+|$))/
+ }, {
+ token : "keyword.operator",
+ regex : "<<\\w*:\\w*"
+ }, {
+ token : "keyword.operator",
+ regex : "-\\s*(?=[{])"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '[\\|>]\\w*',
+ next : "qqstring"
+ }, {
+ token : "string", // single quoted string
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+\-]?[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?\b/
+ }, {
+ token : "constant.numeric", // other number
+ regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"
+ }, {
+ token : "invalid.illegal", // comments are not allowed
+ regex : "\\/\\/.*$"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : "\\w+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?=(?:(?:\\\\.)|(?:[^:]))*?:)',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]};
+
+};
+
+oop.inherits(YamlHighlightRules, TextHighlightRules);
+
+exports.YamlHighlightRules = YamlHighlightRules;
+});
+
+ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/contexts/data/lib/ace/theme-ambiance.js b/contexts/data/lib/ace/theme-ambiance.js
new file mode 100644
index 0000000..56ddcff
--- /dev/null
+++ b/contexts/data/lib/ace/theme-ambiance.js
@@ -0,0 +1,202 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright 2011 Irakli Gozalishvili. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/ambiance', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-ambiance";
+exports.cssText = ".ace-ambiance .ace_gutter {\
+background-color: #3d3d3d;\
+background-image: -moz-linear-gradient(left, #3D3D3D, #333);\
+background-image: -ms-linear-gradient(left, #3D3D3D, #333);\
+background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3D3D3D), to(#333));\
+background-image: -webkit-linear-gradient(left, #3D3D3D, #333);\
+background-image: -o-linear-gradient(left, #3D3D3D, #333);\
+background-image: linear-gradient(left, #3D3D3D, #333);\
+background-repeat: repeat-x;\
+border-right: 1px solid #4d4d4d;\
+text-shadow: 0px 1px 1px #4d4d4d;\
+color: #222;\
+}\
+.ace-ambiance .ace_gutter-layer {\
+background: repeat left top;\
+}\
+.ace-ambiance .ace_fold-widget {\
+text-align: center;\
+}\
+.ace-ambiance .ace_fold-widget:hover {\
+color: #777;\
+}\
+.ace-ambiance .ace_fold-widget.ace_start,\
+.ace-ambiance .ace_fold-widget.ace_end,\
+.ace-ambiance .ace_fold-widget.ace_closed{\
+background: none;\
+border: none;\
+box-shadow: none;\
+}\
+.ace-ambiance .ace_fold-widget.ace_start:after {\
+content: '▾'\
+}\
+.ace-ambiance .ace_fold-widget.ace_end:after {\
+content: '▴'\
+}\
+.ace-ambiance .ace_fold-widget.ace_closed:after {\
+content: '‣'\
+}\
+.ace-ambiance .ace_print-margin {\
+border-left: 1px dotted #2D2D2D;\
+right: 0;\
+background: #262626;\
+}\
+.ace-ambiance .ace_scroller {\
+background-color: #202020;\
+-webkit-box-shadow: inset 0 0 10px black;\
+-moz-box-shadow: inset 0 0 10px black;\
+-o-box-shadow: inset 0 0 10px black;\
+box-shadow: inset 0 0 10px black;\
+}\
+.ace-ambiance .ace_text-layer {\
+color: #E6E1DC;\
+}\
+.ace-ambiance .ace_cursor {\
+border-left: 1px solid #7991E8;\
+}\
+.ace-ambiance .ace_overwrite-cursors .ace_cursor {\
+border: 1px solid #FFE300;\
+background: #766B13;\
+}\
+.ace-ambiance.normal-mode .ace_cursor-layer {\
+z-index: 0;\
+}\
+.ace-ambiance .ace_marker-layer .ace_selection {\
+background: rgba(221, 240, 255, 0.20);\
+}\
+.ace-ambiance .ace_marker-layer .ace_selected-word {\
+border-radius: 4px;\
+border: 8px solid #3f475d;\
+box-shadow: 0 0 4px black;\
+}\
+.ace-ambiance .ace_marker-layer .ace_step {\
+background: rgb(198, 219, 174);\
+}\
+.ace-ambiance .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(255, 255, 255, 0.25);\
+}\
+.ace-ambiance .ace_marker-layer .ace_active-line {\
+background: rgba(255, 255, 255, 0.031);\
+}\
+.ace-ambiance .ace_invisible {\
+color: #333;\
+}\
+.ace-ambiance .ace_paren {\
+color: #24C2C7;\
+}\
+.ace-ambiance .ace_keyword {\
+color: #cda869;\
+}\
+.ace-ambiance .ace_keyword.ace_operator {\
+color: #fa8d6a;\
+}\
+.ace-ambiance .ace_punctuation.ace_operator {\
+color: #fa8d6a;\
+}\
+.ace-ambiance .ace_identifier {\
+}\
+.ace-ambiance .ace-statement {\
+color: #cda869;\
+}\
+.ace-ambiance .ace_constant {\
+color: #CF7EA9;\
+}\
+.ace-ambiance .ace_constant.ace_language {\
+color: #CF7EA9;\
+}\
+.ace-ambiance .ace_constant.ace_library {\
+}\
+.ace-ambiance .ace_constant.ace_numeric {\
+color: #78CF8A;\
+}\
+.ace-ambiance .ace_invalid {\
+text-decoration: underline;\
+}\
+.ace-ambiance .ace_invalid.ace_illegal {\
+color:#F8F8F8;\
+background-color: rgba(86, 45, 86, 0.75);\
+}\
+.ace-ambiance .ace_invalid,\
+.ace-ambiance .ace_deprecated {\
+text-decoration: underline;\
+font-style: italic;\
+color: #D2A8A1;\
+}\
+.ace-ambiance .ace_support {\
+color: #9B859D;\
+}\
+.ace-ambiance .ace_support.ace_function {\
+color: #DAD085;\
+}\
+.ace-ambiance .ace_function.ace_buildin {\
+color: #9b859d;\
+}\
+.ace-ambiance .ace_string {\
+color: #8f9d6a;\
+}\
+.ace-ambiance .ace_string.ace_regexp {\
+color: #DAD085;\
+}\
+.ace-ambiance .ace_comment {\
+font-style: italic;\
+color: #555;\
+}\
+.ace-ambiance .ace_comment.ace_doc {\
+}\
+.ace-ambiance .ace_comment.ace_doc.ace_tag {\
+color: #666;\
+font-style: normal;\
+}\
+.ace-ambiance .ace_definition,\
+.ace-ambiance .ace_type {\
+color: #aac6e3;\
+}\
+.ace-ambiance .ace_variable {\
+color: #9999cc;\
+}\
+.ace-ambiance .ace_variable.ace_language {\
+color: #9b859d;\
+}\
+.ace-ambiance .ace_xml-pe {\
+color: #494949;\
+}\
+.ace-ambiance .ace_gutter-layer,\
+.ace-ambiance .ace_text-layer {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC\");\
+}\
+.ace-ambiance .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+
+});
diff --git a/contexts/data/lib/ace/theme-chaos.js b/contexts/data/lib/ace/theme-chaos.js
new file mode 100644
index 0000000..73c477f
--- /dev/null
+++ b/contexts/data/lib/ace/theme-chaos.js
@@ -0,0 +1,167 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright 2011 Irakli Gozalishvili. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/chaos', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-chaos";
+exports.cssText = ".ace-chaos .ace_gutter {\
+background: #141414;\
+color: #595959;\
+border-right: 1px solid #282828;\
+}\
+.ace-chaos .ace_gutter-cell.ace_warning {\
+background-image: none;\
+background: #FC0;\
+border-left: none;\
+padding-left: 0;\
+color: #000;\
+}\
+.ace-chaos .ace_gutter-cell.ace_error {\
+background-position: -6px center;\
+background-image: none;\
+background: #F10;\
+border-left: none;\
+padding-left: 0;\
+color: #000;\
+}\
+.ace-chaos .ace_print-margin {\
+border-left: 1px solid #555;\
+right: 0;\
+background: #1D1D1D;\
+}\
+.ace-chaos .ace_scroller {\
+background-color: #161616;\
+}\
+.ace-chaos .ace_text-layer {\
+cursor: text;\
+color: #E6E1DC;\
+}\
+.ace-chaos .ace_cursor {\
+border-left: 2px solid #FFFFFF;\
+}\
+.ace-chaos .ace_cursor.ace_overwrite {\
+border-left: 0px;\
+border-bottom: 1px solid #FFFFFF;\
+}\
+.ace-chaos .ace_marker-layer .ace_selection {\
+background: #494836;\
+}\
+.ace-chaos .ace_marker-layer .ace_step {\
+background: rgb(198, 219, 174);\
+}\
+.ace-chaos .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #FCE94F;\
+}\
+.ace-chaos .ace_marker-layer .ace_active-line {\
+background: #333;\
+}\
+.ace-chaos .ace_gutter-active-line {\
+background-color: #222;\
+}\
+.ace-chaos .ace_invisible {\
+color: #404040;\
+}\
+.ace-chaos .ace_keyword {\
+color:#00698F;\
+}\
+.ace-chaos .ace_keyword.ace_operator {\
+color:#FF308F;\
+}\
+.ace-chaos .ace_constant {\
+color:#1EDAFB;\
+}\
+.ace-chaos .ace_constant.ace_language {\
+color:#FDC251;\
+}\
+.ace-chaos .ace_constant.ace_library {\
+color:#8DFF0A;\
+}\
+.ace-chaos .ace_constant.ace_numeric {\
+color:#58C554;\
+}\
+.ace-chaos .ace_invalid {\
+color:#FFFFFF;\
+background-color:#990000;\
+}\
+.ace-chaos .ace_invalid.ace_deprecated {\
+color:#FFFFFF;\
+background-color:#990000;\
+}\
+.ace-chaos .ace_support {\
+color: #999;\
+}\
+.ace-chaos .ace_support.ace_function {\
+color:#00AEEF;\
+}\
+.ace-chaos .ace_function {\
+color:#00AEEF;\
+}\
+.ace-chaos .ace_string {\
+color:#58C554;\
+}\
+.ace-chaos .ace_comment {\
+color:#555;\
+font-style:italic;\
+padding-bottom: 0px;\
+}\
+.ace-chaos .ace_variable {\
+color:#997744;\
+}\
+.ace-chaos .ace_meta.ace_tag {\
+color:#BE53E6;\
+}\
+.ace-chaos .ace_entity.ace_other.ace_attribute-name {\
+color:#FFFF89;\
+}\
+.ace-chaos .ace_markup.ace_underline {\
+text-decoration: underline;\
+}\
+.ace-chaos .ace_fold-widget {\
+text-align: center;\
+}\
+.ace-chaos .ace_fold-widget:hover {\
+color: #777;\
+}\
+.ace-chaos .ace_fold-widget.ace_start,\
+.ace-chaos .ace_fold-widget.ace_end,\
+.ace-chaos .ace_fold-widget.ace_closed{\
+background: none;\
+border: none;\
+box-shadow: none;\
+}\
+.ace-chaos .ace_fold-widget.ace_start:after {\
+content: '▾'\
+}\
+.ace-chaos .ace_fold-widget.ace_end:after {\
+content: '▴'\
+}\
+.ace-chaos .ace_fold-widget.ace_closed:after {\
+content: '‣'\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+
+}); \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-chrome-noconflict.js b/contexts/data/lib/ace/theme-chrome-noconflict.js
deleted file mode 100644
index 256863c..0000000
--- a/contexts/data/lib/ace/theme-chrome-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/chrome",["require","exports","module"],function(a,b,c){b.cssClass="ace-chrome",b.cssText=".ace-chrome .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-chrome .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-chrome .ace_gutter { width: 50px; background: #e8e8e8; color: #333; overflow : hidden;}.ace-chrome .ace_gutter-layer { width: 100%; text-align: right;}.ace-chrome .ace_gutter-layer .ace_gutter-cell { padding-right: 6px;}.ace-chrome .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-chrome .ace_text-layer { cursor: text;}.ace-chrome .ace_cursor { border-left: 2px solid black;}.ace-chrome .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-chrome .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-chrome .ace_line .ace_keyword { color: blue;}.ace-chrome .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-chrome .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-chrome .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-chrome .ace_line .ace_fold {}.ace-chrome .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-chrome .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_support.ace_type,.ace-chrome .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-chrome .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-chrome .ace_line .ace_string { color: #1919a6;}.ace-chrome .ace_line .ace_comment { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc.ace_tag { color: #236e24;}.ace-chrome .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-chrome .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-chrome .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-chrome .ace_markup.ace_markupine { text-decoration:underline;}.ace-chrome .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-chrome .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_meta.ace_tag { color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex { color: rgb(255, 0, 0)}.ace-chrome .ace_entity.ace_other.ace_attribute-name{ color: #994409;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-chrome-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-chrome-uncompressed-noconflict.js
deleted file mode 100644
index 7e4606a..0000000
--- a/contexts/data/lib/ace/theme-chrome-uncompressed-noconflict.js
+++ /dev/null
@@ -1,223 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/chrome', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.cssClass = "ace-chrome";
-exports.cssText = ".ace-chrome .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-chrome .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-chrome .ace_gutter {\
- width: 50px;\
- background: #e8e8e8;\
- color: #333;\
- overflow : hidden;\
-}\
-\
-.ace-chrome .ace_gutter-layer {\
- width: 100%;\
- text-align: right;\
-}\
-\
-.ace-chrome .ace_gutter-layer .ace_gutter-cell {\
- padding-right: 6px;\
-}\
-\
-.ace-chrome .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-chrome .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-chrome .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-chrome .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
- \
-.ace-chrome .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-chrome .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-chrome .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-chrome .ace_line .ace_constant.ace_language {\
- color: rgb(88, 92, 246);\
-}\
-\
-.ace-chrome .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-chrome .ace_line .ace_invalid {\
- background-color: rgb(153, 0, 0);\
- color: white;\
-}\
-\
-.ace-chrome .ace_line .ace_fold {\
-}\
-\
-.ace-chrome .ace_line .ace_support.ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-chrome .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-chrome .ace_line .ace_support.ace_type,\
-.ace-chrome .ace_line .ace_support.ace_class {\
- color: rgb(109, 121, 222);\
-}\
-\
-.ace-chrome .ace_line .ace_keyword.ace_operator {\
- color: rgb(104, 118, 135);\
-}\
-\
-.ace-chrome .ace_line .ace_string {\
- color: #1919a6;\
-}\
-\
-.ace-chrome .ace_line .ace_comment {\
- color: #236e24;\
-}\
-\
-.ace-chrome .ace_line .ace_comment.ace_doc {\
- color: #236e24;\
-}\
-\
-.ace-chrome .ace_line .ace_comment.ace_doc.ace_tag {\
- color: #236e24;\
-}\
-\
-.ace-chrome .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 205);\
-}\
-\
-.ace-chrome .ace_line .ace_variable {\
- color: rgb(49, 132, 149);\
-}\
-\
-.ace-chrome .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-chrome .ace_entity.ace_name.ace_function {\
- color: #0000A2;\
-}\
-\
-.ace-chrome .ace_markup.ace_markupine {\
- text-decoration:underline;\
-}\
-\
-.ace-chrome .ace_markup.ace_heading {\
- color: rgb(12, 7, 255);\
-}\
-\
-.ace-chrome .ace_markup.ace_list {\
- color:rgb(185, 6, 144);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.07);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-chrome .ace_meta.ace_tag {\
- color: rgb(147, 15, 128);\
-}\
-\
-.ace-chrome .ace_string.ace_regex {\
- color: rgb(255, 0, 0)\
-}\
-\
-.ace-chrome .ace_entity.ace_other.ace_attribute-name{\
- color: #994409;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-chrome-uncompressed.js b/contexts/data/lib/ace/theme-chrome-uncompressed.js
deleted file mode 100644
index 135324c..0000000
--- a/contexts/data/lib/ace/theme-chrome-uncompressed.js
+++ /dev/null
@@ -1,223 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/chrome', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.cssClass = "ace-chrome";
-exports.cssText = ".ace-chrome .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-chrome .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-chrome .ace_gutter {\
- width: 50px;\
- background: #e8e8e8;\
- color: #333;\
- overflow : hidden;\
-}\
-\
-.ace-chrome .ace_gutter-layer {\
- width: 100%;\
- text-align: right;\
-}\
-\
-.ace-chrome .ace_gutter-layer .ace_gutter-cell {\
- padding-right: 6px;\
-}\
-\
-.ace-chrome .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-chrome .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-chrome .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-chrome .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
- \
-.ace-chrome .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-chrome .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-chrome .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-chrome .ace_line .ace_constant.ace_language {\
- color: rgb(88, 92, 246);\
-}\
-\
-.ace-chrome .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-chrome .ace_line .ace_invalid {\
- background-color: rgb(153, 0, 0);\
- color: white;\
-}\
-\
-.ace-chrome .ace_line .ace_fold {\
-}\
-\
-.ace-chrome .ace_line .ace_support.ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-chrome .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-chrome .ace_line .ace_support.ace_type,\
-.ace-chrome .ace_line .ace_support.ace_class {\
- color: rgb(109, 121, 222);\
-}\
-\
-.ace-chrome .ace_line .ace_keyword.ace_operator {\
- color: rgb(104, 118, 135);\
-}\
-\
-.ace-chrome .ace_line .ace_string {\
- color: #1919a6;\
-}\
-\
-.ace-chrome .ace_line .ace_comment {\
- color: #236e24;\
-}\
-\
-.ace-chrome .ace_line .ace_comment.ace_doc {\
- color: #236e24;\
-}\
-\
-.ace-chrome .ace_line .ace_comment.ace_doc.ace_tag {\
- color: #236e24;\
-}\
-\
-.ace-chrome .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 205);\
-}\
-\
-.ace-chrome .ace_line .ace_variable {\
- color: rgb(49, 132, 149);\
-}\
-\
-.ace-chrome .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-chrome .ace_entity.ace_name.ace_function {\
- color: #0000A2;\
-}\
-\
-.ace-chrome .ace_markup.ace_markupine {\
- text-decoration:underline;\
-}\
-\
-.ace-chrome .ace_markup.ace_heading {\
- color: rgb(12, 7, 255);\
-}\
-\
-.ace-chrome .ace_markup.ace_list {\
- color:rgb(185, 6, 144);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.07);\
-}\
-\
-.ace-chrome .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-chrome .ace_meta.ace_tag {\
- color: rgb(147, 15, 128);\
-}\
-\
-.ace-chrome .ace_string.ace_regex {\
- color: rgb(255, 0, 0)\
-}\
-\
-.ace-chrome .ace_entity.ace_other.ace_attribute-name{\
- color: #994409;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-chrome.js b/contexts/data/lib/ace/theme-chrome.js
index 2e26264..94930a8 100644
--- a/contexts/data/lib/ace/theme-chrome.js
+++ b/contexts/data/lib/ace/theme-chrome.js
@@ -1 +1,161 @@
-define("ace/theme/chrome",["require","exports","module"],function(a,b,c){b.cssClass="ace-chrome",b.cssText=".ace-chrome .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-chrome .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-chrome .ace_gutter { width: 50px; background: #e8e8e8; color: #333; overflow : hidden;}.ace-chrome .ace_gutter-layer { width: 100%; text-align: right;}.ace-chrome .ace_gutter-layer .ace_gutter-cell { padding-right: 6px;}.ace-chrome .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-chrome .ace_text-layer { cursor: text;}.ace-chrome .ace_cursor { border-left: 2px solid black;}.ace-chrome .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-chrome .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-chrome .ace_line .ace_keyword { color: blue;}.ace-chrome .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-chrome .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-chrome .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-chrome .ace_line .ace_fold {}.ace-chrome .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-chrome .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_support.ace_type,.ace-chrome .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-chrome .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-chrome .ace_line .ace_string { color: #1919a6;}.ace-chrome .ace_line .ace_comment { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc.ace_tag { color: #236e24;}.ace-chrome .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-chrome .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-chrome .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-chrome .ace_markup.ace_markupine { text-decoration:underline;}.ace-chrome .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-chrome .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_meta.ace_tag { color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex { color: rgb(255, 0, 0)}.ace-chrome .ace_entity.ace_other.ace_attribute-name{ color: #994409;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/chrome', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-chrome";
+exports.cssText = ".ace-chrome .ace_gutter {\
+background: #ebebeb;\
+color: #333;\
+overflow : hidden;\
+}\
+.ace-chrome .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-chrome .ace_scroller {\
+background-color: #FFFFFF;\
+}\
+.ace-chrome .ace_cursor {\
+border-left: 2px solid black;\
+}\
+.ace-chrome .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid black;\
+}\
+.ace-chrome .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-chrome .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-chrome .ace_constant.ace_language {\
+color: rgb(88, 92, 246);\
+}\
+.ace-chrome .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-chrome .ace_invalid {\
+background-color: rgb(153, 0, 0);\
+color: white;\
+}\
+.ace-chrome .ace_fold {\
+}\
+.ace-chrome .ace_support.ace_function {\
+color: rgb(60, 76, 114);\
+}\
+.ace-chrome .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-chrome .ace_support.ace_type,\
+.ace-chrome .ace_support.ace_class\
+.ace-chrome .ace_support.ace_other {\
+color: rgb(109, 121, 222);\
+}\
+.ace-chrome .ace_variable.ace_parameter {\
+font-style:italic;\
+color:#FD971F;\
+}\
+.ace-chrome .ace_keyword.ace_operator {\
+color: rgb(104, 118, 135);\
+}\
+.ace-chrome .ace_comment {\
+color: #236e24;\
+}\
+.ace-chrome .ace_comment.ace_doc {\
+color: #236e24;\
+}\
+.ace-chrome .ace_comment.ace_doc.ace_tag {\
+color: #236e24;\
+}\
+.ace-chrome .ace_constant.ace_numeric {\
+color: rgb(0, 0, 205);\
+}\
+.ace-chrome .ace_variable {\
+color: rgb(49, 132, 149);\
+}\
+.ace-chrome .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-chrome .ace_entity.ace_name.ace_function {\
+color: #0000A2;\
+}\
+.ace-chrome .ace_markup.ace_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-chrome .ace_markup.ace_list {\
+color:rgb(185, 6, 144);\
+}\
+.ace-chrome .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-chrome .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-chrome .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-chrome .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-chrome .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.07);\
+}\
+.ace-chrome .ace_gutter-active-line {\
+background-color : #dcdcdc;\
+}\
+.ace-chrome .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-chrome .ace_storage,\
+.ace-chrome .ace_keyword,\
+.ace-chrome .ace_meta.ace_tag {\
+color: rgb(147, 15, 128);\
+}\
+.ace-chrome .ace_string.ace_regex {\
+color: rgb(255, 0, 0)\
+}\
+.ace-chrome .ace_string {\
+color: #1A1AA6;\
+}\
+.ace-chrome .ace_entity.ace_other.ace_attribute-name {\
+color: #994409;\
+}\
+.ace-chrome .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-clouds-noconflict.js b/contexts/data/lib/ace/theme-clouds-noconflict.js
deleted file mode 100644
index e4aec13..0000000
--- a/contexts/data/lib/ace/theme-clouds-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/clouds",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-clouds",b.cssText=".ace-clouds .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-clouds .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-clouds .ace_gutter { background: #e8e8e8; color: #333;}.ace-clouds .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-clouds .ace_scroller { background-color: #FFFFFF;}.ace-clouds .ace_text-layer { cursor: text; color: #000000;}.ace-clouds .ace_cursor { border-left: 2px solid #000000;}.ace-clouds .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #000000;} .ace-clouds .ace_marker-layer .ace_selection { background: #BDD5FC;}.ace-clouds .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-clouds .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #BFBFBF;}.ace-clouds .ace_marker-layer .ace_active_line { background: #FFFBD1;}.ace-clouds .ace_marker-layer .ace_selected_word { border: 1px solid #BDD5FC;} .ace-clouds .ace_invisible { color: #BFBFBF;}.ace-clouds .ace_keyword { color:#AF956F;}.ace-clouds .ace_keyword.ace_operator { color:#484848;}.ace-clouds .ace_constant.ace_language { color:#39946A;}.ace-clouds .ace_constant.ace_numeric { color:#46A609;}.ace-clouds .ace_invalid { background-color:#FF002A;}.ace-clouds .ace_fold { background-color: #AF956F; border-color: #000000;}.ace-clouds .ace_support.ace_function { color:#C52727;}.ace-clouds .ace_string { color:#5D90CD;}.ace-clouds .ace_comment { color:#BCC8BA;}.ace-clouds .ace_entity.ace_other.ace_attribute-name { color:#606060;}.ace-clouds .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-clouds-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-clouds-uncompressed-noconflict.js
deleted file mode 100644
index ddb877a..0000000
--- a/contexts/data/lib/ace/theme-clouds-uncompressed-noconflict.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/clouds', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-clouds";
-exports.cssText = "\
-.ace-clouds .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-clouds .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-clouds .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-clouds .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-clouds .ace_scroller {\
- background-color: #FFFFFF;\
-}\
-\
-.ace-clouds .ace_text-layer {\
- cursor: text;\
- color: #000000;\
-}\
-\
-.ace-clouds .ace_cursor {\
- border-left: 2px solid #000000;\
-}\
-\
-.ace-clouds .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #000000;\
-}\
- \
-.ace-clouds .ace_marker-layer .ace_selection {\
- background: #BDD5FC;\
-}\
-\
-.ace-clouds .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-clouds .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #BFBFBF;\
-}\
-\
-.ace-clouds .ace_marker-layer .ace_active_line {\
- background: #FFFBD1;\
-}\
-\
-.ace-clouds .ace_marker-layer .ace_selected_word {\
- border: 1px solid #BDD5FC;\
-}\
- \
-.ace-clouds .ace_invisible {\
- color: #BFBFBF;\
-}\
-\
-.ace-clouds .ace_keyword {\
- color:#AF956F;\
-}\
-\
-.ace-clouds .ace_keyword.ace_operator {\
- color:#484848;\
-}\
-\
-.ace-clouds .ace_constant.ace_language {\
- color:#39946A;\
-}\
-\
-.ace-clouds .ace_constant.ace_numeric {\
- color:#46A609;\
-}\
-\
-.ace-clouds .ace_invalid {\
- background-color:#FF002A;\
-}\
-\
-.ace-clouds .ace_fold {\
- background-color: #AF956F;\
- border-color: #000000;\
-}\
-\
-.ace-clouds .ace_support.ace_function {\
- color:#C52727;\
-}\
-\
-.ace-clouds .ace_string {\
- color:#5D90CD;\
-}\
-\
-.ace-clouds .ace_comment {\
- color:#BCC8BA;\
-}\
-\
-.ace-clouds .ace_entity.ace_other.ace_attribute-name {\
- color:#606060;\
-}\
-\
-.ace-clouds .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-clouds-uncompressed.js b/contexts/data/lib/ace/theme-clouds-uncompressed.js
deleted file mode 100644
index 0c04451..0000000
--- a/contexts/data/lib/ace/theme-clouds-uncompressed.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/clouds', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-clouds";
-exports.cssText = "\
-.ace-clouds .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-clouds .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-clouds .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-clouds .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-clouds .ace_scroller {\
- background-color: #FFFFFF;\
-}\
-\
-.ace-clouds .ace_text-layer {\
- cursor: text;\
- color: #000000;\
-}\
-\
-.ace-clouds .ace_cursor {\
- border-left: 2px solid #000000;\
-}\
-\
-.ace-clouds .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #000000;\
-}\
- \
-.ace-clouds .ace_marker-layer .ace_selection {\
- background: #BDD5FC;\
-}\
-\
-.ace-clouds .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-clouds .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #BFBFBF;\
-}\
-\
-.ace-clouds .ace_marker-layer .ace_active_line {\
- background: #FFFBD1;\
-}\
-\
-.ace-clouds .ace_marker-layer .ace_selected_word {\
- border: 1px solid #BDD5FC;\
-}\
- \
-.ace-clouds .ace_invisible {\
- color: #BFBFBF;\
-}\
-\
-.ace-clouds .ace_keyword {\
- color:#AF956F;\
-}\
-\
-.ace-clouds .ace_keyword.ace_operator {\
- color:#484848;\
-}\
-\
-.ace-clouds .ace_constant.ace_language {\
- color:#39946A;\
-}\
-\
-.ace-clouds .ace_constant.ace_numeric {\
- color:#46A609;\
-}\
-\
-.ace-clouds .ace_invalid {\
- background-color:#FF002A;\
-}\
-\
-.ace-clouds .ace_fold {\
- background-color: #AF956F;\
- border-color: #000000;\
-}\
-\
-.ace-clouds .ace_support.ace_function {\
- color:#C52727;\
-}\
-\
-.ace-clouds .ace_string {\
- color:#5D90CD;\
-}\
-\
-.ace-clouds .ace_comment {\
- color:#BCC8BA;\
-}\
-\
-.ace-clouds .ace_entity.ace_other.ace_attribute-name {\
- color:#606060;\
-}\
-\
-.ace-clouds .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-clouds.js b/contexts/data/lib/ace/theme-clouds.js
index 78a1d5b..b9ed60f 100644
--- a/contexts/data/lib/ace/theme-clouds.js
+++ b/contexts/data/lib/ace/theme-clouds.js
@@ -1 +1,135 @@
-define("ace/theme/clouds",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-clouds",b.cssText=".ace-clouds .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-clouds .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-clouds .ace_gutter { background: #e8e8e8; color: #333;}.ace-clouds .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-clouds .ace_scroller { background-color: #FFFFFF;}.ace-clouds .ace_text-layer { cursor: text; color: #000000;}.ace-clouds .ace_cursor { border-left: 2px solid #000000;}.ace-clouds .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #000000;} .ace-clouds .ace_marker-layer .ace_selection { background: #BDD5FC;}.ace-clouds .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-clouds .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #BFBFBF;}.ace-clouds .ace_marker-layer .ace_active_line { background: #FFFBD1;}.ace-clouds .ace_marker-layer .ace_selected_word { border: 1px solid #BDD5FC;} .ace-clouds .ace_invisible { color: #BFBFBF;}.ace-clouds .ace_keyword { color:#AF956F;}.ace-clouds .ace_keyword.ace_operator { color:#484848;}.ace-clouds .ace_constant.ace_language { color:#39946A;}.ace-clouds .ace_constant.ace_numeric { color:#46A609;}.ace-clouds .ace_invalid { background-color:#FF002A;}.ace-clouds .ace_fold { background-color: #AF956F; border-color: #000000;}.ace-clouds .ace_support.ace_function { color:#C52727;}.ace-clouds .ace_string { color:#5D90CD;}.ace-clouds .ace_comment { color:#BCC8BA;}.ace-clouds .ace_entity.ace_other.ace_attribute-name { color:#606060;}.ace-clouds .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/clouds', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-clouds";
+exports.cssText = ".ace-clouds .ace_gutter {\
+background: #ebebeb;\
+color: #333\
+}\
+.ace-clouds .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8\
+}\
+.ace-clouds .ace_scroller {\
+background-color: #FFFFFF\
+}\
+.ace-clouds .ace_text-layer {\
+color: #000000\
+}\
+.ace-clouds .ace_cursor {\
+border-left: 2px solid #000000\
+}\
+.ace-clouds .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #000000\
+}\
+.ace-clouds .ace_marker-layer .ace_selection {\
+background: #BDD5FC\
+}\
+.ace-clouds.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #FFFFFF;\
+border-radius: 2px\
+}\
+.ace-clouds .ace_marker-layer .ace_step {\
+background: rgb(255, 255, 0)\
+}\
+.ace-clouds .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #BFBFBF\
+}\
+.ace-clouds .ace_marker-layer .ace_active-line {\
+background: #FFFBD1\
+}\
+.ace-clouds .ace_gutter-active-line {\
+background-color : #dcdcdc\
+}\
+.ace-clouds .ace_marker-layer .ace_selected-word {\
+border: 1px solid #BDD5FC\
+}\
+.ace-clouds .ace_invisible {\
+color: #BFBFBF\
+}\
+.ace-clouds .ace_keyword,\
+.ace-clouds .ace_meta,\
+.ace-clouds .ace_support.ace_constant.ace_property-value {\
+color: #AF956F\
+}\
+.ace-clouds .ace_keyword.ace_operator {\
+color: #484848\
+}\
+.ace-clouds .ace_keyword.ace_other.ace_unit {\
+color: #96DC5F\
+}\
+.ace-clouds .ace_constant.ace_language {\
+color: #39946A\
+}\
+.ace-clouds .ace_constant.ace_numeric {\
+color: #46A609\
+}\
+.ace-clouds .ace_constant.ace_character.ace_entity {\
+color: #BF78CC\
+}\
+.ace-clouds .ace_invalid {\
+background-color: #FF002A\
+}\
+.ace-clouds .ace_fold {\
+background-color: #AF956F;\
+border-color: #000000\
+}\
+.ace-clouds .ace_storage,\
+.ace-clouds .ace_support.ace_class,\
+.ace-clouds .ace_support.ace_function,\
+.ace-clouds .ace_support.ace_other,\
+.ace-clouds .ace_support.ace_type {\
+color: #C52727\
+}\
+.ace-clouds .ace_string {\
+color: #5D90CD\
+}\
+.ace-clouds .ace_comment {\
+color: #BCC8BA\
+}\
+.ace-clouds .ace_entity.ace_name.ace_tag,\
+.ace-clouds .ace_entity.ace_other.ace_attribute-name {\
+color: #606060\
+}\
+.ace-clouds .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-clouds .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-clouds_midnight-noconflict.js b/contexts/data/lib/ace/theme-clouds_midnight-noconflict.js
deleted file mode 100644
index 42525b5..0000000
--- a/contexts/data/lib/ace/theme-clouds_midnight-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/clouds_midnight",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-clouds-midnight",b.cssText=".ace-clouds-midnight .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-clouds-midnight .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-clouds-midnight .ace_gutter { background: #e8e8e8; color: #333;}.ace-clouds-midnight .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-clouds-midnight .ace_scroller { background-color: #191919;}.ace-clouds-midnight .ace_text-layer { cursor: text; color: #929292;}.ace-clouds-midnight .ace_cursor { border-left: 2px solid #7DA5DC;}.ace-clouds-midnight .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #7DA5DC;} .ace-clouds-midnight .ace_marker-layer .ace_selection { background: #000000;}.ace-clouds-midnight .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-clouds-midnight .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #BFBFBF;}.ace-clouds-midnight .ace_marker-layer .ace_active_line { background: rgba(215, 215, 215, 0.031);}.ace-clouds-midnight .ace_marker-layer .ace_selected_word { border: 1px solid #000000;} .ace-clouds-midnight .ace_invisible { color: #BFBFBF;}.ace-clouds-midnight .ace_keyword { color:#927C5D;}.ace-clouds-midnight .ace_keyword.ace_operator { color:#4B4B4B;}.ace-clouds-midnight .ace_constant.ace_language { color:#39946A;}.ace-clouds-midnight .ace_constant.ace_numeric { color:#46A609;}.ace-clouds-midnight .ace_invalid { color:#FFFFFF;background-color:#E92E2E;}.ace-clouds-midnight .ace_fold { background-color: #927C5D; border-color: #929292;}.ace-clouds-midnight .ace_support.ace_function { color:#E92E2E;}.ace-clouds-midnight .ace_string { color:#5D90CD;}.ace-clouds-midnight .ace_comment { color:#3C403B;}.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name { color:#606060;}.ace-clouds-midnight .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-clouds_midnight-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-clouds_midnight-uncompressed-noconflict.js
deleted file mode 100644
index aba6d3b..0000000
--- a/contexts/data/lib/ace/theme-clouds_midnight-uncompressed-noconflict.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/clouds_midnight', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-clouds-midnight";
-exports.cssText = "\
-.ace-clouds-midnight .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-clouds-midnight .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-clouds-midnight .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-clouds-midnight .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-clouds-midnight .ace_scroller {\
- background-color: #191919;\
-}\
-\
-.ace-clouds-midnight .ace_text-layer {\
- cursor: text;\
- color: #929292;\
-}\
-\
-.ace-clouds-midnight .ace_cursor {\
- border-left: 2px solid #7DA5DC;\
-}\
-\
-.ace-clouds-midnight .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #7DA5DC;\
-}\
- \
-.ace-clouds-midnight .ace_marker-layer .ace_selection {\
- background: #000000;\
-}\
-\
-.ace-clouds-midnight .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-clouds-midnight .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #BFBFBF;\
-}\
-\
-.ace-clouds-midnight .ace_marker-layer .ace_active_line {\
- background: rgba(215, 215, 215, 0.031);\
-}\
-\
-.ace-clouds-midnight .ace_marker-layer .ace_selected_word {\
- border: 1px solid #000000;\
-}\
- \
-.ace-clouds-midnight .ace_invisible {\
- color: #BFBFBF;\
-}\
-\
-.ace-clouds-midnight .ace_keyword {\
- color:#927C5D;\
-}\
-\
-.ace-clouds-midnight .ace_keyword.ace_operator {\
- color:#4B4B4B;\
-}\
-\
-.ace-clouds-midnight .ace_constant.ace_language {\
- color:#39946A;\
-}\
-\
-.ace-clouds-midnight .ace_constant.ace_numeric {\
- color:#46A609;\
-}\
-\
-.ace-clouds-midnight .ace_invalid {\
- color:#FFFFFF;\
-background-color:#E92E2E;\
-}\
-\
-.ace-clouds-midnight .ace_fold {\
- background-color: #927C5D;\
- border-color: #929292;\
-}\
-\
-.ace-clouds-midnight .ace_support.ace_function {\
- color:#E92E2E;\
-}\
-\
-.ace-clouds-midnight .ace_string {\
- color:#5D90CD;\
-}\
-\
-.ace-clouds-midnight .ace_comment {\
- color:#3C403B;\
-}\
-\
-.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\
- color:#606060;\
-}\
-\
-.ace-clouds-midnight .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-clouds_midnight-uncompressed.js b/contexts/data/lib/ace/theme-clouds_midnight-uncompressed.js
deleted file mode 100644
index 23ca2a9..0000000
--- a/contexts/data/lib/ace/theme-clouds_midnight-uncompressed.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/clouds_midnight', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-clouds-midnight";
-exports.cssText = "\
-.ace-clouds-midnight .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-clouds-midnight .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-clouds-midnight .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-clouds-midnight .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-clouds-midnight .ace_scroller {\
- background-color: #191919;\
-}\
-\
-.ace-clouds-midnight .ace_text-layer {\
- cursor: text;\
- color: #929292;\
-}\
-\
-.ace-clouds-midnight .ace_cursor {\
- border-left: 2px solid #7DA5DC;\
-}\
-\
-.ace-clouds-midnight .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #7DA5DC;\
-}\
- \
-.ace-clouds-midnight .ace_marker-layer .ace_selection {\
- background: #000000;\
-}\
-\
-.ace-clouds-midnight .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-clouds-midnight .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #BFBFBF;\
-}\
-\
-.ace-clouds-midnight .ace_marker-layer .ace_active_line {\
- background: rgba(215, 215, 215, 0.031);\
-}\
-\
-.ace-clouds-midnight .ace_marker-layer .ace_selected_word {\
- border: 1px solid #000000;\
-}\
- \
-.ace-clouds-midnight .ace_invisible {\
- color: #BFBFBF;\
-}\
-\
-.ace-clouds-midnight .ace_keyword {\
- color:#927C5D;\
-}\
-\
-.ace-clouds-midnight .ace_keyword.ace_operator {\
- color:#4B4B4B;\
-}\
-\
-.ace-clouds-midnight .ace_constant.ace_language {\
- color:#39946A;\
-}\
-\
-.ace-clouds-midnight .ace_constant.ace_numeric {\
- color:#46A609;\
-}\
-\
-.ace-clouds-midnight .ace_invalid {\
- color:#FFFFFF;\
-background-color:#E92E2E;\
-}\
-\
-.ace-clouds-midnight .ace_fold {\
- background-color: #927C5D;\
- border-color: #929292;\
-}\
-\
-.ace-clouds-midnight .ace_support.ace_function {\
- color:#E92E2E;\
-}\
-\
-.ace-clouds-midnight .ace_string {\
- color:#5D90CD;\
-}\
-\
-.ace-clouds-midnight .ace_comment {\
- color:#3C403B;\
-}\
-\
-.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\
- color:#606060;\
-}\
-\
-.ace-clouds-midnight .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-clouds_midnight.js b/contexts/data/lib/ace/theme-clouds_midnight.js
index f8d7939..6f5d95b 100644
--- a/contexts/data/lib/ace/theme-clouds_midnight.js
+++ b/contexts/data/lib/ace/theme-clouds_midnight.js
@@ -1 +1,136 @@
-define("ace/theme/clouds_midnight",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-clouds-midnight",b.cssText=".ace-clouds-midnight .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-clouds-midnight .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-clouds-midnight .ace_gutter { background: #e8e8e8; color: #333;}.ace-clouds-midnight .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-clouds-midnight .ace_scroller { background-color: #191919;}.ace-clouds-midnight .ace_text-layer { cursor: text; color: #929292;}.ace-clouds-midnight .ace_cursor { border-left: 2px solid #7DA5DC;}.ace-clouds-midnight .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #7DA5DC;} .ace-clouds-midnight .ace_marker-layer .ace_selection { background: #000000;}.ace-clouds-midnight .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-clouds-midnight .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #BFBFBF;}.ace-clouds-midnight .ace_marker-layer .ace_active_line { background: rgba(215, 215, 215, 0.031);}.ace-clouds-midnight .ace_marker-layer .ace_selected_word { border: 1px solid #000000;} .ace-clouds-midnight .ace_invisible { color: #BFBFBF;}.ace-clouds-midnight .ace_keyword { color:#927C5D;}.ace-clouds-midnight .ace_keyword.ace_operator { color:#4B4B4B;}.ace-clouds-midnight .ace_constant.ace_language { color:#39946A;}.ace-clouds-midnight .ace_constant.ace_numeric { color:#46A609;}.ace-clouds-midnight .ace_invalid { color:#FFFFFF;background-color:#E92E2E;}.ace-clouds-midnight .ace_fold { background-color: #927C5D; border-color: #929292;}.ace-clouds-midnight .ace_support.ace_function { color:#E92E2E;}.ace-clouds-midnight .ace_string { color:#5D90CD;}.ace-clouds-midnight .ace_comment { color:#3C403B;}.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name { color:#606060;}.ace-clouds-midnight .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/clouds_midnight', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-clouds-midnight";
+exports.cssText = ".ace-clouds-midnight .ace_gutter {\
+background: #232323;\
+color: #929292\
+}\
+.ace-clouds-midnight .ace_print-margin {\
+width: 1px;\
+background: #232323\
+}\
+.ace-clouds-midnight .ace_scroller {\
+background-color: #191919\
+}\
+.ace-clouds-midnight .ace_text-layer {\
+color: #929292\
+}\
+.ace-clouds-midnight .ace_cursor {\
+border-left: 2px solid #7DA5DC\
+}\
+.ace-clouds-midnight .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #7DA5DC\
+}\
+.ace-clouds-midnight .ace_marker-layer .ace_selection {\
+background: #000000\
+}\
+.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #191919;\
+border-radius: 2px\
+}\
+.ace-clouds-midnight .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-clouds-midnight .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #BFBFBF\
+}\
+.ace-clouds-midnight .ace_marker-layer .ace_active-line {\
+background: rgba(215, 215, 215, 0.031)\
+}\
+.ace-clouds-midnight .ace_gutter-active-line {\
+background-color: rgba(215, 215, 215, 0.031)\
+}\
+.ace-clouds-midnight .ace_marker-layer .ace_selected-word {\
+border: 1px solid #000000\
+}\
+.ace-clouds-midnight .ace_invisible {\
+color: #BFBFBF\
+}\
+.ace-clouds-midnight .ace_keyword,\
+.ace-clouds-midnight .ace_meta,\
+.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {\
+color: #927C5D\
+}\
+.ace-clouds-midnight .ace_keyword.ace_operator {\
+color: #4B4B4B\
+}\
+.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {\
+color: #366F1A\
+}\
+.ace-clouds-midnight .ace_constant.ace_language {\
+color: #39946A\
+}\
+.ace-clouds-midnight .ace_constant.ace_numeric {\
+color: #46A609\
+}\
+.ace-clouds-midnight .ace_constant.ace_character.ace_entity {\
+color: #A165AC\
+}\
+.ace-clouds-midnight .ace_invalid {\
+color: #FFFFFF;\
+background-color: #E92E2E\
+}\
+.ace-clouds-midnight .ace_fold {\
+background-color: #927C5D;\
+border-color: #929292\
+}\
+.ace-clouds-midnight .ace_storage,\
+.ace-clouds-midnight .ace_support.ace_class,\
+.ace-clouds-midnight .ace_support.ace_function,\
+.ace-clouds-midnight .ace_support.ace_other,\
+.ace-clouds-midnight .ace_support.ace_type {\
+color: #E92E2E\
+}\
+.ace-clouds-midnight .ace_string {\
+color: #5D90CD\
+}\
+.ace-clouds-midnight .ace_comment {\
+color: #3C403B\
+}\
+.ace-clouds-midnight .ace_entity.ace_name.ace_tag,\
+.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\
+color: #606060\
+}\
+.ace-clouds-midnight .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-clouds-midnight .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQlJT8z1BeXv4fAA2KA6+h9Z+2AAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-cobalt-noconflict.js b/contexts/data/lib/ace/theme-cobalt-noconflict.js
deleted file mode 100644
index d34053b..0000000
--- a/contexts/data/lib/ace/theme-cobalt-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/cobalt",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-cobalt",b.cssText=".ace-cobalt .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-cobalt .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-cobalt .ace_gutter { background: #e8e8e8; color: #333;}.ace-cobalt .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-cobalt .ace_scroller { background-color: #002240;}.ace-cobalt .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-cobalt .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-cobalt .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-cobalt .ace_marker-layer .ace_selection { background: rgba(179, 101, 57, 0.75);}.ace-cobalt .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-cobalt .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.15);}.ace-cobalt .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.35);}.ace-cobalt .ace_marker-layer .ace_selected_word { border: 1px solid rgba(179, 101, 57, 0.75);} .ace-cobalt .ace_invisible { color: rgba(255, 255, 255, 0.15);}.ace-cobalt .ace_keyword { color:#FF9D00;}.ace-cobalt .ace_constant { color:#FF628C;}.ace-cobalt .ace_invalid { color:#F8F8F8;background-color:#800F00;}.ace-cobalt .ace_support { color:#80FFBB;}.ace-cobalt .ace_fold { background-color: #FF9D00; border-color: #FFFFFF;}.ace-cobalt .ace_support.ace_function { color:#FFB054;}.ace-cobalt .ace_string.ace_regexp { color:#80FFC2;}.ace-cobalt .ace_comment { font-style:italic;color:#0088FF;}.ace-cobalt .ace_variable { color:#CCCCCC;}.ace-cobalt .ace_variable.ace_language { color:#FF80E1;}.ace-cobalt .ace_meta.ace_tag { color:#9EFFFF;}.ace-cobalt .ace_markup.ace_underline { text-decoration:underline;}.ace-cobalt .ace_markup.ace_heading { color:#C8E4FD;background-color:#001221;}.ace-cobalt .ace_markup.ace_list { background-color:#130D26;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-cobalt-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-cobalt-uncompressed-noconflict.js
deleted file mode 100644
index c1fe925..0000000
--- a/contexts/data/lib/ace/theme-cobalt-uncompressed-noconflict.js
+++ /dev/null
@@ -1,176 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/cobalt', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-cobalt";
-exports.cssText = "\
-.ace-cobalt .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-cobalt .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-cobalt .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-cobalt .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-cobalt .ace_scroller {\
- background-color: #002240;\
-}\
-\
-.ace-cobalt .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-cobalt .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-cobalt .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-cobalt .ace_marker-layer .ace_selection {\
- background: rgba(179, 101, 57, 0.75);\
-}\
-\
-.ace-cobalt .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-cobalt .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(255, 255, 255, 0.15);\
-}\
-\
-.ace-cobalt .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.35);\
-}\
-\
-.ace-cobalt .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(179, 101, 57, 0.75);\
-}\
- \
-.ace-cobalt .ace_invisible {\
- color: rgba(255, 255, 255, 0.15);\
-}\
-\
-.ace-cobalt .ace_keyword {\
- color:#FF9D00;\
-}\
-\
-.ace-cobalt .ace_constant {\
- color:#FF628C;\
-}\
-\
-.ace-cobalt .ace_invalid {\
- color:#F8F8F8;\
-background-color:#800F00;\
-}\
-\
-.ace-cobalt .ace_support {\
- color:#80FFBB;\
-}\
-\
-.ace-cobalt .ace_fold {\
- background-color: #FF9D00;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-cobalt .ace_support.ace_function {\
- color:#FFB054;\
-}\
-\
-.ace-cobalt .ace_string.ace_regexp {\
- color:#80FFC2;\
-}\
-\
-.ace-cobalt .ace_comment {\
- font-style:italic;\
-color:#0088FF;\
-}\
-\
-.ace-cobalt .ace_variable {\
- color:#CCCCCC;\
-}\
-\
-.ace-cobalt .ace_variable.ace_language {\
- color:#FF80E1;\
-}\
-\
-.ace-cobalt .ace_meta.ace_tag {\
- color:#9EFFFF;\
-}\
-\
-.ace-cobalt .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-cobalt .ace_markup.ace_heading {\
- color:#C8E4FD;\
-background-color:#001221;\
-}\
-\
-.ace-cobalt .ace_markup.ace_list {\
- background-color:#130D26;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-cobalt-uncompressed.js b/contexts/data/lib/ace/theme-cobalt-uncompressed.js
deleted file mode 100644
index 7ddec45..0000000
--- a/contexts/data/lib/ace/theme-cobalt-uncompressed.js
+++ /dev/null
@@ -1,176 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/cobalt', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-cobalt";
-exports.cssText = "\
-.ace-cobalt .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-cobalt .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-cobalt .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-cobalt .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-cobalt .ace_scroller {\
- background-color: #002240;\
-}\
-\
-.ace-cobalt .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-cobalt .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-cobalt .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-cobalt .ace_marker-layer .ace_selection {\
- background: rgba(179, 101, 57, 0.75);\
-}\
-\
-.ace-cobalt .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-cobalt .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(255, 255, 255, 0.15);\
-}\
-\
-.ace-cobalt .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.35);\
-}\
-\
-.ace-cobalt .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(179, 101, 57, 0.75);\
-}\
- \
-.ace-cobalt .ace_invisible {\
- color: rgba(255, 255, 255, 0.15);\
-}\
-\
-.ace-cobalt .ace_keyword {\
- color:#FF9D00;\
-}\
-\
-.ace-cobalt .ace_constant {\
- color:#FF628C;\
-}\
-\
-.ace-cobalt .ace_invalid {\
- color:#F8F8F8;\
-background-color:#800F00;\
-}\
-\
-.ace-cobalt .ace_support {\
- color:#80FFBB;\
-}\
-\
-.ace-cobalt .ace_fold {\
- background-color: #FF9D00;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-cobalt .ace_support.ace_function {\
- color:#FFB054;\
-}\
-\
-.ace-cobalt .ace_string.ace_regexp {\
- color:#80FFC2;\
-}\
-\
-.ace-cobalt .ace_comment {\
- font-style:italic;\
-color:#0088FF;\
-}\
-\
-.ace-cobalt .ace_variable {\
- color:#CCCCCC;\
-}\
-\
-.ace-cobalt .ace_variable.ace_language {\
- color:#FF80E1;\
-}\
-\
-.ace-cobalt .ace_meta.ace_tag {\
- color:#9EFFFF;\
-}\
-\
-.ace-cobalt .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-cobalt .ace_markup.ace_heading {\
- color:#C8E4FD;\
-background-color:#001221;\
-}\
-\
-.ace-cobalt .ace_markup.ace_list {\
- background-color:#130D26;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-cobalt.js b/contexts/data/lib/ace/theme-cobalt.js
index f73b450..d59b70a 100644
--- a/contexts/data/lib/ace/theme-cobalt.js
+++ b/contexts/data/lib/ace/theme-cobalt.js
@@ -1 +1,150 @@
-define("ace/theme/cobalt",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-cobalt",b.cssText=".ace-cobalt .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-cobalt .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-cobalt .ace_gutter { background: #e8e8e8; color: #333;}.ace-cobalt .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-cobalt .ace_scroller { background-color: #002240;}.ace-cobalt .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-cobalt .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-cobalt .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-cobalt .ace_marker-layer .ace_selection { background: rgba(179, 101, 57, 0.75);}.ace-cobalt .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-cobalt .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.15);}.ace-cobalt .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.35);}.ace-cobalt .ace_marker-layer .ace_selected_word { border: 1px solid rgba(179, 101, 57, 0.75);} .ace-cobalt .ace_invisible { color: rgba(255, 255, 255, 0.15);}.ace-cobalt .ace_keyword { color:#FF9D00;}.ace-cobalt .ace_constant { color:#FF628C;}.ace-cobalt .ace_invalid { color:#F8F8F8;background-color:#800F00;}.ace-cobalt .ace_support { color:#80FFBB;}.ace-cobalt .ace_fold { background-color: #FF9D00; border-color: #FFFFFF;}.ace-cobalt .ace_support.ace_function { color:#FFB054;}.ace-cobalt .ace_string.ace_regexp { color:#80FFC2;}.ace-cobalt .ace_comment { font-style:italic;color:#0088FF;}.ace-cobalt .ace_variable { color:#CCCCCC;}.ace-cobalt .ace_variable.ace_language { color:#FF80E1;}.ace-cobalt .ace_meta.ace_tag { color:#9EFFFF;}.ace-cobalt .ace_markup.ace_underline { text-decoration:underline;}.ace-cobalt .ace_markup.ace_heading { color:#C8E4FD;background-color:#001221;}.ace-cobalt .ace_markup.ace_list { background-color:#130D26;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/cobalt', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-cobalt";
+exports.cssText = ".ace-cobalt .ace_gutter {\
+background: #011e3a;\
+color: #fff\
+}\
+.ace-cobalt .ace_print-margin {\
+width: 1px;\
+background: #011e3a\
+}\
+.ace-cobalt .ace_scroller {\
+background-color: #002240\
+}\
+.ace-cobalt .ace_text-layer {\
+color: #FFFFFF\
+}\
+.ace-cobalt .ace_cursor {\
+border-left: 2px solid #FFFFFF\
+}\
+.ace-cobalt .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #FFFFFF\
+}\
+.ace-cobalt .ace_marker-layer .ace_selection {\
+background: rgba(179, 101, 57, 0.75)\
+}\
+.ace-cobalt.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #002240;\
+border-radius: 2px\
+}\
+.ace-cobalt .ace_marker-layer .ace_step {\
+background: rgb(127, 111, 19)\
+}\
+.ace-cobalt .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(255, 255, 255, 0.15)\
+}\
+.ace-cobalt .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.35)\
+}\
+.ace-cobalt .ace_gutter-active-line {\
+background-color: rgba(0, 0, 0, 0.35)\
+}\
+.ace-cobalt .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(179, 101, 57, 0.75)\
+}\
+.ace-cobalt .ace_invisible {\
+color: rgba(255, 255, 255, 0.15)\
+}\
+.ace-cobalt .ace_keyword,\
+.ace-cobalt .ace_meta {\
+color: #FF9D00\
+}\
+.ace-cobalt .ace_constant,\
+.ace-cobalt .ace_constant.ace_character,\
+.ace-cobalt .ace_constant.ace_character.ace_escape,\
+.ace-cobalt .ace_constant.ace_other {\
+color: #FF628C\
+}\
+.ace-cobalt .ace_invalid {\
+color: #F8F8F8;\
+background-color: #800F00\
+}\
+.ace-cobalt .ace_support {\
+color: #80FFBB\
+}\
+.ace-cobalt .ace_support.ace_constant {\
+color: #EB939A\
+}\
+.ace-cobalt .ace_fold {\
+background-color: #FF9D00;\
+border-color: #FFFFFF\
+}\
+.ace-cobalt .ace_support.ace_function {\
+color: #FFB054\
+}\
+.ace-cobalt .ace_storage {\
+color: #FFEE80\
+}\
+.ace-cobalt .ace_entity {\
+color: #FFDD00\
+}\
+.ace-cobalt .ace_string {\
+color: #3AD900\
+}\
+.ace-cobalt .ace_string.ace_regexp {\
+color: #80FFC2\
+}\
+.ace-cobalt .ace_comment {\
+font-style: italic;\
+color: #0088FF\
+}\
+.ace-cobalt .ace_variable {\
+color: #CCCCCC\
+}\
+.ace-cobalt .ace_variable.ace_language {\
+color: #FF80E1\
+}\
+.ace-cobalt .ace_meta.ace_tag {\
+color: #9EFFFF\
+}\
+.ace-cobalt .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-cobalt .ace_markup.ace_heading {\
+color: #C8E4FD;\
+background-color: #001221\
+}\
+.ace-cobalt .ace_markup.ace_list {\
+background-color: #130D26\
+}\
+.ace-cobalt .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgUHL4zzBz5sz/AA80BCzv+WXhAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-crimson_editor-noconflict.js b/contexts/data/lib/ace/theme-crimson_editor-noconflict.js
deleted file mode 100644
index 6bc3efa..0000000
--- a/contexts/data/lib/ace/theme-crimson_editor-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/crimson_editor",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssText=".ace-crimson-editor .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-crimson-editor .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-crimson-editor .ace_gutter { width: 50px; background: #e8e8e8; color: #333; overflow : hidden;}.ace-crimson-editor .ace_gutter-layer { width: 100%; text-align: right;}.ace-crimson-editor .ace_gutter-layer .ace_gutter-cell { padding-right: 6px;}.ace-crimson-editor .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-crimson-editor .ace_text-layer { cursor: text; color: rgb(64, 64, 64);}.ace-crimson-editor .ace_cursor { border-left: 2px solid black;}.ace-crimson-editor .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;}.ace-crimson-editor .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-crimson-editor .ace_line .ace_identifier { color: black;}.ace-crimson-editor .ace_line .ace_keyword { color: blue;}.ace-crimson-editor .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-crimson-editor .ace_line .ace_constant.ace_language { color: rgb(255, 156, 0);}.ace-crimson-editor .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-crimson-editor .ace_line .ace_invalid { text-decoration: line-through; color: rgb(224, 0, 0);}.ace-crimson-editor .ace_line .ace_fold {}.ace-crimson-editor .ace_line .ace_support.ace_function { color: rgb(192, 0, 0);}.ace-crimson-editor .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-crimson-editor .ace_line .ace_support.ace_type,.ace-crimson-editor .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-crimson-editor .ace_line .ace_keyword.ace_operator { color: rgb(49, 132, 149);}.ace-crimson-editor .ace_line .ace_string { color: rgb(128, 0, 128);}.ace-crimson-editor .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-crimson-editor .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-crimson-editor .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-crimson-editor .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 64);}.ace-crimson-editor .ace_line .ace_variable { color: rgb(0, 64, 128);}.ace-crimson-editor .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-crimson-editor .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-crimson-editor .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-crimson-editor .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-crimson-editor .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-crimson-editor .ace_marker-layer .ace_active_line { background: rgb(232, 242, 254);}.ace-crimson-editor .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-crimson-editor .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-crimson-editor .ace_string.ace_regex { color: rgb(192, 0, 192);}",b.cssClass="ace-crimson-editor";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-crimson_editor-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-crimson_editor-uncompressed-noconflict.js
deleted file mode 100644
index 8ccaead..0000000
--- a/contexts/data/lib/ace/theme-crimson_editor-uncompressed-noconflict.js
+++ /dev/null
@@ -1,208 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/crimson_editor', ['require', 'exports', 'module' ], function(require, exports, module) {
-exports.isDark = false;
-exports.cssText = ".ace-crimson-editor .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-crimson-editor .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-crimson-editor .ace_gutter {\
- width: 50px;\
- background: #e8e8e8;\
- color: #333;\
- overflow : hidden;\
-}\
-\
-.ace-crimson-editor .ace_gutter-layer {\
- width: 100%;\
- text-align: right;\
-}\
-\
-.ace-crimson-editor .ace_gutter-layer .ace_gutter-cell {\
- padding-right: 6px;\
-}\
-\
-.ace-crimson-editor .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-crimson-editor .ace_text-layer {\
- cursor: text;\
- color: rgb(64, 64, 64);\
-}\
-\
-.ace-crimson-editor .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-crimson-editor .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
-\
-.ace-crimson-editor .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_identifier {\
- color: black;\
-}\
-\
-.ace-crimson-editor .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-crimson-editor .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_constant.ace_language {\
- color: rgb(255, 156, 0);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_invalid {\
- text-decoration: line-through;\
- color: rgb(224, 0, 0);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_fold {\
-}\
-\
-.ace-crimson-editor .ace_line .ace_support.ace_function {\
- color: rgb(192, 0, 0);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_support.ace_type,\
-.ace-crimson-editor .ace_line .ace_support.ace_class {\
- color: rgb(109, 121, 222);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_keyword.ace_operator {\
- color: rgb(49, 132, 149);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_string {\
- color: rgb(128, 0, 128);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_comment {\
- color: rgb(76, 136, 107);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_comment.ace_doc {\
- color: rgb(0, 102, 255);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(128, 159, 191);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 64);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_variable {\
- color: rgb(0, 64, 128);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_active_line {\
- background: rgb(232, 242, 254);\
-}\
-\
-.ace-crimson-editor .ace_meta.ace_tag {\
- color:rgb(28, 2, 255);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-crimson-editor .ace_string.ace_regex {\
- color: rgb(192, 0, 192);\
-}";
-
-exports.cssClass = "ace-crimson-editor";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-crimson_editor-uncompressed.js b/contexts/data/lib/ace/theme-crimson_editor-uncompressed.js
deleted file mode 100644
index d52c4a5..0000000
--- a/contexts/data/lib/ace/theme-crimson_editor-uncompressed.js
+++ /dev/null
@@ -1,208 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/crimson_editor', ['require', 'exports', 'module' ], function(require, exports, module) {
-exports.isDark = false;
-exports.cssText = ".ace-crimson-editor .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-crimson-editor .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-crimson-editor .ace_gutter {\
- width: 50px;\
- background: #e8e8e8;\
- color: #333;\
- overflow : hidden;\
-}\
-\
-.ace-crimson-editor .ace_gutter-layer {\
- width: 100%;\
- text-align: right;\
-}\
-\
-.ace-crimson-editor .ace_gutter-layer .ace_gutter-cell {\
- padding-right: 6px;\
-}\
-\
-.ace-crimson-editor .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-crimson-editor .ace_text-layer {\
- cursor: text;\
- color: rgb(64, 64, 64);\
-}\
-\
-.ace-crimson-editor .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-crimson-editor .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
-\
-.ace-crimson-editor .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_identifier {\
- color: black;\
-}\
-\
-.ace-crimson-editor .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-crimson-editor .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_constant.ace_language {\
- color: rgb(255, 156, 0);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_invalid {\
- text-decoration: line-through;\
- color: rgb(224, 0, 0);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_fold {\
-}\
-\
-.ace-crimson-editor .ace_line .ace_support.ace_function {\
- color: rgb(192, 0, 0);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_support.ace_type,\
-.ace-crimson-editor .ace_line .ace_support.ace_class {\
- color: rgb(109, 121, 222);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_keyword.ace_operator {\
- color: rgb(49, 132, 149);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_string {\
- color: rgb(128, 0, 128);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_comment {\
- color: rgb(76, 136, 107);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_comment.ace_doc {\
- color: rgb(0, 102, 255);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(128, 159, 191);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 64);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_variable {\
- color: rgb(0, 64, 128);\
-}\
-\
-.ace-crimson-editor .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_active_line {\
- background: rgb(232, 242, 254);\
-}\
-\
-.ace-crimson-editor .ace_meta.ace_tag {\
- color:rgb(28, 2, 255);\
-}\
-\
-.ace-crimson-editor .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-crimson-editor .ace_string.ace_regex {\
- color: rgb(192, 0, 192);\
-}";
-
-exports.cssClass = "ace-crimson-editor";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-crimson_editor.js b/contexts/data/lib/ace/theme-crimson_editor.js
index e693929..8097806 100644
--- a/contexts/data/lib/ace/theme-crimson_editor.js
+++ b/contexts/data/lib/ace/theme-crimson_editor.js
@@ -1 +1,154 @@
-define("ace/theme/crimson_editor",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssText=".ace-crimson-editor .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-crimson-editor .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-crimson-editor .ace_gutter { width: 50px; background: #e8e8e8; color: #333; overflow : hidden;}.ace-crimson-editor .ace_gutter-layer { width: 100%; text-align: right;}.ace-crimson-editor .ace_gutter-layer .ace_gutter-cell { padding-right: 6px;}.ace-crimson-editor .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-crimson-editor .ace_text-layer { cursor: text; color: rgb(64, 64, 64);}.ace-crimson-editor .ace_cursor { border-left: 2px solid black;}.ace-crimson-editor .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;}.ace-crimson-editor .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-crimson-editor .ace_line .ace_identifier { color: black;}.ace-crimson-editor .ace_line .ace_keyword { color: blue;}.ace-crimson-editor .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-crimson-editor .ace_line .ace_constant.ace_language { color: rgb(255, 156, 0);}.ace-crimson-editor .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-crimson-editor .ace_line .ace_invalid { text-decoration: line-through; color: rgb(224, 0, 0);}.ace-crimson-editor .ace_line .ace_fold {}.ace-crimson-editor .ace_line .ace_support.ace_function { color: rgb(192, 0, 0);}.ace-crimson-editor .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-crimson-editor .ace_line .ace_support.ace_type,.ace-crimson-editor .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-crimson-editor .ace_line .ace_keyword.ace_operator { color: rgb(49, 132, 149);}.ace-crimson-editor .ace_line .ace_string { color: rgb(128, 0, 128);}.ace-crimson-editor .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-crimson-editor .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-crimson-editor .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-crimson-editor .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 64);}.ace-crimson-editor .ace_line .ace_variable { color: rgb(0, 64, 128);}.ace-crimson-editor .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-crimson-editor .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-crimson-editor .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-crimson-editor .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-crimson-editor .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-crimson-editor .ace_marker-layer .ace_active_line { background: rgb(232, 242, 254);}.ace-crimson-editor .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-crimson-editor .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-crimson-editor .ace_string.ace_regex { color: rgb(192, 0, 192);}",b.cssClass="ace-crimson-editor";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/crimson_editor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+exports.isDark = false;
+exports.cssText = ".ace-crimson-editor .ace_gutter {\
+background: #ebebeb;\
+color: #333;\
+overflow : hidden;\
+}\
+.ace-crimson-editor .ace_gutter-layer {\
+width: 100%;\
+text-align: right;\
+}\
+.ace-crimson-editor .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-crimson-editor .ace_scroller {\
+background-color: #FFFFFF;\
+}\
+.ace-crimson-editor .ace_text-layer {\
+color: rgb(64, 64, 64);\
+}\
+.ace-crimson-editor .ace_cursor {\
+border-left: 2px solid black;\
+}\
+.ace-crimson-editor .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid black;\
+}\
+.ace-crimson-editor .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-crimson-editor .ace_identifier {\
+color: black;\
+}\
+.ace-crimson-editor .ace_keyword {\
+color: blue;\
+}\
+.ace-crimson-editor .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-crimson-editor .ace_constant.ace_language {\
+color: rgb(255, 156, 0);\
+}\
+.ace-crimson-editor .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-crimson-editor .ace_invalid {\
+text-decoration: line-through;\
+color: rgb(224, 0, 0);\
+}\
+.ace-crimson-editor .ace_fold {\
+}\
+.ace-crimson-editor .ace_support.ace_function {\
+color: rgb(192, 0, 0);\
+}\
+.ace-crimson-editor .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-crimson-editor .ace_support.ace_type,\
+.ace-crimson-editor .ace_support.ace_class {\
+color: rgb(109, 121, 222);\
+}\
+.ace-crimson-editor .ace_keyword.ace_operator {\
+color: rgb(49, 132, 149);\
+}\
+.ace-crimson-editor .ace_string {\
+color: rgb(128, 0, 128);\
+}\
+.ace-crimson-editor .ace_comment {\
+color: rgb(76, 136, 107);\
+}\
+.ace-crimson-editor .ace_comment.ace_doc {\
+color: rgb(0, 102, 255);\
+}\
+.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\
+color: rgb(128, 159, 191);\
+}\
+.ace-crimson-editor .ace_constant.ace_numeric {\
+color: rgb(0, 0, 64);\
+}\
+.ace-crimson-editor .ace_variable {\
+color: rgb(0, 64, 128);\
+}\
+.ace-crimson-editor .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_active-line {\
+background: rgb(232, 242, 254);\
+}\
+.ace-crimson-editor .ace_gutter-active-line {\
+background-color : #dcdcdc;\
+}\
+.ace-crimson-editor .ace_meta.ace_tag {\
+color:rgb(28, 2, 255);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-crimson-editor .ace_string.ace_regex {\
+color: rgb(192, 0, 192);\
+}\
+.ace-crimson-editor .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}";
+
+exports.cssClass = "ace-crimson-editor";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-dawn-noconflict.js b/contexts/data/lib/ace/theme-dawn-noconflict.js
deleted file mode 100644
index ffc04c6..0000000
--- a/contexts/data/lib/ace/theme-dawn-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/dawn",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-dawn",b.cssText=".ace-dawn .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-dawn .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-dawn .ace_gutter { background: #e8e8e8; color: #333;}.ace-dawn .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-dawn .ace_scroller { background-color: #F9F9F9;}.ace-dawn .ace_text-layer { cursor: text; color: #080808;}.ace-dawn .ace_cursor { border-left: 2px solid #000000;}.ace-dawn .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #000000;} .ace-dawn .ace_marker-layer .ace_selection { background: rgba(39, 95, 255, 0.30);}.ace-dawn .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-dawn .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(75, 75, 126, 0.50);}.ace-dawn .ace_marker-layer .ace_active_line { background: rgba(36, 99, 180, 0.12);}.ace-dawn .ace_marker-layer .ace_selected_word { border: 1px solid rgba(39, 95, 255, 0.30);} .ace-dawn .ace_invisible { color: rgba(75, 75, 126, 0.50);}.ace-dawn .ace_keyword { color:#794938;}.ace-dawn .ace_constant { color:#811F24;}.ace-dawn .ace_invalid.ace_illegal { text-decoration:underline;font-style:italic;color:#F8F8F8;background-color:#B52A1D;}.ace-dawn .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#B52A1D;}.ace-dawn .ace_support { color:#691C97;}.ace-dawn .ace_fold { background-color: #794938; border-color: #080808;}.ace-dawn .ace_support.ace_function { color:#693A17;}.ace-dawn .ace_string { color:#0B6125;}.ace-dawn .ace_string.ace_regexp { color:#CF5628;}.ace-dawn .ace_comment { font-style:italic;color:#5A525F;}.ace-dawn .ace_variable { color:#234A97;}.ace-dawn .ace_markup.ace_underline { text-decoration:underline;}.ace-dawn .ace_markup.ace_heading { color:#19356D;}.ace-dawn .ace_markup.ace_list { color:#693A17;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-dawn-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-dawn-uncompressed-noconflict.js
deleted file mode 100644
index 0647ea8..0000000
--- a/contexts/data/lib/ace/theme-dawn-uncompressed-noconflict.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/dawn', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-dawn";
-exports.cssText = "\
-.ace-dawn .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-dawn .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-dawn .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-dawn .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-dawn .ace_scroller {\
- background-color: #F9F9F9;\
-}\
-\
-.ace-dawn .ace_text-layer {\
- cursor: text;\
- color: #080808;\
-}\
-\
-.ace-dawn .ace_cursor {\
- border-left: 2px solid #000000;\
-}\
-\
-.ace-dawn .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #000000;\
-}\
- \
-.ace-dawn .ace_marker-layer .ace_selection {\
- background: rgba(39, 95, 255, 0.30);\
-}\
-\
-.ace-dawn .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-dawn .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(75, 75, 126, 0.50);\
-}\
-\
-.ace-dawn .ace_marker-layer .ace_active_line {\
- background: rgba(36, 99, 180, 0.12);\
-}\
-\
-.ace-dawn .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(39, 95, 255, 0.30);\
-}\
- \
-.ace-dawn .ace_invisible {\
- color: rgba(75, 75, 126, 0.50);\
-}\
-\
-.ace-dawn .ace_keyword {\
- color:#794938;\
-}\
-\
-.ace-dawn .ace_constant {\
- color:#811F24;\
-}\
-\
-.ace-dawn .ace_invalid.ace_illegal {\
- text-decoration:underline;\
-font-style:italic;\
-color:#F8F8F8;\
-background-color:#B52A1D;\
-}\
-\
-.ace-dawn .ace_invalid.ace_deprecated {\
- text-decoration:underline;\
-font-style:italic;\
-color:#B52A1D;\
-}\
-\
-.ace-dawn .ace_support {\
- color:#691C97;\
-}\
-\
-.ace-dawn .ace_fold {\
- background-color: #794938;\
- border-color: #080808;\
-}\
-\
-.ace-dawn .ace_support.ace_function {\
- color:#693A17;\
-}\
-\
-.ace-dawn .ace_string {\
- color:#0B6125;\
-}\
-\
-.ace-dawn .ace_string.ace_regexp {\
- color:#CF5628;\
-}\
-\
-.ace-dawn .ace_comment {\
- font-style:italic;\
-color:#5A525F;\
-}\
-\
-.ace-dawn .ace_variable {\
- color:#234A97;\
-}\
-\
-.ace-dawn .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-dawn .ace_markup.ace_heading {\
- color:#19356D;\
-}\
-\
-.ace-dawn .ace_markup.ace_list {\
- color:#693A17;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-dawn-uncompressed.js b/contexts/data/lib/ace/theme-dawn-uncompressed.js
deleted file mode 100644
index 498a54a..0000000
--- a/contexts/data/lib/ace/theme-dawn-uncompressed.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/dawn', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-dawn";
-exports.cssText = "\
-.ace-dawn .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-dawn .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-dawn .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-dawn .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-dawn .ace_scroller {\
- background-color: #F9F9F9;\
-}\
-\
-.ace-dawn .ace_text-layer {\
- cursor: text;\
- color: #080808;\
-}\
-\
-.ace-dawn .ace_cursor {\
- border-left: 2px solid #000000;\
-}\
-\
-.ace-dawn .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #000000;\
-}\
- \
-.ace-dawn .ace_marker-layer .ace_selection {\
- background: rgba(39, 95, 255, 0.30);\
-}\
-\
-.ace-dawn .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-dawn .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(75, 75, 126, 0.50);\
-}\
-\
-.ace-dawn .ace_marker-layer .ace_active_line {\
- background: rgba(36, 99, 180, 0.12);\
-}\
-\
-.ace-dawn .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(39, 95, 255, 0.30);\
-}\
- \
-.ace-dawn .ace_invisible {\
- color: rgba(75, 75, 126, 0.50);\
-}\
-\
-.ace-dawn .ace_keyword {\
- color:#794938;\
-}\
-\
-.ace-dawn .ace_constant {\
- color:#811F24;\
-}\
-\
-.ace-dawn .ace_invalid.ace_illegal {\
- text-decoration:underline;\
-font-style:italic;\
-color:#F8F8F8;\
-background-color:#B52A1D;\
-}\
-\
-.ace-dawn .ace_invalid.ace_deprecated {\
- text-decoration:underline;\
-font-style:italic;\
-color:#B52A1D;\
-}\
-\
-.ace-dawn .ace_support {\
- color:#691C97;\
-}\
-\
-.ace-dawn .ace_fold {\
- background-color: #794938;\
- border-color: #080808;\
-}\
-\
-.ace-dawn .ace_support.ace_function {\
- color:#693A17;\
-}\
-\
-.ace-dawn .ace_string {\
- color:#0B6125;\
-}\
-\
-.ace-dawn .ace_string.ace_regexp {\
- color:#CF5628;\
-}\
-\
-.ace-dawn .ace_comment {\
- font-style:italic;\
-color:#5A525F;\
-}\
-\
-.ace-dawn .ace_variable {\
- color:#234A97;\
-}\
-\
-.ace-dawn .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-dawn .ace_markup.ace_heading {\
- color:#19356D;\
-}\
-\
-.ace-dawn .ace_markup.ace_list {\
- color:#693A17;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-dawn.js b/contexts/data/lib/ace/theme-dawn.js
index cea9628..9f79c8d 100644
--- a/contexts/data/lib/ace/theme-dawn.js
+++ b/contexts/data/lib/ace/theme-dawn.js
@@ -1 +1,146 @@
-define("ace/theme/dawn",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-dawn",b.cssText=".ace-dawn .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-dawn .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-dawn .ace_gutter { background: #e8e8e8; color: #333;}.ace-dawn .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-dawn .ace_scroller { background-color: #F9F9F9;}.ace-dawn .ace_text-layer { cursor: text; color: #080808;}.ace-dawn .ace_cursor { border-left: 2px solid #000000;}.ace-dawn .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #000000;} .ace-dawn .ace_marker-layer .ace_selection { background: rgba(39, 95, 255, 0.30);}.ace-dawn .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-dawn .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(75, 75, 126, 0.50);}.ace-dawn .ace_marker-layer .ace_active_line { background: rgba(36, 99, 180, 0.12);}.ace-dawn .ace_marker-layer .ace_selected_word { border: 1px solid rgba(39, 95, 255, 0.30);} .ace-dawn .ace_invisible { color: rgba(75, 75, 126, 0.50);}.ace-dawn .ace_keyword { color:#794938;}.ace-dawn .ace_constant { color:#811F24;}.ace-dawn .ace_invalid.ace_illegal { text-decoration:underline;font-style:italic;color:#F8F8F8;background-color:#B52A1D;}.ace-dawn .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#B52A1D;}.ace-dawn .ace_support { color:#691C97;}.ace-dawn .ace_fold { background-color: #794938; border-color: #080808;}.ace-dawn .ace_support.ace_function { color:#693A17;}.ace-dawn .ace_string { color:#0B6125;}.ace-dawn .ace_string.ace_regexp { color:#CF5628;}.ace-dawn .ace_comment { font-style:italic;color:#5A525F;}.ace-dawn .ace_variable { color:#234A97;}.ace-dawn .ace_markup.ace_underline { text-decoration:underline;}.ace-dawn .ace_markup.ace_heading { color:#19356D;}.ace-dawn .ace_markup.ace_list { color:#693A17;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/dawn', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-dawn";
+exports.cssText = ".ace-dawn .ace_gutter {\
+background: #ebebeb;\
+color: #333\
+}\
+.ace-dawn .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8\
+}\
+.ace-dawn .ace_scroller {\
+background-color: #F9F9F9\
+}\
+.ace-dawn .ace_text-layer {\
+color: #080808\
+}\
+.ace-dawn .ace_cursor {\
+border-left: 2px solid #000000\
+}\
+.ace-dawn .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #000000\
+}\
+.ace-dawn .ace_marker-layer .ace_selection {\
+background: rgba(39, 95, 255, 0.30)\
+}\
+.ace-dawn.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #F9F9F9;\
+border-radius: 2px\
+}\
+.ace-dawn .ace_marker-layer .ace_step {\
+background: rgb(255, 255, 0)\
+}\
+.ace-dawn .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(75, 75, 126, 0.50)\
+}\
+.ace-dawn .ace_marker-layer .ace_active-line {\
+background: rgba(36, 99, 180, 0.12)\
+}\
+.ace-dawn .ace_gutter-active-line {\
+background-color : #dcdcdc\
+}\
+.ace-dawn .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(39, 95, 255, 0.30)\
+}\
+.ace-dawn .ace_invisible {\
+color: rgba(75, 75, 126, 0.50)\
+}\
+.ace-dawn .ace_keyword,\
+.ace-dawn .ace_meta {\
+color: #794938\
+}\
+.ace-dawn .ace_constant,\
+.ace-dawn .ace_constant.ace_character,\
+.ace-dawn .ace_constant.ace_character.ace_escape,\
+.ace-dawn .ace_constant.ace_other {\
+color: #811F24\
+}\
+.ace-dawn .ace_invalid.ace_illegal {\
+text-decoration: underline;\
+font-style: italic;\
+color: #F8F8F8;\
+background-color: #B52A1D\
+}\
+.ace-dawn .ace_invalid.ace_deprecated {\
+text-decoration: underline;\
+font-style: italic;\
+color: #B52A1D\
+}\
+.ace-dawn .ace_support {\
+color: #691C97\
+}\
+.ace-dawn .ace_support.ace_constant {\
+color: #B4371F\
+}\
+.ace-dawn .ace_fold {\
+background-color: #794938;\
+border-color: #080808\
+}\
+.ace-dawn .ace_markup.ace_list,\
+.ace-dawn .ace_support.ace_function {\
+color: #693A17\
+}\
+.ace-dawn .ace_storage {\
+font-style: italic;\
+color: #A71D5D\
+}\
+.ace-dawn .ace_string {\
+color: #0B6125\
+}\
+.ace-dawn .ace_string.ace_regexp {\
+color: #CF5628\
+}\
+.ace-dawn .ace_comment {\
+font-style: italic;\
+color: #5A525F\
+}\
+.ace-dawn .ace_variable {\
+color: #234A97\
+}\
+.ace-dawn .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-dawn .ace_markup.ace_heading {\
+color: #19356D\
+}\
+.ace-dawn .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4+fPnf4ZVq1b9BwAkVQboFQv98gAAAABJRU5ErkJggg==) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-dreamweaver-noconflict.js b/contexts/data/lib/ace/theme-dreamweaver-noconflict.js
deleted file mode 100644
index 2927574..0000000
--- a/contexts/data/lib/ace/theme-dreamweaver-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/dreamweaver",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #00F;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: #009;}.ace-tm .ace_line .ace_support.ace_php_tag { color: #f00;}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: #00F;}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: #06F}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #00F;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:#009;}.ace-tm .ace_meta.ace_tag.ace_anchor { color:#060;}.ace-tm .ace_meta.ace_tag.ace_form { color:#F90;}.ace-tm .ace_meta.ace_tag.ace_image { color:#909;}.ace-tm .ace_meta.ace_tag.ace_script { color:#900;}.ace-tm .ace_meta.ace_tag.ace_style { color:#909;}.ace-tm .ace_meta.ace_tag.ace_table { color:#099;}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-dreamweaver-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-dreamweaver-uncompressed-noconflict.js
deleted file mode 100644
index 947dfb6..0000000
--- a/contexts/data/lib/ace/theme-dreamweaver-uncompressed-noconflict.js
+++ /dev/null
@@ -1,236 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Adam Jimenez <adam AT shiftcreate DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/dreamweaver', ['require', 'exports', 'module' ], function(require, exports, module) {
-exports.isDark = false;
-exports.cssClass = "ace-tm";
-exports.cssText = ".ace-tm .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tm .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tm .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tm .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tm .ace_fold {\
- background-color: #00F;\
-}\
-\
-.ace-tm .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-tm .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-tm .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
- \
-.ace-tm .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-tm .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_language {\
- color: rgb(88, 92, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_invalid {\
- background-color: rgb(153, 0, 0);\
- color: white;\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_type,\
-.ace-tm .ace_line .ace_support.ace_class {\
- color: #009;\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_php_tag {\
- color: #f00;\
-}\
-\
-.ace-tm .ace_line .ace_keyword.ace_operator {\
- color: rgb(104, 118, 135);\
-}\
-\
-.ace-tm .ace_line .ace_string {\
- color: #00F;\
-}\
-\
-.ace-tm .ace_line .ace_comment {\
- color: rgb(76, 136, 107);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc {\
- color: rgb(0, 102, 255);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(128, 159, 191);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 205);\
-}\
-\
-.ace-tm .ace_line .ace_variable {\
- color: #06F\
-}\
-\
-.ace-tm .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-tm .ace_entity.ace_name.ace_function {\
- color: #00F;\
-}\
-\
-.ace-tm .ace_markup.ace_markupine {\
- text-decoration:underline;\
-}\
-\
-.ace-tm .ace_markup.ace_heading {\
- color: rgb(12, 7, 255);\
-}\
-\
-.ace-tm .ace_markup.ace_list {\
- color:rgb(185, 6, 144);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.07);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-tm .ace_meta.ace_tag {\
- color:#009;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_anchor {\
- color:#060;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_form {\
- color:#F90;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_image {\
- color:#909;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_script {\
- color:#900;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_style {\
- color:#909;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_table {\
- color:#099;\
-}\
-\
-.ace-tm .ace_string.ace_regex {\
- color: rgb(255, 0, 0)\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-dreamweaver-uncompressed.js b/contexts/data/lib/ace/theme-dreamweaver-uncompressed.js
deleted file mode 100644
index fcd479d..0000000
--- a/contexts/data/lib/ace/theme-dreamweaver-uncompressed.js
+++ /dev/null
@@ -1,236 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Adam Jimenez <adam AT shiftcreate DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/dreamweaver', ['require', 'exports', 'module' ], function(require, exports, module) {
-exports.isDark = false;
-exports.cssClass = "ace-tm";
-exports.cssText = ".ace-tm .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tm .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tm .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tm .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tm .ace_fold {\
- background-color: #00F;\
-}\
-\
-.ace-tm .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-tm .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-tm .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
- \
-.ace-tm .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-tm .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_language {\
- color: rgb(88, 92, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_invalid {\
- background-color: rgb(153, 0, 0);\
- color: white;\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_type,\
-.ace-tm .ace_line .ace_support.ace_class {\
- color: #009;\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_php_tag {\
- color: #f00;\
-}\
-\
-.ace-tm .ace_line .ace_keyword.ace_operator {\
- color: rgb(104, 118, 135);\
-}\
-\
-.ace-tm .ace_line .ace_string {\
- color: #00F;\
-}\
-\
-.ace-tm .ace_line .ace_comment {\
- color: rgb(76, 136, 107);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc {\
- color: rgb(0, 102, 255);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(128, 159, 191);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 205);\
-}\
-\
-.ace-tm .ace_line .ace_variable {\
- color: #06F\
-}\
-\
-.ace-tm .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-tm .ace_entity.ace_name.ace_function {\
- color: #00F;\
-}\
-\
-.ace-tm .ace_markup.ace_markupine {\
- text-decoration:underline;\
-}\
-\
-.ace-tm .ace_markup.ace_heading {\
- color: rgb(12, 7, 255);\
-}\
-\
-.ace-tm .ace_markup.ace_list {\
- color:rgb(185, 6, 144);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.07);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-tm .ace_meta.ace_tag {\
- color:#009;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_anchor {\
- color:#060;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_form {\
- color:#F90;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_image {\
- color:#909;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_script {\
- color:#900;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_style {\
- color:#909;\
-}\
-\
-.ace-tm .ace_meta.ace_tag.ace_table {\
- color:#099;\
-}\
-\
-.ace-tm .ace_string.ace_regex {\
- color: rgb(255, 0, 0)\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-dreamweaver.js b/contexts/data/lib/ace/theme-dreamweaver.js
index 8c58194..6973232 100644
--- a/contexts/data/lib/ace/theme-dreamweaver.js
+++ b/contexts/data/lib/ace/theme-dreamweaver.js
@@ -1 +1,173 @@
-define("ace/theme/dreamweaver",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #00F;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: #009;}.ace-tm .ace_line .ace_support.ace_php_tag { color: #f00;}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: #00F;}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: #06F}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #00F;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:#009;}.ace-tm .ace_meta.ace_tag.ace_anchor { color:#060;}.ace-tm .ace_meta.ace_tag.ace_form { color:#F90;}.ace-tm .ace_meta.ace_tag.ace_image { color:#909;}.ace-tm .ace_meta.ace_tag.ace_script { color:#900;}.ace-tm .ace_meta.ace_tag.ace_style { color:#909;}.ace-tm .ace_meta.ace_tag.ace_table { color:#099;}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/dreamweaver', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+exports.isDark = false;
+exports.cssClass = "ace-dreamweaver";
+exports.cssText = ".ace-dreamweaver .ace_gutter {\
+background: #e8e8e8;\
+color: #333;\
+}\
+.ace-dreamweaver .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-dreamweaver .ace_scroller {\
+background-color: #FFFFFF;\
+}\
+.ace-dreamweaver .ace_fold {\
+background-color: #757AD8;\
+}\
+.ace-dreamweaver .ace_text-layer {\
+}\
+.ace-dreamweaver .ace_cursor {\
+border-left: 2px solid black;\
+}\
+.ace-dreamweaver .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid black;\
+}\
+.ace-dreamweaver .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-dreamweaver .ace_storage,\
+.ace-dreamweaver .ace_keyword {\
+color: blue;\
+}\
+.ace-dreamweaver .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-dreamweaver .ace_constant.ace_language {\
+color: rgb(88, 92, 246);\
+}\
+.ace-dreamweaver .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-dreamweaver .ace_invalid {\
+background-color: rgb(153, 0, 0);\
+color: white;\
+}\
+.ace-dreamweaver .ace_support.ace_function {\
+color: rgb(60, 76, 114);\
+}\
+.ace-dreamweaver .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-dreamweaver .ace_support.ace_type,\
+.ace-dreamweaver .ace_support.ace_class {\
+color: #009;\
+}\
+.ace-dreamweaver .ace_support.ace_php_tag {\
+color: #f00;\
+}\
+.ace-dreamweaver .ace_keyword.ace_operator {\
+color: rgb(104, 118, 135);\
+}\
+.ace-dreamweaver .ace_string {\
+color: #00F;\
+}\
+.ace-dreamweaver .ace_comment {\
+color: rgb(76, 136, 107);\
+}\
+.ace-dreamweaver .ace_comment.ace_doc {\
+color: rgb(0, 102, 255);\
+}\
+.ace-dreamweaver .ace_comment.ace_doc.ace_tag {\
+color: rgb(128, 159, 191);\
+}\
+.ace-dreamweaver .ace_constant.ace_numeric {\
+color: rgb(0, 0, 205);\
+}\
+.ace-dreamweaver .ace_variable {\
+color: #06F\
+}\
+.ace-dreamweaver .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-dreamweaver .ace_entity.ace_name.ace_function {\
+color: #00F;\
+}\
+.ace-dreamweaver .ace_markup.ace_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-dreamweaver .ace_markup.ace_list {\
+color:rgb(185, 6, 144);\
+}\
+.ace-dreamweaver .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-dreamweaver .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-dreamweaver .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-dreamweaver .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-dreamweaver .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.07);\
+}\
+.ace-dreamweaver .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-dreamweaver .ace_meta.ace_tag {\
+color:#009;\
+}\
+.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {\
+color:#060;\
+}\
+.ace-dreamweaver .ace_meta.ace_tag.ace_form {\
+color:#F90;\
+}\
+.ace-dreamweaver .ace_meta.ace_tag.ace_image {\
+color:#909;\
+}\
+.ace-dreamweaver .ace_meta.ace_tag.ace_script {\
+color:#900;\
+}\
+.ace-dreamweaver .ace_meta.ace_tag.ace_style {\
+color:#909;\
+}\
+.ace-dreamweaver .ace_meta.ace_tag.ace_table {\
+color:#099;\
+}\
+.ace-dreamweaver .ace_string.ace_regex {\
+color: rgb(255, 0, 0)\
+}\
+.ace-dreamweaver .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-eclipse-noconflict.js b/contexts/data/lib/ace/theme-eclipse-noconflict.js
deleted file mode 100644
index 7f97010..0000000
--- a/contexts/data/lib/ace/theme-eclipse-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/eclipse",["require","exports","module"],function(a,b,c){"use strict",b.isDark=!1,b.cssText=".ace-eclipse .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-eclipse .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-eclipse .ace_gutter { background: rgb(227, 227, 227); border-right: 1px solid rgb(159, 159, 159); color: rgb(136, 136, 136);}.ace-eclipse .ace_print_margin { width: 1px; background: #b1b4ba;}.ace-eclipse .ace_fold { background-color: rgb(60, 76, 114);}.ace-eclipse .ace_text-layer { cursor: text;}.ace-eclipse .ace_cursor { border-left: 1px solid black;}.ace-eclipse .ace_line .ace_keyword, .ace-eclipse .ace_line .ace_variable { color: rgb(127, 0, 85);}.ace-eclipse .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-eclipse .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-eclipse .ace_line .ace_function { color: rgb(60, 76, 114);}.ace-eclipse .ace_line .ace_string { color: rgb(42, 0, 255);}.ace-eclipse .ace_line .ace_comment { color: rgb(63, 127, 95);}.ace-eclipse .ace_line .ace_comment.ace_doc { color: rgb(63, 95, 191);}.ace-eclipse .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(127, 159, 191);}.ace-eclipse .ace_line .ace_constant.ace_numeric {}.ace-eclipse .ace_line .ace_tag { color: rgb(63, 127, 127);}.ace-eclipse .ace_line .ace_type { color: rgb(127, 0, 127);}.ace-eclipse .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-eclipse .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-eclipse .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-eclipse .ace_line .ace_meta.ace_tag { color:rgb(63, 127, 127);}.ace-eclipse .ace_entity.ace_other.ace_attribute-name { color:rgb(127, 0, 127);}.ace-eclipse .ace_marker-layer .ace_active_line { background: rgb(232, 242, 254);}",b.cssClass="ace-eclipse";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-eclipse-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-eclipse-uncompressed-noconflict.js
deleted file mode 100644
index a53e594..0000000
--- a/contexts/data/lib/ace/theme-eclipse-uncompressed-noconflict.js
+++ /dev/null
@@ -1,155 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/eclipse', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.isDark = false;
-exports.cssText = ".ace-eclipse .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-eclipse .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-eclipse .ace_gutter {\
- background: rgb(227, 227, 227);\
- border-right: 1px solid rgb(159, 159, 159);\
- color: rgb(136, 136, 136);\
-}\
-\
-.ace-eclipse .ace_print_margin {\
- width: 1px;\
- background: #b1b4ba;\
-}\
-\
-.ace-eclipse .ace_fold {\
- background-color: rgb(60, 76, 114);\
-}\
-\
-.ace-eclipse .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-eclipse .ace_cursor {\
- border-left: 1px solid black;\
-}\
-\
-.ace-eclipse .ace_line .ace_keyword, .ace-eclipse .ace_line .ace_variable {\
- color: rgb(127, 0, 85);\
-}\
-\
-.ace-eclipse .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-eclipse .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-eclipse .ace_line .ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-eclipse .ace_line .ace_string {\
- color: rgb(42, 0, 255);\
-}\
-\
-.ace-eclipse .ace_line .ace_comment {\
- color: rgb(63, 127, 95);\
-}\
-\
-.ace-eclipse .ace_line .ace_comment.ace_doc {\
- color: rgb(63, 95, 191);\
-}\
-\
-.ace-eclipse .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(127, 159, 191);\
-}\
-\
-.ace-eclipse .ace_line .ace_constant.ace_numeric {\
-}\
-\
-.ace-eclipse .ace_line .ace_tag {\
- color: rgb(63, 127, 127);\
-}\
-\
-.ace-eclipse .ace_line .ace_type {\
- color: rgb(127, 0, 127);\
-}\
-\
-.ace-eclipse .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-eclipse .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-eclipse .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-eclipse .ace_line .ace_meta.ace_tag {\
- color:rgb(63, 127, 127);\
-}\
-\
-.ace-eclipse .ace_entity.ace_other.ace_attribute-name {\
- color:rgb(127, 0, 127);\
-}\
-\
-.ace-eclipse .ace_marker-layer .ace_active_line {\
- background: rgb(232, 242, 254);\
-}";
-
-exports.cssClass = "ace-eclipse";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-eclipse-uncompressed.js b/contexts/data/lib/ace/theme-eclipse-uncompressed.js
deleted file mode 100644
index 38ca99a..0000000
--- a/contexts/data/lib/ace/theme-eclipse-uncompressed.js
+++ /dev/null
@@ -1,155 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/eclipse', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.isDark = false;
-exports.cssText = ".ace-eclipse .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-eclipse .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-eclipse .ace_gutter {\
- background: rgb(227, 227, 227);\
- border-right: 1px solid rgb(159, 159, 159);\
- color: rgb(136, 136, 136);\
-}\
-\
-.ace-eclipse .ace_print_margin {\
- width: 1px;\
- background: #b1b4ba;\
-}\
-\
-.ace-eclipse .ace_fold {\
- background-color: rgb(60, 76, 114);\
-}\
-\
-.ace-eclipse .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-eclipse .ace_cursor {\
- border-left: 1px solid black;\
-}\
-\
-.ace-eclipse .ace_line .ace_keyword, .ace-eclipse .ace_line .ace_variable {\
- color: rgb(127, 0, 85);\
-}\
-\
-.ace-eclipse .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-eclipse .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-eclipse .ace_line .ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-eclipse .ace_line .ace_string {\
- color: rgb(42, 0, 255);\
-}\
-\
-.ace-eclipse .ace_line .ace_comment {\
- color: rgb(63, 127, 95);\
-}\
-\
-.ace-eclipse .ace_line .ace_comment.ace_doc {\
- color: rgb(63, 95, 191);\
-}\
-\
-.ace-eclipse .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(127, 159, 191);\
-}\
-\
-.ace-eclipse .ace_line .ace_constant.ace_numeric {\
-}\
-\
-.ace-eclipse .ace_line .ace_tag {\
- color: rgb(63, 127, 127);\
-}\
-\
-.ace-eclipse .ace_line .ace_type {\
- color: rgb(127, 0, 127);\
-}\
-\
-.ace-eclipse .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-eclipse .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-eclipse .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-eclipse .ace_line .ace_meta.ace_tag {\
- color:rgb(63, 127, 127);\
-}\
-\
-.ace-eclipse .ace_entity.ace_other.ace_attribute-name {\
- color:rgb(127, 0, 127);\
-}\
-\
-.ace-eclipse .ace_marker-layer .ace_active_line {\
- background: rgb(232, 242, 254);\
-}";
-
-exports.cssClass = "ace-eclipse";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-eclipse.js b/contexts/data/lib/ace/theme-eclipse.js
index 3168f5a..653a3ff 100644
--- a/contexts/data/lib/ace/theme-eclipse.js
+++ b/contexts/data/lib/ace/theme-eclipse.js
@@ -1 +1,122 @@
-define("ace/theme/eclipse",["require","exports","module"],function(a,b,c){"use strict",b.isDark=!1,b.cssText=".ace-eclipse .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-eclipse .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-eclipse .ace_gutter { background: rgb(227, 227, 227); border-right: 1px solid rgb(159, 159, 159); color: rgb(136, 136, 136);}.ace-eclipse .ace_print_margin { width: 1px; background: #b1b4ba;}.ace-eclipse .ace_fold { background-color: rgb(60, 76, 114);}.ace-eclipse .ace_text-layer { cursor: text;}.ace-eclipse .ace_cursor { border-left: 1px solid black;}.ace-eclipse .ace_line .ace_keyword, .ace-eclipse .ace_line .ace_variable { color: rgb(127, 0, 85);}.ace-eclipse .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-eclipse .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-eclipse .ace_line .ace_function { color: rgb(60, 76, 114);}.ace-eclipse .ace_line .ace_string { color: rgb(42, 0, 255);}.ace-eclipse .ace_line .ace_comment { color: rgb(63, 127, 95);}.ace-eclipse .ace_line .ace_comment.ace_doc { color: rgb(63, 95, 191);}.ace-eclipse .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(127, 159, 191);}.ace-eclipse .ace_line .ace_constant.ace_numeric {}.ace-eclipse .ace_line .ace_tag { color: rgb(63, 127, 127);}.ace-eclipse .ace_line .ace_type { color: rgb(127, 0, 127);}.ace-eclipse .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-eclipse .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-eclipse .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-eclipse .ace_line .ace_meta.ace_tag { color:rgb(63, 127, 127);}.ace-eclipse .ace_entity.ace_other.ace_attribute-name { color:rgb(127, 0, 127);}.ace-eclipse .ace_marker-layer .ace_active_line { background: rgb(232, 242, 254);}",b.cssClass="ace-eclipse";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/eclipse', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+
+exports.isDark = false;
+exports.cssText = ".ace-eclipse .ace_gutter {\
+background: #ebebeb;\
+border-right: 1px solid rgb(159, 159, 159);\
+color: rgb(136, 136, 136);\
+}\
+.ace-eclipse .ace_print-margin {\
+width: 1px;\
+background: #ebebeb;\
+}\
+.ace-eclipse .ace_scroller {\
+background-color: #FFFFFF;\
+}\
+.ace-eclipse .ace_fold {\
+background-color: rgb(60, 76, 114);\
+}\
+.ace-eclipse .ace_text-layer {\
+}\
+.ace-eclipse .ace_cursor {\
+border-left: 2px solid black;\
+}\
+.ace-eclipse .ace_storage,\
+.ace-eclipse .ace_keyword,\
+.ace-eclipse .ace_variable {\
+color: rgb(127, 0, 85);\
+}\
+.ace-eclipse .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-eclipse .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-eclipse .ace_function {\
+color: rgb(60, 76, 114);\
+}\
+.ace-eclipse .ace_string {\
+color: rgb(42, 0, 255);\
+}\
+.ace-eclipse .ace_comment {\
+color: rgb(63, 127, 95);\
+}\
+.ace-eclipse .ace_comment.ace_doc {\
+color: rgb(63, 95, 191);\
+}\
+.ace-eclipse .ace_comment.ace_doc.ace_tag {\
+color: rgb(127, 159, 191);\
+}\
+.ace-eclipse .ace_constant.ace_numeric {\
+}\
+.ace-eclipse .ace_tag {\
+color: rgb(63, 127, 127);\
+}\
+.ace-eclipse .ace_type {\
+color: rgb(127, 0, 127);\
+}\
+.ace-eclipse .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-eclipse .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-eclipse .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-eclipse .ace_meta.ace_tag {\
+color:rgb(63, 127, 127);\
+}\
+.ace-eclipse .ace_entity.ace_other.ace_attribute-name {\
+color:rgb(127, 0, 127);\
+}\
+.ace-eclipse .ace_marker-layer .ace_step {\
+background: rgb(255, 255, 0);\
+}\
+.ace-eclipse .ace_marker-layer .ace_active-line {\
+background: rgb(232, 242, 254);\
+}\
+.ace-eclipse .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgb(181, 213, 255);\
+}\
+.ace-eclipse .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}";
+
+exports.cssClass = "ace-eclipse";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-github.js b/contexts/data/lib/ace/theme-github.js
new file mode 100644
index 0000000..a368692
--- /dev/null
+++ b/contexts/data/lib/ace/theme-github.js
@@ -0,0 +1,136 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/github', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-github";
+exports.cssText = "/* CSS style content from github's default pygments highlighter template.\
+Cursor and selection styles from textmate.css. */\
+.ace-github .ace_gutter {\
+background: #e8e8e8;\
+color: #AAA;\
+}\
+.ace-github .ace_scroller {\
+background: #fff;\
+}\
+.ace-github .ace_keyword {\
+font-weight: bold;\
+}\
+.ace-github .ace_string {\
+color: #D14;\
+}\
+.ace-github .ace_variable.ace_class {\
+color: teal;\
+}\
+.ace-github .ace_constant.ace_numeric {\
+color: #099;\
+}\
+.ace-github .ace_constant.ace_buildin {\
+color: #0086B3;\
+}\
+.ace-github .ace_support.ace_function {\
+color: #0086B3;\
+}\
+.ace-github .ace_comment {\
+color: #998;\
+font-style: italic;\
+}\
+.ace-github .ace_variable.ace_language {\
+color: #0086B3;\
+}\
+.ace-github .ace_paren {\
+font-weight: bold;\
+}\
+.ace-github .ace_boolean {\
+font-weight: bold;\
+}\
+.ace-github .ace_string.ace_regexp {\
+color: #009926;\
+font-weight: normal;\
+}\
+.ace-github .ace_variable.ace_instance {\
+color: teal;\
+}\
+.ace-github .ace_constant.ace_language {\
+font-weight: bold;\
+}\
+.ace-github .ace_text-layer {\
+}\
+.ace-github .ace_cursor {\
+border-left: 2px solid black;\
+}\
+.ace-github .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid black;\
+}\
+.ace-github .ace_marker-layer .ace_active-line {\
+background: rgb(255, 255, 204);\
+}\
+.ace-github .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-github.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px white;\
+border-radius: 2px;\
+}\
+/* bold keywords cause cursor issues for some fonts */\
+/* this disables bold style for editor and keeps for static highlighter */\
+.ace-github.ace_nobold .ace_line > span {\
+font-weight: normal !important;\
+}\
+.ace-github .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-github .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-github .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-github .ace_gutter-active-line {\
+background-color : rgba(0, 0, 0, 0.07);\
+}\
+.ace-github .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-github .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-github .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}";
+
+ var dom = require("../lib/dom");
+ dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-idle_fingers-noconflict.js b/contexts/data/lib/ace/theme-idle_fingers-noconflict.js
deleted file mode 100644
index 8f1f087..0000000
--- a/contexts/data/lib/ace/theme-idle_fingers-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/idle_fingers",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-idle-fingers",b.cssText=".ace-idle-fingers .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-idle-fingers .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-idle-fingers .ace_gutter { background: #e8e8e8; color: #333;}.ace-idle-fingers .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-idle-fingers .ace_scroller { background-color: #323232;}.ace-idle-fingers .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-idle-fingers .ace_cursor { border-left: 2px solid #91FF00;}.ace-idle-fingers .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #91FF00;} .ace-idle-fingers .ace_marker-layer .ace_selection { background: rgba(90, 100, 126, 0.88);}.ace-idle-fingers .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-idle-fingers .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404040;}.ace-idle-fingers .ace_marker-layer .ace_active_line { background: #353637;}.ace-idle-fingers .ace_marker-layer .ace_selected_word { border: 1px solid rgba(90, 100, 126, 0.88);} .ace-idle-fingers .ace_invisible { color: #404040;}.ace-idle-fingers .ace_keyword { color:#CC7833;}.ace-idle-fingers .ace_constant { color:#6C99BB;}.ace-idle-fingers .ace_invalid { color:#FFFFFF;background-color:#FF0000;}.ace-idle-fingers .ace_fold { background-color: #CC7833; border-color: #FFFFFF;}.ace-idle-fingers .ace_support.ace_function { color:#B83426;}.ace-idle-fingers .ace_string { color:#A5C261;}.ace-idle-fingers .ace_string.ace_regexp { color:#CCCC33;}.ace-idle-fingers .ace_comment { font-style:italic;color:#BC9458;}.ace-idle-fingers .ace_meta.ace_tag { color:#FFE5BB;}.ace-idle-fingers .ace_entity.ace_name { color:#FFC66D;}.ace-idle-fingers .ace_markup.ace_underline { text-decoration:underline;}.ace-idle-fingers .ace_collab.ace_user1 { color:#323232;background-color:#FFF980; }";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-idle_fingers-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-idle_fingers-uncompressed-noconflict.js
deleted file mode 100644
index f706f9f..0000000
--- a/contexts/data/lib/ace/theme-idle_fingers-uncompressed-noconflict.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/idle_fingers', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-idle-fingers";
-exports.cssText = "\
-.ace-idle-fingers .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-idle-fingers .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-idle-fingers .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-idle-fingers .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-idle-fingers .ace_scroller {\
- background-color: #323232;\
-}\
-\
-.ace-idle-fingers .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-idle-fingers .ace_cursor {\
- border-left: 2px solid #91FF00;\
-}\
-\
-.ace-idle-fingers .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #91FF00;\
-}\
- \
-.ace-idle-fingers .ace_marker-layer .ace_selection {\
- background: rgba(90, 100, 126, 0.88);\
-}\
-\
-.ace-idle-fingers .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-idle-fingers .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404040;\
-}\
-\
-.ace-idle-fingers .ace_marker-layer .ace_active_line {\
- background: #353637;\
-}\
-\
-.ace-idle-fingers .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(90, 100, 126, 0.88);\
-}\
- \
-.ace-idle-fingers .ace_invisible {\
- color: #404040;\
-}\
-\
-.ace-idle-fingers .ace_keyword {\
- color:#CC7833;\
-}\
-\
-.ace-idle-fingers .ace_constant {\
- color:#6C99BB;\
-}\
-\
-.ace-idle-fingers .ace_invalid {\
- color:#FFFFFF;\
-background-color:#FF0000;\
-}\
-\
-.ace-idle-fingers .ace_fold {\
- background-color: #CC7833;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-idle-fingers .ace_support.ace_function {\
- color:#B83426;\
-}\
-\
-.ace-idle-fingers .ace_string {\
- color:#A5C261;\
-}\
-\
-.ace-idle-fingers .ace_string.ace_regexp {\
- color:#CCCC33;\
-}\
-\
-.ace-idle-fingers .ace_comment {\
- font-style:italic;\
-color:#BC9458;\
-}\
-\
-.ace-idle-fingers .ace_meta.ace_tag {\
- color:#FFE5BB;\
-}\
-\
-.ace-idle-fingers .ace_entity.ace_name {\
- color:#FFC66D;\
-}\
-\
-.ace-idle-fingers .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-idle-fingers .ace_collab.ace_user1 {\
- color:#323232;\
-background-color:#FFF980; \
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-idle_fingers-uncompressed.js b/contexts/data/lib/ace/theme-idle_fingers-uncompressed.js
deleted file mode 100644
index 3812ab2..0000000
--- a/contexts/data/lib/ace/theme-idle_fingers-uncompressed.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/idle_fingers', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-idle-fingers";
-exports.cssText = "\
-.ace-idle-fingers .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-idle-fingers .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-idle-fingers .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-idle-fingers .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-idle-fingers .ace_scroller {\
- background-color: #323232;\
-}\
-\
-.ace-idle-fingers .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-idle-fingers .ace_cursor {\
- border-left: 2px solid #91FF00;\
-}\
-\
-.ace-idle-fingers .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #91FF00;\
-}\
- \
-.ace-idle-fingers .ace_marker-layer .ace_selection {\
- background: rgba(90, 100, 126, 0.88);\
-}\
-\
-.ace-idle-fingers .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-idle-fingers .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404040;\
-}\
-\
-.ace-idle-fingers .ace_marker-layer .ace_active_line {\
- background: #353637;\
-}\
-\
-.ace-idle-fingers .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(90, 100, 126, 0.88);\
-}\
- \
-.ace-idle-fingers .ace_invisible {\
- color: #404040;\
-}\
-\
-.ace-idle-fingers .ace_keyword {\
- color:#CC7833;\
-}\
-\
-.ace-idle-fingers .ace_constant {\
- color:#6C99BB;\
-}\
-\
-.ace-idle-fingers .ace_invalid {\
- color:#FFFFFF;\
-background-color:#FF0000;\
-}\
-\
-.ace-idle-fingers .ace_fold {\
- background-color: #CC7833;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-idle-fingers .ace_support.ace_function {\
- color:#B83426;\
-}\
-\
-.ace-idle-fingers .ace_string {\
- color:#A5C261;\
-}\
-\
-.ace-idle-fingers .ace_string.ace_regexp {\
- color:#CCCC33;\
-}\
-\
-.ace-idle-fingers .ace_comment {\
- font-style:italic;\
-color:#BC9458;\
-}\
-\
-.ace-idle-fingers .ace_meta.ace_tag {\
- color:#FFE5BB;\
-}\
-\
-.ace-idle-fingers .ace_entity.ace_name {\
- color:#FFC66D;\
-}\
-\
-.ace-idle-fingers .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-idle-fingers .ace_collab.ace_user1 {\
- color:#323232;\
-background-color:#FFF980; \
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-idle_fingers.js b/contexts/data/lib/ace/theme-idle_fingers.js
index 7a4899a..3b9c7bb 100644
--- a/contexts/data/lib/ace/theme-idle_fingers.js
+++ b/contexts/data/lib/ace/theme-idle_fingers.js
@@ -1 +1,136 @@
-define("ace/theme/idle_fingers",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-idle-fingers",b.cssText=".ace-idle-fingers .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-idle-fingers .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-idle-fingers .ace_gutter { background: #e8e8e8; color: #333;}.ace-idle-fingers .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-idle-fingers .ace_scroller { background-color: #323232;}.ace-idle-fingers .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-idle-fingers .ace_cursor { border-left: 2px solid #91FF00;}.ace-idle-fingers .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #91FF00;} .ace-idle-fingers .ace_marker-layer .ace_selection { background: rgba(90, 100, 126, 0.88);}.ace-idle-fingers .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-idle-fingers .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404040;}.ace-idle-fingers .ace_marker-layer .ace_active_line { background: #353637;}.ace-idle-fingers .ace_marker-layer .ace_selected_word { border: 1px solid rgba(90, 100, 126, 0.88);} .ace-idle-fingers .ace_invisible { color: #404040;}.ace-idle-fingers .ace_keyword { color:#CC7833;}.ace-idle-fingers .ace_constant { color:#6C99BB;}.ace-idle-fingers .ace_invalid { color:#FFFFFF;background-color:#FF0000;}.ace-idle-fingers .ace_fold { background-color: #CC7833; border-color: #FFFFFF;}.ace-idle-fingers .ace_support.ace_function { color:#B83426;}.ace-idle-fingers .ace_string { color:#A5C261;}.ace-idle-fingers .ace_string.ace_regexp { color:#CCCC33;}.ace-idle-fingers .ace_comment { font-style:italic;color:#BC9458;}.ace-idle-fingers .ace_meta.ace_tag { color:#FFE5BB;}.ace-idle-fingers .ace_entity.ace_name { color:#FFC66D;}.ace-idle-fingers .ace_markup.ace_underline { text-decoration:underline;}.ace-idle-fingers .ace_collab.ace_user1 { color:#323232;background-color:#FFF980; }";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/idle_fingers', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-idle-fingers";
+exports.cssText = ".ace-idle-fingers .ace_gutter {\
+background: #3b3b3b;\
+color: #fff\
+}\
+.ace-idle-fingers .ace_print-margin {\
+width: 1px;\
+background: #3b3b3b\
+}\
+.ace-idle-fingers .ace_scroller {\
+background-color: #323232\
+}\
+.ace-idle-fingers .ace_text-layer {\
+color: #FFFFFF\
+}\
+.ace-idle-fingers .ace_cursor {\
+border-left: 2px solid #91FF00\
+}\
+.ace-idle-fingers .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #91FF00\
+}\
+.ace-idle-fingers .ace_marker-layer .ace_selection {\
+background: rgba(90, 100, 126, 0.88)\
+}\
+.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #323232;\
+border-radius: 2px\
+}\
+.ace-idle-fingers .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-idle-fingers .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #404040\
+}\
+.ace-idle-fingers .ace_marker-layer .ace_active-line {\
+background: #353637\
+}\
+.ace-idle-fingers .ace_gutter-active-line {\
+background-color: #353637\
+}\
+.ace-idle-fingers .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(90, 100, 126, 0.88)\
+}\
+.ace-idle-fingers .ace_invisible {\
+color: #404040\
+}\
+.ace-idle-fingers .ace_keyword,\
+.ace-idle-fingers .ace_meta {\
+color: #CC7833\
+}\
+.ace-idle-fingers .ace_constant,\
+.ace-idle-fingers .ace_constant.ace_character,\
+.ace-idle-fingers .ace_constant.ace_character.ace_escape,\
+.ace-idle-fingers .ace_constant.ace_other,\
+.ace-idle-fingers .ace_support.ace_constant {\
+color: #6C99BB\
+}\
+.ace-idle-fingers .ace_invalid {\
+color: #FFFFFF;\
+background-color: #FF0000\
+}\
+.ace-idle-fingers .ace_fold {\
+background-color: #CC7833;\
+border-color: #FFFFFF\
+}\
+.ace-idle-fingers .ace_support.ace_function {\
+color: #B83426\
+}\
+.ace-idle-fingers .ace_variable.ace_parameter {\
+font-style: italic\
+}\
+.ace-idle-fingers .ace_string {\
+color: #A5C261\
+}\
+.ace-idle-fingers .ace_string.ace_regexp {\
+color: #CCCC33\
+}\
+.ace-idle-fingers .ace_comment {\
+font-style: italic;\
+color: #BC9458\
+}\
+.ace-idle-fingers .ace_meta.ace_tag {\
+color: #FFE5BB\
+}\
+.ace-idle-fingers .ace_entity.ace_name {\
+color: #FFC66D\
+}\
+.ace-idle-fingers .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-idle-fingers .ace_collab.ace_user1 {\
+color: #323232;\
+background-color: #FFF980\
+}\
+.ace-idle-fingers .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjL6zzBz5sz/ABEUBGCqhK6UAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-kr.js b/contexts/data/lib/ace/theme-kr.js
new file mode 100644
index 0000000..0bc9366
--- /dev/null
+++ b/contexts/data/lib/ace/theme-kr.js
@@ -0,0 +1,143 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/kr_theme', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-kr-theme";
+exports.cssText = ".ace-kr-theme .ace_gutter {\
+background: #1c1917;\
+color: #FCFFE0\
+}\
+.ace-kr-theme .ace_print-margin {\
+width: 1px;\
+background: #1c1917\
+}\
+.ace-kr-theme .ace_scroller {\
+background-color: #0B0A09\
+}\
+.ace-kr-theme .ace_text-layer {\
+color: #FCFFE0\
+}\
+.ace-kr-theme .ace_cursor {\
+border-left: 2px solid #FF9900\
+}\
+.ace-kr-theme .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #FF9900\
+}\
+.ace-kr-theme .ace_marker-layer .ace_selection {\
+background: rgba(170, 0, 255, 0.45)\
+}\
+.ace-kr-theme.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #0B0A09;\
+border-radius: 2px\
+}\
+.ace-kr-theme .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-kr-theme .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(255, 177, 111, 0.32)\
+}\
+.ace-kr-theme .ace_marker-layer .ace_active-line {\
+background: #38403D\
+}\
+.ace-kr-theme .ace_gutter-active-line {\
+background-color : #38403D\
+}\
+.ace-kr-theme .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(170, 0, 255, 0.45)\
+}\
+.ace-kr-theme .ace_invisible {\
+color: rgba(255, 177, 111, 0.32)\
+}\
+.ace-kr-theme .ace_keyword,\
+.ace-kr-theme .ace_meta {\
+color: #949C8B\
+}\
+.ace-kr-theme .ace_constant,\
+.ace-kr-theme .ace_constant.ace_character,\
+.ace-kr-theme .ace_constant.ace_character.ace_escape,\
+.ace-kr-theme .ace_constant.ace_other {\
+color: rgba(210, 117, 24, 0.76)\
+}\
+.ace-kr-theme .ace_invalid {\
+color: #F8F8F8;\
+background-color: #A41300\
+}\
+.ace-kr-theme .ace_support {\
+color: #9FC28A\
+}\
+.ace-kr-theme .ace_support.ace_constant {\
+color: #C27E66\
+}\
+.ace-kr-theme .ace_fold {\
+background-color: #949C8B;\
+border-color: #FCFFE0\
+}\
+.ace-kr-theme .ace_support.ace_function {\
+color: #85873A\
+}\
+.ace-kr-theme .ace_storage {\
+color: #FFEE80\
+}\
+.ace-kr-theme .ace_string {\
+color: rgba(164, 161, 181, 0.8)\
+}\
+.ace-kr-theme .ace_string.ace_regexp {\
+color: rgba(125, 255, 192, 0.65)\
+}\
+.ace-kr-theme .ace_comment {\
+font-style: italic;\
+color: #706D5B\
+}\
+.ace-kr-theme .ace_variable {\
+color: #D1A796\
+}\
+.ace-kr-theme .ace_variable.ace_language {\
+color: #FF80E1\
+}\
+.ace-kr-theme .ace_meta.ace_tag {\
+color: #BABD9C\
+}\
+.ace-kr-theme .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-kr-theme .ace_markup.ace_list {\
+background-color: #0F0040\
+}\
+.ace-kr-theme .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPg5uL8zzBz5sz/AA1WA+hUYIqjAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-kr_theme-noconflict.js b/contexts/data/lib/ace/theme-kr_theme-noconflict.js
deleted file mode 100644
index 50a027b..0000000
--- a/contexts/data/lib/ace/theme-kr_theme-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/kr_theme",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-kr-theme",b.cssText=".ace-kr-theme .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-kr-theme .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-kr-theme .ace_gutter { background: #e8e8e8; color: #333;}.ace-kr-theme .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-kr-theme .ace_scroller { background-color: #0B0A09;}.ace-kr-theme .ace_text-layer { cursor: text; color: #FCFFE0;}.ace-kr-theme .ace_cursor { border-left: 2px solid #FF9900;}.ace-kr-theme .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FF9900;} .ace-kr-theme .ace_marker-layer .ace_selection { background: rgba(170, 0, 255, 0.45);}.ace-kr-theme .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-kr-theme .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 177, 111, 0.32);}.ace-kr-theme .ace_marker-layer .ace_active_line { background: #38403D;}.ace-kr-theme .ace_marker-layer .ace_selected_word { border: 1px solid rgba(170, 0, 255, 0.45);} .ace-kr-theme .ace_invisible { color: rgba(255, 177, 111, 0.32);}.ace-kr-theme .ace_keyword { color:#949C8B;}.ace-kr-theme .ace_constant { color:rgba(210, 117, 24, 0.76);}.ace-kr-theme .ace_invalid { color:#F8F8F8;background-color:#A41300;}.ace-kr-theme .ace_support { color:#9FC28A;}.ace-kr-theme .ace_fold { background-color: #949C8B; border-color: #FCFFE0;}.ace-kr-theme .ace_support.ace_function { color:#85873A;}.ace-kr-theme .ace_string.ace_regexp { color:rgba(125, 255, 192, 0.65);}.ace-kr-theme .ace_comment { font-style:italic;color:#706D5B;}.ace-kr-theme .ace_variable { color:#D1A796;}.ace-kr-theme .ace_variable.ace_language { color:#FF80E1;}.ace-kr-theme .ace_meta.ace_tag { color:#BABD9C;}.ace-kr-theme .ace_markup.ace_underline { text-decoration:underline;}.ace-kr-theme .ace_markup.ace_list { background-color:#0F0040;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-kr_theme-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-kr_theme-uncompressed-noconflict.js
deleted file mode 100644
index ee17350..0000000
--- a/contexts/data/lib/ace/theme-kr_theme-uncompressed-noconflict.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/kr_theme', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-kr-theme";
-exports.cssText = "\
-.ace-kr-theme .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-kr-theme .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-kr-theme .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-kr-theme .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-kr-theme .ace_scroller {\
- background-color: #0B0A09;\
-}\
-\
-.ace-kr-theme .ace_text-layer {\
- cursor: text;\
- color: #FCFFE0;\
-}\
-\
-.ace-kr-theme .ace_cursor {\
- border-left: 2px solid #FF9900;\
-}\
-\
-.ace-kr-theme .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FF9900;\
-}\
- \
-.ace-kr-theme .ace_marker-layer .ace_selection {\
- background: rgba(170, 0, 255, 0.45);\
-}\
-\
-.ace-kr-theme .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-kr-theme .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(255, 177, 111, 0.32);\
-}\
-\
-.ace-kr-theme .ace_marker-layer .ace_active_line {\
- background: #38403D;\
-}\
-\
-.ace-kr-theme .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(170, 0, 255, 0.45);\
-}\
- \
-.ace-kr-theme .ace_invisible {\
- color: rgba(255, 177, 111, 0.32);\
-}\
-\
-.ace-kr-theme .ace_keyword {\
- color:#949C8B;\
-}\
-\
-.ace-kr-theme .ace_constant {\
- color:rgba(210, 117, 24, 0.76);\
-}\
-\
-.ace-kr-theme .ace_invalid {\
- color:#F8F8F8;\
-background-color:#A41300;\
-}\
-\
-.ace-kr-theme .ace_support {\
- color:#9FC28A;\
-}\
-\
-.ace-kr-theme .ace_fold {\
- background-color: #949C8B;\
- border-color: #FCFFE0;\
-}\
-\
-.ace-kr-theme .ace_support.ace_function {\
- color:#85873A;\
-}\
-\
-.ace-kr-theme .ace_string.ace_regexp {\
- color:rgba(125, 255, 192, 0.65);\
-}\
-\
-.ace-kr-theme .ace_comment {\
- font-style:italic;\
-color:#706D5B;\
-}\
-\
-.ace-kr-theme .ace_variable {\
- color:#D1A796;\
-}\
-\
-.ace-kr-theme .ace_variable.ace_language {\
- color:#FF80E1;\
-}\
-\
-.ace-kr-theme .ace_meta.ace_tag {\
- color:#BABD9C;\
-}\
-\
-.ace-kr-theme .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-kr-theme .ace_markup.ace_list {\
- background-color:#0F0040;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-kr_theme-uncompressed.js b/contexts/data/lib/ace/theme-kr_theme-uncompressed.js
deleted file mode 100644
index 567386d..0000000
--- a/contexts/data/lib/ace/theme-kr_theme-uncompressed.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/kr_theme', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-kr-theme";
-exports.cssText = "\
-.ace-kr-theme .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-kr-theme .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-kr-theme .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-kr-theme .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-kr-theme .ace_scroller {\
- background-color: #0B0A09;\
-}\
-\
-.ace-kr-theme .ace_text-layer {\
- cursor: text;\
- color: #FCFFE0;\
-}\
-\
-.ace-kr-theme .ace_cursor {\
- border-left: 2px solid #FF9900;\
-}\
-\
-.ace-kr-theme .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FF9900;\
-}\
- \
-.ace-kr-theme .ace_marker-layer .ace_selection {\
- background: rgba(170, 0, 255, 0.45);\
-}\
-\
-.ace-kr-theme .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-kr-theme .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(255, 177, 111, 0.32);\
-}\
-\
-.ace-kr-theme .ace_marker-layer .ace_active_line {\
- background: #38403D;\
-}\
-\
-.ace-kr-theme .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(170, 0, 255, 0.45);\
-}\
- \
-.ace-kr-theme .ace_invisible {\
- color: rgba(255, 177, 111, 0.32);\
-}\
-\
-.ace-kr-theme .ace_keyword {\
- color:#949C8B;\
-}\
-\
-.ace-kr-theme .ace_constant {\
- color:rgba(210, 117, 24, 0.76);\
-}\
-\
-.ace-kr-theme .ace_invalid {\
- color:#F8F8F8;\
-background-color:#A41300;\
-}\
-\
-.ace-kr-theme .ace_support {\
- color:#9FC28A;\
-}\
-\
-.ace-kr-theme .ace_fold {\
- background-color: #949C8B;\
- border-color: #FCFFE0;\
-}\
-\
-.ace-kr-theme .ace_support.ace_function {\
- color:#85873A;\
-}\
-\
-.ace-kr-theme .ace_string.ace_regexp {\
- color:rgba(125, 255, 192, 0.65);\
-}\
-\
-.ace-kr-theme .ace_comment {\
- font-style:italic;\
-color:#706D5B;\
-}\
-\
-.ace-kr-theme .ace_variable {\
- color:#D1A796;\
-}\
-\
-.ace-kr-theme .ace_variable.ace_language {\
- color:#FF80E1;\
-}\
-\
-.ace-kr-theme .ace_meta.ace_tag {\
- color:#BABD9C;\
-}\
-\
-.ace-kr-theme .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-kr-theme .ace_markup.ace_list {\
- background-color:#0F0040;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-kr_theme.js b/contexts/data/lib/ace/theme-kr_theme.js
deleted file mode 100644
index 5114a08..0000000
--- a/contexts/data/lib/ace/theme-kr_theme.js
+++ /dev/null
@@ -1 +0,0 @@
-define("ace/theme/kr_theme",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-kr-theme",b.cssText=".ace-kr-theme .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-kr-theme .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-kr-theme .ace_gutter { background: #e8e8e8; color: #333;}.ace-kr-theme .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-kr-theme .ace_scroller { background-color: #0B0A09;}.ace-kr-theme .ace_text-layer { cursor: text; color: #FCFFE0;}.ace-kr-theme .ace_cursor { border-left: 2px solid #FF9900;}.ace-kr-theme .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FF9900;} .ace-kr-theme .ace_marker-layer .ace_selection { background: rgba(170, 0, 255, 0.45);}.ace-kr-theme .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-kr-theme .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 177, 111, 0.32);}.ace-kr-theme .ace_marker-layer .ace_active_line { background: #38403D;}.ace-kr-theme .ace_marker-layer .ace_selected_word { border: 1px solid rgba(170, 0, 255, 0.45);} .ace-kr-theme .ace_invisible { color: rgba(255, 177, 111, 0.32);}.ace-kr-theme .ace_keyword { color:#949C8B;}.ace-kr-theme .ace_constant { color:rgba(210, 117, 24, 0.76);}.ace-kr-theme .ace_invalid { color:#F8F8F8;background-color:#A41300;}.ace-kr-theme .ace_support { color:#9FC28A;}.ace-kr-theme .ace_fold { background-color: #949C8B; border-color: #FCFFE0;}.ace-kr-theme .ace_support.ace_function { color:#85873A;}.ace-kr-theme .ace_string.ace_regexp { color:rgba(125, 255, 192, 0.65);}.ace-kr-theme .ace_comment { font-style:italic;color:#706D5B;}.ace-kr-theme .ace_variable { color:#D1A796;}.ace-kr-theme .ace_variable.ace_language { color:#FF80E1;}.ace-kr-theme .ace_meta.ace_tag { color:#BABD9C;}.ace-kr-theme .ace_markup.ace_underline { text-decoration:underline;}.ace-kr-theme .ace_markup.ace_list { background-color:#0F0040;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-merbivore-noconflict.js b/contexts/data/lib/ace/theme-merbivore-noconflict.js
deleted file mode 100644
index 69bca4e..0000000
--- a/contexts/data/lib/ace/theme-merbivore-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/merbivore",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-merbivore",b.cssText=".ace-merbivore .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-merbivore .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-merbivore .ace_gutter { background: #e8e8e8; color: #333;}.ace-merbivore .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-merbivore .ace_scroller { background-color: #161616;}.ace-merbivore .ace_text-layer { cursor: text; color: #E6E1DC;}.ace-merbivore .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-merbivore .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-merbivore .ace_marker-layer .ace_selection { background: #454545;}.ace-merbivore .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-merbivore .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404040;}.ace-merbivore .ace_marker-layer .ace_active_line { background: #333435;}.ace-merbivore .ace_marker-layer .ace_selected_word { border: 1px solid #454545;} .ace-merbivore .ace_invisible { color: #404040;}.ace-merbivore .ace_keyword { color:#FC6F09;}.ace-merbivore .ace_constant { color:#1EDAFB;}.ace-merbivore .ace_constant.ace_language { color:#FDC251;}.ace-merbivore .ace_constant.ace_library { color:#8DFF0A;}.ace-merbivore .ace_constant.ace_numeric { color:#58C554;}.ace-merbivore .ace_invalid { color:#FFFFFF;background-color:#990000;}.ace-merbivore .ace_fold { background-color: #FC6F09; border-color: #E6E1DC;}.ace-merbivore .ace_support.ace_function { color:#FC6F09;}.ace-merbivore .ace_string { color:#8DFF0A;}.ace-merbivore .ace_comment { font-style:italic;color:#AD2EA4;}.ace-merbivore .ace_meta.ace_tag { color:#FC6F09;}.ace-merbivore .ace_entity.ace_other.ace_attribute-name { color:#FFFF89;}.ace-merbivore .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-merbivore-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-merbivore-uncompressed-noconflict.js
deleted file mode 100644
index 8bbd65e..0000000
--- a/contexts/data/lib/ace/theme-merbivore-uncompressed-noconflict.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Michael Schwartz <mr.pants AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/merbivore', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-merbivore";
-exports.cssText = "\
-.ace-merbivore .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-merbivore .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-merbivore .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-merbivore .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-merbivore .ace_scroller {\
- background-color: #161616;\
-}\
-\
-.ace-merbivore .ace_text-layer {\
- cursor: text;\
- color: #E6E1DC;\
-}\
-\
-.ace-merbivore .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-merbivore .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-merbivore .ace_marker-layer .ace_selection {\
- background: #454545;\
-}\
-\
-.ace-merbivore .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-merbivore .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404040;\
-}\
-\
-.ace-merbivore .ace_marker-layer .ace_active_line {\
- background: #333435;\
-}\
-\
-.ace-merbivore .ace_marker-layer .ace_selected_word {\
- border: 1px solid #454545;\
-}\
- \
-.ace-merbivore .ace_invisible {\
- color: #404040;\
-}\
-\
-.ace-merbivore .ace_keyword {\
- color:#FC6F09;\
-}\
-\
-.ace-merbivore .ace_constant {\
- color:#1EDAFB;\
-}\
-\
-.ace-merbivore .ace_constant.ace_language {\
- color:#FDC251;\
-}\
-\
-.ace-merbivore .ace_constant.ace_library {\
- color:#8DFF0A;\
-}\
-\
-.ace-merbivore .ace_constant.ace_numeric {\
- color:#58C554;\
-}\
-\
-.ace-merbivore .ace_invalid {\
- color:#FFFFFF;\
-background-color:#990000;\
-}\
-\
-.ace-merbivore .ace_fold {\
- background-color: #FC6F09;\
- border-color: #E6E1DC;\
-}\
-\
-.ace-merbivore .ace_support.ace_function {\
- color:#FC6F09;\
-}\
-\
-.ace-merbivore .ace_string {\
- color:#8DFF0A;\
-}\
-\
-.ace-merbivore .ace_comment {\
- font-style:italic;\
-color:#AD2EA4;\
-}\
-\
-.ace-merbivore .ace_meta.ace_tag {\
- color:#FC6F09;\
-}\
-\
-.ace-merbivore .ace_entity.ace_other.ace_attribute-name {\
- color:#FFFF89;\
-}\
-\
-.ace-merbivore .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-merbivore-uncompressed.js b/contexts/data/lib/ace/theme-merbivore-uncompressed.js
deleted file mode 100644
index 2a59d10..0000000
--- a/contexts/data/lib/ace/theme-merbivore-uncompressed.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Michael Schwartz <mr.pants AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/merbivore', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-merbivore";
-exports.cssText = "\
-.ace-merbivore .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-merbivore .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-merbivore .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-merbivore .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-merbivore .ace_scroller {\
- background-color: #161616;\
-}\
-\
-.ace-merbivore .ace_text-layer {\
- cursor: text;\
- color: #E6E1DC;\
-}\
-\
-.ace-merbivore .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-merbivore .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-merbivore .ace_marker-layer .ace_selection {\
- background: #454545;\
-}\
-\
-.ace-merbivore .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-merbivore .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404040;\
-}\
-\
-.ace-merbivore .ace_marker-layer .ace_active_line {\
- background: #333435;\
-}\
-\
-.ace-merbivore .ace_marker-layer .ace_selected_word {\
- border: 1px solid #454545;\
-}\
- \
-.ace-merbivore .ace_invisible {\
- color: #404040;\
-}\
-\
-.ace-merbivore .ace_keyword {\
- color:#FC6F09;\
-}\
-\
-.ace-merbivore .ace_constant {\
- color:#1EDAFB;\
-}\
-\
-.ace-merbivore .ace_constant.ace_language {\
- color:#FDC251;\
-}\
-\
-.ace-merbivore .ace_constant.ace_library {\
- color:#8DFF0A;\
-}\
-\
-.ace-merbivore .ace_constant.ace_numeric {\
- color:#58C554;\
-}\
-\
-.ace-merbivore .ace_invalid {\
- color:#FFFFFF;\
-background-color:#990000;\
-}\
-\
-.ace-merbivore .ace_fold {\
- background-color: #FC6F09;\
- border-color: #E6E1DC;\
-}\
-\
-.ace-merbivore .ace_support.ace_function {\
- color:#FC6F09;\
-}\
-\
-.ace-merbivore .ace_string {\
- color:#8DFF0A;\
-}\
-\
-.ace-merbivore .ace_comment {\
- font-style:italic;\
-color:#AD2EA4;\
-}\
-\
-.ace-merbivore .ace_meta.ace_tag {\
- color:#FC6F09;\
-}\
-\
-.ace-merbivore .ace_entity.ace_other.ace_attribute-name {\
- color:#FFFF89;\
-}\
-\
-.ace-merbivore .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-merbivore.js b/contexts/data/lib/ace/theme-merbivore.js
index db66ae1..b0cafb2 100644
--- a/contexts/data/lib/ace/theme-merbivore.js
+++ b/contexts/data/lib/ace/theme-merbivore.js
@@ -1 +1,135 @@
-define("ace/theme/merbivore",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-merbivore",b.cssText=".ace-merbivore .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-merbivore .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-merbivore .ace_gutter { background: #e8e8e8; color: #333;}.ace-merbivore .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-merbivore .ace_scroller { background-color: #161616;}.ace-merbivore .ace_text-layer { cursor: text; color: #E6E1DC;}.ace-merbivore .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-merbivore .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-merbivore .ace_marker-layer .ace_selection { background: #454545;}.ace-merbivore .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-merbivore .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404040;}.ace-merbivore .ace_marker-layer .ace_active_line { background: #333435;}.ace-merbivore .ace_marker-layer .ace_selected_word { border: 1px solid #454545;} .ace-merbivore .ace_invisible { color: #404040;}.ace-merbivore .ace_keyword { color:#FC6F09;}.ace-merbivore .ace_constant { color:#1EDAFB;}.ace-merbivore .ace_constant.ace_language { color:#FDC251;}.ace-merbivore .ace_constant.ace_library { color:#8DFF0A;}.ace-merbivore .ace_constant.ace_numeric { color:#58C554;}.ace-merbivore .ace_invalid { color:#FFFFFF;background-color:#990000;}.ace-merbivore .ace_fold { background-color: #FC6F09; border-color: #E6E1DC;}.ace-merbivore .ace_support.ace_function { color:#FC6F09;}.ace-merbivore .ace_string { color:#8DFF0A;}.ace-merbivore .ace_comment { font-style:italic;color:#AD2EA4;}.ace-merbivore .ace_meta.ace_tag { color:#FC6F09;}.ace-merbivore .ace_entity.ace_other.ace_attribute-name { color:#FFFF89;}.ace-merbivore .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/merbivore', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-merbivore";
+exports.cssText = ".ace-merbivore .ace_gutter {\
+background: #202020;\
+color: #E6E1DC\
+}\
+.ace-merbivore .ace_print-margin {\
+width: 1px;\
+background: #555651\
+}\
+.ace-merbivore .ace_scroller {\
+background-color: #161616\
+}\
+.ace-merbivore .ace_text-layer {\
+color: #E6E1DC\
+}\
+.ace-merbivore .ace_cursor {\
+border-left: 2px solid #FFFFFF\
+}\
+.ace-merbivore .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #FFFFFF\
+}\
+.ace-merbivore .ace_marker-layer .ace_selection {\
+background: #454545\
+}\
+.ace-merbivore.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #161616;\
+border-radius: 2px\
+}\
+.ace-merbivore .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-merbivore .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #404040\
+}\
+.ace-merbivore .ace_marker-layer .ace_active-line {\
+background: #333435\
+}\
+.ace-merbivore .ace_gutter-active-line {\
+background-color: #333435\
+}\
+.ace-merbivore .ace_marker-layer .ace_selected-word {\
+border: 1px solid #454545\
+}\
+.ace-merbivore .ace_invisible {\
+color: #404040\
+}\
+.ace-merbivore .ace_entity.ace_name.ace_tag,\
+.ace-merbivore .ace_keyword,\
+.ace-merbivore .ace_meta,\
+.ace-merbivore .ace_meta.ace_tag,\
+.ace-merbivore .ace_storage,\
+.ace-merbivore .ace_support.ace_function {\
+color: #FC6F09\
+}\
+.ace-merbivore .ace_constant,\
+.ace-merbivore .ace_constant.ace_character,\
+.ace-merbivore .ace_constant.ace_character.ace_escape,\
+.ace-merbivore .ace_constant.ace_other,\
+.ace-merbivore .ace_support.ace_type {\
+color: #1EDAFB\
+}\
+.ace-merbivore .ace_constant.ace_character.ace_escape {\
+color: #519F50\
+}\
+.ace-merbivore .ace_constant.ace_language {\
+color: #FDC251\
+}\
+.ace-merbivore .ace_constant.ace_library,\
+.ace-merbivore .ace_string,\
+.ace-merbivore .ace_support.ace_constant {\
+color: #8DFF0A\
+}\
+.ace-merbivore .ace_constant.ace_numeric {\
+color: #58C554\
+}\
+.ace-merbivore .ace_invalid {\
+color: #FFFFFF;\
+background-color: #990000\
+}\
+.ace-merbivore .ace_fold {\
+background-color: #FC6F09;\
+border-color: #E6E1DC\
+}\
+.ace-merbivore .ace_comment {\
+font-style: italic;\
+color: #AD2EA4\
+}\
+.ace-merbivore .ace_entity.ace_other.ace_attribute-name {\
+color: #FFFF89\
+}\
+.ace-merbivore .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-merbivore .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQExP7zzBz5sz/AA50BAyDznYhAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-merbivore_soft-noconflict.js b/contexts/data/lib/ace/theme-merbivore_soft-noconflict.js
deleted file mode 100644
index f3a8878..0000000
--- a/contexts/data/lib/ace/theme-merbivore_soft-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/merbivore_soft",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-merbivore-soft",b.cssText=".ace-merbivore-soft .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-merbivore-soft .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-merbivore-soft .ace_gutter { background: #e8e8e8; color: #333;}.ace-merbivore-soft .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-merbivore-soft .ace_scroller { background-color: #1C1C1C;}.ace-merbivore-soft .ace_text-layer { cursor: text; color: #E6E1DC;}.ace-merbivore-soft .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-merbivore-soft .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-merbivore-soft .ace_marker-layer .ace_selection { background: #494949;}.ace-merbivore-soft .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-merbivore-soft .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404040;}.ace-merbivore-soft .ace_marker-layer .ace_active_line { background: #333435;}.ace-merbivore-soft .ace_marker-layer .ace_selected_word { border: 1px solid #494949;} .ace-merbivore-soft .ace_invisible { color: #404040;}.ace-merbivore-soft .ace_keyword { color:#FC803A;}.ace-merbivore-soft .ace_constant { color:#68C1D8;}.ace-merbivore-soft .ace_constant.ace_language { color:#E1C582;}.ace-merbivore-soft .ace_constant.ace_library { color:#8EC65F;}.ace-merbivore-soft .ace_constant.ace_numeric { color:#7FC578;}.ace-merbivore-soft .ace_invalid { color:#FFFFFF;background-color:#FE3838;}.ace-merbivore-soft .ace_invalid.ace_deprecated { color:#FFFFFF;background-color:#FE3838;}.ace-merbivore-soft .ace_fold { background-color: #FC803A; border-color: #E6E1DC;}.ace-merbivore-soft .ace_string { color:#8EC65F;}.ace-merbivore-soft .ace_comment { font-style:italic;color:#AC4BB8;}.ace-merbivore-soft .ace_meta { font-style:italic;color:#AC4BB8;}.ace-merbivore-soft .ace_meta.ace_tag { color:#FC803A;}.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name { color:#EAF1A3;}.ace-merbivore-soft .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-merbivore_soft-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-merbivore_soft-uncompressed-noconflict.js
deleted file mode 100644
index 8c1336c..0000000
--- a/contexts/data/lib/ace/theme-merbivore_soft-uncompressed-noconflict.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Michael Schwartz <mr.pants AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/merbivore_soft', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-merbivore-soft";
-exports.cssText = "\
-.ace-merbivore-soft .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-merbivore-soft .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-merbivore-soft .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-merbivore-soft .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-merbivore-soft .ace_scroller {\
- background-color: #1C1C1C;\
-}\
-\
-.ace-merbivore-soft .ace_text-layer {\
- cursor: text;\
- color: #E6E1DC;\
-}\
-\
-.ace-merbivore-soft .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-merbivore-soft .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-merbivore-soft .ace_marker-layer .ace_selection {\
- background: #494949;\
-}\
-\
-.ace-merbivore-soft .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-merbivore-soft .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404040;\
-}\
-\
-.ace-merbivore-soft .ace_marker-layer .ace_active_line {\
- background: #333435;\
-}\
-\
-.ace-merbivore-soft .ace_marker-layer .ace_selected_word {\
- border: 1px solid #494949;\
-}\
- \
-.ace-merbivore-soft .ace_invisible {\
- color: #404040;\
-}\
-\
-.ace-merbivore-soft .ace_keyword {\
- color:#FC803A;\
-}\
-\
-.ace-merbivore-soft .ace_constant {\
- color:#68C1D8;\
-}\
-\
-.ace-merbivore-soft .ace_constant.ace_language {\
- color:#E1C582;\
-}\
-\
-.ace-merbivore-soft .ace_constant.ace_library {\
- color:#8EC65F;\
-}\
-\
-.ace-merbivore-soft .ace_constant.ace_numeric {\
- color:#7FC578;\
-}\
-\
-.ace-merbivore-soft .ace_invalid {\
- color:#FFFFFF;\
-background-color:#FE3838;\
-}\
-\
-.ace-merbivore-soft .ace_invalid.ace_deprecated {\
- color:#FFFFFF;\
-background-color:#FE3838;\
-}\
-\
-.ace-merbivore-soft .ace_fold {\
- background-color: #FC803A;\
- border-color: #E6E1DC;\
-}\
-\
-.ace-merbivore-soft .ace_string {\
- color:#8EC65F;\
-}\
-\
-.ace-merbivore-soft .ace_comment {\
- font-style:italic;\
-color:#AC4BB8;\
-}\
-\
-.ace-merbivore-soft .ace_meta {\
- font-style:italic;\
-color:#AC4BB8;\
-}\
-\
-.ace-merbivore-soft .ace_meta.ace_tag {\
- color:#FC803A;\
-}\
-\
-.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\
- color:#EAF1A3;\
-}\
-\
-.ace-merbivore-soft .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-merbivore_soft-uncompressed.js b/contexts/data/lib/ace/theme-merbivore_soft-uncompressed.js
deleted file mode 100644
index 5badf4b..0000000
--- a/contexts/data/lib/ace/theme-merbivore_soft-uncompressed.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Michael Schwartz <mr.pants AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/merbivore_soft', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-merbivore-soft";
-exports.cssText = "\
-.ace-merbivore-soft .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-merbivore-soft .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-merbivore-soft .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-merbivore-soft .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-merbivore-soft .ace_scroller {\
- background-color: #1C1C1C;\
-}\
-\
-.ace-merbivore-soft .ace_text-layer {\
- cursor: text;\
- color: #E6E1DC;\
-}\
-\
-.ace-merbivore-soft .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-merbivore-soft .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-merbivore-soft .ace_marker-layer .ace_selection {\
- background: #494949;\
-}\
-\
-.ace-merbivore-soft .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-merbivore-soft .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404040;\
-}\
-\
-.ace-merbivore-soft .ace_marker-layer .ace_active_line {\
- background: #333435;\
-}\
-\
-.ace-merbivore-soft .ace_marker-layer .ace_selected_word {\
- border: 1px solid #494949;\
-}\
- \
-.ace-merbivore-soft .ace_invisible {\
- color: #404040;\
-}\
-\
-.ace-merbivore-soft .ace_keyword {\
- color:#FC803A;\
-}\
-\
-.ace-merbivore-soft .ace_constant {\
- color:#68C1D8;\
-}\
-\
-.ace-merbivore-soft .ace_constant.ace_language {\
- color:#E1C582;\
-}\
-\
-.ace-merbivore-soft .ace_constant.ace_library {\
- color:#8EC65F;\
-}\
-\
-.ace-merbivore-soft .ace_constant.ace_numeric {\
- color:#7FC578;\
-}\
-\
-.ace-merbivore-soft .ace_invalid {\
- color:#FFFFFF;\
-background-color:#FE3838;\
-}\
-\
-.ace-merbivore-soft .ace_invalid.ace_deprecated {\
- color:#FFFFFF;\
-background-color:#FE3838;\
-}\
-\
-.ace-merbivore-soft .ace_fold {\
- background-color: #FC803A;\
- border-color: #E6E1DC;\
-}\
-\
-.ace-merbivore-soft .ace_string {\
- color:#8EC65F;\
-}\
-\
-.ace-merbivore-soft .ace_comment {\
- font-style:italic;\
-color:#AC4BB8;\
-}\
-\
-.ace-merbivore-soft .ace_meta {\
- font-style:italic;\
-color:#AC4BB8;\
-}\
-\
-.ace-merbivore-soft .ace_meta.ace_tag {\
- color:#FC803A;\
-}\
-\
-.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\
- color:#EAF1A3;\
-}\
-\
-.ace-merbivore-soft .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-merbivore_soft.js b/contexts/data/lib/ace/theme-merbivore_soft.js
index 1b2a822..d1f6921 100644
--- a/contexts/data/lib/ace/theme-merbivore_soft.js
+++ b/contexts/data/lib/ace/theme-merbivore_soft.js
@@ -1 +1,136 @@
-define("ace/theme/merbivore_soft",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-merbivore-soft",b.cssText=".ace-merbivore-soft .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-merbivore-soft .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-merbivore-soft .ace_gutter { background: #e8e8e8; color: #333;}.ace-merbivore-soft .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-merbivore-soft .ace_scroller { background-color: #1C1C1C;}.ace-merbivore-soft .ace_text-layer { cursor: text; color: #E6E1DC;}.ace-merbivore-soft .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-merbivore-soft .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-merbivore-soft .ace_marker-layer .ace_selection { background: #494949;}.ace-merbivore-soft .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-merbivore-soft .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404040;}.ace-merbivore-soft .ace_marker-layer .ace_active_line { background: #333435;}.ace-merbivore-soft .ace_marker-layer .ace_selected_word { border: 1px solid #494949;} .ace-merbivore-soft .ace_invisible { color: #404040;}.ace-merbivore-soft .ace_keyword { color:#FC803A;}.ace-merbivore-soft .ace_constant { color:#68C1D8;}.ace-merbivore-soft .ace_constant.ace_language { color:#E1C582;}.ace-merbivore-soft .ace_constant.ace_library { color:#8EC65F;}.ace-merbivore-soft .ace_constant.ace_numeric { color:#7FC578;}.ace-merbivore-soft .ace_invalid { color:#FFFFFF;background-color:#FE3838;}.ace-merbivore-soft .ace_invalid.ace_deprecated { color:#FFFFFF;background-color:#FE3838;}.ace-merbivore-soft .ace_fold { background-color: #FC803A; border-color: #E6E1DC;}.ace-merbivore-soft .ace_string { color:#8EC65F;}.ace-merbivore-soft .ace_comment { font-style:italic;color:#AC4BB8;}.ace-merbivore-soft .ace_meta { font-style:italic;color:#AC4BB8;}.ace-merbivore-soft .ace_meta.ace_tag { color:#FC803A;}.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name { color:#EAF1A3;}.ace-merbivore-soft .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/merbivore_soft', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-merbivore-soft";
+exports.cssText = ".ace-merbivore-soft .ace_gutter {\
+background: #262424;\
+color: #E6E1DC\
+}\
+.ace-merbivore-soft .ace_print-margin {\
+width: 1px;\
+background: #262424\
+}\
+.ace-merbivore-soft .ace_scroller {\
+background-color: #1C1C1C\
+}\
+.ace-merbivore-soft .ace_text-layer {\
+color: #E6E1DC\
+}\
+.ace-merbivore-soft .ace_cursor {\
+border-left: 2px solid #FFFFFF\
+}\
+.ace-merbivore-soft .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #FFFFFF\
+}\
+.ace-merbivore-soft .ace_marker-layer .ace_selection {\
+background: #494949\
+}\
+.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #1C1C1C;\
+border-radius: 2px\
+}\
+.ace-merbivore-soft .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-merbivore-soft .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #404040\
+}\
+.ace-merbivore-soft .ace_marker-layer .ace_active-line {\
+background: #333435\
+}\
+.ace-merbivore-soft .ace_gutter-active-line {\
+background-color: #333435\
+}\
+.ace-merbivore-soft .ace_marker-layer .ace_selected-word {\
+border: 1px solid #494949\
+}\
+.ace-merbivore-soft .ace_invisible {\
+color: #404040\
+}\
+.ace-merbivore-soft .ace_entity.ace_name.ace_tag,\
+.ace-merbivore-soft .ace_keyword,\
+.ace-merbivore-soft .ace_meta,\
+.ace-merbivore-soft .ace_meta.ace_tag,\
+.ace-merbivore-soft .ace_storage {\
+color: #FC803A\
+}\
+.ace-merbivore-soft .ace_constant,\
+.ace-merbivore-soft .ace_constant.ace_character,\
+.ace-merbivore-soft .ace_constant.ace_character.ace_escape,\
+.ace-merbivore-soft .ace_constant.ace_other,\
+.ace-merbivore-soft .ace_support.ace_type {\
+color: #68C1D8\
+}\
+.ace-merbivore-soft .ace_constant.ace_character.ace_escape {\
+color: #B3E5B4\
+}\
+.ace-merbivore-soft .ace_constant.ace_language {\
+color: #E1C582\
+}\
+.ace-merbivore-soft .ace_constant.ace_library,\
+.ace-merbivore-soft .ace_string,\
+.ace-merbivore-soft .ace_support.ace_constant {\
+color: #8EC65F\
+}\
+.ace-merbivore-soft .ace_constant.ace_numeric {\
+color: #7FC578\
+}\
+.ace-merbivore-soft .ace_invalid,\
+.ace-merbivore-soft .ace_invalid.ace_deprecated {\
+color: #FFFFFF;\
+background-color: #FE3838\
+}\
+.ace-merbivore-soft .ace_fold {\
+background-color: #FC803A;\
+border-color: #E6E1DC\
+}\
+.ace-merbivore-soft .ace_comment,\
+.ace-merbivore-soft .ace_meta {\
+font-style: italic;\
+color: #AC4BB8\
+}\
+.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\
+color: #EAF1A3\
+}\
+.ace-merbivore-soft .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-merbivore-soft .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkZH5zzBz5sz/AA8EBB6crd1rAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-mono_industrial-noconflict.js b/contexts/data/lib/ace/theme-mono_industrial-noconflict.js
deleted file mode 100644
index acfba2b..0000000
--- a/contexts/data/lib/ace/theme-mono_industrial-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/mono_industrial",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-mono-industrial",b.cssText=".ace-mono-industrial .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-mono-industrial .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-mono-industrial .ace_gutter { background: #e8e8e8; color: #333;}.ace-mono-industrial .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-mono-industrial .ace_scroller { background-color: #222C28;}.ace-mono-industrial .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-mono-industrial .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-mono-industrial .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-mono-industrial .ace_marker-layer .ace_selection { background: rgba(145, 153, 148, 0.40);}.ace-mono-industrial .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-mono-industrial .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(102, 108, 104, 0.50);}.ace-mono-industrial .ace_marker-layer .ace_active_line { background: rgba(12, 13, 12, 0.25);}.ace-mono-industrial .ace_marker-layer .ace_selected_word { border: 1px solid rgba(145, 153, 148, 0.40);} .ace-mono-industrial .ace_invisible { color: rgba(102, 108, 104, 0.50);}.ace-mono-industrial .ace_keyword { color:#A39E64;}.ace-mono-industrial .ace_keyword.ace_operator { color:#A8B3AB;}.ace-mono-industrial .ace_constant { color:#E98800;}.ace-mono-industrial .ace_constant.ace_numeric { color:#E98800;}.ace-mono-industrial .ace_invalid { color:#FFFFFF;background-color:rgba(153, 0, 0, 0.68);}.ace-mono-industrial .ace_fold { background-color: #A8B3AB; border-color: #FFFFFF;}.ace-mono-industrial .ace_support.ace_function { color:#588E60;}.ace-mono-industrial .ace_comment { color:#666C68;background-color:#151C19;}.ace-mono-industrial .ace_variable.ace_language { color:#648BD2;}.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name { color:#909993;}.ace-mono-industrial .ace_entity.ace_name { color:#5778B6;}.ace-mono-industrial .ace_entity.ace_name.ace_function { color:#A8B3AB;}.ace-mono-industrial .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-mono_industrial-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-mono_industrial-uncompressed-noconflict.js
deleted file mode 100644
index 5db5a7b..0000000
--- a/contexts/data/lib/ace/theme-mono_industrial-uncompressed-noconflict.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/mono_industrial', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-mono-industrial";
-exports.cssText = "\
-.ace-mono-industrial .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-mono-industrial .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-mono-industrial .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-mono-industrial .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-mono-industrial .ace_scroller {\
- background-color: #222C28;\
-}\
-\
-.ace-mono-industrial .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-mono-industrial .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-mono-industrial .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-mono-industrial .ace_marker-layer .ace_selection {\
- background: rgba(145, 153, 148, 0.40);\
-}\
-\
-.ace-mono-industrial .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-mono-industrial .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(102, 108, 104, 0.50);\
-}\
-\
-.ace-mono-industrial .ace_marker-layer .ace_active_line {\
- background: rgba(12, 13, 12, 0.25);\
-}\
-\
-.ace-mono-industrial .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(145, 153, 148, 0.40);\
-}\
- \
-.ace-mono-industrial .ace_invisible {\
- color: rgba(102, 108, 104, 0.50);\
-}\
-\
-.ace-mono-industrial .ace_keyword {\
- color:#A39E64;\
-}\
-\
-.ace-mono-industrial .ace_keyword.ace_operator {\
- color:#A8B3AB;\
-}\
-\
-.ace-mono-industrial .ace_constant {\
- color:#E98800;\
-}\
-\
-.ace-mono-industrial .ace_constant.ace_numeric {\
- color:#E98800;\
-}\
-\
-.ace-mono-industrial .ace_invalid {\
- color:#FFFFFF;\
-background-color:rgba(153, 0, 0, 0.68);\
-}\
-\
-.ace-mono-industrial .ace_fold {\
- background-color: #A8B3AB;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-mono-industrial .ace_support.ace_function {\
- color:#588E60;\
-}\
-\
-.ace-mono-industrial .ace_comment {\
- color:#666C68;\
-background-color:#151C19;\
-}\
-\
-.ace-mono-industrial .ace_variable.ace_language {\
- color:#648BD2;\
-}\
-\
-.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {\
- color:#909993;\
-}\
-\
-.ace-mono-industrial .ace_entity.ace_name {\
- color:#5778B6;\
-}\
-\
-.ace-mono-industrial .ace_entity.ace_name.ace_function {\
- color:#A8B3AB;\
-}\
-\
-.ace-mono-industrial .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-mono_industrial-uncompressed.js b/contexts/data/lib/ace/theme-mono_industrial-uncompressed.js
deleted file mode 100644
index fff29dc..0000000
--- a/contexts/data/lib/ace/theme-mono_industrial-uncompressed.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/mono_industrial', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-mono-industrial";
-exports.cssText = "\
-.ace-mono-industrial .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-mono-industrial .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-mono-industrial .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-mono-industrial .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-mono-industrial .ace_scroller {\
- background-color: #222C28;\
-}\
-\
-.ace-mono-industrial .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-mono-industrial .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-mono-industrial .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-mono-industrial .ace_marker-layer .ace_selection {\
- background: rgba(145, 153, 148, 0.40);\
-}\
-\
-.ace-mono-industrial .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-mono-industrial .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(102, 108, 104, 0.50);\
-}\
-\
-.ace-mono-industrial .ace_marker-layer .ace_active_line {\
- background: rgba(12, 13, 12, 0.25);\
-}\
-\
-.ace-mono-industrial .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(145, 153, 148, 0.40);\
-}\
- \
-.ace-mono-industrial .ace_invisible {\
- color: rgba(102, 108, 104, 0.50);\
-}\
-\
-.ace-mono-industrial .ace_keyword {\
- color:#A39E64;\
-}\
-\
-.ace-mono-industrial .ace_keyword.ace_operator {\
- color:#A8B3AB;\
-}\
-\
-.ace-mono-industrial .ace_constant {\
- color:#E98800;\
-}\
-\
-.ace-mono-industrial .ace_constant.ace_numeric {\
- color:#E98800;\
-}\
-\
-.ace-mono-industrial .ace_invalid {\
- color:#FFFFFF;\
-background-color:rgba(153, 0, 0, 0.68);\
-}\
-\
-.ace-mono-industrial .ace_fold {\
- background-color: #A8B3AB;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-mono-industrial .ace_support.ace_function {\
- color:#588E60;\
-}\
-\
-.ace-mono-industrial .ace_comment {\
- color:#666C68;\
-background-color:#151C19;\
-}\
-\
-.ace-mono-industrial .ace_variable.ace_language {\
- color:#648BD2;\
-}\
-\
-.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {\
- color:#909993;\
-}\
-\
-.ace-mono-industrial .ace_entity.ace_name {\
- color:#5778B6;\
-}\
-\
-.ace-mono-industrial .ace_entity.ace_name.ace_function {\
- color:#A8B3AB;\
-}\
-\
-.ace-mono-industrial .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-mono_industrial.js b/contexts/data/lib/ace/theme-mono_industrial.js
index 8ebff2c..2bcd637 100644
--- a/contexts/data/lib/ace/theme-mono_industrial.js
+++ b/contexts/data/lib/ace/theme-mono_industrial.js
@@ -1 +1,148 @@
-define("ace/theme/mono_industrial",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-mono-industrial",b.cssText=".ace-mono-industrial .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-mono-industrial .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-mono-industrial .ace_gutter { background: #e8e8e8; color: #333;}.ace-mono-industrial .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-mono-industrial .ace_scroller { background-color: #222C28;}.ace-mono-industrial .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-mono-industrial .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-mono-industrial .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-mono-industrial .ace_marker-layer .ace_selection { background: rgba(145, 153, 148, 0.40);}.ace-mono-industrial .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-mono-industrial .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(102, 108, 104, 0.50);}.ace-mono-industrial .ace_marker-layer .ace_active_line { background: rgba(12, 13, 12, 0.25);}.ace-mono-industrial .ace_marker-layer .ace_selected_word { border: 1px solid rgba(145, 153, 148, 0.40);} .ace-mono-industrial .ace_invisible { color: rgba(102, 108, 104, 0.50);}.ace-mono-industrial .ace_keyword { color:#A39E64;}.ace-mono-industrial .ace_keyword.ace_operator { color:#A8B3AB;}.ace-mono-industrial .ace_constant { color:#E98800;}.ace-mono-industrial .ace_constant.ace_numeric { color:#E98800;}.ace-mono-industrial .ace_invalid { color:#FFFFFF;background-color:rgba(153, 0, 0, 0.68);}.ace-mono-industrial .ace_fold { background-color: #A8B3AB; border-color: #FFFFFF;}.ace-mono-industrial .ace_support.ace_function { color:#588E60;}.ace-mono-industrial .ace_comment { color:#666C68;background-color:#151C19;}.ace-mono-industrial .ace_variable.ace_language { color:#648BD2;}.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name { color:#909993;}.ace-mono-industrial .ace_entity.ace_name { color:#5778B6;}.ace-mono-industrial .ace_entity.ace_name.ace_function { color:#A8B3AB;}.ace-mono-industrial .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/mono_industrial', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-mono-industrial";
+exports.cssText = ".ace-mono-industrial .ace_gutter {\
+background: #1d2521;\
+color: #C5C9C9\
+}\
+.ace-mono-industrial .ace_print-margin {\
+width: 1px;\
+background: #555651\
+}\
+.ace-mono-industrial .ace_scroller {\
+background-color: #222C28\
+}\
+.ace-mono-industrial .ace_text-layer {\
+color: #FFFFFF\
+}\
+.ace-mono-industrial .ace_cursor {\
+border-left: 2px solid #FFFFFF\
+}\
+.ace-mono-industrial .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #FFFFFF\
+}\
+.ace-mono-industrial .ace_marker-layer .ace_selection {\
+background: rgba(145, 153, 148, 0.40)\
+}\
+.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #222C28;\
+border-radius: 2px\
+}\
+.ace-mono-industrial .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-mono-industrial .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(102, 108, 104, 0.50)\
+}\
+.ace-mono-industrial .ace_marker-layer .ace_active-line {\
+background: rgba(12, 13, 12, 0.25)\
+}\
+.ace-mono-industrial .ace_gutter-active-line {\
+background-color: rgba(12, 13, 12, 0.25)\
+}\
+.ace-mono-industrial .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(145, 153, 148, 0.40)\
+}\
+.ace-mono-industrial .ace_invisible {\
+color: rgba(102, 108, 104, 0.50)\
+}\
+.ace-mono-industrial .ace_string {\
+background-color: #151C19;\
+color: #FFFFFF\
+}\
+.ace-mono-industrial .ace_keyword,\
+.ace-mono-industrial .ace_meta {\
+color: #A39E64\
+}\
+.ace-mono-industrial .ace_constant,\
+.ace-mono-industrial .ace_constant.ace_character,\
+.ace-mono-industrial .ace_constant.ace_character.ace_escape,\
+.ace-mono-industrial .ace_constant.ace_numeric,\
+.ace-mono-industrial .ace_constant.ace_other {\
+color: #E98800\
+}\
+.ace-mono-industrial .ace_entity.ace_name.ace_function,\
+.ace-mono-industrial .ace_keyword.ace_operator,\
+.ace-mono-industrial .ace_variable {\
+color: #A8B3AB\
+}\
+.ace-mono-industrial .ace_invalid {\
+color: #FFFFFF;\
+background-color: rgba(153, 0, 0, 0.68)\
+}\
+.ace-mono-industrial .ace_support.ace_constant {\
+color: #C87500\
+}\
+.ace-mono-industrial .ace_fold {\
+background-color: #A8B3AB;\
+border-color: #FFFFFF\
+}\
+.ace-mono-industrial .ace_support.ace_function {\
+color: #588E60\
+}\
+.ace-mono-industrial .ace_entity.ace_name,\
+.ace-mono-industrial .ace_support.ace_class,\
+.ace-mono-industrial .ace_support.ace_type {\
+color: #5778B6\
+}\
+.ace-mono-industrial .ace_storage {\
+color: #C23B00\
+}\
+.ace-mono-industrial .ace_variable.ace_language,\
+.ace-mono-industrial .ace_variable.ace_parameter {\
+color: #648BD2\
+}\
+.ace-mono-industrial .ace_comment {\
+color: #666C68;\
+background-color: #151C19\
+}\
+.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {\
+color: #909993\
+}\
+.ace-mono-industrial .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-mono-industrial .ace_entity.ace_name.ace_tag {\
+color: #A65EFF\
+}\
+.ace-mono-industrial .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ0tH4zzBz5sz/ABAOBECKH+evAAAAAElFTkSuQmCC) right repeat-y\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-monokai-noconflict.js b/contexts/data/lib/ace/theme-monokai-noconflict.js
deleted file mode 100644
index 99b6063..0000000
--- a/contexts/data/lib/ace/theme-monokai-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/monokai",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-monokai",b.cssText=".ace-monokai .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-monokai .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-monokai .ace_gutter { background: #e8e8e8; color: #333;}.ace-monokai .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-monokai .ace_scroller { background-color: #272822;}.ace-monokai .ace_text-layer { cursor: text; color: #F8F8F2;}.ace-monokai .ace_cursor { border-left: 2px solid #F8F8F0;}.ace-monokai .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #F8F8F0;} .ace-monokai .ace_marker-layer .ace_selection { background: #49483E;}.ace-monokai .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-monokai .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #49483E;}.ace-monokai .ace_marker-layer .ace_active_line { background: #49483E;}.ace-monokai .ace_marker-layer .ace_selected_word { border: 1px solid #49483E;} .ace-monokai .ace_invisible { color: #49483E;}.ace-monokai .ace_keyword { color:#F92672;}.ace-monokai .ace_constant.ace_language { color:#AE81FF;}.ace-monokai .ace_constant.ace_numeric { color:#AE81FF;}.ace-monokai .ace_invalid { color:#F8F8F0;background-color:#F92672;}.ace-monokai .ace_invalid.ace_deprecated { color:#F8F8F0;background-color:#AE81FF;}.ace-monokai .ace_fold { background-color: #A6E22E; border-color: #F8F8F2;}.ace-monokai .ace_support.ace_function { color:#66D9EF;}.ace-monokai .ace_string { color:#E6DB74;}.ace-monokai .ace_comment { color:#75715E;}.ace-monokai .ace_entity.ace_other.ace_attribute-name { color:#A6E22E;}.ace-monokai .ace_entity.ace_name.ace_function { color:#A6E22E;}.ace-monokai .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-monokai-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-monokai-uncompressed-noconflict.js
deleted file mode 100644
index 4600168..0000000
--- a/contexts/data/lib/ace/theme-monokai-uncompressed-noconflict.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/monokai', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-monokai";
-exports.cssText = "\
-.ace-monokai .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-monokai .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-monokai .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-monokai .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-monokai .ace_scroller {\
- background-color: #272822;\
-}\
-\
-.ace-monokai .ace_text-layer {\
- cursor: text;\
- color: #F8F8F2;\
-}\
-\
-.ace-monokai .ace_cursor {\
- border-left: 2px solid #F8F8F0;\
-}\
-\
-.ace-monokai .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #F8F8F0;\
-}\
- \
-.ace-monokai .ace_marker-layer .ace_selection {\
- background: #49483E;\
-}\
-\
-.ace-monokai .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-monokai .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #49483E;\
-}\
-\
-.ace-monokai .ace_marker-layer .ace_active_line {\
- background: #49483E;\
-}\
-\
-.ace-monokai .ace_marker-layer .ace_selected_word {\
- border: 1px solid #49483E;\
-}\
- \
-.ace-monokai .ace_invisible {\
- color: #49483E;\
-}\
-\
-.ace-monokai .ace_keyword {\
- color:#F92672;\
-}\
-\
-.ace-monokai .ace_constant.ace_language {\
- color:#AE81FF;\
-}\
-\
-.ace-monokai .ace_constant.ace_numeric {\
- color:#AE81FF;\
-}\
-\
-.ace-monokai .ace_invalid {\
- color:#F8F8F0;\
-background-color:#F92672;\
-}\
-\
-.ace-monokai .ace_invalid.ace_deprecated {\
- color:#F8F8F0;\
-background-color:#AE81FF;\
-}\
-\
-.ace-monokai .ace_fold {\
- background-color: #A6E22E;\
- border-color: #F8F8F2;\
-}\
-\
-.ace-monokai .ace_support.ace_function {\
- color:#66D9EF;\
-}\
-\
-.ace-monokai .ace_string {\
- color:#E6DB74;\
-}\
-\
-.ace-monokai .ace_comment {\
- color:#75715E;\
-}\
-\
-.ace-monokai .ace_entity.ace_other.ace_attribute-name {\
- color:#A6E22E;\
-}\
-\
-.ace-monokai .ace_entity.ace_name.ace_function {\
- color:#A6E22E;\
-}\
-\
-.ace-monokai .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-monokai-uncompressed.js b/contexts/data/lib/ace/theme-monokai-uncompressed.js
deleted file mode 100644
index 8a4a73c..0000000
--- a/contexts/data/lib/ace/theme-monokai-uncompressed.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/monokai', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-monokai";
-exports.cssText = "\
-.ace-monokai .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-monokai .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-monokai .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-monokai .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-monokai .ace_scroller {\
- background-color: #272822;\
-}\
-\
-.ace-monokai .ace_text-layer {\
- cursor: text;\
- color: #F8F8F2;\
-}\
-\
-.ace-monokai .ace_cursor {\
- border-left: 2px solid #F8F8F0;\
-}\
-\
-.ace-monokai .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #F8F8F0;\
-}\
- \
-.ace-monokai .ace_marker-layer .ace_selection {\
- background: #49483E;\
-}\
-\
-.ace-monokai .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-monokai .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #49483E;\
-}\
-\
-.ace-monokai .ace_marker-layer .ace_active_line {\
- background: #49483E;\
-}\
-\
-.ace-monokai .ace_marker-layer .ace_selected_word {\
- border: 1px solid #49483E;\
-}\
- \
-.ace-monokai .ace_invisible {\
- color: #49483E;\
-}\
-\
-.ace-monokai .ace_keyword {\
- color:#F92672;\
-}\
-\
-.ace-monokai .ace_constant.ace_language {\
- color:#AE81FF;\
-}\
-\
-.ace-monokai .ace_constant.ace_numeric {\
- color:#AE81FF;\
-}\
-\
-.ace-monokai .ace_invalid {\
- color:#F8F8F0;\
-background-color:#F92672;\
-}\
-\
-.ace-monokai .ace_invalid.ace_deprecated {\
- color:#F8F8F0;\
-background-color:#AE81FF;\
-}\
-\
-.ace-monokai .ace_fold {\
- background-color: #A6E22E;\
- border-color: #F8F8F2;\
-}\
-\
-.ace-monokai .ace_support.ace_function {\
- color:#66D9EF;\
-}\
-\
-.ace-monokai .ace_string {\
- color:#E6DB74;\
-}\
-\
-.ace-monokai .ace_comment {\
- color:#75715E;\
-}\
-\
-.ace-monokai .ace_entity.ace_other.ace_attribute-name {\
- color:#A6E22E;\
-}\
-\
-.ace-monokai .ace_entity.ace_name.ace_function {\
- color:#A6E22E;\
-}\
-\
-.ace-monokai .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-monokai.js b/contexts/data/lib/ace/theme-monokai.js
index ba392d5..9b2d339 100644
--- a/contexts/data/lib/ace/theme-monokai.js
+++ b/contexts/data/lib/ace/theme-monokai.js
@@ -1 +1,140 @@
-define("ace/theme/monokai",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-monokai",b.cssText=".ace-monokai .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-monokai .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-monokai .ace_gutter { background: #e8e8e8; color: #333;}.ace-monokai .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-monokai .ace_scroller { background-color: #272822;}.ace-monokai .ace_text-layer { cursor: text; color: #F8F8F2;}.ace-monokai .ace_cursor { border-left: 2px solid #F8F8F0;}.ace-monokai .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #F8F8F0;} .ace-monokai .ace_marker-layer .ace_selection { background: #49483E;}.ace-monokai .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-monokai .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #49483E;}.ace-monokai .ace_marker-layer .ace_active_line { background: #49483E;}.ace-monokai .ace_marker-layer .ace_selected_word { border: 1px solid #49483E;} .ace-monokai .ace_invisible { color: #49483E;}.ace-monokai .ace_keyword { color:#F92672;}.ace-monokai .ace_constant.ace_language { color:#AE81FF;}.ace-monokai .ace_constant.ace_numeric { color:#AE81FF;}.ace-monokai .ace_invalid { color:#F8F8F0;background-color:#F92672;}.ace-monokai .ace_invalid.ace_deprecated { color:#F8F8F0;background-color:#AE81FF;}.ace-monokai .ace_fold { background-color: #A6E22E; border-color: #F8F8F2;}.ace-monokai .ace_support.ace_function { color:#66D9EF;}.ace-monokai .ace_string { color:#E6DB74;}.ace-monokai .ace_comment { color:#75715E;}.ace-monokai .ace_entity.ace_other.ace_attribute-name { color:#A6E22E;}.ace-monokai .ace_entity.ace_name.ace_function { color:#A6E22E;}.ace-monokai .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/monokai', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-monokai";
+exports.cssText = ".ace-monokai .ace_gutter {\
+background: #2f3129;\
+color: #f1f1f1\
+}\
+.ace-monokai .ace_print-margin {\
+width: 1px;\
+background: #555651\
+}\
+.ace-monokai .ace_scroller {\
+background-color: #272822\
+}\
+.ace-monokai .ace_text-layer {\
+color: #F8F8F2\
+}\
+.ace-monokai .ace_cursor {\
+border-left: 2px solid #F8F8F0\
+}\
+.ace-monokai .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #F8F8F0\
+}\
+.ace-monokai .ace_marker-layer .ace_selection {\
+background: #49483E\
+}\
+.ace-monokai.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #272822;\
+border-radius: 2px\
+}\
+.ace-monokai .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-monokai .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #49483E\
+}\
+.ace-monokai .ace_marker-layer .ace_active-line {\
+background: #202020\
+}\
+.ace-monokai .ace_gutter-active-line {\
+background-color: #272727\
+}\
+.ace-monokai .ace_marker-layer .ace_selected-word {\
+border: 1px solid #49483E\
+}\
+.ace-monokai .ace_invisible {\
+color: #49483E\
+}\
+.ace-monokai .ace_entity.ace_name.ace_tag,\
+.ace-monokai .ace_keyword,\
+.ace-monokai .ace_meta,\
+.ace-monokai .ace_storage {\
+color: #F92672\
+}\
+.ace-monokai .ace_constant.ace_character,\
+.ace-monokai .ace_constant.ace_language,\
+.ace-monokai .ace_constant.ace_numeric,\
+.ace-monokai .ace_constant.ace_other {\
+color: #AE81FF\
+}\
+.ace-monokai .ace_invalid {\
+color: #F8F8F0;\
+background-color: #F92672\
+}\
+.ace-monokai .ace_invalid.ace_deprecated {\
+color: #F8F8F0;\
+background-color: #AE81FF\
+}\
+.ace-monokai .ace_support.ace_constant,\
+.ace-monokai .ace_support.ace_function {\
+color: #66D9EF\
+}\
+.ace-monokai .ace_fold {\
+background-color: #A6E22E;\
+border-color: #F8F8F2\
+}\
+.ace-monokai .ace_storage.ace_type,\
+.ace-monokai .ace_support.ace_class,\
+.ace-monokai .ace_support.ace_type {\
+font-style: italic;\
+color: #66D9EF\
+}\
+.ace-monokai .ace_entity.ace_name.ace_function,\
+.ace-monokai .ace_entity.ace_other,\
+.ace-monokai .ace_variable {\
+color: #A6E22E\
+}\
+.ace-monokai .ace_variable.ace_parameter {\
+font-style: italic;\
+color: #FD971F\
+}\
+.ace-monokai .ace_string {\
+color: #E6DB74\
+}\
+.ace-monokai .ace_comment {\
+color: #75715E\
+}\
+.ace-monokai .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-monokai .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ11D6z7Bq1ar/ABCKBG6g04U2AAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-pastel_on_dark-noconflict.js b/contexts/data/lib/ace/theme-pastel_on_dark-noconflict.js
deleted file mode 100644
index fc62e03..0000000
--- a/contexts/data/lib/ace/theme-pastel_on_dark-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/pastel_on_dark",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-pastel-on-dark",b.cssText=".ace-pastel-on-dark .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-pastel-on-dark .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-pastel-on-dark .ace_gutter { background: #e8e8e8; color: #333;}.ace-pastel-on-dark .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-pastel-on-dark .ace_scroller { background-color: #2C2828;}.ace-pastel-on-dark .ace_text-layer { cursor: text; color: #8F938F;}.ace-pastel-on-dark .ace_cursor { border-left: 2px solid #A7A7A7;}.ace-pastel-on-dark .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #A7A7A7;} .ace-pastel-on-dark .ace_marker-layer .ace_selection { background: rgba(221, 240, 255, 0.20);}.ace-pastel-on-dark .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-pastel-on-dark .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.25);}.ace-pastel-on-dark .ace_marker-layer .ace_active_line { background: rgba(255, 255, 255, 0.031);}.ace-pastel-on-dark .ace_marker-layer .ace_selected_word { border: 1px solid rgba(221, 240, 255, 0.20);} .ace-pastel-on-dark .ace_invisible { color: rgba(255, 255, 255, 0.25);}.ace-pastel-on-dark .ace_keyword { color:#757aD8;}.ace-pastel-on-dark .ace_keyword.ace_operator { color:#797878;}.ace-pastel-on-dark .ace_constant { color:#4FB7C5;}.ace-pastel-on-dark .ace_constant.ace_language { color:#DE8E30;}.ace-pastel-on-dark .ace_constant.ace_numeric { color:#CCCCCC;}.ace-pastel-on-dark .ace_invalid { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-pastel-on-dark .ace_invalid.ace_illegal { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-pastel-on-dark .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#D2A8A1;}.ace-pastel-on-dark .ace_fold { background-color: #757aD8; border-color: #8F938F;}.ace-pastel-on-dark .ace_support.ace_function { color:#AEB2F8;}.ace-pastel-on-dark .ace_string { color:#66A968;}.ace-pastel-on-dark .ace_string.ace_regexp { color:#E9C062;}.ace-pastel-on-dark .ace_comment { color:#A6C6FF;}.ace-pastel-on-dark .ace_variable { color:#BEBF55;}.ace-pastel-on-dark .ace_variable.ace_language { color:#C1C144;}.ace-pastel-on-dark .ace_xml_pe { color:#494949;}.ace-pastel-on-dark .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-pastel_on_dark-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-pastel_on_dark-uncompressed-noconflict.js
deleted file mode 100644
index 90e1820..0000000
--- a/contexts/data/lib/ace/theme-pastel_on_dark-uncompressed-noconflict.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * André Fiedler <fiedler dot andre a t gmail dot com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/pastel_on_dark', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-pastel-on-dark";
-exports.cssText = "\
-.ace-pastel-on-dark .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-pastel-on-dark .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-pastel-on-dark .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-pastel-on-dark .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-pastel-on-dark .ace_scroller {\
- background-color: #2C2828;\
-}\
-\
-.ace-pastel-on-dark .ace_text-layer {\
- cursor: text;\
- color: #8F938F;\
-}\
-\
-.ace-pastel-on-dark .ace_cursor {\
- border-left: 2px solid #A7A7A7;\
-}\
-\
-.ace-pastel-on-dark .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #A7A7A7;\
-}\
- \
-.ace-pastel-on-dark .ace_marker-layer .ace_selection {\
- background: rgba(221, 240, 255, 0.20);\
-}\
-\
-.ace-pastel-on-dark .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(255, 255, 255, 0.25);\
-}\
-\
-.ace-pastel-on-dark .ace_marker-layer .ace_active_line {\
- background: rgba(255, 255, 255, 0.031);\
-}\
-\
-.ace-pastel-on-dark .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(221, 240, 255, 0.20);\
-}\
- \
-.ace-pastel-on-dark .ace_invisible {\
- color: rgba(255, 255, 255, 0.25);\
-}\
-\
-.ace-pastel-on-dark .ace_keyword {\
- color:#757aD8;\
-}\
-\
-.ace-pastel-on-dark .ace_keyword.ace_operator {\
- color:#797878;\
-}\
-\
-.ace-pastel-on-dark .ace_constant {\
- color:#4FB7C5;\
-}\
-\
-.ace-pastel-on-dark .ace_constant.ace_language {\
- color:#DE8E30;\
-}\
-\
-.ace-pastel-on-dark .ace_constant.ace_numeric {\
- color:#CCCCCC;\
-}\
-\
-.ace-pastel-on-dark .ace_invalid {\
- color:#F8F8F8;\
-background-color:rgba(86, 45, 86, 0.75);\
-}\
-\
-.ace-pastel-on-dark .ace_invalid.ace_illegal {\
- color:#F8F8F8;\
-background-color:rgba(86, 45, 86, 0.75);\
-}\
-\
-.ace-pastel-on-dark .ace_invalid.ace_deprecated {\
- text-decoration:underline;\
-font-style:italic;\
-color:#D2A8A1;\
-}\
-\
-.ace-pastel-on-dark .ace_fold {\
- background-color: #757aD8;\
- border-color: #8F938F;\
-}\
-\
-.ace-pastel-on-dark .ace_support.ace_function {\
- color:#AEB2F8;\
-}\
-\
-.ace-pastel-on-dark .ace_string {\
- color:#66A968;\
-}\
-\
-.ace-pastel-on-dark .ace_string.ace_regexp {\
- color:#E9C062;\
-}\
-\
-.ace-pastel-on-dark .ace_comment {\
- color:#A6C6FF;\
-}\
-\
-.ace-pastel-on-dark .ace_variable {\
- color:#BEBF55;\
-}\
-\
-.ace-pastel-on-dark .ace_variable.ace_language {\
- color:#C1C144;\
-}\
-\
-.ace-pastel-on-dark .ace_xml_pe {\
- color:#494949;\
-}\
-\
-.ace-pastel-on-dark .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-pastel_on_dark-uncompressed.js b/contexts/data/lib/ace/theme-pastel_on_dark-uncompressed.js
deleted file mode 100644
index 43642af..0000000
--- a/contexts/data/lib/ace/theme-pastel_on_dark-uncompressed.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * André Fiedler <fiedler dot andre a t gmail dot com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/pastel_on_dark', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-pastel-on-dark";
-exports.cssText = "\
-.ace-pastel-on-dark .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-pastel-on-dark .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-pastel-on-dark .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-pastel-on-dark .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-pastel-on-dark .ace_scroller {\
- background-color: #2C2828;\
-}\
-\
-.ace-pastel-on-dark .ace_text-layer {\
- cursor: text;\
- color: #8F938F;\
-}\
-\
-.ace-pastel-on-dark .ace_cursor {\
- border-left: 2px solid #A7A7A7;\
-}\
-\
-.ace-pastel-on-dark .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #A7A7A7;\
-}\
- \
-.ace-pastel-on-dark .ace_marker-layer .ace_selection {\
- background: rgba(221, 240, 255, 0.20);\
-}\
-\
-.ace-pastel-on-dark .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(255, 255, 255, 0.25);\
-}\
-\
-.ace-pastel-on-dark .ace_marker-layer .ace_active_line {\
- background: rgba(255, 255, 255, 0.031);\
-}\
-\
-.ace-pastel-on-dark .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(221, 240, 255, 0.20);\
-}\
- \
-.ace-pastel-on-dark .ace_invisible {\
- color: rgba(255, 255, 255, 0.25);\
-}\
-\
-.ace-pastel-on-dark .ace_keyword {\
- color:#757aD8;\
-}\
-\
-.ace-pastel-on-dark .ace_keyword.ace_operator {\
- color:#797878;\
-}\
-\
-.ace-pastel-on-dark .ace_constant {\
- color:#4FB7C5;\
-}\
-\
-.ace-pastel-on-dark .ace_constant.ace_language {\
- color:#DE8E30;\
-}\
-\
-.ace-pastel-on-dark .ace_constant.ace_numeric {\
- color:#CCCCCC;\
-}\
-\
-.ace-pastel-on-dark .ace_invalid {\
- color:#F8F8F8;\
-background-color:rgba(86, 45, 86, 0.75);\
-}\
-\
-.ace-pastel-on-dark .ace_invalid.ace_illegal {\
- color:#F8F8F8;\
-background-color:rgba(86, 45, 86, 0.75);\
-}\
-\
-.ace-pastel-on-dark .ace_invalid.ace_deprecated {\
- text-decoration:underline;\
-font-style:italic;\
-color:#D2A8A1;\
-}\
-\
-.ace-pastel-on-dark .ace_fold {\
- background-color: #757aD8;\
- border-color: #8F938F;\
-}\
-\
-.ace-pastel-on-dark .ace_support.ace_function {\
- color:#AEB2F8;\
-}\
-\
-.ace-pastel-on-dark .ace_string {\
- color:#66A968;\
-}\
-\
-.ace-pastel-on-dark .ace_string.ace_regexp {\
- color:#E9C062;\
-}\
-\
-.ace-pastel-on-dark .ace_comment {\
- color:#A6C6FF;\
-}\
-\
-.ace-pastel-on-dark .ace_variable {\
- color:#BEBF55;\
-}\
-\
-.ace-pastel-on-dark .ace_variable.ace_language {\
- color:#C1C144;\
-}\
-\
-.ace-pastel-on-dark .ace_xml_pe {\
- color:#494949;\
-}\
-\
-.ace-pastel-on-dark .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-pastel_on_dark.js b/contexts/data/lib/ace/theme-pastel_on_dark.js
index 4aa62fd..d70c51a 100644
--- a/contexts/data/lib/ace/theme-pastel_on_dark.js
+++ b/contexts/data/lib/ace/theme-pastel_on_dark.js
@@ -1 +1,148 @@
-define("ace/theme/pastel_on_dark",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-pastel-on-dark",b.cssText=".ace-pastel-on-dark .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-pastel-on-dark .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-pastel-on-dark .ace_gutter { background: #e8e8e8; color: #333;}.ace-pastel-on-dark .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-pastel-on-dark .ace_scroller { background-color: #2C2828;}.ace-pastel-on-dark .ace_text-layer { cursor: text; color: #8F938F;}.ace-pastel-on-dark .ace_cursor { border-left: 2px solid #A7A7A7;}.ace-pastel-on-dark .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #A7A7A7;} .ace-pastel-on-dark .ace_marker-layer .ace_selection { background: rgba(221, 240, 255, 0.20);}.ace-pastel-on-dark .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-pastel-on-dark .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.25);}.ace-pastel-on-dark .ace_marker-layer .ace_active_line { background: rgba(255, 255, 255, 0.031);}.ace-pastel-on-dark .ace_marker-layer .ace_selected_word { border: 1px solid rgba(221, 240, 255, 0.20);} .ace-pastel-on-dark .ace_invisible { color: rgba(255, 255, 255, 0.25);}.ace-pastel-on-dark .ace_keyword { color:#757aD8;}.ace-pastel-on-dark .ace_keyword.ace_operator { color:#797878;}.ace-pastel-on-dark .ace_constant { color:#4FB7C5;}.ace-pastel-on-dark .ace_constant.ace_language { color:#DE8E30;}.ace-pastel-on-dark .ace_constant.ace_numeric { color:#CCCCCC;}.ace-pastel-on-dark .ace_invalid { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-pastel-on-dark .ace_invalid.ace_illegal { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-pastel-on-dark .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#D2A8A1;}.ace-pastel-on-dark .ace_fold { background-color: #757aD8; border-color: #8F938F;}.ace-pastel-on-dark .ace_support.ace_function { color:#AEB2F8;}.ace-pastel-on-dark .ace_string { color:#66A968;}.ace-pastel-on-dark .ace_string.ace_regexp { color:#E9C062;}.ace-pastel-on-dark .ace_comment { color:#A6C6FF;}.ace-pastel-on-dark .ace_variable { color:#BEBF55;}.ace-pastel-on-dark .ace_variable.ace_language { color:#C1C144;}.ace-pastel-on-dark .ace_xml_pe { color:#494949;}.ace-pastel-on-dark .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/pastel_on_dark', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-pastel-on-dark";
+exports.cssText = ".ace-pastel-on-dark .ace_gutter {\
+background: #353030;\
+color: #8F938F\
+}\
+.ace-pastel-on-dark .ace_print-margin {\
+width: 1px;\
+background: #353030\
+}\
+.ace-pastel-on-dark .ace_scroller {\
+background-color: #2C2828\
+}\
+.ace-pastel-on-dark .ace_text-layer {\
+color: #8F938F\
+}\
+.ace-pastel-on-dark .ace_cursor {\
+border-left: 2px solid #A7A7A7\
+}\
+.ace-pastel-on-dark .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #A7A7A7\
+}\
+.ace-pastel-on-dark .ace_marker-layer .ace_selection {\
+background: rgba(221, 240, 255, 0.20)\
+}\
+.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #2C2828;\
+border-radius: 2px\
+}\
+.ace-pastel-on-dark .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(255, 255, 255, 0.25)\
+}\
+.ace-pastel-on-dark .ace_marker-layer .ace_active-line {\
+background: rgba(255, 255, 255, 0.031)\
+}\
+.ace-pastel-on-dark .ace_gutter-active-line {\
+background-color: rgba(255, 255, 255, 0.031)\
+}\
+.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(221, 240, 255, 0.20)\
+}\
+.ace-pastel-on-dark .ace_invisible {\
+color: rgba(255, 255, 255, 0.25)\
+}\
+.ace-pastel-on-dark .ace_keyword,\
+.ace-pastel-on-dark .ace_meta {\
+color: #757aD8\
+}\
+.ace-pastel-on-dark .ace_constant,\
+.ace-pastel-on-dark .ace_constant.ace_character,\
+.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,\
+.ace-pastel-on-dark .ace_constant.ace_other {\
+color: #4FB7C5\
+}\
+.ace-pastel-on-dark .ace_keyword.ace_operator {\
+color: #797878\
+}\
+.ace-pastel-on-dark .ace_constant.ace_character {\
+color: #AFA472\
+}\
+.ace-pastel-on-dark .ace_constant.ace_language {\
+color: #DE8E30\
+}\
+.ace-pastel-on-dark .ace_constant.ace_numeric {\
+color: #CCCCCC\
+}\
+.ace-pastel-on-dark .ace_invalid,\
+.ace-pastel-on-dark .ace_invalid.ace_illegal {\
+color: #F8F8F8;\
+background-color: rgba(86, 45, 86, 0.75)\
+}\
+.ace-pastel-on-dark .ace_invalid.ace_deprecated {\
+text-decoration: underline;\
+font-style: italic;\
+color: #D2A8A1\
+}\
+.ace-pastel-on-dark .ace_fold {\
+background-color: #757aD8;\
+border-color: #8F938F\
+}\
+.ace-pastel-on-dark .ace_support.ace_function {\
+color: #AEB2F8\
+}\
+.ace-pastel-on-dark .ace_string {\
+color: #66A968\
+}\
+.ace-pastel-on-dark .ace_string.ace_regexp {\
+color: #E9C062\
+}\
+.ace-pastel-on-dark .ace_comment {\
+color: #A6C6FF\
+}\
+.ace-pastel-on-dark .ace_variable {\
+color: #BEBF55\
+}\
+.ace-pastel-on-dark .ace_variable.ace_language {\
+color: #C1C144\
+}\
+.ace-pastel-on-dark .ace_xml-pe {\
+color: #494949\
+}\
+.ace-pastel-on-dark .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-pastel-on-dark .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0dD4z9DR0fEfAA+vBBPqhbn1AAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-solarized_dark-noconflict.js b/contexts/data/lib/ace/theme-solarized_dark-noconflict.js
deleted file mode 100644
index 7d2e026..0000000
--- a/contexts/data/lib/ace/theme-solarized_dark-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/solarized_dark",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-solarized-dark",b.cssText=".ace-solarized-dark .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-solarized-dark .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-solarized-dark .ace_gutter { background: #e8e8e8; color: #333;}.ace-solarized-dark .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-solarized-dark .ace_scroller { background-color: #002B36;}.ace-solarized-dark .ace_text-layer { cursor: text; color: #93A1A1;}.ace-solarized-dark .ace_cursor { border-left: 2px solid #D30102;}.ace-solarized-dark .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #D30102;} .ace-solarized-dark .ace_marker-layer .ace_selection { background: #073642;}.ace-solarized-dark .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-solarized-dark .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(147, 161, 161, 0.50);}.ace-solarized-dark .ace_marker-layer .ace_active_line { background: #073642;}.ace-solarized-dark .ace_marker-layer .ace_selected_word { border: 1px solid #073642;} .ace-solarized-dark .ace_invisible { color: rgba(147, 161, 161, 0.50);}.ace-solarized-dark .ace_keyword { color:#859900;}.ace-solarized-dark .ace_constant.ace_language { color:#B58900;}.ace-solarized-dark .ace_constant.ace_numeric { color:#D33682;}.ace-solarized-dark .ace_fold { background-color: #268BD2; border-color: #93A1A1;}.ace-solarized-dark .ace_support.ace_function { color:#268BD2;}.ace-solarized-dark .ace_string { color:#2AA198;}.ace-solarized-dark .ace_string.ace_regexp { color:#D30102;}.ace-solarized-dark .ace_comment { font-style:italic;color:#657B83;}.ace-solarized-dark .ace_variable.ace_language { color:#268BD2;}.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name { color:#93A1A1;}.ace-solarized-dark .ace_entity.ace_name.ace_function { color:#268BD2;}.ace-solarized-dark .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-solarized_dark-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-solarized_dark-uncompressed-noconflict.js
deleted file mode 100644
index 29632f6..0000000
--- a/contexts/data/lib/ace/theme-solarized_dark-uncompressed-noconflict.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/solarized_dark', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-solarized-dark";
-exports.cssText = "\
-.ace-solarized-dark .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-solarized-dark .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-solarized-dark .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-solarized-dark .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-solarized-dark .ace_scroller {\
- background-color: #002B36;\
-}\
-\
-.ace-solarized-dark .ace_text-layer {\
- cursor: text;\
- color: #93A1A1;\
-}\
-\
-.ace-solarized-dark .ace_cursor {\
- border-left: 2px solid #D30102;\
-}\
-\
-.ace-solarized-dark .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #D30102;\
-}\
- \
-.ace-solarized-dark .ace_marker-layer .ace_selection {\
- background: #073642;\
-}\
-\
-.ace-solarized-dark .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-solarized-dark .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(147, 161, 161, 0.50);\
-}\
-\
-.ace-solarized-dark .ace_marker-layer .ace_active_line {\
- background: #073642;\
-}\
-\
-.ace-solarized-dark .ace_marker-layer .ace_selected_word {\
- border: 1px solid #073642;\
-}\
- \
-.ace-solarized-dark .ace_invisible {\
- color: rgba(147, 161, 161, 0.50);\
-}\
-\
-.ace-solarized-dark .ace_keyword {\
- color:#859900;\
-}\
-\
-.ace-solarized-dark .ace_constant.ace_language {\
- color:#B58900;\
-}\
-\
-.ace-solarized-dark .ace_constant.ace_numeric {\
- color:#D33682;\
-}\
-\
-.ace-solarized-dark .ace_fold {\
- background-color: #268BD2;\
- border-color: #93A1A1;\
-}\
-\
-.ace-solarized-dark .ace_support.ace_function {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-dark .ace_string {\
- color:#2AA198;\
-}\
-\
-.ace-solarized-dark .ace_string.ace_regexp {\
- color:#D30102;\
-}\
-\
-.ace-solarized-dark .ace_comment {\
- font-style:italic;\
-color:#657B83;\
-}\
-\
-.ace-solarized-dark .ace_variable.ace_language {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name {\
- color:#93A1A1;\
-}\
-\
-.ace-solarized-dark .ace_entity.ace_name.ace_function {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-dark .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-solarized_dark-uncompressed.js b/contexts/data/lib/ace/theme-solarized_dark-uncompressed.js
deleted file mode 100644
index b1dac70..0000000
--- a/contexts/data/lib/ace/theme-solarized_dark-uncompressed.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/solarized_dark', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-solarized-dark";
-exports.cssText = "\
-.ace-solarized-dark .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-solarized-dark .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-solarized-dark .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-solarized-dark .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-solarized-dark .ace_scroller {\
- background-color: #002B36;\
-}\
-\
-.ace-solarized-dark .ace_text-layer {\
- cursor: text;\
- color: #93A1A1;\
-}\
-\
-.ace-solarized-dark .ace_cursor {\
- border-left: 2px solid #D30102;\
-}\
-\
-.ace-solarized-dark .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #D30102;\
-}\
- \
-.ace-solarized-dark .ace_marker-layer .ace_selection {\
- background: #073642;\
-}\
-\
-.ace-solarized-dark .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-solarized-dark .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(147, 161, 161, 0.50);\
-}\
-\
-.ace-solarized-dark .ace_marker-layer .ace_active_line {\
- background: #073642;\
-}\
-\
-.ace-solarized-dark .ace_marker-layer .ace_selected_word {\
- border: 1px solid #073642;\
-}\
- \
-.ace-solarized-dark .ace_invisible {\
- color: rgba(147, 161, 161, 0.50);\
-}\
-\
-.ace-solarized-dark .ace_keyword {\
- color:#859900;\
-}\
-\
-.ace-solarized-dark .ace_constant.ace_language {\
- color:#B58900;\
-}\
-\
-.ace-solarized-dark .ace_constant.ace_numeric {\
- color:#D33682;\
-}\
-\
-.ace-solarized-dark .ace_fold {\
- background-color: #268BD2;\
- border-color: #93A1A1;\
-}\
-\
-.ace-solarized-dark .ace_support.ace_function {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-dark .ace_string {\
- color:#2AA198;\
-}\
-\
-.ace-solarized-dark .ace_string.ace_regexp {\
- color:#D30102;\
-}\
-\
-.ace-solarized-dark .ace_comment {\
- font-style:italic;\
-color:#657B83;\
-}\
-\
-.ace-solarized-dark .ace_variable.ace_language {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name {\
- color:#93A1A1;\
-}\
-\
-.ace-solarized-dark .ace_entity.ace_name.ace_function {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-dark .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-solarized_dark.js b/contexts/data/lib/ace/theme-solarized_dark.js
index 3136950..71bce33 100644
--- a/contexts/data/lib/ace/theme-solarized_dark.js
+++ b/contexts/data/lib/ace/theme-solarized_dark.js
@@ -1 +1,128 @@
-define("ace/theme/solarized_dark",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-solarized-dark",b.cssText=".ace-solarized-dark .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-solarized-dark .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-solarized-dark .ace_gutter { background: #e8e8e8; color: #333;}.ace-solarized-dark .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-solarized-dark .ace_scroller { background-color: #002B36;}.ace-solarized-dark .ace_text-layer { cursor: text; color: #93A1A1;}.ace-solarized-dark .ace_cursor { border-left: 2px solid #D30102;}.ace-solarized-dark .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #D30102;} .ace-solarized-dark .ace_marker-layer .ace_selection { background: #073642;}.ace-solarized-dark .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-solarized-dark .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(147, 161, 161, 0.50);}.ace-solarized-dark .ace_marker-layer .ace_active_line { background: #073642;}.ace-solarized-dark .ace_marker-layer .ace_selected_word { border: 1px solid #073642;} .ace-solarized-dark .ace_invisible { color: rgba(147, 161, 161, 0.50);}.ace-solarized-dark .ace_keyword { color:#859900;}.ace-solarized-dark .ace_constant.ace_language { color:#B58900;}.ace-solarized-dark .ace_constant.ace_numeric { color:#D33682;}.ace-solarized-dark .ace_fold { background-color: #268BD2; border-color: #93A1A1;}.ace-solarized-dark .ace_support.ace_function { color:#268BD2;}.ace-solarized-dark .ace_string { color:#2AA198;}.ace-solarized-dark .ace_string.ace_regexp { color:#D30102;}.ace-solarized-dark .ace_comment { font-style:italic;color:#657B83;}.ace-solarized-dark .ace_variable.ace_language { color:#268BD2;}.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name { color:#93A1A1;}.ace-solarized-dark .ace_entity.ace_name.ace_function { color:#268BD2;}.ace-solarized-dark .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/solarized_dark', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-solarized-dark";
+exports.cssText = ".ace-solarized-dark .ace_gutter {\
+background: #01313f;\
+color: #d0edf7\
+}\
+.ace-solarized-dark .ace_print-margin {\
+width: 1px;\
+background: #33555E\
+}\
+.ace-solarized-dark .ace_scroller {\
+background-color: #002B36\
+}\
+.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\
+.ace-solarized-dark .ace_storage,\
+.ace-solarized-dark .ace_text-layer {\
+color: #93A1A1\
+}\
+.ace-solarized-dark .ace_cursor {\
+border-left: 2px solid #D30102\
+}\
+.ace-solarized-dark .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #D30102\
+}\
+.ace-solarized-dark .ace_marker-layer .ace_active-line,\
+.ace-solarized-dark .ace_marker-layer .ace_selection {\
+background: rgba(255, 255, 255, 0.1)\
+}\
+.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #002B36;\
+border-radius: 2px\
+}\
+.ace-solarized-dark .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-solarized-dark .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(147, 161, 161, 0.50)\
+}\
+.ace-solarized-dark .ace_gutter-active-line {\
+background-color: #0d3440\
+}\
+.ace-solarized-dark .ace_marker-layer .ace_selected-word {\
+border: 1px solid #073642\
+}\
+.ace-solarized-dark .ace_invisible {\
+color: rgba(147, 161, 161, 0.50)\
+}\
+.ace-solarized-dark .ace_keyword,\
+.ace-solarized-dark .ace_meta,\
+.ace-solarized-dark .ace_support.ace_class,\
+.ace-solarized-dark .ace_support.ace_type {\
+color: #859900\
+}\
+.ace-solarized-dark .ace_constant.ace_character,\
+.ace-solarized-dark .ace_constant.ace_other {\
+color: #CB4B16\
+}\
+.ace-solarized-dark .ace_constant.ace_language {\
+color: #B58900\
+}\
+.ace-solarized-dark .ace_constant.ace_numeric {\
+color: #D33682\
+}\
+.ace-solarized-dark .ace_fold {\
+background-color: #268BD2;\
+border-color: #93A1A1\
+}\
+.ace-solarized-dark .ace_entity.ace_name.ace_function,\
+.ace-solarized-dark .ace_entity.ace_name.ace_tag,\
+.ace-solarized-dark .ace_support.ace_function,\
+.ace-solarized-dark .ace_variable,\
+.ace-solarized-dark .ace_variable.ace_language {\
+color: #268BD2\
+}\
+.ace-solarized-dark .ace_string {\
+color: #2AA198\
+}\
+.ace-solarized-dark .ace_string.ace_regexp {\
+color: #D30102\
+}\
+.ace-solarized-dark .ace_comment {\
+font-style: italic;\
+color: #657B83\
+}\
+.ace-solarized-dark .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-solarized-dark .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db7zzBz5sz/AA82BCv7wOIDAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-solarized_light-noconflict.js b/contexts/data/lib/ace/theme-solarized_light-noconflict.js
deleted file mode 100644
index b7f8da9..0000000
--- a/contexts/data/lib/ace/theme-solarized_light-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/solarized_light",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-solarized-light",b.cssText=".ace-solarized-light .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-solarized-light .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-solarized-light .ace_gutter { background: #e8e8e8; color: #333;}.ace-solarized-light .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-solarized-light .ace_scroller { background-color: #FDF6E3;}.ace-solarized-light .ace_text-layer { cursor: text; color: #586E75;}.ace-solarized-light .ace_cursor { border-left: 2px solid #000000;}.ace-solarized-light .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #000000;} .ace-solarized-light .ace_marker-layer .ace_selection { background: #073642;}.ace-solarized-light .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-solarized-light .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(147, 161, 161, 0.50);}.ace-solarized-light .ace_marker-layer .ace_active_line { background: #EEE8D5;}.ace-solarized-light .ace_marker-layer .ace_selected_word { border: 1px solid #073642;} .ace-solarized-light .ace_invisible { color: rgba(147, 161, 161, 0.50);}.ace-solarized-light .ace_keyword { color:#859900;}.ace-solarized-light .ace_constant.ace_language { color:#B58900;}.ace-solarized-light .ace_constant.ace_numeric { color:#D33682;}.ace-solarized-light .ace_fold { background-color: #268BD2; border-color: #586E75;}.ace-solarized-light .ace_support.ace_function { color:#268BD2;}.ace-solarized-light .ace_string { color:#2AA198;}.ace-solarized-light .ace_string.ace_regexp { color:#D30102;}.ace-solarized-light .ace_comment { color:#93A1A1;}.ace-solarized-light .ace_variable.ace_language { color:#268BD2;}.ace-solarized-light .ace_entity.ace_other.ace_attribute-name { color:#93A1A1;}.ace-solarized-light .ace_entity.ace_name.ace_function { color:#268BD2;}.ace-solarized-light .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-solarized_light-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-solarized_light-uncompressed-noconflict.js
deleted file mode 100644
index e4c200e..0000000
--- a/contexts/data/lib/ace/theme-solarized_light-uncompressed-noconflict.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/solarized_light', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-solarized-light";
-exports.cssText = "\
-.ace-solarized-light .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-solarized-light .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-solarized-light .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-solarized-light .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-solarized-light .ace_scroller {\
- background-color: #FDF6E3;\
-}\
-\
-.ace-solarized-light .ace_text-layer {\
- cursor: text;\
- color: #586E75;\
-}\
-\
-.ace-solarized-light .ace_cursor {\
- border-left: 2px solid #000000;\
-}\
-\
-.ace-solarized-light .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #000000;\
-}\
- \
-.ace-solarized-light .ace_marker-layer .ace_selection {\
- background: #073642;\
-}\
-\
-.ace-solarized-light .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-solarized-light .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(147, 161, 161, 0.50);\
-}\
-\
-.ace-solarized-light .ace_marker-layer .ace_active_line {\
- background: #EEE8D5;\
-}\
-\
-.ace-solarized-light .ace_marker-layer .ace_selected_word {\
- border: 1px solid #073642;\
-}\
- \
-.ace-solarized-light .ace_invisible {\
- color: rgba(147, 161, 161, 0.50);\
-}\
-\
-.ace-solarized-light .ace_keyword {\
- color:#859900;\
-}\
-\
-.ace-solarized-light .ace_constant.ace_language {\
- color:#B58900;\
-}\
-\
-.ace-solarized-light .ace_constant.ace_numeric {\
- color:#D33682;\
-}\
-\
-.ace-solarized-light .ace_fold {\
- background-color: #268BD2;\
- border-color: #586E75;\
-}\
-\
-.ace-solarized-light .ace_support.ace_function {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-light .ace_string {\
- color:#2AA198;\
-}\
-\
-.ace-solarized-light .ace_string.ace_regexp {\
- color:#D30102;\
-}\
-\
-.ace-solarized-light .ace_comment {\
- color:#93A1A1;\
-}\
-\
-.ace-solarized-light .ace_variable.ace_language {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\
- color:#93A1A1;\
-}\
-\
-.ace-solarized-light .ace_entity.ace_name.ace_function {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-light .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-solarized_light-uncompressed.js b/contexts/data/lib/ace/theme-solarized_light-uncompressed.js
deleted file mode 100644
index 697f32f..0000000
--- a/contexts/data/lib/ace/theme-solarized_light-uncompressed.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/solarized_light', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-solarized-light";
-exports.cssText = "\
-.ace-solarized-light .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-solarized-light .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-solarized-light .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-solarized-light .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-solarized-light .ace_scroller {\
- background-color: #FDF6E3;\
-}\
-\
-.ace-solarized-light .ace_text-layer {\
- cursor: text;\
- color: #586E75;\
-}\
-\
-.ace-solarized-light .ace_cursor {\
- border-left: 2px solid #000000;\
-}\
-\
-.ace-solarized-light .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #000000;\
-}\
- \
-.ace-solarized-light .ace_marker-layer .ace_selection {\
- background: #073642;\
-}\
-\
-.ace-solarized-light .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-solarized-light .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(147, 161, 161, 0.50);\
-}\
-\
-.ace-solarized-light .ace_marker-layer .ace_active_line {\
- background: #EEE8D5;\
-}\
-\
-.ace-solarized-light .ace_marker-layer .ace_selected_word {\
- border: 1px solid #073642;\
-}\
- \
-.ace-solarized-light .ace_invisible {\
- color: rgba(147, 161, 161, 0.50);\
-}\
-\
-.ace-solarized-light .ace_keyword {\
- color:#859900;\
-}\
-\
-.ace-solarized-light .ace_constant.ace_language {\
- color:#B58900;\
-}\
-\
-.ace-solarized-light .ace_constant.ace_numeric {\
- color:#D33682;\
-}\
-\
-.ace-solarized-light .ace_fold {\
- background-color: #268BD2;\
- border-color: #586E75;\
-}\
-\
-.ace-solarized-light .ace_support.ace_function {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-light .ace_string {\
- color:#2AA198;\
-}\
-\
-.ace-solarized-light .ace_string.ace_regexp {\
- color:#D30102;\
-}\
-\
-.ace-solarized-light .ace_comment {\
- color:#93A1A1;\
-}\
-\
-.ace-solarized-light .ace_variable.ace_language {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\
- color:#93A1A1;\
-}\
-\
-.ace-solarized-light .ace_entity.ace_name.ace_function {\
- color:#268BD2;\
-}\
-\
-.ace-solarized-light .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-solarized_light.js b/contexts/data/lib/ace/theme-solarized_light.js
index a65276e..688e3f8 100644
--- a/contexts/data/lib/ace/theme-solarized_light.js
+++ b/contexts/data/lib/ace/theme-solarized_light.js
@@ -1 +1,131 @@
-define("ace/theme/solarized_light",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-solarized-light",b.cssText=".ace-solarized-light .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-solarized-light .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-solarized-light .ace_gutter { background: #e8e8e8; color: #333;}.ace-solarized-light .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-solarized-light .ace_scroller { background-color: #FDF6E3;}.ace-solarized-light .ace_text-layer { cursor: text; color: #586E75;}.ace-solarized-light .ace_cursor { border-left: 2px solid #000000;}.ace-solarized-light .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #000000;} .ace-solarized-light .ace_marker-layer .ace_selection { background: #073642;}.ace-solarized-light .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-solarized-light .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(147, 161, 161, 0.50);}.ace-solarized-light .ace_marker-layer .ace_active_line { background: #EEE8D5;}.ace-solarized-light .ace_marker-layer .ace_selected_word { border: 1px solid #073642;} .ace-solarized-light .ace_invisible { color: rgba(147, 161, 161, 0.50);}.ace-solarized-light .ace_keyword { color:#859900;}.ace-solarized-light .ace_constant.ace_language { color:#B58900;}.ace-solarized-light .ace_constant.ace_numeric { color:#D33682;}.ace-solarized-light .ace_fold { background-color: #268BD2; border-color: #586E75;}.ace-solarized-light .ace_support.ace_function { color:#268BD2;}.ace-solarized-light .ace_string { color:#2AA198;}.ace-solarized-light .ace_string.ace_regexp { color:#D30102;}.ace-solarized-light .ace_comment { color:#93A1A1;}.ace-solarized-light .ace_variable.ace_language { color:#268BD2;}.ace-solarized-light .ace_entity.ace_other.ace_attribute-name { color:#93A1A1;}.ace-solarized-light .ace_entity.ace_name.ace_function { color:#268BD2;}.ace-solarized-light .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/solarized_light', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-solarized-light";
+exports.cssText = ".ace-solarized-light .ace_gutter {\
+background: #fbf1d3;\
+color: #333\
+}\
+.ace-solarized-light .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8\
+}\
+.ace-solarized-light .ace_scroller {\
+background-color: #FDF6E3\
+}\
+.ace-solarized-light .ace_text-layer {\
+color: #586E75\
+}\
+.ace-solarized-light .ace_cursor {\
+border-left: 2px solid #000000\
+}\
+.ace-solarized-light .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #000000\
+}\
+.ace-solarized-light .ace_marker-layer .ace_selection {\
+background: #073642\
+}\
+.ace-solarized-light.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #FDF6E3;\
+border-radius: 2px\
+}\
+.ace-solarized-light .ace_marker-layer .ace_step {\
+background: rgb(255, 255, 0)\
+}\
+.ace-solarized-light .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(147, 161, 161, 0.50)\
+}\
+.ace-solarized-light .ace_marker-layer .ace_active-line {\
+background: #EEE8D5\
+}\
+.ace-solarized-light .ace_gutter-active-line {\
+background-color : #dcdcdc\
+}\
+.ace-solarized-light .ace_marker-layer .ace_selected-word {\
+border: 1px solid #073642\
+}\
+.ace-solarized-light .ace_invisible {\
+color: rgba(147, 161, 161, 0.50)\
+}\
+.ace-solarized-light .ace_keyword,\
+.ace-solarized-light .ace_meta,\
+.ace-solarized-light .ace_support.ace_class,\
+.ace-solarized-light .ace_support.ace_type {\
+color: #859900\
+}\
+.ace-solarized-light .ace_constant.ace_character,\
+.ace-solarized-light .ace_constant.ace_other {\
+color: #CB4B16\
+}\
+.ace-solarized-light .ace_constant.ace_language {\
+color: #B58900\
+}\
+.ace-solarized-light .ace_constant.ace_numeric {\
+color: #D33682\
+}\
+.ace-solarized-light .ace_fold {\
+background-color: #268BD2;\
+border-color: #586E75\
+}\
+.ace-solarized-light .ace_entity.ace_name.ace_function,\
+.ace-solarized-light .ace_entity.ace_name.ace_tag,\
+.ace-solarized-light .ace_support.ace_function,\
+.ace-solarized-light .ace_variable,\
+.ace-solarized-light .ace_variable.ace_language {\
+color: #268BD2\
+}\
+.ace-solarized-light .ace_storage {\
+color: #073642\
+}\
+.ace-solarized-light .ace_string {\
+color: #2AA198\
+}\
+.ace-solarized-light .ace_string.ace_regexp {\
+color: #D30102\
+}\
+.ace-solarized-light .ace_comment,\
+.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\
+color: #93A1A1\
+}\
+.ace-solarized-light .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-solarized-light .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4++3xf4ZVq1b9BwAjxwbT1g3hiwAAAABJRU5ErkJggg==) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-textmate-noconflict.js b/contexts/data/lib/ace/theme-textmate-noconflict.js
deleted file mode 100644
index 1e6a551..0000000
--- a/contexts/data/lib/ace/theme-textmate-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/textmate",["require","exports","module"],function(a,b,c){"use strict",b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #0000A2;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-textmate-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-textmate-uncompressed-noconflict.js
deleted file mode 100644
index 5e7f330..0000000
--- a/contexts/data/lib/ace/theme-textmate-uncompressed-noconflict.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/textmate', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.isDark = false;
-exports.cssClass = "ace-tm";
-exports.cssText = ".ace-tm .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tm .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tm .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tm .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tm .ace_fold {\
- background-color: #0000A2;\
-}\
-\
-.ace-tm .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-tm .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-tm .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
- \
-.ace-tm .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-tm .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_language {\
- color: rgb(88, 92, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_invalid {\
- background-color: rgb(153, 0, 0);\
- color: white;\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_type,\
-.ace-tm .ace_line .ace_support.ace_class {\
- color: rgb(109, 121, 222);\
-}\
-\
-.ace-tm .ace_line .ace_keyword.ace_operator {\
- color: rgb(104, 118, 135);\
-}\
-\
-.ace-tm .ace_line .ace_string {\
- color: rgb(3, 106, 7);\
-}\
-\
-.ace-tm .ace_line .ace_comment {\
- color: rgb(76, 136, 107);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc {\
- color: rgb(0, 102, 255);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(128, 159, 191);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 205);\
-}\
-\
-.ace-tm .ace_line .ace_variable {\
- color: rgb(49, 132, 149);\
-}\
-\
-.ace-tm .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-tm .ace_entity.ace_name.ace_function {\
- color: #0000A2;\
-}\
-\
-.ace-tm .ace_markup.ace_markupine {\
- text-decoration:underline;\
-}\
-\
-.ace-tm .ace_markup.ace_heading {\
- color: rgb(12, 7, 255);\
-}\
-\
-.ace-tm .ace_markup.ace_list {\
- color:rgb(185, 6, 144);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.07);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-tm .ace_meta.ace_tag {\
- color:rgb(28, 2, 255);\
-}\
-\
-.ace-tm .ace_string.ace_regex {\
- color: rgb(255, 0, 0)\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-textmate-uncompressed.js b/contexts/data/lib/ace/theme-textmate-uncompressed.js
deleted file mode 100644
index ba242c4..0000000
--- a/contexts/data/lib/ace/theme-textmate-uncompressed.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/textmate', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.isDark = false;
-exports.cssClass = "ace-tm";
-exports.cssText = ".ace-tm .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tm .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tm .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tm .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tm .ace_fold {\
- background-color: #0000A2;\
-}\
-\
-.ace-tm .ace_text-layer {\
- cursor: text;\
-}\
-\
-.ace-tm .ace_cursor {\
- border-left: 2px solid black;\
-}\
-\
-.ace-tm .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid black;\
-}\
- \
-.ace-tm .ace_line .ace_invisible {\
- color: rgb(191, 191, 191);\
-}\
-\
-.ace-tm .ace_line .ace_keyword {\
- color: blue;\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_buildin {\
- color: rgb(88, 72, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_language {\
- color: rgb(88, 92, 246);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_library {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_invalid {\
- background-color: rgb(153, 0, 0);\
- color: white;\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_function {\
- color: rgb(60, 76, 114);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_constant {\
- color: rgb(6, 150, 14);\
-}\
-\
-.ace-tm .ace_line .ace_support.ace_type,\
-.ace-tm .ace_line .ace_support.ace_class {\
- color: rgb(109, 121, 222);\
-}\
-\
-.ace-tm .ace_line .ace_keyword.ace_operator {\
- color: rgb(104, 118, 135);\
-}\
-\
-.ace-tm .ace_line .ace_string {\
- color: rgb(3, 106, 7);\
-}\
-\
-.ace-tm .ace_line .ace_comment {\
- color: rgb(76, 136, 107);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc {\
- color: rgb(0, 102, 255);\
-}\
-\
-.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\
- color: rgb(128, 159, 191);\
-}\
-\
-.ace-tm .ace_line .ace_constant.ace_numeric {\
- color: rgb(0, 0, 205);\
-}\
-\
-.ace-tm .ace_line .ace_variable {\
- color: rgb(49, 132, 149);\
-}\
-\
-.ace-tm .ace_line .ace_xml_pe {\
- color: rgb(104, 104, 91);\
-}\
-\
-.ace-tm .ace_entity.ace_name.ace_function {\
- color: #0000A2;\
-}\
-\
-.ace-tm .ace_markup.ace_markupine {\
- text-decoration:underline;\
-}\
-\
-.ace-tm .ace_markup.ace_heading {\
- color: rgb(12, 7, 255);\
-}\
-\
-.ace-tm .ace_markup.ace_list {\
- color:rgb(185, 6, 144);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selection {\
- background: rgb(181, 213, 255);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_step {\
- background: rgb(252, 255, 0);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_stack {\
- background: rgb(164, 229, 101);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgb(192, 192, 192);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_active_line {\
- background: rgba(0, 0, 0, 0.07);\
-}\
-\
-.ace-tm .ace_marker-layer .ace_selected_word {\
- background: rgb(250, 250, 255);\
- border: 1px solid rgb(200, 200, 250);\
-}\
-\
-.ace-tm .ace_meta.ace_tag {\
- color:rgb(28, 2, 255);\
-}\
-\
-.ace-tm .ace_string.ace_regex {\
- color: rgb(255, 0, 0)\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-textmate.js b/contexts/data/lib/ace/theme-textmate.js
index a2d3af3..fdf67fa 100644
--- a/contexts/data/lib/ace/theme-textmate.js
+++ b/contexts/data/lib/ace/theme-textmate.js
@@ -1 +1,163 @@
-define("ace/theme/textmate",["require","exports","module"],function(a,b,c){"use strict",b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #0000A2;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/textmate', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+
+exports.isDark = false;
+exports.cssClass = "ace-tm";
+exports.cssText = ".ace-tm .ace_gutter {\
+background: #f0f0f0;\
+color: #333;\
+}\
+.ace-tm .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-tm .ace_fold {\
+background-color: #6B72E6;\
+}\
+.ace-tm .ace_scroller {\
+background-color: #FFFFFF;\
+}\
+.ace-tm .ace_cursor {\
+border-left: 2px solid black;\
+}\
+.ace-tm .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid black;\
+}\
+.ace-tm .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-tm .ace_storage,\
+.ace-tm .ace_keyword {\
+color: blue;\
+}\
+.ace-tm .ace_constant {\
+color: rgb(197, 6, 11);\
+}\
+.ace-tm .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-tm .ace_constant.ace_language {\
+color: rgb(88, 92, 246);\
+}\
+.ace-tm .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-tm .ace_invalid {\
+background-color: rgba(255, 0, 0, 0.1);\
+color: red;\
+}\
+.ace-tm .ace_support.ace_function {\
+color: rgb(60, 76, 114);\
+}\
+.ace-tm .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-tm .ace_support.ace_type,\
+.ace-tm .ace_support.ace_class {\
+color: rgb(109, 121, 222);\
+}\
+.ace-tm .ace_keyword.ace_operator {\
+color: rgb(104, 118, 135);\
+}\
+.ace-tm .ace_string {\
+color: rgb(3, 106, 7);\
+}\
+.ace-tm .ace_comment {\
+color: rgb(76, 136, 107);\
+}\
+.ace-tm .ace_comment.ace_doc {\
+color: rgb(0, 102, 255);\
+}\
+.ace-tm .ace_comment.ace_doc.ace_tag {\
+color: rgb(128, 159, 191);\
+}\
+.ace-tm .ace_constant.ace_numeric {\
+color: rgb(0, 0, 205);\
+}\
+.ace-tm .ace_variable {\
+color: rgb(49, 132, 149);\
+}\
+.ace-tm .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-tm .ace_entity.ace_name.ace_function {\
+color: #0000A2;\
+}\
+.ace-tm .ace_markup.ace_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-tm .ace_markup.ace_list {\
+color:rgb(185, 6, 144);\
+}\
+.ace-tm .ace_meta.ace_tag {\
+color:rgb(0, 22, 142);\
+}\
+.ace-tm .ace_string.ace_regex {\
+color: rgb(255, 0, 0)\
+}\
+.ace-tm .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-tm.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px white;\
+border-radius: 2px;\
+}\
+.ace-tm .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-tm .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-tm .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-tm .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.07);\
+}\
+.ace-tm .ace_gutter-active-line {\
+background-color : #dcdcdc;\
+}\
+.ace-tm .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-tm .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-tomorrow-noconflict.js b/contexts/data/lib/ace/theme-tomorrow-noconflict.js
deleted file mode 100644
index f9c49e5..0000000
--- a/contexts/data/lib/ace/theme-tomorrow-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/tomorrow",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-tomorrow",b.cssText=".ace-tomorrow .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow .ace_scroller { background-color: #FFFFFF;}.ace-tomorrow .ace_text-layer { cursor: text; color: #4D4D4C;}.ace-tomorrow .ace_cursor { border-left: 2px solid #AEAFAD;}.ace-tomorrow .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #AEAFAD;} .ace-tomorrow .ace_marker-layer .ace_selection { background: #D6D6D6;}.ace-tomorrow .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #D1D1D1;}.ace-tomorrow .ace_marker-layer .ace_active_line { background: #EFEFEF;}.ace-tomorrow .ace_marker-layer .ace_selected_word { border: 1px solid #D6D6D6;} .ace-tomorrow .ace_invisible { color: #D1D1D1;}.ace-tomorrow .ace_keyword { color:#8959A8;}.ace-tomorrow .ace_keyword.ace_operator { color:#3E999F;}.ace-tomorrow .ace_constant.ace_language { color:#F5871F;}.ace-tomorrow .ace_constant.ace_numeric { color:#F5871F;}.ace-tomorrow .ace_invalid { color:#FFFFFF;background-color:#C82829;}.ace-tomorrow .ace_invalid.ace_deprecated { color:#FFFFFF;background-color:#8959A8;}.ace-tomorrow .ace_fold { background-color: #4271AE; border-color: #4D4D4C;}.ace-tomorrow .ace_support.ace_function { color:#4271AE;}.ace-tomorrow .ace_string { color:#718C00;}.ace-tomorrow .ace_string.ace_regexp { color:#C82829;}.ace-tomorrow .ace_comment { color:#8E908C;}.ace-tomorrow .ace_variable { color:#C82829;}.ace-tomorrow .ace_meta.ace_tag { color:#C82829;}.ace-tomorrow .ace_entity.ace_other.ace_attribute-name { color:#C82829;}.ace-tomorrow .ace_entity.ace_name.ace_function { color:#4271AE;}.ace-tomorrow .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow .ace_markup.ace_heading { color:#718C00;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-tomorrow-uncompressed-noconflict.js
deleted file mode 100644
index 365eacd..0000000
--- a/contexts/data/lib/ace/theme-tomorrow-uncompressed-noconflict.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-tomorrow";
-exports.cssText = "\
-.ace-tomorrow .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow .ace_scroller {\
- background-color: #FFFFFF;\
-}\
-\
-.ace-tomorrow .ace_text-layer {\
- cursor: text;\
- color: #4D4D4C;\
-}\
-\
-.ace-tomorrow .ace_cursor {\
- border-left: 2px solid #AEAFAD;\
-}\
-\
-.ace-tomorrow .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #AEAFAD;\
-}\
- \
-.ace-tomorrow .ace_marker-layer .ace_selection {\
- background: #D6D6D6;\
-}\
-\
-.ace-tomorrow .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #D1D1D1;\
-}\
-\
-.ace-tomorrow .ace_marker-layer .ace_active_line {\
- background: #EFEFEF;\
-}\
-\
-.ace-tomorrow .ace_marker-layer .ace_selected_word {\
- border: 1px solid #D6D6D6;\
-}\
- \
-.ace-tomorrow .ace_invisible {\
- color: #D1D1D1;\
-}\
-\
-.ace-tomorrow .ace_keyword {\
- color:#8959A8;\
-}\
-\
-.ace-tomorrow .ace_keyword.ace_operator {\
- color:#3E999F;\
-}\
-\
-.ace-tomorrow .ace_constant.ace_language {\
- color:#F5871F;\
-}\
-\
-.ace-tomorrow .ace_constant.ace_numeric {\
- color:#F5871F;\
-}\
-\
-.ace-tomorrow .ace_invalid {\
- color:#FFFFFF;\
-background-color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_invalid.ace_deprecated {\
- color:#FFFFFF;\
-background-color:#8959A8;\
-}\
-\
-.ace-tomorrow .ace_fold {\
- background-color: #4271AE;\
- border-color: #4D4D4C;\
-}\
-\
-.ace-tomorrow .ace_support.ace_function {\
- color:#4271AE;\
-}\
-\
-.ace-tomorrow .ace_string {\
- color:#718C00;\
-}\
-\
-.ace-tomorrow .ace_string.ace_regexp {\
- color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_comment {\
- color:#8E908C;\
-}\
-\
-.ace-tomorrow .ace_variable {\
- color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_meta.ace_tag {\
- color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_entity.ace_other.ace_attribute-name {\
- color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_entity.ace_name.ace_function {\
- color:#4271AE;\
-}\
-\
-.ace-tomorrow .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow .ace_markup.ace_heading {\
- color:#718C00;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow-uncompressed.js b/contexts/data/lib/ace/theme-tomorrow-uncompressed.js
deleted file mode 100644
index fdece23..0000000
--- a/contexts/data/lib/ace/theme-tomorrow-uncompressed.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/tomorrow', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-tomorrow";
-exports.cssText = "\
-.ace-tomorrow .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow .ace_scroller {\
- background-color: #FFFFFF;\
-}\
-\
-.ace-tomorrow .ace_text-layer {\
- cursor: text;\
- color: #4D4D4C;\
-}\
-\
-.ace-tomorrow .ace_cursor {\
- border-left: 2px solid #AEAFAD;\
-}\
-\
-.ace-tomorrow .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #AEAFAD;\
-}\
- \
-.ace-tomorrow .ace_marker-layer .ace_selection {\
- background: #D6D6D6;\
-}\
-\
-.ace-tomorrow .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #D1D1D1;\
-}\
-\
-.ace-tomorrow .ace_marker-layer .ace_active_line {\
- background: #EFEFEF;\
-}\
-\
-.ace-tomorrow .ace_marker-layer .ace_selected_word {\
- border: 1px solid #D6D6D6;\
-}\
- \
-.ace-tomorrow .ace_invisible {\
- color: #D1D1D1;\
-}\
-\
-.ace-tomorrow .ace_keyword {\
- color:#8959A8;\
-}\
-\
-.ace-tomorrow .ace_keyword.ace_operator {\
- color:#3E999F;\
-}\
-\
-.ace-tomorrow .ace_constant.ace_language {\
- color:#F5871F;\
-}\
-\
-.ace-tomorrow .ace_constant.ace_numeric {\
- color:#F5871F;\
-}\
-\
-.ace-tomorrow .ace_invalid {\
- color:#FFFFFF;\
-background-color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_invalid.ace_deprecated {\
- color:#FFFFFF;\
-background-color:#8959A8;\
-}\
-\
-.ace-tomorrow .ace_fold {\
- background-color: #4271AE;\
- border-color: #4D4D4C;\
-}\
-\
-.ace-tomorrow .ace_support.ace_function {\
- color:#4271AE;\
-}\
-\
-.ace-tomorrow .ace_string {\
- color:#718C00;\
-}\
-\
-.ace-tomorrow .ace_string.ace_regexp {\
- color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_comment {\
- color:#8E908C;\
-}\
-\
-.ace-tomorrow .ace_variable {\
- color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_meta.ace_tag {\
- color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_entity.ace_other.ace_attribute-name {\
- color:#C82829;\
-}\
-\
-.ace-tomorrow .ace_entity.ace_name.ace_function {\
- color:#4271AE;\
-}\
-\
-.ace-tomorrow .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow .ace_markup.ace_heading {\
- color:#718C00;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow.js b/contexts/data/lib/ace/theme-tomorrow.js
index cbcf167..adc979f 100644
--- a/contexts/data/lib/ace/theme-tomorrow.js
+++ b/contexts/data/lib/ace/theme-tomorrow.js
@@ -1 +1,147 @@
-define("ace/theme/tomorrow",["require","exports","module"],function(a,b,c){b.isDark=!1,b.cssClass="ace-tomorrow",b.cssText=".ace-tomorrow .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow .ace_scroller { background-color: #FFFFFF;}.ace-tomorrow .ace_text-layer { cursor: text; color: #4D4D4C;}.ace-tomorrow .ace_cursor { border-left: 2px solid #AEAFAD;}.ace-tomorrow .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #AEAFAD;} .ace-tomorrow .ace_marker-layer .ace_selection { background: #D6D6D6;}.ace-tomorrow .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #D1D1D1;}.ace-tomorrow .ace_marker-layer .ace_active_line { background: #EFEFEF;}.ace-tomorrow .ace_marker-layer .ace_selected_word { border: 1px solid #D6D6D6;} .ace-tomorrow .ace_invisible { color: #D1D1D1;}.ace-tomorrow .ace_keyword { color:#8959A8;}.ace-tomorrow .ace_keyword.ace_operator { color:#3E999F;}.ace-tomorrow .ace_constant.ace_language { color:#F5871F;}.ace-tomorrow .ace_constant.ace_numeric { color:#F5871F;}.ace-tomorrow .ace_invalid { color:#FFFFFF;background-color:#C82829;}.ace-tomorrow .ace_invalid.ace_deprecated { color:#FFFFFF;background-color:#8959A8;}.ace-tomorrow .ace_fold { background-color: #4271AE; border-color: #4D4D4C;}.ace-tomorrow .ace_support.ace_function { color:#4271AE;}.ace-tomorrow .ace_string { color:#718C00;}.ace-tomorrow .ace_string.ace_regexp { color:#C82829;}.ace-tomorrow .ace_comment { color:#8E908C;}.ace-tomorrow .ace_variable { color:#C82829;}.ace-tomorrow .ace_meta.ace_tag { color:#C82829;}.ace-tomorrow .ace_entity.ace_other.ace_attribute-name { color:#C82829;}.ace-tomorrow .ace_entity.ace_name.ace_function { color:#4271AE;}.ace-tomorrow .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow .ace_markup.ace_heading { color:#718C00;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/tomorrow', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-tomorrow";
+exports.cssText = ".ace-tomorrow .ace_gutter {\
+background: #f6f6f6;\
+color: #4D4D4C\
+}\
+.ace-tomorrow .ace_print-margin {\
+width: 1px;\
+background: #f6f6f6\
+}\
+.ace-tomorrow .ace_scroller {\
+background-color: #FFFFFF\
+}\
+.ace-tomorrow .ace_text-layer {\
+color: #4D4D4C\
+}\
+.ace-tomorrow .ace_cursor {\
+border-left: 2px solid #AEAFAD\
+}\
+.ace-tomorrow .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #AEAFAD\
+}\
+.ace-tomorrow .ace_marker-layer .ace_selection {\
+background: #D6D6D6\
+}\
+.ace-tomorrow.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #FFFFFF;\
+border-radius: 2px\
+}\
+.ace-tomorrow .ace_marker-layer .ace_step {\
+background: rgb(255, 255, 0)\
+}\
+.ace-tomorrow .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #D1D1D1\
+}\
+.ace-tomorrow .ace_marker-layer .ace_active-line {\
+background: #EFEFEF\
+}\
+.ace-tomorrow .ace_gutter-active-line {\
+background-color : #dcdcdc\
+}\
+.ace-tomorrow .ace_marker-layer .ace_selected-word {\
+border: 1px solid #D6D6D6\
+}\
+.ace-tomorrow .ace_invisible {\
+color: #D1D1D1\
+}\
+.ace-tomorrow .ace_keyword,\
+.ace-tomorrow .ace_meta,\
+.ace-tomorrow .ace_storage,\
+.ace-tomorrow .ace_storage.ace_type,\
+.ace-tomorrow .ace_support.ace_type {\
+color: #8959A8\
+}\
+.ace-tomorrow .ace_keyword.ace_operator {\
+color: #3E999F\
+}\
+.ace-tomorrow .ace_constant.ace_character,\
+.ace-tomorrow .ace_constant.ace_language,\
+.ace-tomorrow .ace_constant.ace_numeric,\
+.ace-tomorrow .ace_keyword.ace_other.ace_unit,\
+.ace-tomorrow .ace_support.ace_constant,\
+.ace-tomorrow .ace_variable.ace_parameter {\
+color: #F5871F\
+}\
+.ace-tomorrow .ace_constant.ace_other {\
+color: #666969\
+}\
+.ace-tomorrow .ace_invalid {\
+color: #FFFFFF;\
+background-color: #C82829\
+}\
+.ace-tomorrow .ace_invalid.ace_deprecated {\
+color: #FFFFFF;\
+background-color: #8959A8\
+}\
+.ace-tomorrow .ace_fold {\
+background-color: #4271AE;\
+border-color: #4D4D4C\
+}\
+.ace-tomorrow .ace_entity.ace_name.ace_function,\
+.ace-tomorrow .ace_support.ace_function,\
+.ace-tomorrow .ace_variable {\
+color: #4271AE\
+}\
+.ace-tomorrow .ace_support.ace_class,\
+.ace-tomorrow .ace_support.ace_type {\
+color: #C99E00\
+}\
+.ace-tomorrow .ace_markup.ace_heading,\
+.ace-tomorrow .ace_string {\
+color: #718C00\
+}\
+.ace-tomorrow .ace_entity.ace_name.ace_tag,\
+.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,\
+.ace-tomorrow .ace_meta.ace_tag,\
+.ace-tomorrow .ace_string.ace_regexp,\
+.ace-tomorrow .ace_variable {\
+color: #C82829\
+}\
+.ace-tomorrow .ace_comment {\
+color: #8E908C\
+}\
+.ace-tomorrow .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-tomorrow .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-tomorrow_night-noconflict.js b/contexts/data/lib/ace/theme-tomorrow_night-noconflict.js
deleted file mode 100644
index d90ccde..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/tomorrow_night",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-tomorrow-night",b.cssText=".ace-tomorrow-night .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow-night .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow-night .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow-night .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow-night .ace_scroller { background-color: #1D1F21;}.ace-tomorrow-night .ace_text-layer { cursor: text; color: #C5C8C6;}.ace-tomorrow-night .ace_cursor { border-left: 2px solid #AEAFAD;}.ace-tomorrow-night .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #AEAFAD;} .ace-tomorrow-night .ace_marker-layer .ace_selection { background: #373B41;}.ace-tomorrow-night .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow-night .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #4B4E55;}.ace-tomorrow-night .ace_marker-layer .ace_active_line { background: #282A2E;}.ace-tomorrow-night .ace_marker-layer .ace_selected_word { border: 1px solid #373B41;} .ace-tomorrow-night .ace_invisible { color: #4B4E55;}.ace-tomorrow-night .ace_keyword { color:#B294BB;}.ace-tomorrow-night .ace_keyword.ace_operator { color:#8ABEB7;}.ace-tomorrow-night .ace_constant.ace_language { color:#DE935F;}.ace-tomorrow-night .ace_constant.ace_numeric { color:#DE935F;}.ace-tomorrow-night .ace_invalid { color:#CED2CF;background-color:#DF5F5F;}.ace-tomorrow-night .ace_invalid.ace_deprecated { color:#CED2CF;background-color:#B798BF;}.ace-tomorrow-night .ace_fold { background-color: #81A2BE; border-color: #C5C8C6;}.ace-tomorrow-night .ace_support.ace_function { color:#81A2BE;}.ace-tomorrow-night .ace_string { color:#B5BD68;}.ace-tomorrow-night .ace_string.ace_regexp { color:#CC6666;}.ace-tomorrow-night .ace_comment { color:#969896;}.ace-tomorrow-night .ace_variable { color:#CC6666;}.ace-tomorrow-night .ace_meta.ace_tag { color:#CC6666;}.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name { color:#CC6666;}.ace-tomorrow-night .ace_entity.ace_name.ace_function { color:#81A2BE;}.ace-tomorrow-night .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow-night .ace_markup.ace_heading { color:#B5BD68;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-tomorrow_night-uncompressed-noconflict.js
deleted file mode 100644
index 4d4f607..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night-uncompressed-noconflict.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow_night', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-tomorrow-night";
-exports.cssText = "\
-.ace-tomorrow-night .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow-night .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow-night .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow-night .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow-night .ace_scroller {\
- background-color: #1D1F21;\
-}\
-\
-.ace-tomorrow-night .ace_text-layer {\
- cursor: text;\
- color: #C5C8C6;\
-}\
-\
-.ace-tomorrow-night .ace_cursor {\
- border-left: 2px solid #AEAFAD;\
-}\
-\
-.ace-tomorrow-night .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #AEAFAD;\
-}\
- \
-.ace-tomorrow-night .ace_marker-layer .ace_selection {\
- background: #373B41;\
-}\
-\
-.ace-tomorrow-night .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow-night .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #4B4E55;\
-}\
-\
-.ace-tomorrow-night .ace_marker-layer .ace_active_line {\
- background: #282A2E;\
-}\
-\
-.ace-tomorrow-night .ace_marker-layer .ace_selected_word {\
- border: 1px solid #373B41;\
-}\
- \
-.ace-tomorrow-night .ace_invisible {\
- color: #4B4E55;\
-}\
-\
-.ace-tomorrow-night .ace_keyword {\
- color:#B294BB;\
-}\
-\
-.ace-tomorrow-night .ace_keyword.ace_operator {\
- color:#8ABEB7;\
-}\
-\
-.ace-tomorrow-night .ace_constant.ace_language {\
- color:#DE935F;\
-}\
-\
-.ace-tomorrow-night .ace_constant.ace_numeric {\
- color:#DE935F;\
-}\
-\
-.ace-tomorrow-night .ace_invalid {\
- color:#CED2CF;\
-background-color:#DF5F5F;\
-}\
-\
-.ace-tomorrow-night .ace_invalid.ace_deprecated {\
- color:#CED2CF;\
-background-color:#B798BF;\
-}\
-\
-.ace-tomorrow-night .ace_fold {\
- background-color: #81A2BE;\
- border-color: #C5C8C6;\
-}\
-\
-.ace-tomorrow-night .ace_support.ace_function {\
- color:#81A2BE;\
-}\
-\
-.ace-tomorrow-night .ace_string {\
- color:#B5BD68;\
-}\
-\
-.ace-tomorrow-night .ace_string.ace_regexp {\
- color:#CC6666;\
-}\
-\
-.ace-tomorrow-night .ace_comment {\
- color:#969896;\
-}\
-\
-.ace-tomorrow-night .ace_variable {\
- color:#CC6666;\
-}\
-\
-.ace-tomorrow-night .ace_meta.ace_tag {\
- color:#CC6666;\
-}\
-\
-.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name {\
- color:#CC6666;\
-}\
-\
-.ace-tomorrow-night .ace_entity.ace_name.ace_function {\
- color:#81A2BE;\
-}\
-\
-.ace-tomorrow-night .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow-night .ace_markup.ace_heading {\
- color:#B5BD68;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night-uncompressed.js b/contexts/data/lib/ace/theme-tomorrow_night-uncompressed.js
deleted file mode 100644
index e1712ea..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night-uncompressed.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/tomorrow_night', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-tomorrow-night";
-exports.cssText = "\
-.ace-tomorrow-night .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow-night .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow-night .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow-night .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow-night .ace_scroller {\
- background-color: #1D1F21;\
-}\
-\
-.ace-tomorrow-night .ace_text-layer {\
- cursor: text;\
- color: #C5C8C6;\
-}\
-\
-.ace-tomorrow-night .ace_cursor {\
- border-left: 2px solid #AEAFAD;\
-}\
-\
-.ace-tomorrow-night .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #AEAFAD;\
-}\
- \
-.ace-tomorrow-night .ace_marker-layer .ace_selection {\
- background: #373B41;\
-}\
-\
-.ace-tomorrow-night .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow-night .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #4B4E55;\
-}\
-\
-.ace-tomorrow-night .ace_marker-layer .ace_active_line {\
- background: #282A2E;\
-}\
-\
-.ace-tomorrow-night .ace_marker-layer .ace_selected_word {\
- border: 1px solid #373B41;\
-}\
- \
-.ace-tomorrow-night .ace_invisible {\
- color: #4B4E55;\
-}\
-\
-.ace-tomorrow-night .ace_keyword {\
- color:#B294BB;\
-}\
-\
-.ace-tomorrow-night .ace_keyword.ace_operator {\
- color:#8ABEB7;\
-}\
-\
-.ace-tomorrow-night .ace_constant.ace_language {\
- color:#DE935F;\
-}\
-\
-.ace-tomorrow-night .ace_constant.ace_numeric {\
- color:#DE935F;\
-}\
-\
-.ace-tomorrow-night .ace_invalid {\
- color:#CED2CF;\
-background-color:#DF5F5F;\
-}\
-\
-.ace-tomorrow-night .ace_invalid.ace_deprecated {\
- color:#CED2CF;\
-background-color:#B798BF;\
-}\
-\
-.ace-tomorrow-night .ace_fold {\
- background-color: #81A2BE;\
- border-color: #C5C8C6;\
-}\
-\
-.ace-tomorrow-night .ace_support.ace_function {\
- color:#81A2BE;\
-}\
-\
-.ace-tomorrow-night .ace_string {\
- color:#B5BD68;\
-}\
-\
-.ace-tomorrow-night .ace_string.ace_regexp {\
- color:#CC6666;\
-}\
-\
-.ace-tomorrow-night .ace_comment {\
- color:#969896;\
-}\
-\
-.ace-tomorrow-night .ace_variable {\
- color:#CC6666;\
-}\
-\
-.ace-tomorrow-night .ace_meta.ace_tag {\
- color:#CC6666;\
-}\
-\
-.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name {\
- color:#CC6666;\
-}\
-\
-.ace-tomorrow-night .ace_entity.ace_name.ace_function {\
- color:#81A2BE;\
-}\
-\
-.ace-tomorrow-night .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow-night .ace_markup.ace_heading {\
- color:#B5BD68;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night.js b/contexts/data/lib/ace/theme-tomorrow_night.js
index 342b1b8..9066df3 100644
--- a/contexts/data/lib/ace/theme-tomorrow_night.js
+++ b/contexts/data/lib/ace/theme-tomorrow_night.js
@@ -1 +1,147 @@
-define("ace/theme/tomorrow_night",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-tomorrow-night",b.cssText=".ace-tomorrow-night .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow-night .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow-night .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow-night .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow-night .ace_scroller { background-color: #1D1F21;}.ace-tomorrow-night .ace_text-layer { cursor: text; color: #C5C8C6;}.ace-tomorrow-night .ace_cursor { border-left: 2px solid #AEAFAD;}.ace-tomorrow-night .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #AEAFAD;} .ace-tomorrow-night .ace_marker-layer .ace_selection { background: #373B41;}.ace-tomorrow-night .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow-night .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #4B4E55;}.ace-tomorrow-night .ace_marker-layer .ace_active_line { background: #282A2E;}.ace-tomorrow-night .ace_marker-layer .ace_selected_word { border: 1px solid #373B41;} .ace-tomorrow-night .ace_invisible { color: #4B4E55;}.ace-tomorrow-night .ace_keyword { color:#B294BB;}.ace-tomorrow-night .ace_keyword.ace_operator { color:#8ABEB7;}.ace-tomorrow-night .ace_constant.ace_language { color:#DE935F;}.ace-tomorrow-night .ace_constant.ace_numeric { color:#DE935F;}.ace-tomorrow-night .ace_invalid { color:#CED2CF;background-color:#DF5F5F;}.ace-tomorrow-night .ace_invalid.ace_deprecated { color:#CED2CF;background-color:#B798BF;}.ace-tomorrow-night .ace_fold { background-color: #81A2BE; border-color: #C5C8C6;}.ace-tomorrow-night .ace_support.ace_function { color:#81A2BE;}.ace-tomorrow-night .ace_string { color:#B5BD68;}.ace-tomorrow-night .ace_string.ace_regexp { color:#CC6666;}.ace-tomorrow-night .ace_comment { color:#969896;}.ace-tomorrow-night .ace_variable { color:#CC6666;}.ace-tomorrow-night .ace_meta.ace_tag { color:#CC6666;}.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name { color:#CC6666;}.ace-tomorrow-night .ace_entity.ace_name.ace_function { color:#81A2BE;}.ace-tomorrow-night .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow-night .ace_markup.ace_heading { color:#B5BD68;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/tomorrow_night', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-tomorrow-night";
+exports.cssText = ".ace-tomorrow-night .ace_gutter {\
+background: #25282c;\
+color: #C5C8C6\
+}\
+.ace-tomorrow-night .ace_print-margin {\
+width: 1px;\
+background: #25282c\
+}\
+.ace-tomorrow-night .ace_scroller {\
+background-color: #1D1F21\
+}\
+.ace-tomorrow-night .ace_text-layer {\
+color: #C5C8C6\
+}\
+.ace-tomorrow-night .ace_cursor {\
+border-left: 2px solid #AEAFAD\
+}\
+.ace-tomorrow-night .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #AEAFAD\
+}\
+.ace-tomorrow-night .ace_marker-layer .ace_selection {\
+background: #373B41\
+}\
+.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #1D1F21;\
+border-radius: 2px\
+}\
+.ace-tomorrow-night .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-tomorrow-night .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #4B4E55\
+}\
+.ace-tomorrow-night .ace_marker-layer .ace_active-line {\
+background: #282A2E\
+}\
+.ace-tomorrow-night .ace_gutter-active-line {\
+background-color: #282A2E\
+}\
+.ace-tomorrow-night .ace_marker-layer .ace_selected-word {\
+border: 1px solid #373B41\
+}\
+.ace-tomorrow-night .ace_invisible {\
+color: #4B4E55\
+}\
+.ace-tomorrow-night .ace_keyword,\
+.ace-tomorrow-night .ace_meta,\
+.ace-tomorrow-night .ace_storage,\
+.ace-tomorrow-night .ace_storage.ace_type,\
+.ace-tomorrow-night .ace_support.ace_type {\
+color: #B294BB\
+}\
+.ace-tomorrow-night .ace_keyword.ace_operator {\
+color: #8ABEB7\
+}\
+.ace-tomorrow-night .ace_constant.ace_character,\
+.ace-tomorrow-night .ace_constant.ace_language,\
+.ace-tomorrow-night .ace_constant.ace_numeric,\
+.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,\
+.ace-tomorrow-night .ace_support.ace_constant,\
+.ace-tomorrow-night .ace_variable.ace_parameter {\
+color: #DE935F\
+}\
+.ace-tomorrow-night .ace_constant.ace_other {\
+color: #CED1CF\
+}\
+.ace-tomorrow-night .ace_invalid {\
+color: #CED2CF;\
+background-color: #DF5F5F\
+}\
+.ace-tomorrow-night .ace_invalid.ace_deprecated {\
+color: #CED2CF;\
+background-color: #B798BF\
+}\
+.ace-tomorrow-night .ace_fold {\
+background-color: #81A2BE;\
+border-color: #C5C8C6\
+}\
+.ace-tomorrow-night .ace_entity.ace_name.ace_function,\
+.ace-tomorrow-night .ace_support.ace_function,\
+.ace-tomorrow-night .ace_variable {\
+color: #81A2BE\
+}\
+.ace-tomorrow-night .ace_support.ace_class,\
+.ace-tomorrow-night .ace_support.ace_type {\
+color: #F0C674\
+}\
+.ace-tomorrow-night .ace_markup.ace_heading,\
+.ace-tomorrow-night .ace_string {\
+color: #B5BD68\
+}\
+.ace-tomorrow-night .ace_entity.ace_name.ace_tag,\
+.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,\
+.ace-tomorrow-night .ace_meta.ace_tag,\
+.ace-tomorrow-night .ace_string.ace_regexp,\
+.ace-tomorrow-night .ace_variable {\
+color: #CC6666\
+}\
+.ace-tomorrow-night .ace_comment {\
+color: #969896\
+}\
+.ace-tomorrow-night .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-tomorrow-night .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQlVf8z7Bq1ar/AA/hBFp7egmpAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_blue-noconflict.js b/contexts/data/lib/ace/theme-tomorrow_night_blue-noconflict.js
deleted file mode 100644
index 1fd929d..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_blue-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/tomorrow_night_blue",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-tomorrow-night-blue",b.cssText=".ace-tomorrow-night-blue .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow-night-blue .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow-night-blue .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow-night-blue .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow-night-blue .ace_scroller { background-color: #002451;}.ace-tomorrow-night-blue .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-tomorrow-night-blue .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-tomorrow-night-blue .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-tomorrow-night-blue .ace_marker-layer .ace_selection { background: #003F8E;}.ace-tomorrow-night-blue .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404F7D;}.ace-tomorrow-night-blue .ace_marker-layer .ace_active_line { background: #00346E;}.ace-tomorrow-night-blue .ace_marker-layer .ace_selected_word { border: 1px solid #003F8E;} .ace-tomorrow-night-blue .ace_invisible { color: #404F7D;}.ace-tomorrow-night-blue .ace_keyword { color:#EBBBFF;}.ace-tomorrow-night-blue .ace_keyword.ace_operator { color:#99FFFF;}.ace-tomorrow-night-blue .ace_constant.ace_language { color:#FFC58F;}.ace-tomorrow-night-blue .ace_constant.ace_numeric { color:#FFC58F;}.ace-tomorrow-night-blue .ace_invalid { color:#FFFFFF;background-color:#F99DA5;}.ace-tomorrow-night-blue .ace_invalid.ace_deprecated { color:#FFFFFF;background-color:#EBBBFF;}.ace-tomorrow-night-blue .ace_fold { background-color: #BBDAFF; border-color: #FFFFFF;}.ace-tomorrow-night-blue .ace_support.ace_function { color:#BBDAFF;}.ace-tomorrow-night-blue .ace_string { color:#D1F1A9;}.ace-tomorrow-night-blue .ace_string.ace_regexp { color:#FF9DA4;}.ace-tomorrow-night-blue .ace_comment { color:#7285B7;}.ace-tomorrow-night-blue .ace_variable { color:#FF9DA4;}.ace-tomorrow-night-blue .ace_meta.ace_tag { color:#FF9DA4;}.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name { color:#FF9DA4;}.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function { color:#BBDAFF;}.ace-tomorrow-night-blue .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow-night-blue .ace_markup.ace_heading { color:#D1F1A9;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_blue-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-tomorrow_night_blue-uncompressed-noconflict.js
deleted file mode 100644
index 165b7e6..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_blue-uncompressed-noconflict.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow_night_blue', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-tomorrow-night-blue";
-exports.cssText = "\
-.ace-tomorrow-night-blue .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow-night-blue .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow-night-blue .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow-night-blue .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow-night-blue .ace_scroller {\
- background-color: #002451;\
-}\
-\
-.ace-tomorrow-night-blue .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\
- background: #003F8E;\
-}\
-\
-.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404F7D;\
-}\
-\
-.ace-tomorrow-night-blue .ace_marker-layer .ace_active_line {\
- background: #00346E;\
-}\
-\
-.ace-tomorrow-night-blue .ace_marker-layer .ace_selected_word {\
- border: 1px solid #003F8E;\
-}\
- \
-.ace-tomorrow-night-blue .ace_invisible {\
- color: #404F7D;\
-}\
-\
-.ace-tomorrow-night-blue .ace_keyword {\
- color:#EBBBFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_keyword.ace_operator {\
- color:#99FFFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_constant.ace_language {\
- color:#FFC58F;\
-}\
-\
-.ace-tomorrow-night-blue .ace_constant.ace_numeric {\
- color:#FFC58F;\
-}\
-\
-.ace-tomorrow-night-blue .ace_invalid {\
- color:#FFFFFF;\
-background-color:#F99DA5;\
-}\
-\
-.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\
- color:#FFFFFF;\
-background-color:#EBBBFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_fold {\
- background-color: #BBDAFF;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_support.ace_function {\
- color:#BBDAFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_string {\
- color:#D1F1A9;\
-}\
-\
-.ace-tomorrow-night-blue .ace_string.ace_regexp {\
- color:#FF9DA4;\
-}\
-\
-.ace-tomorrow-night-blue .ace_comment {\
- color:#7285B7;\
-}\
-\
-.ace-tomorrow-night-blue .ace_variable {\
- color:#FF9DA4;\
-}\
-\
-.ace-tomorrow-night-blue .ace_meta.ace_tag {\
- color:#FF9DA4;\
-}\
-\
-.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name {\
- color:#FF9DA4;\
-}\
-\
-.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function {\
- color:#BBDAFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow-night-blue .ace_markup.ace_heading {\
- color:#D1F1A9;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_blue-uncompressed.js b/contexts/data/lib/ace/theme-tomorrow_night_blue-uncompressed.js
deleted file mode 100644
index 6dda83b..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_blue-uncompressed.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/tomorrow_night_blue', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-tomorrow-night-blue";
-exports.cssText = "\
-.ace-tomorrow-night-blue .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow-night-blue .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow-night-blue .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow-night-blue .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow-night-blue .ace_scroller {\
- background-color: #002451;\
-}\
-\
-.ace-tomorrow-night-blue .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\
- background: #003F8E;\
-}\
-\
-.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404F7D;\
-}\
-\
-.ace-tomorrow-night-blue .ace_marker-layer .ace_active_line {\
- background: #00346E;\
-}\
-\
-.ace-tomorrow-night-blue .ace_marker-layer .ace_selected_word {\
- border: 1px solid #003F8E;\
-}\
- \
-.ace-tomorrow-night-blue .ace_invisible {\
- color: #404F7D;\
-}\
-\
-.ace-tomorrow-night-blue .ace_keyword {\
- color:#EBBBFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_keyword.ace_operator {\
- color:#99FFFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_constant.ace_language {\
- color:#FFC58F;\
-}\
-\
-.ace-tomorrow-night-blue .ace_constant.ace_numeric {\
- color:#FFC58F;\
-}\
-\
-.ace-tomorrow-night-blue .ace_invalid {\
- color:#FFFFFF;\
-background-color:#F99DA5;\
-}\
-\
-.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\
- color:#FFFFFF;\
-background-color:#EBBBFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_fold {\
- background-color: #BBDAFF;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_support.ace_function {\
- color:#BBDAFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_string {\
- color:#D1F1A9;\
-}\
-\
-.ace-tomorrow-night-blue .ace_string.ace_regexp {\
- color:#FF9DA4;\
-}\
-\
-.ace-tomorrow-night-blue .ace_comment {\
- color:#7285B7;\
-}\
-\
-.ace-tomorrow-night-blue .ace_variable {\
- color:#FF9DA4;\
-}\
-\
-.ace-tomorrow-night-blue .ace_meta.ace_tag {\
- color:#FF9DA4;\
-}\
-\
-.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name {\
- color:#FF9DA4;\
-}\
-\
-.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function {\
- color:#BBDAFF;\
-}\
-\
-.ace-tomorrow-night-blue .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow-night-blue .ace_markup.ace_heading {\
- color:#D1F1A9;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_blue.js b/contexts/data/lib/ace/theme-tomorrow_night_blue.js
index e8c578d..f71eba9 100644
--- a/contexts/data/lib/ace/theme-tomorrow_night_blue.js
+++ b/contexts/data/lib/ace/theme-tomorrow_night_blue.js
@@ -1 +1,145 @@
-define("ace/theme/tomorrow_night_blue",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-tomorrow-night-blue",b.cssText=".ace-tomorrow-night-blue .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow-night-blue .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow-night-blue .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow-night-blue .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow-night-blue .ace_scroller { background-color: #002451;}.ace-tomorrow-night-blue .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-tomorrow-night-blue .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-tomorrow-night-blue .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-tomorrow-night-blue .ace_marker-layer .ace_selection { background: #003F8E;}.ace-tomorrow-night-blue .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404F7D;}.ace-tomorrow-night-blue .ace_marker-layer .ace_active_line { background: #00346E;}.ace-tomorrow-night-blue .ace_marker-layer .ace_selected_word { border: 1px solid #003F8E;} .ace-tomorrow-night-blue .ace_invisible { color: #404F7D;}.ace-tomorrow-night-blue .ace_keyword { color:#EBBBFF;}.ace-tomorrow-night-blue .ace_keyword.ace_operator { color:#99FFFF;}.ace-tomorrow-night-blue .ace_constant.ace_language { color:#FFC58F;}.ace-tomorrow-night-blue .ace_constant.ace_numeric { color:#FFC58F;}.ace-tomorrow-night-blue .ace_invalid { color:#FFFFFF;background-color:#F99DA5;}.ace-tomorrow-night-blue .ace_invalid.ace_deprecated { color:#FFFFFF;background-color:#EBBBFF;}.ace-tomorrow-night-blue .ace_fold { background-color: #BBDAFF; border-color: #FFFFFF;}.ace-tomorrow-night-blue .ace_support.ace_function { color:#BBDAFF;}.ace-tomorrow-night-blue .ace_string { color:#D1F1A9;}.ace-tomorrow-night-blue .ace_string.ace_regexp { color:#FF9DA4;}.ace-tomorrow-night-blue .ace_comment { color:#7285B7;}.ace-tomorrow-night-blue .ace_variable { color:#FF9DA4;}.ace-tomorrow-night-blue .ace_meta.ace_tag { color:#FF9DA4;}.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name { color:#FF9DA4;}.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function { color:#BBDAFF;}.ace-tomorrow-night-blue .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow-night-blue .ace_markup.ace_heading { color:#D1F1A9;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/tomorrow_night_blue', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-tomorrow-night-blue";
+exports.cssText = ".ace-tomorrow-night-blue .ace_gutter {\
+background: #00204b;\
+color: #7388b5\
+}\
+.ace-tomorrow-night-blue .ace_print-margin {\
+width: 1px;\
+background: #00204b\
+}\
+.ace-tomorrow-night-blue .ace_scroller {\
+background-color: #002451\
+}\
+.ace-tomorrow-night-blue .ace_constant.ace_other,\
+.ace-tomorrow-night-blue .ace_text-layer {\
+color: #FFFFFF\
+}\
+.ace-tomorrow-night-blue .ace_cursor {\
+border-left: 2px solid #FFFFFF\
+}\
+.ace-tomorrow-night-blue .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #FFFFFF\
+}\
+.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\
+background: #003F8E\
+}\
+.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #002451;\
+border-radius: 2px\
+}\
+.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\
+background: rgb(127, 111, 19)\
+}\
+.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #404F7D\
+}\
+.ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {\
+background: #00346E\
+}\
+.ace-tomorrow-night-blue .ace_gutter-active-line {\
+background-color: #022040\
+}\
+.ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {\
+border: 1px solid #003F8E\
+}\
+.ace-tomorrow-night-blue .ace_invisible {\
+color: #404F7D\
+}\
+.ace-tomorrow-night-blue .ace_keyword,\
+.ace-tomorrow-night-blue .ace_meta,\
+.ace-tomorrow-night-blue .ace_storage,\
+.ace-tomorrow-night-blue .ace_storage.ace_type,\
+.ace-tomorrow-night-blue .ace_support.ace_type {\
+color: #EBBBFF\
+}\
+.ace-tomorrow-night-blue .ace_keyword.ace_operator {\
+color: #99FFFF\
+}\
+.ace-tomorrow-night-blue .ace_constant.ace_character,\
+.ace-tomorrow-night-blue .ace_constant.ace_language,\
+.ace-tomorrow-night-blue .ace_constant.ace_numeric,\
+.ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,\
+.ace-tomorrow-night-blue .ace_support.ace_constant,\
+.ace-tomorrow-night-blue .ace_variable.ace_parameter {\
+color: #FFC58F\
+}\
+.ace-tomorrow-night-blue .ace_invalid {\
+color: #FFFFFF;\
+background-color: #F99DA5\
+}\
+.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\
+color: #FFFFFF;\
+background-color: #EBBBFF\
+}\
+.ace-tomorrow-night-blue .ace_fold {\
+background-color: #BBDAFF;\
+border-color: #FFFFFF\
+}\
+.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,\
+.ace-tomorrow-night-blue .ace_support.ace_function,\
+.ace-tomorrow-night-blue .ace_variable {\
+color: #BBDAFF\
+}\
+.ace-tomorrow-night-blue .ace_support.ace_class,\
+.ace-tomorrow-night-blue .ace_support.ace_type {\
+color: #FFEEAD\
+}\
+.ace-tomorrow-night-blue .ace_markup.ace_heading,\
+.ace-tomorrow-night-blue .ace_string {\
+color: #D1F1A9\
+}\
+.ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,\
+.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,\
+.ace-tomorrow-night-blue .ace_meta.ace_tag,\
+.ace-tomorrow-night-blue .ace_string.ace_regexp,\
+.ace-tomorrow-night-blue .ace_variable {\
+color: #FF9DA4\
+}\
+.ace-tomorrow-night-blue .ace_comment {\
+color: #7285B7\
+}\
+.ace-tomorrow-night-blue .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-tomorrow-night-blue .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgUAn8z7Bq1ar/ABBUBHJ4/r3JAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_bright-noconflict.js b/contexts/data/lib/ace/theme-tomorrow_night_bright-noconflict.js
deleted file mode 100644
index 2b10639..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_bright-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/tomorrow_night_bright",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-tomorrow-night-bright",b.cssText=".ace-tomorrow-night-bright .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow-night-bright .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow-night-bright .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow-night-bright .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow-night-bright .ace_scroller { background-color: #000000;}.ace-tomorrow-night-bright .ace_text-layer { cursor: text; color: #DEDEDE;}.ace-tomorrow-night-bright .ace_cursor { border-left: 2px solid #9F9F9F;}.ace-tomorrow-night-bright .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #9F9F9F;} .ace-tomorrow-night-bright .ace_marker-layer .ace_selection { background: #424242;}.ace-tomorrow-night-bright .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #343434;}.ace-tomorrow-night-bright .ace_marker-layer .ace_active_line { background: #2A2A2A;}.ace-tomorrow-night-bright .ace_marker-layer .ace_selected_word { border: 1px solid #424242;} .ace-tomorrow-night-bright .ace_invisible { color: #343434;}.ace-tomorrow-night-bright .ace_keyword { color:#C397D8;}.ace-tomorrow-night-bright .ace_keyword.ace_operator { color:#70C0B1;}.ace-tomorrow-night-bright .ace_constant.ace_language { color:#E78C45;}.ace-tomorrow-night-bright .ace_constant.ace_numeric { color:#E78C45;}.ace-tomorrow-night-bright .ace_invalid { color:#CED2CF;background-color:#DF5F5F;}.ace-tomorrow-night-bright .ace_invalid.ace_deprecated { color:#CED2CF;background-color:#B798BF;}.ace-tomorrow-night-bright .ace_fold { background-color: #7AA6DA; border-color: #DEDEDE;}.ace-tomorrow-night-bright .ace_support.ace_function { color:#7AA6DA;}.ace-tomorrow-night-bright .ace_string { color:#B9CA4A;}.ace-tomorrow-night-bright .ace_string.ace_regexp { color:#D54E53;}.ace-tomorrow-night-bright .ace_comment { color:#969896;}.ace-tomorrow-night-bright .ace_variable { color:#D54E53;}.ace-tomorrow-night-bright .ace_meta.ace_tag { color:#D54E53;}.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name { color:#D54E53;}.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function { color:#7AA6DA;}.ace-tomorrow-night-bright .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow-night-bright .ace_markup.ace_heading { color:#B9CA4A;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_bright-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-tomorrow_night_bright-uncompressed-noconflict.js
deleted file mode 100644
index 0bde7cb..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_bright-uncompressed-noconflict.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow_night_bright', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-tomorrow-night-bright";
-exports.cssText = "\
-.ace-tomorrow-night-bright .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow-night-bright .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow-night-bright .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow-night-bright .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow-night-bright .ace_scroller {\
- background-color: #000000;\
-}\
-\
-.ace-tomorrow-night-bright .ace_text-layer {\
- cursor: text;\
- color: #DEDEDE;\
-}\
-\
-.ace-tomorrow-night-bright .ace_cursor {\
- border-left: 2px solid #9F9F9F;\
-}\
-\
-.ace-tomorrow-night-bright .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #9F9F9F;\
-}\
- \
-.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\
- background: #424242;\
-}\
-\
-.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #343434;\
-}\
-\
-.ace-tomorrow-night-bright .ace_marker-layer .ace_active_line {\
- background: #2A2A2A;\
-}\
-\
-.ace-tomorrow-night-bright .ace_marker-layer .ace_selected_word {\
- border: 1px solid #424242;\
-}\
- \
-.ace-tomorrow-night-bright .ace_invisible {\
- color: #343434;\
-}\
-\
-.ace-tomorrow-night-bright .ace_keyword {\
- color:#C397D8;\
-}\
-\
-.ace-tomorrow-night-bright .ace_keyword.ace_operator {\
- color:#70C0B1;\
-}\
-\
-.ace-tomorrow-night-bright .ace_constant.ace_language {\
- color:#E78C45;\
-}\
-\
-.ace-tomorrow-night-bright .ace_constant.ace_numeric {\
- color:#E78C45;\
-}\
-\
-.ace-tomorrow-night-bright .ace_invalid {\
- color:#CED2CF;\
-background-color:#DF5F5F;\
-}\
-\
-.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\
- color:#CED2CF;\
-background-color:#B798BF;\
-}\
-\
-.ace-tomorrow-night-bright .ace_fold {\
- background-color: #7AA6DA;\
- border-color: #DEDEDE;\
-}\
-\
-.ace-tomorrow-night-bright .ace_support.ace_function {\
- color:#7AA6DA;\
-}\
-\
-.ace-tomorrow-night-bright .ace_string {\
- color:#B9CA4A;\
-}\
-\
-.ace-tomorrow-night-bright .ace_string.ace_regexp {\
- color:#D54E53;\
-}\
-\
-.ace-tomorrow-night-bright .ace_comment {\
- color:#969896;\
-}\
-\
-.ace-tomorrow-night-bright .ace_variable {\
- color:#D54E53;\
-}\
-\
-.ace-tomorrow-night-bright .ace_meta.ace_tag {\
- color:#D54E53;\
-}\
-\
-.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name {\
- color:#D54E53;\
-}\
-\
-.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function {\
- color:#7AA6DA;\
-}\
-\
-.ace-tomorrow-night-bright .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow-night-bright .ace_markup.ace_heading {\
- color:#B9CA4A;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_bright-uncompressed.js b/contexts/data/lib/ace/theme-tomorrow_night_bright-uncompressed.js
deleted file mode 100644
index 0f58542..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_bright-uncompressed.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/tomorrow_night_bright', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-tomorrow-night-bright";
-exports.cssText = "\
-.ace-tomorrow-night-bright .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow-night-bright .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow-night-bright .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow-night-bright .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow-night-bright .ace_scroller {\
- background-color: #000000;\
-}\
-\
-.ace-tomorrow-night-bright .ace_text-layer {\
- cursor: text;\
- color: #DEDEDE;\
-}\
-\
-.ace-tomorrow-night-bright .ace_cursor {\
- border-left: 2px solid #9F9F9F;\
-}\
-\
-.ace-tomorrow-night-bright .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #9F9F9F;\
-}\
- \
-.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\
- background: #424242;\
-}\
-\
-.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #343434;\
-}\
-\
-.ace-tomorrow-night-bright .ace_marker-layer .ace_active_line {\
- background: #2A2A2A;\
-}\
-\
-.ace-tomorrow-night-bright .ace_marker-layer .ace_selected_word {\
- border: 1px solid #424242;\
-}\
- \
-.ace-tomorrow-night-bright .ace_invisible {\
- color: #343434;\
-}\
-\
-.ace-tomorrow-night-bright .ace_keyword {\
- color:#C397D8;\
-}\
-\
-.ace-tomorrow-night-bright .ace_keyword.ace_operator {\
- color:#70C0B1;\
-}\
-\
-.ace-tomorrow-night-bright .ace_constant.ace_language {\
- color:#E78C45;\
-}\
-\
-.ace-tomorrow-night-bright .ace_constant.ace_numeric {\
- color:#E78C45;\
-}\
-\
-.ace-tomorrow-night-bright .ace_invalid {\
- color:#CED2CF;\
-background-color:#DF5F5F;\
-}\
-\
-.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\
- color:#CED2CF;\
-background-color:#B798BF;\
-}\
-\
-.ace-tomorrow-night-bright .ace_fold {\
- background-color: #7AA6DA;\
- border-color: #DEDEDE;\
-}\
-\
-.ace-tomorrow-night-bright .ace_support.ace_function {\
- color:#7AA6DA;\
-}\
-\
-.ace-tomorrow-night-bright .ace_string {\
- color:#B9CA4A;\
-}\
-\
-.ace-tomorrow-night-bright .ace_string.ace_regexp {\
- color:#D54E53;\
-}\
-\
-.ace-tomorrow-night-bright .ace_comment {\
- color:#969896;\
-}\
-\
-.ace-tomorrow-night-bright .ace_variable {\
- color:#D54E53;\
-}\
-\
-.ace-tomorrow-night-bright .ace_meta.ace_tag {\
- color:#D54E53;\
-}\
-\
-.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name {\
- color:#D54E53;\
-}\
-\
-.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function {\
- color:#7AA6DA;\
-}\
-\
-.ace-tomorrow-night-bright .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow-night-bright .ace_markup.ace_heading {\
- color:#B9CA4A;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_bright.js b/contexts/data/lib/ace/theme-tomorrow_night_bright.js
index 1201918..f244904 100644
--- a/contexts/data/lib/ace/theme-tomorrow_night_bright.js
+++ b/contexts/data/lib/ace/theme-tomorrow_night_bright.js
@@ -1 +1,147 @@
-define("ace/theme/tomorrow_night_bright",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-tomorrow-night-bright",b.cssText=".ace-tomorrow-night-bright .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow-night-bright .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow-night-bright .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow-night-bright .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow-night-bright .ace_scroller { background-color: #000000;}.ace-tomorrow-night-bright .ace_text-layer { cursor: text; color: #DEDEDE;}.ace-tomorrow-night-bright .ace_cursor { border-left: 2px solid #9F9F9F;}.ace-tomorrow-night-bright .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #9F9F9F;} .ace-tomorrow-night-bright .ace_marker-layer .ace_selection { background: #424242;}.ace-tomorrow-night-bright .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #343434;}.ace-tomorrow-night-bright .ace_marker-layer .ace_active_line { background: #2A2A2A;}.ace-tomorrow-night-bright .ace_marker-layer .ace_selected_word { border: 1px solid #424242;} .ace-tomorrow-night-bright .ace_invisible { color: #343434;}.ace-tomorrow-night-bright .ace_keyword { color:#C397D8;}.ace-tomorrow-night-bright .ace_keyword.ace_operator { color:#70C0B1;}.ace-tomorrow-night-bright .ace_constant.ace_language { color:#E78C45;}.ace-tomorrow-night-bright .ace_constant.ace_numeric { color:#E78C45;}.ace-tomorrow-night-bright .ace_invalid { color:#CED2CF;background-color:#DF5F5F;}.ace-tomorrow-night-bright .ace_invalid.ace_deprecated { color:#CED2CF;background-color:#B798BF;}.ace-tomorrow-night-bright .ace_fold { background-color: #7AA6DA; border-color: #DEDEDE;}.ace-tomorrow-night-bright .ace_support.ace_function { color:#7AA6DA;}.ace-tomorrow-night-bright .ace_string { color:#B9CA4A;}.ace-tomorrow-night-bright .ace_string.ace_regexp { color:#D54E53;}.ace-tomorrow-night-bright .ace_comment { color:#969896;}.ace-tomorrow-night-bright .ace_variable { color:#D54E53;}.ace-tomorrow-night-bright .ace_meta.ace_tag { color:#D54E53;}.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name { color:#D54E53;}.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function { color:#7AA6DA;}.ace-tomorrow-night-bright .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow-night-bright .ace_markup.ace_heading { color:#B9CA4A;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/tomorrow_night_bright', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-tomorrow-night-bright";
+exports.cssText = ".ace-tomorrow-night-bright .ace_gutter {\
+background: #1a1a1a;\
+color: #DEDEDE\
+}\
+.ace-tomorrow-night-bright .ace_print-margin {\
+width: 1px;\
+background: #1a1a1a\
+}\
+.ace-tomorrow-night-bright .ace_scroller {\
+background-color: #000000\
+}\
+.ace-tomorrow-night-bright .ace_text-layer {\
+color: #DEDEDE\
+}\
+.ace-tomorrow-night-bright .ace_cursor {\
+border-left: 2px solid #9F9F9F\
+}\
+.ace-tomorrow-night-bright .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #9F9F9F\
+}\
+.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\
+background: #424242\
+}\
+.ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #000000;\
+border-radius: 2px\
+}\
+.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #343434\
+}\
+.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {\
+background: #2A2A2A\
+}\
+.ace-tomorrow-night-bright .ace_gutter-active-line {\
+background-color: #2A2A2A\
+}\
+.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {\
+border: 1px solid #424242\
+}\
+.ace-tomorrow-night-bright .ace_invisible {\
+color: #343434\
+}\
+.ace-tomorrow-night-bright .ace_keyword,\
+.ace-tomorrow-night-bright .ace_meta,\
+.ace-tomorrow-night-bright .ace_storage,\
+.ace-tomorrow-night-bright .ace_storage.ace_type,\
+.ace-tomorrow-night-bright .ace_support.ace_type {\
+color: #C397D8\
+}\
+.ace-tomorrow-night-bright .ace_keyword.ace_operator {\
+color: #70C0B1\
+}\
+.ace-tomorrow-night-bright .ace_constant.ace_character,\
+.ace-tomorrow-night-bright .ace_constant.ace_language,\
+.ace-tomorrow-night-bright .ace_constant.ace_numeric,\
+.ace-tomorrow-night-bright .ace_keyword.ace_other.ace_unit,\
+.ace-tomorrow-night-bright .ace_support.ace_constant,\
+.ace-tomorrow-night-bright .ace_variable.ace_parameter {\
+color: #E78C45\
+}\
+.ace-tomorrow-night-bright .ace_constant.ace_other {\
+color: #EEEEEE\
+}\
+.ace-tomorrow-night-bright .ace_invalid {\
+color: #CED2CF;\
+background-color: #DF5F5F\
+}\
+.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\
+color: #CED2CF;\
+background-color: #B798BF\
+}\
+.ace-tomorrow-night-bright .ace_fold {\
+background-color: #7AA6DA;\
+border-color: #DEDEDE\
+}\
+.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function,\
+.ace-tomorrow-night-bright .ace_support.ace_function,\
+.ace-tomorrow-night-bright .ace_variable {\
+color: #7AA6DA\
+}\
+.ace-tomorrow-night-bright .ace_support.ace_class,\
+.ace-tomorrow-night-bright .ace_support.ace_type {\
+color: #E7C547\
+}\
+.ace-tomorrow-night-bright .ace_markup.ace_heading,\
+.ace-tomorrow-night-bright .ace_string {\
+color: #B9CA4A\
+}\
+.ace-tomorrow-night-bright .ace_entity.ace_name.ace_tag,\
+.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name,\
+.ace-tomorrow-night-bright .ace_meta.ace_tag,\
+.ace-tomorrow-night-bright .ace_string.ace_regexp,\
+.ace-tomorrow-night-bright .ace_variable {\
+color: #D54E53\
+}\
+.ace-tomorrow-night-bright .ace_comment {\
+color: #969896\
+}\
+.ace-tomorrow-night-bright .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-tomorrow-night-bright .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGD4z7Bq1ar/AAz9A/2naJQKAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_eighties-noconflict.js b/contexts/data/lib/ace/theme-tomorrow_night_eighties-noconflict.js
deleted file mode 100644
index d0c5e47..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_eighties-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/tomorrow_night_eighties",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-tomorrow-night-eighties",b.cssText=".ace-tomorrow-night-eighties .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow-night-eighties .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow-night-eighties .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow-night-eighties .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow-night-eighties .ace_scroller { background-color: #2D2D2D;}.ace-tomorrow-night-eighties .ace_text-layer { cursor: text; color: #CCCCCC;}.ace-tomorrow-night-eighties .ace_cursor { border-left: 2px solid #CCCCCC;}.ace-tomorrow-night-eighties .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #CCCCCC;} .ace-tomorrow-night-eighties .ace_marker-layer .ace_selection { background: #515151;}.ace-tomorrow-night-eighties .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #6A6A6A;}.ace-tomorrow-night-eighties .ace_marker-layer .ace_active_line { background: #393939;}.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected_word { border: 1px solid #515151;} .ace-tomorrow-night-eighties .ace_invisible { color: #6A6A6A;}.ace-tomorrow-night-eighties .ace_keyword { color:#CC99CC;}.ace-tomorrow-night-eighties .ace_keyword.ace_operator { color:#66CCCC;}.ace-tomorrow-night-eighties .ace_constant.ace_language { color:#F99157;}.ace-tomorrow-night-eighties .ace_constant.ace_numeric { color:#F99157;}.ace-tomorrow-night-eighties .ace_invalid { color:#CDCDCD;background-color:#F2777A;}.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated { color:#CDCDCD;background-color:#CC99CC;}.ace-tomorrow-night-eighties .ace_fold { background-color: #6699CC; border-color: #CCCCCC;}.ace-tomorrow-night-eighties .ace_support.ace_function { color:#6699CC;}.ace-tomorrow-night-eighties .ace_string { color:#99CC99;}.ace-tomorrow-night-eighties .ace_comment { color:#999999;}.ace-tomorrow-night-eighties .ace_variable { color:#F2777A;}.ace-tomorrow-night-eighties .ace_meta.ace_tag { color:#F2777A;}.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name { color:#F2777A;}.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function { color:#6699CC;}.ace-tomorrow-night-eighties .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow-night-eighties .ace_markup.ace_heading { color:#99CC99;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_eighties-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-tomorrow_night_eighties-uncompressed-noconflict.js
deleted file mode 100644
index 39c2853..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_eighties-uncompressed-noconflict.js
+++ /dev/null
@@ -1,183 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow_night_eighties', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-tomorrow-night-eighties";
-exports.cssText = "\
-.ace-tomorrow-night-eighties .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow-night-eighties .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_scroller {\
- background-color: #2D2D2D;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_text-layer {\
- cursor: text;\
- color: #CCCCCC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_cursor {\
- border-left: 2px solid #CCCCCC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #CCCCCC;\
-}\
- \
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\
- background: #515151;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #6A6A6A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_active_line {\
- background: #393939;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected_word {\
- border: 1px solid #515151;\
-}\
- \
-.ace-tomorrow-night-eighties .ace_invisible {\
- color: #6A6A6A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_keyword {\
- color:#CC99CC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_keyword.ace_operator {\
- color:#66CCCC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_constant.ace_language {\
- color:#F99157;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_constant.ace_numeric {\
- color:#F99157;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_invalid {\
- color:#CDCDCD;\
-background-color:#F2777A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\
- color:#CDCDCD;\
-background-color:#CC99CC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_fold {\
- background-color: #6699CC;\
- border-color: #CCCCCC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_support.ace_function {\
- color:#6699CC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_string {\
- color:#99CC99;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_comment {\
- color:#999999;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_variable {\
- color:#F2777A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_meta.ace_tag {\
- color:#F2777A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name {\
- color:#F2777A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function {\
- color:#6699CC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_markup.ace_heading {\
- color:#99CC99;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_eighties-uncompressed.js b/contexts/data/lib/ace/theme-tomorrow_night_eighties-uncompressed.js
deleted file mode 100644
index 70507db..0000000
--- a/contexts/data/lib/ace/theme-tomorrow_night_eighties-uncompressed.js
+++ /dev/null
@@ -1,183 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/tomorrow_night_eighties', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-tomorrow-night-eighties";
-exports.cssText = "\
-.ace-tomorrow-night-eighties .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-tomorrow-night-eighties .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_scroller {\
- background-color: #2D2D2D;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_text-layer {\
- cursor: text;\
- color: #CCCCCC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_cursor {\
- border-left: 2px solid #CCCCCC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #CCCCCC;\
-}\
- \
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\
- background: #515151;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #6A6A6A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_active_line {\
- background: #393939;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected_word {\
- border: 1px solid #515151;\
-}\
- \
-.ace-tomorrow-night-eighties .ace_invisible {\
- color: #6A6A6A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_keyword {\
- color:#CC99CC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_keyword.ace_operator {\
- color:#66CCCC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_constant.ace_language {\
- color:#F99157;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_constant.ace_numeric {\
- color:#F99157;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_invalid {\
- color:#CDCDCD;\
-background-color:#F2777A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\
- color:#CDCDCD;\
-background-color:#CC99CC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_fold {\
- background-color: #6699CC;\
- border-color: #CCCCCC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_support.ace_function {\
- color:#6699CC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_string {\
- color:#99CC99;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_comment {\
- color:#999999;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_variable {\
- color:#F2777A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_meta.ace_tag {\
- color:#F2777A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name {\
- color:#F2777A;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function {\
- color:#6699CC;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-tomorrow-night-eighties .ace_markup.ace_heading {\
- color:#99CC99;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-tomorrow_night_eighties.js b/contexts/data/lib/ace/theme-tomorrow_night_eighties.js
index ee465ed..3ca7f30 100644
--- a/contexts/data/lib/ace/theme-tomorrow_night_eighties.js
+++ b/contexts/data/lib/ace/theme-tomorrow_night_eighties.js
@@ -1 +1,144 @@
-define("ace/theme/tomorrow_night_eighties",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-tomorrow-night-eighties",b.cssText=".ace-tomorrow-night-eighties .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tomorrow-night-eighties .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tomorrow-night-eighties .ace_gutter { background: #e8e8e8; color: #333;}.ace-tomorrow-night-eighties .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tomorrow-night-eighties .ace_scroller { background-color: #2D2D2D;}.ace-tomorrow-night-eighties .ace_text-layer { cursor: text; color: #CCCCCC;}.ace-tomorrow-night-eighties .ace_cursor { border-left: 2px solid #CCCCCC;}.ace-tomorrow-night-eighties .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #CCCCCC;} .ace-tomorrow-night-eighties .ace_marker-layer .ace_selection { background: #515151;}.ace-tomorrow-night-eighties .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #6A6A6A;}.ace-tomorrow-night-eighties .ace_marker-layer .ace_active_line { background: #393939;}.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected_word { border: 1px solid #515151;} .ace-tomorrow-night-eighties .ace_invisible { color: #6A6A6A;}.ace-tomorrow-night-eighties .ace_keyword { color:#CC99CC;}.ace-tomorrow-night-eighties .ace_keyword.ace_operator { color:#66CCCC;}.ace-tomorrow-night-eighties .ace_constant.ace_language { color:#F99157;}.ace-tomorrow-night-eighties .ace_constant.ace_numeric { color:#F99157;}.ace-tomorrow-night-eighties .ace_invalid { color:#CDCDCD;background-color:#F2777A;}.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated { color:#CDCDCD;background-color:#CC99CC;}.ace-tomorrow-night-eighties .ace_fold { background-color: #6699CC; border-color: #CCCCCC;}.ace-tomorrow-night-eighties .ace_support.ace_function { color:#6699CC;}.ace-tomorrow-night-eighties .ace_string { color:#99CC99;}.ace-tomorrow-night-eighties .ace_comment { color:#999999;}.ace-tomorrow-night-eighties .ace_variable { color:#F2777A;}.ace-tomorrow-night-eighties .ace_meta.ace_tag { color:#F2777A;}.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name { color:#F2777A;}.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function { color:#6699CC;}.ace-tomorrow-night-eighties .ace_markup.ace_underline { text-decoration:underline;}.ace-tomorrow-night-eighties .ace_markup.ace_heading { color:#99CC99;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/tomorrow_night_eighties', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-tomorrow-night-eighties";
+exports.cssText = ".ace-tomorrow-night-eighties .ace_gutter {\
+background: #272727;\
+color: #CCC\
+}\
+.ace-tomorrow-night-eighties .ace_print-margin {\
+width: 1px;\
+background: #272727\
+}\
+.ace-tomorrow-night-eighties .ace_scroller {\
+background-color: #2D2D2D\
+}\
+.ace-tomorrow-night-eighties .ace_constant.ace_other,\
+.ace-tomorrow-night-eighties .ace_text-layer {\
+color: #CCCCCC\
+}\
+.ace-tomorrow-night-eighties .ace_cursor {\
+border-left: 2px solid #CCCCCC\
+}\
+.ace-tomorrow-night-eighties .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #CCCCCC\
+}\
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\
+background: #515151\
+}\
+.ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #2D2D2D;\
+border-radius: 2px\
+}\
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #6A6A6A\
+}\
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {\
+background: #393939\
+}\
+.ace-tomorrow-night-eighties .ace_gutter-active-line {\
+background-color: #393939\
+}\
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected-word {\
+border: 1px solid #515151\
+}\
+.ace-tomorrow-night-eighties .ace_invisible {\
+color: #6A6A6A\
+}\
+.ace-tomorrow-night-eighties .ace_keyword,\
+.ace-tomorrow-night-eighties .ace_meta,\
+.ace-tomorrow-night-eighties .ace_storage,\
+.ace-tomorrow-night-eighties .ace_storage.ace_type,\
+.ace-tomorrow-night-eighties .ace_support.ace_type {\
+color: #CC99CC\
+}\
+.ace-tomorrow-night-eighties .ace_keyword.ace_operator {\
+color: #66CCCC\
+}\
+.ace-tomorrow-night-eighties .ace_constant.ace_character,\
+.ace-tomorrow-night-eighties .ace_constant.ace_language,\
+.ace-tomorrow-night-eighties .ace_constant.ace_numeric,\
+.ace-tomorrow-night-eighties .ace_keyword.ace_other.ace_unit,\
+.ace-tomorrow-night-eighties .ace_support.ace_constant,\
+.ace-tomorrow-night-eighties .ace_variable.ace_parameter {\
+color: #F99157\
+}\
+.ace-tomorrow-night-eighties .ace_invalid {\
+color: #CDCDCD;\
+background-color: #F2777A\
+}\
+.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\
+color: #CDCDCD;\
+background-color: #CC99CC\
+}\
+.ace-tomorrow-night-eighties .ace_fold {\
+background-color: #6699CC;\
+border-color: #CCCCCC\
+}\
+.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function,\
+.ace-tomorrow-night-eighties .ace_support.ace_function,\
+.ace-tomorrow-night-eighties .ace_variable {\
+color: #6699CC\
+}\
+.ace-tomorrow-night-eighties .ace_support.ace_class,\
+.ace-tomorrow-night-eighties .ace_support.ace_type {\
+color: #FFCC66\
+}\
+.ace-tomorrow-night-eighties .ace_markup.ace_heading,\
+.ace-tomorrow-night-eighties .ace_string {\
+color: #99CC99\
+}\
+.ace-tomorrow-night-eighties .ace_comment {\
+color: #999999\
+}\
+.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_tag,\
+.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name,\
+.ace-tomorrow-night-eighties .ace_meta.ace_tag,\
+.ace-tomorrow-night-eighties .ace_variable {\
+color: #F2777A\
+}\
+.ace-tomorrow-night-eighties .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-tomorrow-night-eighties .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ1dX9z7Bq1ar/ABE1BITwhhuFAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-twilight-noconflict.js b/contexts/data/lib/ace/theme-twilight-noconflict.js
deleted file mode 100644
index 110ef84..0000000
--- a/contexts/data/lib/ace/theme-twilight-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/twilight",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-twilight",b.cssText=".ace-twilight .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-twilight .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-twilight .ace_gutter { background: #e8e8e8; color: #333;}.ace-twilight .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-twilight .ace_scroller { background-color: #141414;}.ace-twilight .ace_text-layer { cursor: text; color: #F8F8F8;}.ace-twilight .ace_cursor { border-left: 2px solid #A7A7A7;}.ace-twilight .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #A7A7A7;} .ace-twilight .ace_marker-layer .ace_selection { background: rgba(221, 240, 255, 0.20);}.ace-twilight .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-twilight .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.25);}.ace-twilight .ace_marker-layer .ace_active_line { background: rgba(255, 255, 255, 0.031);}.ace-twilight .ace_marker-layer .ace_selected_word { border: 1px solid rgba(221, 240, 255, 0.20);} .ace-twilight .ace_invisible { color: rgba(255, 255, 255, 0.25);}.ace-twilight .ace_keyword { color:#CDA869;}.ace-twilight .ace_constant { color:#CF6A4C;}.ace-twilight .ace_invalid.ace_illegal { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-twilight .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#D2A8A1;}.ace-twilight .ace_support { color:#9B859D;}.ace-twilight .ace_fold { background-color: #AC885B; border-color: #F8F8F8;}.ace-twilight .ace_support.ace_function { color:#DAD085;}.ace-twilight .ace_string { color:#8F9D6A;}.ace-twilight .ace_string.ace_regexp { color:#E9C062;}.ace-twilight .ace_comment { font-style:italic;color:#5F5A60;}.ace-twilight .ace_variable { color:#7587A6;}.ace-twilight .ace_xml_pe { color:#494949;}.ace-twilight .ace_meta.ace_tag { color:#AC885B;}.ace-twilight .ace_entity.ace_name.ace_function { color:#AC885B;}.ace-twilight .ace_markup.ace_underline { text-decoration:underline;}.ace-twilight .ace_markup.ace_heading { color:#CF6A4C;}.ace-twilight .ace_markup.ace_list { color:#F9EE98;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-twilight-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-twilight-uncompressed-noconflict.js
deleted file mode 100644
index ca3e51b..0000000
--- a/contexts/data/lib/ace/theme-twilight-uncompressed-noconflict.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/twilight', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-twilight";
-exports.cssText = "\
-.ace-twilight .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-twilight .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-twilight .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-twilight .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-twilight .ace_scroller {\
- background-color: #141414;\
-}\
-\
-.ace-twilight .ace_text-layer {\
- cursor: text;\
- color: #F8F8F8;\
-}\
-\
-.ace-twilight .ace_cursor {\
- border-left: 2px solid #A7A7A7;\
-}\
-\
-.ace-twilight .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #A7A7A7;\
-}\
- \
-.ace-twilight .ace_marker-layer .ace_selection {\
- background: rgba(221, 240, 255, 0.20);\
-}\
-\
-.ace-twilight .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-twilight .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(255, 255, 255, 0.25);\
-}\
-\
-.ace-twilight .ace_marker-layer .ace_active_line {\
- background: rgba(255, 255, 255, 0.031);\
-}\
-\
-.ace-twilight .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(221, 240, 255, 0.20);\
-}\
- \
-.ace-twilight .ace_invisible {\
- color: rgba(255, 255, 255, 0.25);\
-}\
-\
-.ace-twilight .ace_keyword {\
- color:#CDA869;\
-}\
-\
-.ace-twilight .ace_constant {\
- color:#CF6A4C;\
-}\
-\
-.ace-twilight .ace_invalid.ace_illegal {\
- color:#F8F8F8;\
-background-color:rgba(86, 45, 86, 0.75);\
-}\
-\
-.ace-twilight .ace_invalid.ace_deprecated {\
- text-decoration:underline;\
-font-style:italic;\
-color:#D2A8A1;\
-}\
-\
-.ace-twilight .ace_support {\
- color:#9B859D;\
-}\
-\
-.ace-twilight .ace_fold {\
- background-color: #AC885B;\
- border-color: #F8F8F8;\
-}\
-\
-.ace-twilight .ace_support.ace_function {\
- color:#DAD085;\
-}\
-\
-.ace-twilight .ace_string {\
- color:#8F9D6A;\
-}\
-\
-.ace-twilight .ace_string.ace_regexp {\
- color:#E9C062;\
-}\
-\
-.ace-twilight .ace_comment {\
- font-style:italic;\
-color:#5F5A60;\
-}\
-\
-.ace-twilight .ace_variable {\
- color:#7587A6;\
-}\
-\
-.ace-twilight .ace_xml_pe {\
- color:#494949;\
-}\
-\
-.ace-twilight .ace_meta.ace_tag {\
- color:#AC885B;\
-}\
-\
-.ace-twilight .ace_entity.ace_name.ace_function {\
- color:#AC885B;\
-}\
-\
-.ace-twilight .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-twilight .ace_markup.ace_heading {\
- color:#CF6A4C;\
-}\
-\
-.ace-twilight .ace_markup.ace_list {\
- color:#F9EE98;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-twilight-uncompressed.js b/contexts/data/lib/ace/theme-twilight-uncompressed.js
deleted file mode 100644
index d2b3e0e..0000000
--- a/contexts/data/lib/ace/theme-twilight-uncompressed.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/twilight', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-twilight";
-exports.cssText = "\
-.ace-twilight .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-twilight .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-twilight .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-twilight .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-twilight .ace_scroller {\
- background-color: #141414;\
-}\
-\
-.ace-twilight .ace_text-layer {\
- cursor: text;\
- color: #F8F8F8;\
-}\
-\
-.ace-twilight .ace_cursor {\
- border-left: 2px solid #A7A7A7;\
-}\
-\
-.ace-twilight .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #A7A7A7;\
-}\
- \
-.ace-twilight .ace_marker-layer .ace_selection {\
- background: rgba(221, 240, 255, 0.20);\
-}\
-\
-.ace-twilight .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-twilight .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid rgba(255, 255, 255, 0.25);\
-}\
-\
-.ace-twilight .ace_marker-layer .ace_active_line {\
- background: rgba(255, 255, 255, 0.031);\
-}\
-\
-.ace-twilight .ace_marker-layer .ace_selected_word {\
- border: 1px solid rgba(221, 240, 255, 0.20);\
-}\
- \
-.ace-twilight .ace_invisible {\
- color: rgba(255, 255, 255, 0.25);\
-}\
-\
-.ace-twilight .ace_keyword {\
- color:#CDA869;\
-}\
-\
-.ace-twilight .ace_constant {\
- color:#CF6A4C;\
-}\
-\
-.ace-twilight .ace_invalid.ace_illegal {\
- color:#F8F8F8;\
-background-color:rgba(86, 45, 86, 0.75);\
-}\
-\
-.ace-twilight .ace_invalid.ace_deprecated {\
- text-decoration:underline;\
-font-style:italic;\
-color:#D2A8A1;\
-}\
-\
-.ace-twilight .ace_support {\
- color:#9B859D;\
-}\
-\
-.ace-twilight .ace_fold {\
- background-color: #AC885B;\
- border-color: #F8F8F8;\
-}\
-\
-.ace-twilight .ace_support.ace_function {\
- color:#DAD085;\
-}\
-\
-.ace-twilight .ace_string {\
- color:#8F9D6A;\
-}\
-\
-.ace-twilight .ace_string.ace_regexp {\
- color:#E9C062;\
-}\
-\
-.ace-twilight .ace_comment {\
- font-style:italic;\
-color:#5F5A60;\
-}\
-\
-.ace-twilight .ace_variable {\
- color:#7587A6;\
-}\
-\
-.ace-twilight .ace_xml_pe {\
- color:#494949;\
-}\
-\
-.ace-twilight .ace_meta.ace_tag {\
- color:#AC885B;\
-}\
-\
-.ace-twilight .ace_entity.ace_name.ace_function {\
- color:#AC885B;\
-}\
-\
-.ace-twilight .ace_markup.ace_underline {\
- text-decoration:underline;\
-}\
-\
-.ace-twilight .ace_markup.ace_heading {\
- color:#CF6A4C;\
-}\
-\
-.ace-twilight .ace_markup.ace_list {\
- color:#F9EE98;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-twilight.js b/contexts/data/lib/ace/theme-twilight.js
index df48a06..b7f633b 100644
--- a/contexts/data/lib/ace/theme-twilight.js
+++ b/contexts/data/lib/ace/theme-twilight.js
@@ -1 +1,147 @@
-define("ace/theme/twilight",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-twilight",b.cssText=".ace-twilight .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-twilight .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-twilight .ace_gutter { background: #e8e8e8; color: #333;}.ace-twilight .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-twilight .ace_scroller { background-color: #141414;}.ace-twilight .ace_text-layer { cursor: text; color: #F8F8F8;}.ace-twilight .ace_cursor { border-left: 2px solid #A7A7A7;}.ace-twilight .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #A7A7A7;} .ace-twilight .ace_marker-layer .ace_selection { background: rgba(221, 240, 255, 0.20);}.ace-twilight .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-twilight .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.25);}.ace-twilight .ace_marker-layer .ace_active_line { background: rgba(255, 255, 255, 0.031);}.ace-twilight .ace_marker-layer .ace_selected_word { border: 1px solid rgba(221, 240, 255, 0.20);} .ace-twilight .ace_invisible { color: rgba(255, 255, 255, 0.25);}.ace-twilight .ace_keyword { color:#CDA869;}.ace-twilight .ace_constant { color:#CF6A4C;}.ace-twilight .ace_invalid.ace_illegal { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-twilight .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#D2A8A1;}.ace-twilight .ace_support { color:#9B859D;}.ace-twilight .ace_fold { background-color: #AC885B; border-color: #F8F8F8;}.ace-twilight .ace_support.ace_function { color:#DAD085;}.ace-twilight .ace_string { color:#8F9D6A;}.ace-twilight .ace_string.ace_regexp { color:#E9C062;}.ace-twilight .ace_comment { font-style:italic;color:#5F5A60;}.ace-twilight .ace_variable { color:#7587A6;}.ace-twilight .ace_xml_pe { color:#494949;}.ace-twilight .ace_meta.ace_tag { color:#AC885B;}.ace-twilight .ace_entity.ace_name.ace_function { color:#AC885B;}.ace-twilight .ace_markup.ace_underline { text-decoration:underline;}.ace-twilight .ace_markup.ace_heading { color:#CF6A4C;}.ace-twilight .ace_markup.ace_list { color:#F9EE98;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/twilight', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-twilight";
+exports.cssText = ".ace-twilight .ace_gutter {\
+background: #232323;\
+color: #E2E2E2\
+}\
+.ace-twilight .ace_print-margin {\
+width: 1px;\
+background: #232323\
+}\
+.ace-twilight .ace_scroller {\
+background-color: #141414\
+}\
+.ace-twilight .ace_text-layer {\
+color: #F8F8F8\
+}\
+.ace-twilight .ace_cursor {\
+border-left: 2px solid #A7A7A7\
+}\
+.ace-twilight .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #A7A7A7\
+}\
+.ace-twilight .ace_marker-layer .ace_selection {\
+background: rgba(221, 240, 255, 0.20)\
+}\
+.ace-twilight.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #141414;\
+border-radius: 2px\
+}\
+.ace-twilight .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-twilight .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(255, 255, 255, 0.25)\
+}\
+.ace-twilight .ace_marker-layer .ace_active-line {\
+background: rgba(255, 255, 255, 0.031)\
+}\
+.ace-twilight .ace_gutter-active-line {\
+background-color: rgba(255, 255, 255, 0.031)\
+}\
+.ace-twilight .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(221, 240, 255, 0.20)\
+}\
+.ace-twilight .ace_invisible {\
+color: rgba(255, 255, 255, 0.25)\
+}\
+.ace-twilight .ace_keyword,\
+.ace-twilight .ace_meta {\
+color: #CDA869\
+}\
+.ace-twilight .ace_constant,\
+.ace-twilight .ace_constant.ace_character,\
+.ace-twilight .ace_constant.ace_character.ace_escape,\
+.ace-twilight .ace_constant.ace_other,\
+.ace-twilight .ace_markup.ace_heading,\
+.ace-twilight .ace_support.ace_constant {\
+color: #CF6A4C\
+}\
+.ace-twilight .ace_invalid.ace_illegal {\
+color: #F8F8F8;\
+background-color: rgba(86, 45, 86, 0.75)\
+}\
+.ace-twilight .ace_invalid.ace_deprecated {\
+text-decoration: underline;\
+font-style: italic;\
+color: #D2A8A1\
+}\
+.ace-twilight .ace_support {\
+color: #9B859D\
+}\
+.ace-twilight .ace_fold {\
+background-color: #AC885B;\
+border-color: #F8F8F8\
+}\
+.ace-twilight .ace_support.ace_function {\
+color: #DAD085\
+}\
+.ace-twilight .ace_markup.ace_list,\
+.ace-twilight .ace_storage {\
+color: #F9EE98\
+}\
+.ace-twilight .ace_entity.ace_name.ace_function,\
+.ace-twilight .ace_meta.ace_tag,\
+.ace-twilight .ace_variable {\
+color: #AC885B\
+}\
+.ace-twilight .ace_string {\
+color: #8F9D6A\
+}\
+.ace-twilight .ace_string.ace_regexp {\
+color: #E9C062\
+}\
+.ace-twilight .ace_comment {\
+font-style: italic;\
+color: #5F5A60\
+}\
+.ace-twilight .ace_variable {\
+color: #7587A6\
+}\
+.ace-twilight .ace_xml-pe {\
+color: #494949\
+}\
+.ace-twilight .ace_markup.ace_underline {\
+text-decoration: underline\
+}\
+.ace-twilight .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERH5zzBz5sz/AA5EBAYqeZXWAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-vibrant_ink-noconflict.js b/contexts/data/lib/ace/theme-vibrant_ink-noconflict.js
deleted file mode 100644
index 450399f..0000000
--- a/contexts/data/lib/ace/theme-vibrant_ink-noconflict.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/theme/vibrant_ink",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-vibrant-ink",b.cssText=".ace-vibrant-ink .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-vibrant-ink .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-vibrant-ink .ace_gutter { background: #e8e8e8; color: #333;}.ace-vibrant-ink .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-vibrant-ink .ace_scroller { background-color: #0F0F0F;}.ace-vibrant-ink .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-vibrant-ink .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-vibrant-ink .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-vibrant-ink .ace_marker-layer .ace_selection { background: #6699CC;}.ace-vibrant-ink .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-vibrant-ink .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404040;}.ace-vibrant-ink .ace_marker-layer .ace_active_line { background: #333333;}.ace-vibrant-ink .ace_marker-layer .ace_selected_word { border: 1px solid #6699CC;} .ace-vibrant-ink .ace_invisible { color: #404040;}.ace-vibrant-ink .ace_keyword { color:#FF6600;}.ace-vibrant-ink .ace_constant { color:#339999;}.ace-vibrant-ink .ace_constant.ace_numeric { color:#99CC99;}.ace-vibrant-ink .ace_invalid { color:#CCFF33;background-color:#000000;}.ace-vibrant-ink .ace_invalid.ace_deprecated { color:#CCFF33;background-color:#000000;}.ace-vibrant-ink .ace_fold { background-color: #FFCC00; border-color: #FFFFFF;}.ace-vibrant-ink .ace_support.ace_function { color:#FFCC00;}.ace-vibrant-ink .ace_string { color:#66FF00;}.ace-vibrant-ink .ace_string.ace_regexp { color:#44B4CC;}.ace-vibrant-ink .ace_comment { color:#9933CC;}.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name { font-style:italic;color:#99CC99;}.ace-vibrant-ink .ace_entity.ace_name.ace_function { color:#FFCC00;}.ace-vibrant-ink .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-vibrant_ink-uncompressed-noconflict.js b/contexts/data/lib/ace/theme-vibrant_ink-uncompressed-noconflict.js
deleted file mode 100644
index a012b30..0000000
--- a/contexts/data/lib/ace/theme-vibrant_ink-uncompressed-noconflict.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Michael Schwartz <mr.pants AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/vibrant_ink', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-vibrant-ink";
-exports.cssText = "\
-.ace-vibrant-ink .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-vibrant-ink .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-vibrant-ink .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-vibrant-ink .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-vibrant-ink .ace_scroller {\
- background-color: #0F0F0F;\
-}\
-\
-.ace-vibrant-ink .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-vibrant-ink .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-vibrant-ink .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-vibrant-ink .ace_marker-layer .ace_selection {\
- background: #6699CC;\
-}\
-\
-.ace-vibrant-ink .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-vibrant-ink .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404040;\
-}\
-\
-.ace-vibrant-ink .ace_marker-layer .ace_active_line {\
- background: #333333;\
-}\
-\
-.ace-vibrant-ink .ace_marker-layer .ace_selected_word {\
- border: 1px solid #6699CC;\
-}\
- \
-.ace-vibrant-ink .ace_invisible {\
- color: #404040;\
-}\
-\
-.ace-vibrant-ink .ace_keyword {\
- color:#FF6600;\
-}\
-\
-.ace-vibrant-ink .ace_constant {\
- color:#339999;\
-}\
-\
-.ace-vibrant-ink .ace_constant.ace_numeric {\
- color:#99CC99;\
-}\
-\
-.ace-vibrant-ink .ace_invalid {\
- color:#CCFF33;\
-background-color:#000000;\
-}\
-\
-.ace-vibrant-ink .ace_invalid.ace_deprecated {\
- color:#CCFF33;\
-background-color:#000000;\
-}\
-\
-.ace-vibrant-ink .ace_fold {\
- background-color: #FFCC00;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-vibrant-ink .ace_support.ace_function {\
- color:#FFCC00;\
-}\
-\
-.ace-vibrant-ink .ace_string {\
- color:#66FF00;\
-}\
-\
-.ace-vibrant-ink .ace_string.ace_regexp {\
- color:#44B4CC;\
-}\
-\
-.ace-vibrant-ink .ace_comment {\
- color:#9933CC;\
-}\
-\
-.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\
- font-style:italic;\
-color:#99CC99;\
-}\
-\
-.ace-vibrant-ink .ace_entity.ace_name.ace_function {\
- color:#FFCC00;\
-}\
-\
-.ace-vibrant-ink .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-vibrant_ink-uncompressed.js b/contexts/data/lib/ace/theme-vibrant_ink-uncompressed.js
deleted file mode 100644
index 9806e69..0000000
--- a/contexts/data/lib/ace/theme-vibrant_ink-uncompressed.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Michael Schwartz <mr.pants AT gmail DOT com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/vibrant_ink', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-exports.isDark = true;
-exports.cssClass = "ace-vibrant-ink";
-exports.cssText = "\
-.ace-vibrant-ink .ace_editor {\
- border: 2px solid rgb(159, 159, 159);\
-}\
-\
-.ace-vibrant-ink .ace_editor.ace_focus {\
- border: 2px solid #327fbd;\
-}\
-\
-.ace-vibrant-ink .ace_gutter {\
- background: #e8e8e8;\
- color: #333;\
-}\
-\
-.ace-vibrant-ink .ace_print_margin {\
- width: 1px;\
- background: #e8e8e8;\
-}\
-\
-.ace-vibrant-ink .ace_scroller {\
- background-color: #0F0F0F;\
-}\
-\
-.ace-vibrant-ink .ace_text-layer {\
- cursor: text;\
- color: #FFFFFF;\
-}\
-\
-.ace-vibrant-ink .ace_cursor {\
- border-left: 2px solid #FFFFFF;\
-}\
-\
-.ace-vibrant-ink .ace_cursor.ace_overwrite {\
- border-left: 0px;\
- border-bottom: 1px solid #FFFFFF;\
-}\
- \
-.ace-vibrant-ink .ace_marker-layer .ace_selection {\
- background: #6699CC;\
-}\
-\
-.ace-vibrant-ink .ace_marker-layer .ace_step {\
- background: rgb(198, 219, 174);\
-}\
-\
-.ace-vibrant-ink .ace_marker-layer .ace_bracket {\
- margin: -1px 0 0 -1px;\
- border: 1px solid #404040;\
-}\
-\
-.ace-vibrant-ink .ace_marker-layer .ace_active_line {\
- background: #333333;\
-}\
-\
-.ace-vibrant-ink .ace_marker-layer .ace_selected_word {\
- border: 1px solid #6699CC;\
-}\
- \
-.ace-vibrant-ink .ace_invisible {\
- color: #404040;\
-}\
-\
-.ace-vibrant-ink .ace_keyword {\
- color:#FF6600;\
-}\
-\
-.ace-vibrant-ink .ace_constant {\
- color:#339999;\
-}\
-\
-.ace-vibrant-ink .ace_constant.ace_numeric {\
- color:#99CC99;\
-}\
-\
-.ace-vibrant-ink .ace_invalid {\
- color:#CCFF33;\
-background-color:#000000;\
-}\
-\
-.ace-vibrant-ink .ace_invalid.ace_deprecated {\
- color:#CCFF33;\
-background-color:#000000;\
-}\
-\
-.ace-vibrant-ink .ace_fold {\
- background-color: #FFCC00;\
- border-color: #FFFFFF;\
-}\
-\
-.ace-vibrant-ink .ace_support.ace_function {\
- color:#FFCC00;\
-}\
-\
-.ace-vibrant-ink .ace_string {\
- color:#66FF00;\
-}\
-\
-.ace-vibrant-ink .ace_string.ace_regexp {\
- color:#44B4CC;\
-}\
-\
-.ace-vibrant-ink .ace_comment {\
- color:#9933CC;\
-}\
-\
-.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\
- font-style:italic;\
-color:#99CC99;\
-}\
-\
-.ace-vibrant-ink .ace_entity.ace_name.ace_function {\
- color:#FFCC00;\
-}\
-\
-.ace-vibrant-ink .ace_markup.ace_underline {\
- text-decoration:underline;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
-;
- (function() {
- window.require(["ace/ace"], function(a) {
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
- })();
- \ No newline at end of file
diff --git a/contexts/data/lib/ace/theme-vibrant_ink.js b/contexts/data/lib/ace/theme-vibrant_ink.js
index fc59c91..27bded4 100644
--- a/contexts/data/lib/ace/theme-vibrant_ink.js
+++ b/contexts/data/lib/ace/theme-vibrant_ink.js
@@ -1 +1,131 @@
-define("ace/theme/vibrant_ink",["require","exports","module"],function(a,b,c){b.isDark=!0,b.cssClass="ace-vibrant-ink",b.cssText=".ace-vibrant-ink .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-vibrant-ink .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-vibrant-ink .ace_gutter { background: #e8e8e8; color: #333;}.ace-vibrant-ink .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-vibrant-ink .ace_scroller { background-color: #0F0F0F;}.ace-vibrant-ink .ace_text-layer { cursor: text; color: #FFFFFF;}.ace-vibrant-ink .ace_cursor { border-left: 2px solid #FFFFFF;}.ace-vibrant-ink .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #FFFFFF;} .ace-vibrant-ink .ace_marker-layer .ace_selection { background: #6699CC;}.ace-vibrant-ink .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-vibrant-ink .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #404040;}.ace-vibrant-ink .ace_marker-layer .ace_active_line { background: #333333;}.ace-vibrant-ink .ace_marker-layer .ace_selected_word { border: 1px solid #6699CC;} .ace-vibrant-ink .ace_invisible { color: #404040;}.ace-vibrant-ink .ace_keyword { color:#FF6600;}.ace-vibrant-ink .ace_constant { color:#339999;}.ace-vibrant-ink .ace_constant.ace_numeric { color:#99CC99;}.ace-vibrant-ink .ace_invalid { color:#CCFF33;background-color:#000000;}.ace-vibrant-ink .ace_invalid.ace_deprecated { color:#CCFF33;background-color:#000000;}.ace-vibrant-ink .ace_fold { background-color: #FFCC00; border-color: #FFFFFF;}.ace-vibrant-ink .ace_support.ace_function { color:#FFCC00;}.ace-vibrant-ink .ace_string { color:#66FF00;}.ace-vibrant-ink .ace_string.ace_regexp { color:#44B4CC;}.ace-vibrant-ink .ace_comment { color:#9933CC;}.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name { font-style:italic;color:#99CC99;}.ace-vibrant-ink .ace_entity.ace_name.ace_function { color:#FFCC00;}.ace-vibrant-ink .ace_markup.ace_underline { text-decoration:underline;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}() \ No newline at end of file
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/vibrant_ink', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-vibrant-ink";
+exports.cssText = ".ace-vibrant-ink .ace_gutter {\
+background: #1a1a1a;\
+color: #BEBEBE\
+}\
+.ace-vibrant-ink .ace_print-margin {\
+width: 1px;\
+background: #1a1a1a\
+}\
+.ace-vibrant-ink .ace_scroller {\
+background-color: #0F0F0F\
+}\
+.ace-vibrant-ink .ace_text-layer {\
+color: #FFFFFF\
+}\
+.ace-vibrant-ink .ace_cursor {\
+border-left: 2px solid #FFFFFF\
+}\
+.ace-vibrant-ink .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #FFFFFF\
+}\
+.ace-vibrant-ink .ace_marker-layer .ace_selection {\
+background: #6699CC\
+}\
+.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #0F0F0F;\
+border-radius: 2px\
+}\
+.ace-vibrant-ink .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-vibrant-ink .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #404040\
+}\
+.ace-vibrant-ink .ace_marker-layer .ace_active-line {\
+background: #333333\
+}\
+.ace-vibrant-ink .ace_gutter-active-line {\
+background-color: #333333\
+}\
+.ace-vibrant-ink .ace_marker-layer .ace_selected-word {\
+border: 1px solid #6699CC\
+}\
+.ace-vibrant-ink .ace_invisible {\
+color: #404040\
+}\
+.ace-vibrant-ink .ace_keyword,\
+.ace-vibrant-ink .ace_meta {\
+color: #FF6600\
+}\
+.ace-vibrant-ink .ace_constant,\
+.ace-vibrant-ink .ace_constant.ace_character,\
+.ace-vibrant-ink .ace_constant.ace_character.ace_escape,\
+.ace-vibrant-ink .ace_constant.ace_other {\
+color: #339999\
+}\
+.ace-vibrant-ink .ace_constant.ace_numeric {\
+color: #99CC99\
+}\
+.ace-vibrant-ink .ace_invalid,\
+.ace-vibrant-ink .ace_invalid.ace_deprecated {\
+color: #CCFF33;\
+background-color: #000000\
+}\
+.ace-vibrant-ink .ace_fold {\
+background-color: #FFCC00;\
+border-color: #FFFFFF\
+}\
+.ace-vibrant-ink .ace_entity.ace_name.ace_function,\
+.ace-vibrant-ink .ace_support.ace_function,\
+.ace-vibrant-ink .ace_variable {\
+color: #FFCC00\
+}\
+.ace-vibrant-ink .ace_variable.ace_parameter {\
+font-style: italic\
+}\
+.ace-vibrant-ink .ace_string {\
+color: #66FF00\
+}\
+.ace-vibrant-ink .ace_string.ace_regexp {\
+color: #44B4CC\
+}\
+.ace-vibrant-ink .ace_comment {\
+color: #9933CC\
+}\
+.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\
+font-style: italic;\
+color: #99CC99\
+}\
+.ace-vibrant-ink .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPg5+f/z7Bq1ar/AA5lBCqoLxsgAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/theme-xcode.js b/contexts/data/lib/ace/theme-xcode.js
new file mode 100644
index 0000000..2c783aa
--- /dev/null
+++ b/contexts/data/lib/ace/theme-xcode.js
@@ -0,0 +1,125 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ace.define('ace/theme/xcode', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-xcode";
+exports.cssText = "/* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: EE3AD170-2B7F-4DE1-B724-C75F13FE0085) */\
+.ace-xcode .ace_gutter {\
+background: #e8e8e8;\
+color: #333\
+}\
+.ace-xcode .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8\
+}\
+.ace-xcode .ace_scroller {\
+background-color: #FFFFFF\
+}\
+.ace-xcode .ace_text-layer {\
+color: #000000\
+}\
+.ace-xcode .ace_cursor {\
+border-left: 2px solid #000000\
+}\
+.ace-xcode .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #000000\
+}\
+.ace-xcode .ace_marker-layer .ace_selection {\
+background: #B5D5FF\
+}\
+.ace-xcode.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #FFFFFF;\
+border-radius: 2px\
+}\
+.ace-xcode .ace_marker-layer .ace_step {\
+background: rgb(198, 219, 174)\
+}\
+.ace-xcode .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #BFBFBF\
+}\
+.ace-xcode .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.071)\
+}\
+.ace-xcode .ace_gutter-active-line {\
+background-color: rgba(0, 0, 0, 0.071)\
+}\
+.ace-xcode .ace_marker-layer .ace_selected-word {\
+border: 1px solid #B5D5FF\
+}\
+.ace-xcode .ace_constant.ace_language,\
+.ace-xcode .ace_keyword,\
+.ace-xcode .ace_meta,\
+.ace-xcode .ace_variable.ace_language {\
+color: #C800A4\
+}\
+.ace-xcode .ace_invisible {\
+color: #BFBFBF\
+}\
+.ace-xcode .ace_constant.ace_character,\
+.ace-xcode .ace_constant.ace_other {\
+color: #275A5E\
+}\
+.ace-xcode .ace_constant.ace_numeric {\
+color: #3A00DC\
+}\
+.ace-xcode .ace_entity.ace_other.ace_attribute-name,\
+.ace-xcode .ace_support.ace_constant,\
+.ace-xcode .ace_support.ace_function {\
+color: #450084\
+}\
+.ace-xcode .ace_fold {\
+background-color: #C800A4;\
+border-color: #000000\
+}\
+.ace-xcode .ace_entity.ace_name.ace_tag,\
+.ace-xcode .ace_support.ace_class,\
+.ace-xcode .ace_support.ace_type {\
+color: #790EAD\
+}\
+.ace-xcode .ace_storage {\
+color: #C900A4\
+}\
+.ace-xcode .ace_string {\
+color: #DF0002\
+}\
+.ace-xcode .ace_comment {\
+color: #008E00\
+}\
+.ace-xcode .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y;\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/contexts/data/lib/ace/worker-coffee.js b/contexts/data/lib/ace/worker-coffee.js
index d47238c..d96c962 100644
--- a/contexts/data/lib/ace/worker-coffee.js
+++ b/contexts/data/lib/ace/worker-coffee.js
@@ -1,8 +1,16 @@
"no use strict";
+if (typeof window != "undefined" && window.document)
+ throw "atempt to load ace worker into main window instead of webWorker";
+
var console = {
- log: function(msg) {
- postMessage({type: "log", data: msg});
+ log: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ },
+ error: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
}
};
var window = {
@@ -18,11 +26,11 @@ var normalizeModule = function(parentId, moduleName) {
// normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- var moduleName = base + "/" + moduleName;
+ moduleName = base + "/" + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- var moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -30,13 +38,16 @@ var normalizeModule = function(parentId, moduleName) {
};
var require = function(parentId, id) {
- var id = normalizeModule(parentId, id);
-
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = normalizeModule(parentId, id);
+
var module = require.modules[id];
if (module) {
if (!module.initialized) {
- module.exports = module.factory().exports;
module.initialized = true;
+ module.exports = module.factory().exports;
}
return module.exports;
}
@@ -56,6 +67,10 @@ require.tlns = {};
var define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = require.id;
+ }
} else if (arguments.length == 1) {
factory = id;
id = require.id;
@@ -123,7 +138,10 @@ var sender;
onmessage = function(e) {
var msg = e.data;
if (msg.command) {
- main[msg.command].apply(main, msg.args);
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
}
else if (msg.init) {
initBaseUrls(msg.tlns);
@@ -137,40 +155,16 @@ onmessage = function(e) {
}
};
// vim:set ts=4 sts=4 sw=4 st:
-// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Irakli Gozalishvili Copyright (C) 2010 MIT License
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
-"use strict";
+
require("./regexp");
require("./es5-shim");
-});/**
- * Based on code from:
- *
- * XRegExp 1.5.0
- * (c) 2007-2010 Steven Levithan
- * MIT License
- * <http://xregexp.com>
- * Provides an augmented, extensible, cross-browser implementation of regular expressions,
- * including support for additional syntax, flags, and methods
- */
+});
define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
- //---------------------------------
- // Private variables
- //---------------------------------
var real = {
exec: RegExp.prototype.exec,
@@ -186,25 +180,14 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
return !x.lastIndex;
}();
- //---------------------------------
- // Overriden native methods
- //---------------------------------
-
- // Adds named capture support (with backreferences returned as `result.name`), and fixes two
- // cross-browser issues per ES3:
- // - Captured values for nonparticipating capturing groups should be returned as `undefined`,
- // rather than the empty string.
- // - `lastIndex` should not be incremented after zero-length matches.
+ if (compliantLastIndexIncrement && compliantExecNpcg)
+ return;
RegExp.prototype.exec = function (str) {
var match = real.exec.apply(this, arguments),
name, r2;
- if (match) {
- // Fix browsers whose `exec` methods don't consistently return `undefined` for
- // nonparticipating capturing groups
+ if ( typeof(str) == 'string' && match) {
if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
- // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
- // matching due to characters outside the match
real.replace.call(str.slice(match.index), r2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined)
@@ -212,7 +195,6 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
}
});
}
- // Attach named capture properties
if (this._xregexp && this._xregexp.captureNames) {
for (var i = 1; i < match.length; i++) {
name = this._xregexp.captureNames[i - 1];
@@ -220,38 +202,27 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
match[name] = match[i];
}
}
- // Fix browsers that increment `lastIndex` after zero-length matches
if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
}
return match;
};
-
- // Don't override `test` if it won't change anything
if (!compliantLastIndexIncrement) {
- // Fix browser bug in native method
RegExp.prototype.test = function (str) {
- // Use the native `exec` to skip some processing overhead, even though the overriden
- // `exec` would take care of the `lastIndex` fix
var match = real.exec.call(this, str);
- // Fix browsers that increment `lastIndex` after zero-length matches
if (match && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
return !!match;
};
}
- //---------------------------------
- // Private helper functions
- //---------------------------------
-
function getNativeFlags (regex) {
return (regex.global ? "g" : "") +
(regex.ignoreCase ? "i" : "") +
(regex.multiline ? "m" : "") +
(regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
(regex.sticky ? "y" : "");
- };
+ }
function indexOf (array, item, from) {
if (Array.prototype.indexOf) // Use the native array method if available
@@ -261,94 +232,21 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
return i;
}
return -1;
- };
+ }
-});// vim: ts=4 sts=4 sw=4 expandtab
-// -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
-// -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
-// -- kossnocorp Sasha Koss XXX TODO License or CLA
-// -- bryanforbes Bryan Forbes XXX TODO License or CLA
-// -- killdream Quildreen Motta Copyright (C) 2011 MIT Licence
-// -- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD License
-// -- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
-// -- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
-// -- iwyg XXX TODO License or CLA
-// -- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
-// -- xavierm02 Montillet Xavier XXX TODO License or CLA
-// -- Raynos Raynos XXX TODO License or CLA
-// -- samsonjs Sami Samhuri Copyright (C) 2010 MIT License
-// -- rwldrn Rick Waldron Copyright (C) 2011 MIT License
-// -- lexer Alexey Zakharov XXX TODO License or CLA
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
+});
define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-/**
- * Brings an environment as close to ECMAScript 5 compliance
- * as is possible with the facilities of erstwhile engines.
- *
- * Annotated ES5: http://es5.github.com/ (specific links below)
- * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
- *
- * @module
- */
-
-/*whatsupdoc*/
-
-//
-// Function
-// ========
-//
-
-// ES-5 15.3.4.5
-// http://es5.github.com/#x15.3.4.5
-
if (!Function.prototype.bind) {
Function.prototype.bind = function bind(that) { // .length is 1
- // 1. Let Target be the this value.
var target = this;
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
if (typeof target != "function")
throw new TypeError(); // TODO message
- // 3. Let A be a new (possibly empty) internal list of all of the
- // argument values provided after thisArg (arg1, arg2 etc), in order.
- // XXX slicedArgs will stand in for "A" if used
var args = slice.call(arguments, 1); // for normal call
- // 4. Let F be a new native ECMAScript object.
- // 11. Set the [[Prototype]] internal property of F to the standard
- // built-in Function prototype object as specified in 15.3.3.1.
- // 12. Set the [[Call]] internal property of F as described in
- // 15.3.4.5.1.
- // 13. Set the [[Construct]] internal property of F as described in
- // 15.3.4.5.2.
- // 14. Set the [[HasInstance]] internal property of F as described in
- // 15.3.4.5.3.
var bound = function () {
if (this instanceof bound) {
- // 15.3.4.5.2 [[Construct]]
- // When the [[Construct]] internal method of a function object,
- // F that was created using the bind function is called with a
- // list of arguments ExtraArgs, the following steps are taken:
- // 1. Let target be the value of F's [[TargetFunction]]
- // internal property.
- // 2. If target has no [[Construct]] internal method, a
- // TypeError exception is thrown.
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Construct]] internal
- // method of target providing args as the arguments.
var F = function(){};
F.prototype = target.prototype;
@@ -363,25 +261,6 @@ if (!Function.prototype.bind) {
return self;
} else {
- // 15.3.4.5.1 [[Call]]
- // When the [[Call]] internal method of a function object, F,
- // which was created using the bind function is called with a
- // this value and a list of arguments ExtraArgs, the following
- // steps are taken:
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
- // property.
- // 3. Let target be the value of F's [[TargetFunction]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Call]] internal method
- // of target providing boundThis as the this value and
- // providing args as the arguments.
-
- // equiv: target.call(this, ...boundArgs, ...args)
return target.apply(
that,
args.concat(slice.call(arguments))
@@ -390,53 +269,15 @@ if (!Function.prototype.bind) {
}
};
- // XXX bound.length is never writable, so don't even try
- //
- // 15. If the [[Class]] internal property of Target is "Function", then
- // a. Let L be the length property of Target minus the length of A.
- // b. Set the length own property of F to either 0 or L, whichever is
- // larger.
- // 16. Else set the length own property of F to 0.
- // 17. Set the attributes of the length own property of F to the values
- // specified in 15.3.5.1.
-
- // TODO
- // 18. Set the [[Extensible]] internal property of F to true.
-
- // TODO
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
- // 20. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
- // false.
- // 21. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
- // and false.
-
- // TODO
- // NOTE Function objects created using Function.prototype.bind do not
- // have a prototype property or the [[Code]], [[FormalParameters]], and
- // [[Scope]] internal properties.
- // XXX can't delete prototype in pure-js.
-
- // 22. Return F.
return bound;
};
}
-
-// Shortcut to an often accessed properties, in order to avoid multiple
-// dereference that costs universally.
-// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
-// us it in defining shortcuts.
var call = Function.prototype.call;
var prototypeOfArray = Array.prototype;
var prototypeOfObject = Object.prototype;
var slice = prototypeOfArray.slice;
var toString = call.bind(prototypeOfObject.toString);
var owns = call.bind(prototypeOfObject.hasOwnProperty);
-
-// If JS engine supports accessors creating shortcuts.
var defineGetter;
var defineSetter;
var lookupGetter;
@@ -448,70 +289,35 @@ if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
}
-
-//
-// Array
-// =====
-//
-
-// ES5 15.4.3.2
-// http://es5.github.com/#x15.4.3.2
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
if (!Array.isArray) {
Array.isArray = function isArray(obj) {
return toString(obj) == "[object Array]";
};
}
-
-// The IsCallable() check in the Array functions
-// has been replaced with a strict check on the
-// internal class of the object to trap cases where
-// the provided function was actually a regular
-// expression literal, which in V8 and
-// JavaScriptCore is a typeof "function". Only in
-// V8 are regular expression literals permitted as
-// reduce parameters, so it is desirable in the
-// general case for the shim to match the more
-// strict and common behavior of rejecting regular
-// expressions.
-
-// ES5 15.4.4.18
-// http://es5.github.com/#x15.4.4.18
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
if (!Array.prototype.forEach) {
Array.prototype.forEach = function forEach(fun /*, thisp*/) {
var self = toObject(this),
thisp = arguments[1],
i = 0,
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
while (i < length) {
if (i in self) {
- // Invoke the callback function with call, passing arguments:
- // context, property value, property key, thisArg object context
fun.call(thisp, self[i], i, self);
}
i++;
}
};
}
-
-// ES5 15.4.4.19
-// http://es5.github.com/#x15.4.4.19
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
if (!Array.prototype.map) {
Array.prototype.map = function map(fun /*, thisp*/) {
var self = toObject(this),
length = self.length >>> 0,
result = Array(length),
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -523,18 +329,12 @@ if (!Array.prototype.map) {
return result;
};
}
-
-// ES5 15.4.4.20
-// http://es5.github.com/#x15.4.4.20
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
if (!Array.prototype.filter) {
Array.prototype.filter = function filter(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
result = [],
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -546,17 +346,11 @@ if (!Array.prototype.filter) {
return result;
};
}
-
-// ES5 15.4.4.16
-// http://es5.github.com/#x15.4.4.16
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
if (!Array.prototype.every) {
Array.prototype.every = function every(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -568,17 +362,11 @@ if (!Array.prototype.every) {
return true;
};
}
-
-// ES5 15.4.4.17
-// http://es5.github.com/#x15.4.4.17
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
if (!Array.prototype.some) {
Array.prototype.some = function some(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -590,21 +378,13 @@ if (!Array.prototype.some) {
return false;
};
}
-
-// ES5 15.4.4.21
-// http://es5.github.com/#x15.4.4.21
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
if (!Array.prototype.reduce) {
Array.prototype.reduce = function reduce(fun /*, initial*/) {
var self = toObject(this),
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
-
- // no value to return if no initial value and an empty array
if (!length && arguments.length == 1)
throw new TypeError(); // TODO message
@@ -618,8 +398,6 @@ if (!Array.prototype.reduce) {
result = self[i++];
break;
}
-
- // if array contains no values, no initial value to return
if (++i >= length)
throw new TypeError(); // TODO message
} while (true);
@@ -633,21 +411,13 @@ if (!Array.prototype.reduce) {
return result;
};
}
-
-// ES5 15.4.4.22
-// http://es5.github.com/#x15.4.4.22
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
if (!Array.prototype.reduceRight) {
Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
var self = toObject(this),
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
-
- // no value to return if no initial value, empty array
if (!length && arguments.length == 1)
throw new TypeError(); // TODO message
@@ -660,8 +430,6 @@ if (!Array.prototype.reduceRight) {
result = self[i--];
break;
}
-
- // if array contains no values, no initial value to return
if (--i < 0)
throw new TypeError(); // TODO message
} while (true);
@@ -675,10 +443,6 @@ if (!Array.prototype.reduceRight) {
return result;
};
}
-
-// ES5 15.4.4.14
-// http://es5.github.com/#x15.4.4.14
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
var self = toObject(this),
@@ -690,8 +454,6 @@ if (!Array.prototype.indexOf) {
var i = 0;
if (arguments.length > 1)
i = toInteger(arguments[1]);
-
- // handle negative indices
i = i >= 0 ? i : Math.max(0, length + i);
for (; i < length; i++) {
if (i in self && self[i] === sought) {
@@ -701,10 +463,6 @@ if (!Array.prototype.indexOf) {
return -1;
};
}
-
-// ES5 15.4.4.15
-// http://es5.github.com/#x15.4.4.15
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
if (!Array.prototype.lastIndexOf) {
Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
var self = toObject(this),
@@ -715,7 +473,6 @@ if (!Array.prototype.lastIndexOf) {
var i = length - 1;
if (arguments.length > 1)
i = Math.min(i, toInteger(arguments[1]));
- // handle negative indices
i = i >= 0 ? i : length - Math.abs(i);
for (; i >= 0; i--) {
if (i in self && sought === self[i])
@@ -724,18 +481,7 @@ if (!Array.prototype.lastIndexOf) {
return -1;
};
}
-
-//
-// Object
-// ======
-//
-
-// ES5 15.2.3.2
-// http://es5.github.com/#x15.2.3.2
if (!Object.getPrototypeOf) {
- // https://github.com/kriskowal/es5-shim/issues#issue/2
- // http://ejohn.org/blog/objectgetprototypeof/
- // recommended by fschaefer on github
Object.getPrototypeOf = function getPrototypeOf(object) {
return object.__proto__ || (
object.constructor ?
@@ -744,84 +490,73 @@ if (!Object.getPrototypeOf) {
);
};
}
-
-// ES5 15.2.3.3
-// http://es5.github.com/#x15.2.3.3
if (!Object.getOwnPropertyDescriptor) {
var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
"non-object: ";
Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
if ((typeof object != "object" && typeof object != "function") || object === null)
throw new TypeError(ERR_NON_OBJECT + object);
- // If object does not owns property return undefined immediately.
if (!owns(object, property))
return;
var descriptor, getter, setter;
-
- // If object has a property then it's for sure both `enumerable` and
- // `configurable`.
descriptor = { enumerable: true, configurable: true };
-
- // If JS engine supports accessor properties then property may be a
- // getter or setter.
if (supportsAccessors) {
- // Unfortunately `__lookupGetter__` will return a getter even
- // if object has own non getter property along with a same named
- // inherited getter. To avoid misbehavior we temporary remove
- // `__proto__` so that `__lookupGetter__` will return getter only
- // if it's owned by an object.
var prototype = object.__proto__;
object.__proto__ = prototypeOfObject;
var getter = lookupGetter(object, property);
var setter = lookupSetter(object, property);
-
- // Once we have getter and setter we can put values back.
object.__proto__ = prototype;
if (getter || setter) {
if (getter) descriptor.get = getter;
if (setter) descriptor.set = setter;
-
- // If it was accessor property we're done and return here
- // in order to avoid adding `value` to the descriptor.
return descriptor;
}
}
-
- // If we got this far we know that object has an own property that is
- // not an accessor so we set it as a value and return descriptor.
descriptor.value = object[property];
return descriptor;
};
}
-
-// ES5 15.2.3.4
-// http://es5.github.com/#x15.2.3.4
if (!Object.getOwnPropertyNames) {
Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
return Object.keys(object);
};
}
-
-// ES5 15.2.3.5
-// http://es5.github.com/#x15.2.3.5
if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
Object.create = function create(prototype, properties) {
var object;
if (prototype === null) {
- object = { "__proto__": null };
+ object = createEmpty();
} else {
if (typeof prototype != "object")
throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
var Type = function () {};
Type.prototype = prototype;
object = new Type();
- // IE has no built-in implementation of `Object.getPrototypeOf`
- // neither `__proto__`, but this manually setting `__proto__` will
- // guarantee that `Object.getPrototypeOf` will work as expected with
- // objects created using `Object.create`
object.__proto__ = prototype;
}
if (properties !== void 0)
@@ -830,29 +565,13 @@ if (!Object.create) {
};
}
-// ES5 15.2.3.6
-// http://es5.github.com/#x15.2.3.6
-
-// Patch for WebKit and IE8 standard mode
-// Designed by hax <hax.github.com>
-// related issue: https://github.com/kriskowal/es5-shim/issues#issue/5
-// IE8 Reference:
-// http://msdn.microsoft.com/en-us/library/dd282900.aspx
-// http://msdn.microsoft.com/en-us/library/dd229916.aspx
-// WebKit Bugs:
-// https://bugs.webkit.org/show_bug.cgi?id=36423
-
function doesDefinePropertyWork(object) {
try {
Object.defineProperty(object, "sentinel", {});
return "sentinel" in object;
} catch (exception) {
- // returns falsy
}
}
-
-// check whether defineProperty works if it's given. Otherwise,
-// shim partially.
if (Object.defineProperty) {
var definePropertyWorksOnObject = doesDefinePropertyWork({});
var definePropertyWorksOnDom = typeof document == "undefined" ||
@@ -873,48 +592,21 @@ if (!Object.defineProperty || definePropertyFallback) {
throw new TypeError(ERR_NON_OBJECT_TARGET + object);
if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
-
- // make a valiant attempt to use the real defineProperty
- // for I8's DOM elements.
if (definePropertyFallback) {
try {
return definePropertyFallback.call(Object, object, property, descriptor);
} catch (exception) {
- // try the shim if the real one doesn't work
}
}
-
- // If it's a data property.
if (owns(descriptor, "value")) {
- // fail silently if "writable", "enumerable", or "configurable"
- // are requested but not supported
- /*
- // alternate approach:
- if ( // can't implement these features; allow false but not true
- !(owns(descriptor, "writable") ? descriptor.writable : true) ||
- !(owns(descriptor, "enumerable") ? descriptor.enumerable : true) ||
- !(owns(descriptor, "configurable") ? descriptor.configurable : true)
- )
- throw new RangeError(
- "This implementation of Object.defineProperty does not " +
- "support configurable, enumerable, or writable."
- );
- */
if (supportsAccessors && (lookupGetter(object, property) ||
lookupSetter(object, property)))
{
- // As accessors are supported only on engines implementing
- // `__proto__` we can safely override `__proto__` while defining
- // a property to make sure that we don't hit an inherited
- // accessor.
var prototype = object.__proto__;
object.__proto__ = prototypeOfObject;
- // Deleting a property anyway since getter / setter may be
- // defined on object itself.
delete object[property];
object[property] = descriptor.value;
- // Setting original `__proto__` back now.
object.__proto__ = prototype;
} else {
object[property] = descriptor.value;
@@ -922,7 +614,6 @@ if (!Object.defineProperty || definePropertyFallback) {
} else {
if (!supportsAccessors)
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- // If we got that far then getters and setters can be defined !!
if (owns(descriptor, "get"))
defineGetter(object, property, descriptor.get);
if (owns(descriptor, "set"))
@@ -932,9 +623,6 @@ if (!Object.defineProperty || definePropertyFallback) {
return object;
};
}
-
-// ES5 15.2.3.7
-// http://es5.github.com/#x15.2.3.7
if (!Object.defineProperties) {
Object.defineProperties = function defineProperties(object, properties) {
for (var property in properties) {
@@ -944,30 +632,16 @@ if (!Object.defineProperties) {
return object;
};
}
-
-// ES5 15.2.3.8
-// http://es5.github.com/#x15.2.3.8
if (!Object.seal) {
Object.seal = function seal(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// ES5 15.2.3.9
-// http://es5.github.com/#x15.2.3.9
if (!Object.freeze) {
Object.freeze = function freeze(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// detect a Rhino bug and patch it
try {
Object.freeze(function () {});
} catch (exception) {
@@ -981,43 +655,26 @@ try {
};
})(Object.freeze);
}
-
-// ES5 15.2.3.10
-// http://es5.github.com/#x15.2.3.10
if (!Object.preventExtensions) {
Object.preventExtensions = function preventExtensions(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// ES5 15.2.3.11
-// http://es5.github.com/#x15.2.3.11
if (!Object.isSealed) {
Object.isSealed = function isSealed(object) {
return false;
};
}
-
-// ES5 15.2.3.12
-// http://es5.github.com/#x15.2.3.12
if (!Object.isFrozen) {
Object.isFrozen = function isFrozen(object) {
return false;
};
}
-
-// ES5 15.2.3.13
-// http://es5.github.com/#x15.2.3.13
if (!Object.isExtensible) {
Object.isExtensible = function isExtensible(object) {
- // 1. If Type(O) is not Object throw a TypeError exception.
if (Object(object) === object) {
throw new TypeError(); // TODO message
}
- // 2. Return the Boolean value of the [[Extensible]] internal property of O.
var name = '';
while (owns(object, name)) {
name += '?';
@@ -1028,11 +685,7 @@ if (!Object.isExtensible) {
return returnValue;
};
}
-
-// ES5 15.2.3.14
-// http://es5.github.com/#x15.2.3.14
if (!Object.keys) {
- // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
var hasDontEnumBug = true,
dontEnums = [
"toString",
@@ -1073,26 +726,11 @@ if (!Object.keys) {
};
}
-
-//
-// Date
-// ====
-//
-
-// ES5 15.9.5.43
-// http://es5.github.com/#x15.9.5.43
-// This function returns a String value represent the instance in time
-// represented by this Date object. The format of the String is the Date Time
-// string format defined in 15.9.1.15. All fields are present in the String.
-// The time zone is always UTC, denoted by the suffix Z. If the time value of
-// this object is not a finite Number a RangeError exception is thrown.
if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
Date.prototype.toISOString = function toISOString() {
var result, length, value, year;
if (!isFinite(this))
throw new RangeError;
-
- // the date time string format is specified in 15.9.1.15.
result = [this.getUTCMonth() + 1, this.getUTCDate(),
this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
year = this.getUTCFullYear();
@@ -1101,76 +739,32 @@ if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().inde
length = result.length;
while (length--) {
value = result[length];
- // pad months, days, hours, minutes, and seconds to have two digits.
if (value < 10)
result[length] = "0" + value;
}
- // pad milliseconds to have three digits.
return year + "-" + result.slice(0, 2).join("-") + "T" + result.slice(2).join(":") + "." +
("000" + this.getUTCMilliseconds()).slice(-3) + "Z";
}
}
-
-// ES5 15.9.4.4
-// http://es5.github.com/#x15.9.4.4
if (!Date.now) {
Date.now = function now() {
return new Date().getTime();
};
}
-
-// ES5 15.9.5.44
-// http://es5.github.com/#x15.9.5.44
-// This function provides a String representation of a Date object for use by
-// JSON.stringify (15.12.3).
if (!Date.prototype.toJSON) {
Date.prototype.toJSON = function toJSON(key) {
- // When the toJSON method is called with argument key, the following
- // steps are taken:
-
- // 1. Let O be the result of calling ToObject, giving it the this
- // value as its argument.
- // 2. Let tv be ToPrimitive(O, hint Number).
- // 3. If tv is a Number and is not finite, return null.
- // XXX
- // 4. Let toISO be the result of calling the [[Get]] internal method of
- // O with argument "toISOString".
- // 5. If IsCallable(toISO) is false, throw a TypeError exception.
if (typeof this.toISOString != "function")
throw new TypeError(); // TODO message
- // 6. Return the result of calling the [[Call]] internal method of
- // toISO with O as the this value and an empty argument list.
return this.toISOString();
-
- // NOTE 1 The argument is ignored.
-
- // NOTE 2 The toJSON function is intentionally generic; it does not
- // require that its this value be a Date object. Therefore, it can be
- // transferred to other kinds of objects for use as a method. However,
- // it does require that any such object have a toISOString method. An
- // object is free to use the argument key to filter its
- // stringification.
};
}
-
-// ES5 15.9.4.2
-// http://es5.github.com/#x15.9.4.2
-// based on work shared by Daniel Friesen (dantman)
-// http://gist.github.com/303249
if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
- // XXX global assignment won't work in embeddings that use
- // an alternate object for the context.
Date = (function(NativeDate) {
-
- // Date.length === 7
var Date = function Date(Y, M, D, h, m, s, ms) {
var length = arguments.length;
if (this instanceof NativeDate) {
var date = length == 1 && String(Y) === Y ? // isString(Y)
- // We explicitly pass it through parse:
new NativeDate(Date.parse(Y)) :
- // We have to manually make calls depending on argument
- // length here
length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
length >= 5 ? new NativeDate(Y, M, D, h, m) :
@@ -1179,14 +773,11 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
length >= 2 ? new NativeDate(Y, M) :
length >= 1 ? new NativeDate(Y) :
new NativeDate();
- // Prevent mixups with unfixed Date object
date.constructor = Date;
return date;
}
return NativeDate.apply(this, arguments);
};
-
- // 15.9.1.15 Date Time String Format.
var isoDateExpression = new RegExp("^" +
"(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + 6-digit extended year
"(?:-(\\d{2})" + // optional month capture
@@ -1207,59 +798,33 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
")" +
")?)?)?)?" +
"$");
-
- // Copy any custom methods a 3rd party library may have added
for (var key in NativeDate)
Date[key] = NativeDate[key];
-
- // Copy "native" methods explicitly; they may be non-enumerable
Date.now = NativeDate.now;
Date.UTC = NativeDate.UTC;
Date.prototype = NativeDate.prototype;
Date.prototype.constructor = Date;
-
- // Upgrade Date.parse to handle simplified ISO 8601 strings
Date.parse = function parse(string) {
var match = isoDateExpression.exec(string);
if (match) {
match.shift(); // kill match[0], the full match
- // parse months, days, hours, minutes, seconds, and milliseconds
for (var i = 1; i < 7; i++) {
- // provide default values if necessary
match[i] = +(match[i] || (i < 3 ? 1 : 0));
- // match[1] is the month. Months are 0-11 in JavaScript
- // `Date` objects, but 1-12 in ISO notation, so we
- // decrement.
if (i == 1)
match[i]--;
}
-
- // parse the UTC offset component
var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
-
- // compute the explicit time zone offset if specified
var offset = 0;
if (sign) {
- // detect invalid offsets and return early
if (hourOffset > 23 || minuteOffset > 59)
return NaN;
-
- // express the provided time zone offset in minutes. The offset is
- // negative for time zones west of UTC; positive otherwise.
offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == "+" ? -1 : 1);
}
-
- // Date.UTC for years between 0 and 99 converts year to 1900 + year
- // The Gregorian calendar has a 400-year cycle, so
- // to Date.UTC(year + 400, .... ) - 12622780800000 == Date.UTC(year, ...),
- // where 12622780800000 - number of milliseconds in Gregorian calendar 400 years
var year = +match[0];
if (0 <= year && year <= 99) {
match[0] = year + 400;
return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
}
-
- // compute a new UTC date value, accounting for the optional offset
return NativeDate.UTC.apply(this, match) + offset;
}
return NativeDate.parse.apply(this, arguments);
@@ -1268,20 +833,10 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
return Date;
})(Date);
}
-
-//
-// String
-// ======
-//
-
-// ES5 15.5.4.20
-// http://es5.github.com/#x15.5.4.20
var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
"\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
"\u2029\uFEFF";
if (!String.prototype.trim || ws.trim()) {
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript
- // http://perfectionkills.com/whitespace-deviations/
ws = "[" + ws + "]";
var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
trimEndRegexp = new RegExp(ws + ws + "*$");
@@ -1289,15 +844,6 @@ if (!String.prototype.trim || ws.trim()) {
return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
};
}
-
-//
-// Util
-// ======
-//
-
-// ES5 9.4
-// http://es5.github.com/#x9.4
-// http://jsperf.com/to-integer
var toInteger = function (n) {
n = +n;
if (n !== n) // isNaN
@@ -1308,61 +854,19 @@ var toInteger = function (n) {
};
var prepareString = "a"[0] != "a",
- // ES5 9.9
- // http://es5.github.com/#x9.9
toObject = function (o) {
if (o == null) { // this matches both null and undefined
throw new TypeError(); // TODO message
}
- // If the implementation doesn't support by-index access of
- // string characters (ex. IE < 7), split the string
if (prepareString && typeof o == "string" && o) {
return o.split("");
}
return Object(o);
};
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Mike de Boer <mike AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
+
var EventEmitter = {};
@@ -1376,8 +880,11 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!listeners.length && !defaultHandler)
return;
- e = e || {};
- e.type = eventName;
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
if (!e.stopPropagation) {
e.stopPropagation = function() {
@@ -1398,7 +905,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
}
if (defaultHandler && !e.defaultPrevented)
- defaultHandler(e);
+ return defaultHandler(e);
};
EventEmitter.setDefaultHandler = function(eventName, callback) {
@@ -1416,7 +923,7 @@ EventEmitter.addEventListener = function(eventName, callback) {
var listeners = this._eventRegistry[eventName];
if (!listeners)
- var listeners = this._eventRegistry[eventName] = [];
+ listeners = this._eventRegistry[eventName] = [];
if (listeners.indexOf(callback) == -1)
listeners.push(callback);
@@ -1441,45 +948,10 @@ EventEmitter.removeAllListeners = function(eventName) {
exports.EventEmitter = EventEmitter;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
+
exports.inherits = (function() {
var tempCtor = function() {};
@@ -1502,46 +974,10 @@ exports.implement = function(proto, mixin) {
};
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
+
define('ace/mode/coffee_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/coffee/coffee-script'], function(require, exports, module) {
-"use strict";
-
+
+
var oop = require("../lib/oop");
var Mirror = require("../worker/mirror").Mirror;
var coffee = require("../mode/coffee/coffee-script");
@@ -1557,29 +993,29 @@ var Worker = exports.Worker = function(sender) {
oop.inherits(Worker, Mirror);
(function() {
-
+
this.onUpdate = function() {
var value = this.doc.getValue();
-
+
try {
coffee.parse(value);
} catch(e) {
var m = e.message.match(/Parse error on line (\d+): (.*)/);
if (m) {
this.sender.emit("error", {
- row: parseInt(m[1]) - 1,
+ row: parseInt(m[1], 10) - 1,
column: null,
text: m[2],
type: "error"
});
return;
}
-
+
if (e instanceof SyntaxError) {
var m = e.message.match(/ on line (\d+)/);
- if (m) {
+ if (m) {
this.sender.emit("error", {
- row: parseInt(m[1]) - 1,
+ row: parseInt(m[1], 10) - 1,
column: null,
text: e.message.replace(m[0], ""),
type: "error"
@@ -1590,11 +1026,12 @@ oop.inherits(Worker, Mirror);
}
this.sender.emit("ok");
};
-
+
}).call(Worker.prototype);
-});define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
+});
+define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+
var Document = require("../document").Document;
var lang = require("../lib/lang");
@@ -1630,50 +1067,14 @@ var Mirror = exports.Mirror = function(sender) {
};
this.onUpdate = function() {
- // abstract method
};
}).call(Mirror.prototype);
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
-"use strict";
+
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1682,14 +1083,10 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
-
- if (Array.isArray(text)) {
- this.insertLines(0, text);
- }
- // There has to be one line at least in the document. If you pass an empty
- // string to the insert function, nothing will happen. Workaround.
- else if (text.length == 0) {
+ if (text.length == 0) {
this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this.insertLines(0, text);
} else {
this.insert({row: 0, column:0}, text);
}
@@ -1698,22 +1095,17 @@ var Document = function(text) {
(function() {
oop.implement(this, EventEmitter);
-
this.setValue = function(text) {
var len = this.getLength();
this.remove(new Range(0, 0, len, this.getLine(len-1).length));
this.insert({row: 0, column:0}, text);
};
-
this.getValue = function() {
return this.getAllLines().join(this.getNewLineCharacter());
};
-
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
-
- // check for IE split bug
if ("aaa".split(/a/).length == 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
@@ -1724,6 +1116,7 @@ var Document = function(text) {
};
+
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
if (match) {
@@ -1732,18 +1125,17 @@ var Document = function(text) {
this.$autoNewLine = "\n";
}
};
-
this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
+ switch (this.$newLineMode) {
case "windows":
- return "\r\n";
+ return "\r\n";
case "unix":
- return "\n";
+ return "\n";
- case "auto":
- return this.$autoNewLine;
- }
+ default:
+ return this.$autoNewLine;
+ }
};
this.$autoNewLine = "\n";
@@ -1754,48 +1146,33 @@ var Document = function(text) {
this.$newLineMode = newLineMode;
};
-
this.getNewLineMode = function() {
return this.$newLineMode;
};
-
this.isNewLine = function(text) {
return (text == "\r\n" || text == "\r" || text == "\n");
};
-
- /**
- * Get a verbatim copy of the given line as it is in the document
- */
this.getLine = function(row) {
return this.$lines[row] || "";
};
-
this.getLines = function(firstRow, lastRow) {
return this.$lines.slice(firstRow, lastRow + 1);
};
-
- /**
- * Returns all lines in the document as string array. Warning: The caller
- * should not modify this array!
- */
this.getAllLines = function() {
return this.getLines(0, this.getLength());
};
-
this.getLength = function() {
return this.$lines.length;
};
-
this.getTextRange = function(range) {
if (range.start.row == range.end.row) {
return this.$lines[range.start.row].substring(range.start.column,
range.end.column);
}
else {
- var lines = [];
- lines.push(this.$lines[range.start.row].substring(range.start.column));
- lines.push.apply(lines, this.getLines(range.start.row+1, range.end.row-1));
- lines.push(this.$lines[range.end.row].substring(0, range.end.column));
+ var lines = this.getLines(range.start.row+1, range.end.row-1);
+ lines.unshift((this.$lines[range.start.row] || "").substring(range.start.column));
+ lines.push((this.$lines[range.end.row] || "").substring(0, range.end.column));
return lines.join(this.getNewLineCharacter());
}
};
@@ -1808,13 +1185,11 @@ var Document = function(text) {
}
return position;
};
-
this.insert = function(position, text) {
- if (text.length == 0)
+ if (!text || text.length === 0)
return position;
position = this.$clipPosition(position);
-
if (this.getLength() <= 1)
this.$detectNewLine(text);
@@ -1830,10 +1205,13 @@ var Document = function(text) {
}
return position;
};
-
this.insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
+ if (lines.length > 0xFFFF) {
+ var end = this.insertLines(row, lines.slice(0xFFFF));
+ lines = lines.slice(0, 0xFFFF);
+ }
var args = [row, 0];
args.push.apply(args, lines);
@@ -1846,9 +1224,8 @@ var Document = function(text) {
lines: lines
};
this._emit("change", { data: delta });
- return range.end;
+ return end || range.end;
};
-
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
var line = this.$lines[position.row] || "";
@@ -1870,7 +1247,6 @@ var Document = function(text) {
return end;
};
-
this.insertInLine = function(position, text) {
if (text.length == 0)
return position;
@@ -1894,9 +1270,7 @@ var Document = function(text) {
return end;
};
-
this.remove = function(range) {
- // clip to document
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1926,7 +1300,6 @@ var Document = function(text) {
}
return range.start;
};
-
this.removeInLine = function(row, startColumn, endColumn) {
if (startColumn == endColumn)
return;
@@ -1945,14 +1318,6 @@ var Document = function(text) {
this._emit("change", { data: delta });
return range.start;
};
-
- /**
- * Removes a range of full lines
- *
- * @param firstRow {Integer} The first row to be removed
- * @param lastRow {Integer} The last row to be removed
- * @return {String[]} The removed lines
- */
this.removeLines = function(firstRow, lastRow) {
var range = new Range(firstRow, 0, lastRow + 1, 0);
var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
@@ -1966,7 +1331,6 @@ var Document = function(text) {
this._emit("change", { data: delta });
return removed;
};
-
this.removeNewLine = function(row) {
var firstLine = this.getLine(row);
var secondLine = this.getLine(row+1);
@@ -1983,13 +1347,9 @@ var Document = function(text) {
};
this._emit("change", { data: delta });
};
-
this.replace = function(range, text) {
if (text.length == 0 && range.isEmpty())
return range.start;
-
- // Shortcut: If the text we want to insert is the same as it is already
- // in the document, we don't have to replace anything.
if (text == this.getTextRange(range))
return range.end;
@@ -2003,7 +1363,6 @@ var Document = function(text) {
return end;
};
-
this.applyDeltas = function(deltas) {
for (var i=0; i<deltas.length; i++) {
var delta = deltas[i];
@@ -2019,7 +1378,6 @@ var Document = function(text) {
this.remove(range);
}
};
-
this.revertDeltas = function(deltas) {
for (var i=deltas.length-1; i>=0; i--) {
var delta = deltas[i];
@@ -2036,51 +1394,33 @@ var Document = function(text) {
this.insert(range.start, delta.text);
}
};
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length;
+
+ return index + newlineLength * i + pos.column;
+ };
}).call(Document.prototype);
exports.Document = Document;
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
var Range = function(startRow, startColumn, endRow, endColumn) {
this.start = {
row: startRow,
@@ -2093,36 +1433,21 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
};
};
-(function() {
- this.isEequal = function(range) {
+(function() {
+ this.isEqual = function(range) {
return this.start.row == range.start.row &&
this.end.row == range.end.row &&
this.start.column == range.start.column &&
this.end.column == range.end.column
- };
-
+ };
this.toString = function() {
return ("Range: [" + this.start.row + "/" + this.start.column +
"] -> [" + this.end.row + "/" + this.end.column + "]");
- };
+ };
this.contains = function(row, column) {
return this.compare(row, column) == 0;
- };
-
- /**
- * Compares this range (A) with another range (B), where B is the passed in
- * range.
- *
- * Return values:
- * -2: (B) is infront of (A) and doesn't intersect with (A)
- * -1: (B) begins before (A) but ends inside of (A)
- * 0: (B) is completly inside of (A) OR (A) is complety inside of (B)
- * +1: (B) begins inside of (A) but ends outside of (A)
- * +2: (B) is after (A) and doesn't intersect with (A)
- *
- * 42: FTW state: (B) ends in (A) but starts outside of (A)
- */
+ };
this.compareRange = function(range) {
var cmp,
end = range.end,
@@ -2150,24 +1475,23 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return 0;
}
}
- }
-
+ };
this.comparePoint = function(p) {
return this.compare(p.row, p.column);
- }
-
+ };
this.containsRange = function(range) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- }
-
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
this.isEnd = function(row, column) {
return this.end.row == row && this.end.column == column;
- }
-
+ };
this.isStart = function(row, column) {
return this.start.row == row && this.start.column == column;
- }
-
+ };
this.setStart = function(row, column) {
if (typeof row == "object") {
this.start.column = row.column;
@@ -2176,8 +1500,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.start.row = row;
this.start.column = column;
}
- }
-
+ };
this.setEnd = function(row, column) {
if (typeof row == "object") {
this.end.column = row.column;
@@ -2186,8 +1509,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.end.row = row;
this.end.column = column;
}
- }
-
+ };
this.inside = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isEnd(row, column) || this.isStart(row, column)) {
@@ -2197,8 +1519,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.insideStart = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isEnd(row, column)) {
@@ -2208,8 +1529,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.insideEnd = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isStart(row, column)) {
@@ -2219,8 +1539,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.compare = function(row, column) {
if (!this.isMultiLine()) {
if (row === this.start.row) {
@@ -2242,29 +1561,20 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return 0;
};
-
- /**
- * Like .compare(), but if isStart is true, return -1;
- */
this.compareStart = function(row, column) {
if (this.start.row == row && this.start.column == column) {
return -1;
} else {
return this.compare(row, column);
}
- }
-
- /**
- * Like .compare(), but if isEnd is true, return 1;
- */
+ };
this.compareEnd = function(row, column) {
if (this.end.row == row && this.end.column == column) {
return 1;
} else {
return this.compare(row, column);
}
- }
-
+ };
this.compareInside = function(row, column) {
if (this.end.row == row && this.end.column == column) {
return 1;
@@ -2273,8 +1583,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
} else {
return this.compare(row, column);
}
- }
-
+ };
this.clipRows = function(firstRow, lastRow) {
if (this.end.row > lastRow) {
var end = {
@@ -2305,7 +1614,6 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
return Range.fromPoints(start || this.start, end || this.end);
};
-
this.extend = function(row, column) {
var cmp = this.compare(row, column);
@@ -2322,22 +1630,18 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.isEmpty = function() {
return (this.start.row == this.end.row && this.start.column == this.end.column);
};
-
this.isMultiLine = function() {
return (this.start.row !== this.end.row);
};
-
this.clone = function() {
return Range.fromPoints(this.start, this.end);
};
-
this.collapseRows = function() {
if (this.end.column == 0)
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
else
return new Range(this.start.row, 0, this.end.row, 0)
};
-
this.toScreenRange = function(session) {
var screenPosStart =
session.documentToScreenPosition(this.start);
@@ -2351,61 +1655,19 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
};
}).call(Range.prototype);
-
-
Range.fromPoints = function(start, end) {
return new Range(start.row, start.column, end.row, end.column);
};
exports.Range = Range;
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
+
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
-/**
- * An Anchor is a floating pointer in the document. Whenever text is inserted or
- * deleted before the cursor, the position of the cursor is updated
- */
var Anchor = exports.Anchor = function(doc, row, column) {
this.document = doc;
@@ -2421,15 +1683,15 @@ var Anchor = exports.Anchor = function(doc, row, column) {
(function() {
oop.implement(this, EventEmitter);
-
+
this.getPosition = function() {
return this.$clipPositionToDocument(this.row, this.column);
};
-
+
this.getDocument = function() {
return this.document;
};
-
+
this.onChange = function(e) {
var delta = e.data;
var range = delta.range;
@@ -2522,11 +1784,10 @@ var Anchor = exports.Anchor = function(doc, row, column) {
value: pos
});
};
-
+
this.detach = function() {
this.document.removeEventListener("change", this.$onChange);
};
-
this.$clipPositionToDocument = function(row, column) {
var pos = {};
@@ -2552,45 +1813,9 @@ var Anchor = exports.Anchor = function(doc, row, column) {
}).call(Anchor.prototype);
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
+
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
@@ -2655,9 +1880,13 @@ exports.arrayToMap = function(arr) {
};
-/**
- * splice out of 'array' anything that === 'value'
- */
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
exports.arrayRemove = function(array, value) {
for (var i = 0; i <= array.length; i++) {
if (value === array[i]) {
@@ -2670,6 +1899,22 @@ exports.escapeRegExp = function(str) {
return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
};
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
exports.deferredCall = function(fcn) {
var timer = null;
@@ -2701,43 +1946,42 @@ exports.deferredCall = function(fcn) {
return deferred;
};
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = _self;
+ _self.schedule = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || 0);
+ };
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/mode/coffee/coffee-script', ['require', 'exports', 'module' , 'ace/mode/coffee/lexer', 'ace/mode/coffee/parser', 'ace/mode/coffee/nodes'], function(require, exports, module) {
@@ -2764,46 +2008,23 @@ define('ace/mode/coffee/coffee-script', ['require', 'exports', 'module' , 'ace/m
exports.parse = function(code) {
return parser.parse(lexer.tokenize(code));
};
-});/**
- * Copyright (c) 2011 Jeremy Ashkenas
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
+});
define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coffee/rewriter', 'ace/mode/coffee/helpers'], function(require, exports, module) {
-
- var ASSIGNED, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NO_NEWLINE, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, key, last, starts, _ref;
- var __indexOf = Array.prototype.indexOf || function(item) {
- for (var i = 0, l = this.length; i < l; i++) {
- if (this[i] === item) return i;
- }
- return -1;
- };
- Rewriter = require('./rewriter').Rewriter;
- _ref = require('./helpers'), count = _ref.count, starts = _ref.starts, compact = _ref.compact, last = _ref.last;
+
+ var BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, key, last, starts, _ref, _ref1,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+ _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES;
+
+ _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last;
+
exports.Lexer = Lexer = (function() {
+
function Lexer() {}
+
Lexer.prototype.tokenize = function(code, opts) {
- var i;
+ var i, tag;
if (opts == null) {
opts = {};
}
@@ -2817,17 +2038,22 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
this.indebt = 0;
this.outdebt = 0;
this.indents = [];
+ this.ends = [];
this.tokens = [];
i = 0;
while (this.chunk = code.slice(i)) {
i += this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken();
}
this.closeIndentation();
+ if (tag = this.ends.pop()) {
+ this.error("missing " + tag);
+ }
if (opts.rewrite === false) {
return this.tokens;
}
return (new Rewriter).rewrite(this.tokens);
};
+
Lexer.prototype.identifierToken = function() {
var colon, forcedIdentifier, id, input, match, prev, tag, _ref2, _ref3;
if (!(match = IDENTIFIER.exec(this.chunk))) {
@@ -2840,7 +2066,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
}
forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::') || !prev.spaced && prev[0] === '@');
tag = 'IDENTIFIER';
- if (__indexOf.call(JS_KEYWORDS, id) >= 0 || !forcedIdentifier && __indexOf.call(COFFEE_KEYWORDS, id) >= 0) {
+ if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) {
tag = id.toUpperCase();
if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) {
tag = 'LEADING_WHEN';
@@ -2869,7 +2095,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
id = new String(id);
id.reserved = true;
} else if (__indexOf.call(RESERVED, id) >= 0) {
- this.identifierError(id);
+ this.error("reserved word \"" + id + "\"");
}
}
if (!forcedIdentifier) {
@@ -2888,12 +2114,9 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
return 'LOGIC';
case 'true':
case 'false':
- case 'null':
- case 'undefined':
return 'BOOL';
case 'break':
case 'continue':
- case 'debugger':
return 'STATEMENT';
default:
return tag;
@@ -2906,17 +2129,35 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
}
return input.length;
};
+
Lexer.prototype.numberToken = function() {
- var match, number;
+ var binaryLiteral, lexedLength, match, number, octalLiteral;
if (!(match = NUMBER.exec(this.chunk))) {
return 0;
}
number = match[0];
+ if (/^0[BOX]/.test(number)) {
+ this.error("radix prefix '" + number + "' must be lowercase");
+ } else if (/E/.test(number) && !/^0x/.test(number)) {
+ this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'");
+ } else if (/^0\d*[89]/.test(number)) {
+ this.error("decimal literal '" + number + "' must not be prefixed with '0'");
+ } else if (/^0\d+/.test(number)) {
+ this.error("octal literal '" + number + "' must be prefixed with '0o'");
+ }
+ lexedLength = number.length;
+ if (octalLiteral = /^0o([0-7]+)/.exec(number)) {
+ number = '0x' + (parseInt(octalLiteral[1], 8)).toString(16);
+ }
+ if (binaryLiteral = /^0b([01]+)/.exec(number)) {
+ number = '0x' + (parseInt(binaryLiteral[1], 2)).toString(16);
+ }
this.token('NUMBER', number);
- return number.length;
+ return lexedLength;
};
+
Lexer.prototype.stringToken = function() {
- var match, string;
+ var match, octalEsc, string;
switch (this.chunk.charAt(0)) {
case "'":
if (!(match = SIMPLESTR.exec(this.chunk))) {
@@ -2937,9 +2178,13 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
default:
return 0;
}
+ if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) {
+ this.error("octal escape sequences " + string + " are not allowed");
+ }
this.line += count(string, '\n');
return string.length;
};
+
Lexer.prototype.heredocToken = function() {
var doc, heredoc, match, quote;
if (!(match = HEREDOC.exec(this.chunk))) {
@@ -2961,6 +2206,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
this.line += count(heredoc, '\n');
return heredoc.length;
};
+
Lexer.prototype.commentToken = function() {
var comment, here, match;
if (!(match = this.chunk.match(COMMENT))) {
@@ -2972,27 +2218,30 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
herecomment: true,
indent: Array(this.indent + 1).join(' ')
}));
- this.token('TERMINATOR', '\n');
}
this.line += count(comment, '\n');
return comment.length;
};
+
Lexer.prototype.jsToken = function() {
var match, script;
if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) {
return 0;
}
this.token('JS', (script = match[0]).slice(1, -1));
+ this.line += count(script, '\n');
return script.length;
};
+
Lexer.prototype.regexToken = function() {
- var match, prev, regex, _ref2;
+ var flags, length, match, prev, regex, _ref2, _ref3;
if (this.chunk.charAt(0) !== '/') {
return 0;
}
if (match = HEREGEX.exec(this.chunk)) {
- this.line += count(match[0], '\n');
- return this.heregexToken(match);
+ length = this.heregexToken(match);
+ this.line += count(match[0], '\n');
+ return length;
}
prev = last(this.tokens);
if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {
@@ -3001,15 +2250,25 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
if (!(match = REGEX.exec(this.chunk))) {
return 0;
}
- regex = match[0];
- this.token('REGEX', regex === '//' ? '/(?:)/' : regex);
- return regex.length;
+ _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2];
+ if (regex.slice(0, 2) === '/*') {
+ this.error('regular expressions cannot begin with `*`');
+ }
+ if (regex === '//') {
+ regex = '/(?:)/';
+ }
+ this.token('REGEX', "" + regex + flags);
+ return match.length;
};
+
Lexer.prototype.heregexToken = function(match) {
var body, flags, heregex, re, tag, tokens, value, _i, _len, _ref2, _ref3, _ref4, _ref5;
heregex = match[0], body = match[1], flags = match[2];
if (0 > body.indexOf('#{')) {
re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/');
+ if (re.match(/^\*/)) {
+ this.error('regular expressions cannot begin with `*`');
+ }
this.token('REGEX', "/" + (re || '(?:)') + "/" + flags);
return heregex.length;
}
@@ -3043,14 +2302,15 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
this.token(')', ')');
return heregex.length;
};
+
Lexer.prototype.lineToken = function() {
- var diff, indent, match, noNewlines, prev, size;
+ var diff, indent, match, noNewlines, size;
if (!(match = MULTI_DENT.exec(this.chunk))) {
return 0;
}
indent = match[0];
this.line += count(indent, '\n');
- prev = last(this.tokens, 1);
+ this.seenFor = false;
size = indent.length - 1 - indent.lastIndexOf('\n');
noNewlines = this.unfinished();
if (size - this.indebt === this.indent) {
@@ -3070,6 +2330,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
diff = size - this.indent + this.outdebt;
this.token('INDENT', diff);
this.indents.push(diff);
+ this.ends.push('OUTDENT');
this.outdebt = this.indebt = 0;
} else {
this.indebt = 0;
@@ -3078,7 +2339,8 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
this.indent = size;
return indent.length;
};
- Lexer.prototype.outdentToken = function(moveOut, noNewlines, close) {
+
+ Lexer.prototype.outdentToken = function(moveOut, noNewlines) {
var dent, len;
while (moveOut > 0) {
len = this.indents.length - 1;
@@ -3094,17 +2356,22 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
dent = this.indents.pop() - this.outdebt;
moveOut -= dent;
this.outdebt = 0;
+ this.pair('OUTDENT');
this.token('OUTDENT', dent);
}
}
if (dent) {
this.outdebt -= moveOut;
}
+ while (this.value() === ';') {
+ this.tokens.pop();
+ }
if (!(this.tag() === 'TERMINATOR' || noNewlines)) {
this.token('TERMINATOR', '\n');
}
return this;
};
+
Lexer.prototype.whitespaceToken = function() {
var match, nline, prev;
if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) {
@@ -3120,18 +2387,24 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
return 0;
}
};
+
Lexer.prototype.newlineToken = function() {
+ while (this.value() === ';') {
+ this.tokens.pop();
+ }
if (this.tag() !== 'TERMINATOR') {
this.token('TERMINATOR', '\n');
}
return this;
};
+
Lexer.prototype.suppressNewlines = function() {
if (this.value() === '\\') {
this.tokens.pop();
}
return this;
};
+
Lexer.prototype.literalToken = function() {
var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5;
if (match = OPERATOR.exec(this.chunk)) {
@@ -3146,7 +2419,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
prev = last(this.tokens);
if (value === '=' && prev) {
if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) {
- this.assignmentError();
+ this.error("reserved word \"" + (this.value()) + "\" can't be assigned");
}
if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') {
prev[0] = 'COMPOUND_ASSIGN';
@@ -3155,6 +2428,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
}
}
if (value === ';') {
+ this.seenFor = false;
tag = 'TERMINATOR';
} else if (__indexOf.call(MATH, value) >= 0) {
tag = 'MATH';
@@ -3179,21 +2453,30 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
switch (prev[0]) {
case '?':
prev[0] = 'INDEX_SOAK';
- break;
- case '::':
- prev[0] = 'INDEX_PROTO';
}
}
}
+ switch (value) {
+ case '(':
+ case '{':
+ case '[':
+ this.ends.push(INVERSES[value]);
+ break;
+ case ')':
+ case '}':
+ case ']':
+ this.pair(value);
+ }
this.token(tag, value);
return value.length;
};
+
Lexer.prototype.sanitizeHeredoc = function(doc, options) {
var attempt, herecomment, indent, match, _ref2;
indent = options.indent, herecomment = options.herecomment;
if (herecomment) {
if (HEREDOC_ILLEGAL.test(doc)) {
- throw new Error("block comment cannot contain \"*/\", starting on line " + (this.line + 1));
+ this.error("block comment cannot contain \"*/\", starting");
}
if (doc.indexOf('\n') <= 0) {
return doc;
@@ -3214,6 +2497,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
}
return doc;
};
+
Lexer.prototype.tagParameters = function() {
var i, stack, tok, tokens;
if (this.tag() !== ')') {
@@ -3235,38 +2519,43 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
} else if (tok[0] === '(') {
tok[0] = 'PARAM_START';
return this;
+ } else {
+ return this;
}
}
}
return this;
};
+
Lexer.prototype.closeIndentation = function() {
return this.outdentToken(this.indent);
};
- Lexer.prototype.identifierError = function(word) {
- throw SyntaxError("Reserved word \"" + word + "\" on line " + (this.line + 1));
- };
- Lexer.prototype.assignmentError = function() {
- throw SyntaxError("Reserved word \"" + (this.value()) + "\" on line " + (this.line + 1) + " can't be assigned");
- };
+
Lexer.prototype.balancedString = function(str, end) {
- var i, letter, prev, stack, _ref2;
+ var continueCount, i, letter, match, prev, stack, _i, _ref2;
+ continueCount = 0;
stack = [end];
- for (i = 1, _ref2 = str.length; 1 <= _ref2 ? i < _ref2 : i > _ref2; 1 <= _ref2 ? i++ : i--) {
+ for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) {
+ if (continueCount) {
+ --continueCount;
+ continue;
+ }
switch (letter = str.charAt(i)) {
case '\\':
- i++;
+ ++continueCount;
continue;
case end:
stack.pop();
if (!stack.length) {
- return str.slice(0, i + 1);
+ return str.slice(0, +i + 1 || 9e9);
}
end = stack[stack.length - 1];
continue;
}
if (end === '}' && (letter === '"' || letter === "'")) {
stack.push(end = letter);
+ } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) {
+ continueCount += match[0].length - 1;
} else if (end === '}' && letter === '{') {
stack.push(end = '}');
} else if (end === '"' && prev === '#' && letter === '{') {
@@ -3274,10 +2563,11 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
}
prev = letter;
}
- throw new Error("missing " + (stack.pop()) + ", starting on line " + (this.line + 1));
+ return this.error("missing " + (stack.pop()) + ", starting");
};
+
Lexer.prototype.interpolateString = function(str, options) {
- var expr, heredoc, i, inner, interpolated, len, letter, nested, pi, regex, tag, tokens, value, _len, _ref2, _ref3, _ref4;
+ var expr, heredoc, i, inner, interpolated, len, letter, nested, pi, regex, tag, tokens, value, _i, _len, _ref2, _ref3, _ref4;
if (options == null) {
options = {};
}
@@ -3308,8 +2598,8 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
}
if (len = nested.length) {
if (len > 1) {
- nested.unshift(['(', '(']);
- nested.push([')', ')']);
+ nested.unshift(['(', '(', this.line]);
+ nested.push([')', ')', this.line]);
}
tokens.push(['TOKENS', nested]);
}
@@ -3332,7 +2622,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
if (interpolated = tokens.length > 1) {
this.token('(', '(');
}
- for (i = 0, _len = tokens.length; i < _len; i++) {
+ for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) {
_ref3 = tokens[i], tag = _ref3[0], value = _ref3[1];
if (i) {
this.token('+', '+');
@@ -3348,24 +2638,43 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
}
return tokens;
};
+
+ Lexer.prototype.pair = function(tag) {
+ var size, wanted;
+ if (tag !== (wanted = last(this.ends))) {
+ if ('OUTDENT' !== wanted) {
+ this.error("unmatched " + tag);
+ }
+ this.indent -= size = last(this.indents);
+ this.outdentToken(size, true);
+ return this.pair(tag);
+ }
+ return this.ends.pop();
+ };
+
Lexer.prototype.token = function(tag, value) {
return this.tokens.push([tag, value, this.line]);
};
+
Lexer.prototype.tag = function(index, tag) {
var tok;
return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]);
};
+
Lexer.prototype.value = function(index, val) {
var tok;
return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]);
};
+
Lexer.prototype.unfinished = function() {
- var prev, value;
- return LINE_CONTINUER.test(this.chunk) || (prev = last(this.tokens, 1)) && prev[0] !== '.' && (value = this.value()) && !value.reserved && NO_NEWLINE.test(value) && !CODE.test(value) && !ASSIGNED.test(this.chunk);
+ var _ref2;
+ return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS');
};
+
Lexer.prototype.escapeLines = function(str, heredoc) {
return str.replace(MULTILINER, heredoc ? '\\n' : '');
};
+
Lexer.prototype.makeString = function(body, quote, heredoc) {
if (!body) {
return quote + quote;
@@ -3380,10 +2689,19 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
body = body.replace(RegExp("" + quote, "g"), '\\$&');
return quote + this.escapeLines(body, heredoc) + quote;
};
+
+ Lexer.prototype.error = function(message) {
+ throw SyntaxError("" + message + " on line " + (this.line + 1));
+ };
+
return Lexer;
+
})();
+
JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super'];
+
COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'];
+
COFFEE_ALIAS_MAP = {
and: '&&',
or: '||',
@@ -3395,6 +2713,7 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
on: 'true',
off: 'false'
};
+
COFFEE_ALIASES = (function() {
var _results;
_results = [];
@@ -3403,80 +2722,94 @@ define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coff
}
return _results;
})();
+
COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES);
- RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf'];
- JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED);
- exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS);
+
+ RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield'];
+
+ STRICT_PROSCRIBED = ['arguments', 'eval'];
+
+ JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED);
+
+ exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED);
+
+ exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED;
+
IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/;
- NUMBER = /^0x[\da-f]+|^(?:\d+(\.\d+)?|\.\d+)(?:e[+-]?\d+)?/i;
+
+ NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;
+
HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/;
+
OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/;
+
WHITESPACE = /^[^\n\S]+/;
+
COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)?$)|^(?:\s*#(?!##[^#]).*)+/;
+
CODE = /^[-=]>/;
+
MULTI_DENT = /^(?:\n[^\n\S]*)+/;
+
SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/;
+
JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/;
- REGEX = /^\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4}(?!\w)/;
+
+ REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/;
+
HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/;
+
HEREGEX_OMIT = /\s+(?:#.*)?/g;
+
MULTILINER = /\n/g;
+
HEREDOC_INDENT = /\n+([^\n\S]*)/g;
+
HEREDOC_ILLEGAL = /\*\//;
- ASSIGNED = /^\s*@?([$A-Za-z_][$\w\x7f-\uffff]*|['"].*['"])[^\n\S]*?[:=][^:=>]/;
+
LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/;
+
TRAILING_SPACES = /\s+$/;
- NO_NEWLINE = /^(?:[-+*&|\/%=<>!.\\][<>=&|]*|and|or|is(?:nt)?|n(?:ot|ew)|delete|typeof|instanceof)$/;
+
COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='];
+
UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO'];
+
LOGIC = ['&&', '||', '&', '|', '^'];
+
SHIFT = ['<<', '>>', '>>>'];
+
COMPARE = ['==', '!=', '<', '>', '<=', '>='];
+
MATH = ['*', '/', '%'];
+
RELATION = ['IN', 'OF', 'INSTANCEOF'];
- BOOL = ['TRUE', 'FALSE', 'NULL', 'UNDEFINED'];
- NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', '++', '--', ']'];
+
+ BOOL = ['TRUE', 'FALSE'];
+
+ NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--', ']'];
+
NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING');
+
CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER'];
- INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL');
+
+ INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED');
+
LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR'];
+
+
});
-/**
- * Copyright (c) 2011 Jeremy Ashkenas
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(require, exports, module) {
-
- var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref;
- var __indexOf = Array.prototype.indexOf || function(item) {
- for (var i = 0, l = this.length; i < l; i++) {
- if (this[i] === item) return i;
- }
- return -1;
- }, __slice = Array.prototype.slice;
+
+ var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+ __slice = [].slice;
+
exports.Rewriter = (function() {
+
function Rewriter() {}
+
Rewriter.prototype.rewrite = function(tokens) {
this.tokens = tokens;
this.removeLeadingNewlines();
@@ -3487,10 +2820,9 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
this.tagPostfixConditionals();
this.addImplicitBraces();
this.addImplicitParentheses();
- this.ensureBalance(BALANCED_PAIRS);
- this.rewriteClosingParens();
return this.tokens;
};
+
Rewriter.prototype.scanTokens = function(block) {
var i, token, tokens;
tokens = this.tokens;
@@ -3500,8 +2832,9 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
}
return true;
};
+
Rewriter.prototype.detectEnd = function(i, condition, action) {
- var levels, token, tokens, _ref, _ref2;
+ var levels, token, tokens, _ref, _ref1;
tokens = this.tokens;
levels = 0;
while (token = tokens[i]) {
@@ -3513,17 +2846,18 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
}
if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
levels += 1;
- } else if (_ref2 = token[0], __indexOf.call(EXPRESSION_END, _ref2) >= 0) {
+ } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
levels -= 1;
}
i += 1;
}
return i - 1;
};
+
Rewriter.prototype.removeLeadingNewlines = function() {
- var i, tag, _len, _ref;
+ var i, tag, _i, _len, _ref;
_ref = this.tokens;
- for (i = 0, _len = _ref.length; i < _len; i++) {
+ for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
tag = _ref[i][0];
if (tag !== 'TERMINATOR') {
break;
@@ -3533,6 +2867,7 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
return this.tokens.splice(0, i);
}
};
+
Rewriter.prototype.removeMidExpressionNewlines = function() {
return this.scanTokens(function(token, i, tokens) {
var _ref;
@@ -3543,6 +2878,7 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
return 0;
});
};
+
Rewriter.prototype.closeOpenCalls = function() {
var action, condition;
condition = function(token, i) {
@@ -3559,6 +2895,7 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
return 1;
});
};
+
Rewriter.prototype.closeOpenIndexes = function() {
var action, condition;
condition = function(token, i) {
@@ -3575,28 +2912,34 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
return 1;
});
};
+
Rewriter.prototype.addImplicitBraces = function() {
- var action, condition, stack, start, startIndent;
+ var action, condition, sameLine, stack, start, startIndent, startIndex, startsLine;
stack = [];
start = null;
+ startsLine = null;
+ sameLine = true;
startIndent = 0;
+ startIndex = 0;
condition = function(token, i) {
- var one, tag, three, two, _ref, _ref2;
- _ref = this.tokens.slice(i + 1, (i + 3 + 1) || 9e9), one = _ref[0], two = _ref[1], three = _ref[2];
+ var one, tag, three, two, _ref, _ref1;
+ _ref = this.tokens.slice(i + 1, +(i + 3) + 1 || 9e9), one = _ref[0], two = _ref[1], three = _ref[2];
if ('HERECOMMENT' === (one != null ? one[0] : void 0)) {
return false;
}
tag = token[0];
- return ((tag === 'TERMINATOR' || tag === 'OUTDENT') && !((two != null ? two[0] : void 0) === ':' || (one != null ? one[0] : void 0) === '@' && (three != null ? three[0] : void 0) === ':')) || (tag === ',' && one && ((_ref2 = one[0]) !== 'IDENTIFIER' && _ref2 !== 'NUMBER' && _ref2 !== 'STRING' && _ref2 !== '@' && _ref2 !== 'TERMINATOR' && _ref2 !== 'OUTDENT'));
+ if (__indexOf.call(LINEBREAKS, tag) >= 0) {
+ sameLine = false;
+ }
+ return (((tag === 'TERMINATOR' || tag === 'OUTDENT') || (__indexOf.call(IMPLICIT_END, tag) >= 0 && sameLine && !(i - startIndex === 1))) && ((!startsLine && this.tag(i - 1) !== ',') || !((two != null ? two[0] : void 0) === ':' || (one != null ? one[0] : void 0) === '@' && (three != null ? three[0] : void 0) === ':'))) || (tag === ',' && one && ((_ref1 = one[0]) !== 'IDENTIFIER' && _ref1 !== 'NUMBER' && _ref1 !== 'STRING' && _ref1 !== '@' && _ref1 !== 'TERMINATOR' && _ref1 !== 'OUTDENT'));
};
action = function(token, i) {
var tok;
- tok = ['}', '}', token[2]];
- tok.generated = true;
+ tok = this.generate('}', '}', token[2]);
return this.tokens.splice(i, 0, tok);
};
return this.scanTokens(function(token, i, tokens) {
- var ago, idx, tag, tok, value, _ref, _ref2;
+ var ago, idx, prevTag, tag, tok, value, _ref, _ref1;
if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) >= 0) {
stack.push([(tag === 'INDENT' && this.tag(i - 1) === '{' ? '{' : tag), i]);
return 1;
@@ -3605,39 +2948,58 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
start = stack.pop();
return 1;
}
- if (!(tag === ':' && ((ago = this.tag(i - 2)) === ':' || ((_ref2 = stack[stack.length - 1]) != null ? _ref2[0] : void 0) !== '{'))) {
+ if (!(tag === ':' && ((ago = this.tag(i - 2)) === ':' || ((_ref1 = stack[stack.length - 1]) != null ? _ref1[0] : void 0) !== '{'))) {
return 1;
}
+ sameLine = true;
+ startIndex = i + 1;
stack.push(['{']);
idx = ago === '@' ? i - 2 : i - 1;
while (this.tag(idx - 2) === 'HERECOMMENT') {
idx -= 2;
}
+ prevTag = this.tag(idx - 1);
+ startsLine = !prevTag || (__indexOf.call(LINEBREAKS, prevTag) >= 0);
value = new String('{');
value.generated = true;
- tok = ['{', value, token[2]];
- tok.generated = true;
+ tok = this.generate('{', value, token[2]);
tokens.splice(idx, 0, tok);
this.detectEnd(i + 2, condition, action);
return 2;
});
};
+
Rewriter.prototype.addImplicitParentheses = function() {
- var action, noCall;
- noCall = false;
+ var action, condition, noCall, seenControl, seenSingle;
+ noCall = seenSingle = seenControl = false;
+ condition = function(token, i) {
+ var post, tag, _ref, _ref1;
+ tag = token[0];
+ if (!seenSingle && token.fromThen) {
+ return true;
+ }
+ if (tag === 'IF' || tag === 'ELSE' || tag === 'CATCH' || tag === '->' || tag === '=>' || tag === 'CLASS') {
+ seenSingle = true;
+ }
+ if (tag === 'IF' || tag === 'ELSE' || tag === 'SWITCH' || tag === 'TRY' || tag === '=') {
+ seenControl = true;
+ }
+ if ((tag === '.' || tag === '?.' || tag === '::') && this.tag(i - 1) === 'OUTDENT') {
+ return true;
+ }
+ return !token.generated && this.tag(i - 1) !== ',' && (__indexOf.call(IMPLICIT_END, tag) >= 0 || (tag === 'INDENT' && !seenControl)) && (tag !== 'INDENT' || (((_ref = this.tag(i - 2)) !== 'CLASS' && _ref !== 'EXTENDS') && (_ref1 = this.tag(i - 1), __indexOf.call(IMPLICIT_BLOCK, _ref1) < 0) && !((post = this.tokens[i + 1]) && post.generated && post[0] === '{')));
+ };
action = function(token, i) {
- var idx;
- idx = token[0] === 'OUTDENT' ? i + 1 : i;
- return this.tokens.splice(idx, 0, ['CALL_END', ')', token[2]]);
+ return this.tokens.splice(i, 0, this.generate('CALL_END', ')', token[2]));
};
return this.scanTokens(function(token, i, tokens) {
- var callObject, current, next, prev, seenControl, seenSingle, tag, _ref, _ref2, _ref3;
+ var callObject, current, next, prev, tag, _ref, _ref1, _ref2;
tag = token[0];
- if (tag === 'CLASS' || tag === 'IF') {
+ if (tag === 'CLASS' || tag === 'IF' || tag === 'FOR' || tag === 'WHILE') {
noCall = true;
}
- _ref = tokens.slice(i - 1, (i + 1 + 1) || 9e9), prev = _ref[0], current = _ref[1], next = _ref[2];
- callObject = !noCall && tag === 'INDENT' && next && next.generated && next[0] === '{' && prev && (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) >= 0);
+ _ref = tokens.slice(i - 1, +(i + 1) + 1 || 9e9), prev = _ref[0], current = _ref[1], next = _ref[2];
+ callObject = !noCall && tag === 'INDENT' && next && next.generated && next[0] === '{' && prev && (_ref1 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref1) >= 0);
seenSingle = false;
seenControl = false;
if (__indexOf.call(LINEBREAKS, tag) >= 0) {
@@ -3649,36 +3011,30 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
if (token.fromThen) {
return 1;
}
- if (!(callObject || (prev != null ? prev.spaced : void 0) && (prev.call || (_ref3 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref3) >= 0)) && (__indexOf.call(IMPLICIT_CALL, tag) >= 0 || !(token.spaced || token.newLine) && __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) >= 0))) {
+ if (!(callObject || (prev != null ? prev.spaced : void 0) && (prev.call || (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) >= 0)) && (__indexOf.call(IMPLICIT_CALL, tag) >= 0 || !(token.spaced || token.newLine) && __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) >= 0))) {
return 1;
}
- tokens.splice(i, 0, ['CALL_START', '(', token[2]]);
- this.detectEnd(i + 1, function(token, i) {
- var post, _ref4;
- tag = token[0];
- if (!seenSingle && token.fromThen) {
- return true;
- }
- if (tag === 'IF' || tag === 'ELSE' || tag === 'CATCH' || tag === '->' || tag === '=>') {
- seenSingle = true;
- }
- if (tag === 'IF' || tag === 'ELSE' || tag === 'SWITCH' || tag === 'TRY') {
- seenControl = true;
- }
- if ((tag === '.' || tag === '?.' || tag === '::') && this.tag(i - 1) === 'OUTDENT') {
- return true;
- }
- return !token.generated && this.tag(i - 1) !== ',' && (__indexOf.call(IMPLICIT_END, tag) >= 0 || (tag === 'INDENT' && !seenControl)) && (tag !== 'INDENT' || (this.tag(i - 2) !== 'CLASS' && (_ref4 = this.tag(i - 1), __indexOf.call(IMPLICIT_BLOCK, _ref4) < 0) && !((post = this.tokens[i + 1]) && post.generated && post[0] === '{')));
- }, action);
+ tokens.splice(i, 0, this.generate('CALL_START', '(', token[2]));
+ this.detectEnd(i + 1, condition, action);
if (prev[0] === '?') {
prev[0] = 'FUNC_EXIST';
}
return 2;
});
};
+
Rewriter.prototype.addImplicitIndentation = function() {
+ var action, condition, indent, outdent, starter;
+ starter = indent = outdent = null;
+ condition = function(token, i) {
+ var _ref;
+ return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && (starter !== 'IF' && starter !== 'THEN'));
+ };
+ action = function(token, i) {
+ return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
+ };
return this.scanTokens(function(token, i, tokens) {
- var action, condition, indent, outdent, starter, tag, _ref, _ref2;
+ var tag, _ref, _ref1;
tag = token[0];
if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') {
tokens.splice(i, 1);
@@ -3694,19 +3050,11 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
}
if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
starter = tag;
- _ref2 = this.indentation(token), indent = _ref2[0], outdent = _ref2[1];
+ _ref1 = this.indentation(token, true), indent = _ref1[0], outdent = _ref1[1];
if (starter === 'THEN') {
indent.fromThen = true;
}
- indent.generated = outdent.generated = true;
tokens.splice(i + 1, 0, indent);
- condition = function(token, i) {
- var _ref3;
- return token[1] !== ';' && (_ref3 = token[0], __indexOf.call(SINGLE_CLOSERS, _ref3) >= 0) && !(token[0] === 'ELSE' && (starter !== 'IF' && starter !== 'THEN'));
- };
- action = function(token, i) {
- return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
- };
this.detectEnd(i + 2, condition, action);
if (tag === 'THEN') {
tokens.splice(i, 1);
@@ -3716,156 +3064,107 @@ define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(r
return 1;
});
};
+
Rewriter.prototype.tagPostfixConditionals = function() {
- var condition;
+ var action, condition, original;
+ original = null;
condition = function(token, i) {
var _ref;
return (_ref = token[0]) === 'TERMINATOR' || _ref === 'INDENT';
};
+ action = function(token, i) {
+ if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) {
+ return original[0] = 'POST_' + original[0];
+ }
+ };
return this.scanTokens(function(token, i) {
- var original;
if (token[0] !== 'IF') {
return 1;
}
original = token;
- this.detectEnd(i + 1, condition, function(token, i) {
- if (token[0] !== 'INDENT') {
- return original[0] = 'POST_' + original[0];
- }
- });
+ this.detectEnd(i + 1, condition, action);
return 1;
});
};
- Rewriter.prototype.ensureBalance = function(pairs) {
- var close, level, levels, open, openLine, tag, token, _i, _j, _len, _len2, _ref, _ref2;
- levels = {};
- openLine = {};
- _ref = this.tokens;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- token = _ref[_i];
- tag = token[0];
- for (_j = 0, _len2 = pairs.length; _j < _len2; _j++) {
- _ref2 = pairs[_j], open = _ref2[0], close = _ref2[1];
- levels[open] |= 0;
- if (tag === open) {
- if (levels[open]++ === 0) {
- openLine[open] = token[2];
- }
- } else if (tag === close && --levels[open] < 0) {
- throw Error("too many " + token[1] + " on line " + (token[2] + 1));
- }
- }
- }
- for (open in levels) {
- level = levels[open];
- if (level > 0) {
- throw Error("unclosed " + open + " on line " + (openLine[open] + 1));
- }
+
+ Rewriter.prototype.indentation = function(token, implicit) {
+ var indent, outdent;
+ if (implicit == null) {
+ implicit = false;
}
- return this;
- };
- Rewriter.prototype.rewriteClosingParens = function() {
- var debt, key, stack;
- stack = [];
- debt = {};
- for (key in INVERSES) {
- debt[key] = 0;
+ indent = ['INDENT', 2, token[2]];
+ outdent = ['OUTDENT', 2, token[2]];
+ if (implicit) {
+ indent.generated = outdent.generated = true;
}
- return this.scanTokens(function(token, i, tokens) {
- var inv, match, mtag, oppos, tag, val, _ref;
- if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) >= 0) {
- stack.push(token);
- return 1;
- }
- if (__indexOf.call(EXPRESSION_END, tag) < 0) {
- return 1;
- }
- if (debt[inv = INVERSES[tag]] > 0) {
- debt[inv] -= 1;
- tokens.splice(i, 1);
- return 0;
- }
- match = stack.pop();
- mtag = match[0];
- oppos = INVERSES[mtag];
- if (tag === oppos) {
- return 1;
- }
- debt[mtag] += 1;
- val = [oppos, mtag === 'INDENT' ? match[1] : oppos];
- if (this.tag(i + 2) === mtag) {
- tokens.splice(i + 3, 0, val);
- stack.push(match);
- } else {
- tokens.splice(i, 0, val);
- }
- return 1;
- });
+ return [indent, outdent];
};
- Rewriter.prototype.indentation = function(token) {
- return [['INDENT', 2, token[2]], ['OUTDENT', 2, token[2]]];
+
+ Rewriter.prototype.generate = function(tag, value, line) {
+ var tok;
+ tok = [tag, value, line];
+ tok.generated = true;
+ return tok;
};
+
Rewriter.prototype.tag = function(i) {
var _ref;
return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;
};
+
return Rewriter;
+
})();
+
BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];
- INVERSES = {};
+
+ exports.INVERSES = INVERSES = {};
+
EXPRESSION_START = [];
+
EXPRESSION_END = [];
+
for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
_ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
EXPRESSION_START.push(INVERSES[rite] = left);
EXPRESSION_END.push(INVERSES[left] = rite);
}
+
EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);
+
IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
- IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++'];
+
+ IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++'];
+
IMPLICIT_UNSPACED_CALL = ['+', '-'];
+
IMPLICIT_BLOCK = ['->', '=>', '{', '[', ','];
+
IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];
+
SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN'];
+
SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];
+
LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
+
+
});
-/**
- * Copyright (c) 2011 Jeremy Ashkenas
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
define('ace/mode/coffee/helpers', ['require', 'exports', 'module' ], function(require, exports, module) {
-
- var extend, flatten;
+
+ var extend, flatten, _ref;
+
exports.starts = function(string, literal, start) {
return literal === string.substr(start, literal.length);
};
+
exports.ends = function(string, literal, back) {
var len;
len = literal.length;
return literal === string.substr(string.length - len - (back || 0), len);
};
+
exports.compact = function(array) {
var item, _i, _len, _results;
_results = [];
@@ -3877,6 +3176,7 @@ define('ace/mode/coffee/helpers', ['require', 'exports', 'module' ], function(re
}
return _results;
};
+
exports.count = function(string, substr) {
var num, pos;
num = pos = 0;
@@ -3888,9 +3188,11 @@ define('ace/mode/coffee/helpers', ['require', 'exports', 'module' ], function(re
}
return num;
};
+
exports.merge = function(options, overrides) {
return extend(extend({}, options), overrides);
};
+
extend = exports.extend = function(object, properties) {
var key, val;
for (key in properties) {
@@ -3899,6 +3201,7 @@ define('ace/mode/coffee/helpers', ['require', 'exports', 'module' ], function(re
}
return object;
};
+
exports.flatten = flatten = function(array) {
var element, flattened, _i, _len;
flattened = [];
@@ -3912,49 +3215,39 @@ define('ace/mode/coffee/helpers', ['require', 'exports', 'module' ], function(re
}
return flattened;
};
+
exports.del = function(obj, key) {
var val;
val = obj[key];
delete obj[key];
return val;
};
+
exports.last = function(array, back) {
return array[array.length - (back || 0) - 1];
};
+
+ exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) {
+ var e, _i, _len;
+ for (_i = 0, _len = this.length; _i < _len; _i++) {
+ e = this[_i];
+ if (fn(e)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+
});
-/**
- * Copyright (c) 2011 Jeremy Ashkenas
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
define('ace/mode/coffee/parser', ['require', 'exports', 'module' ], function(require, exports, module) {
-/* Jison generated parser */
var parser = {trace: function trace() { },
yy: {},
-symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Throw":11,"Comment":12,"STATEMENT":13,"Value":14,"Invocation":15,"Code":16,"Operation":17,"Assign":18,"If":19,"Try":20,"While":21,"For":22,"Switch":23,"Class":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"BOOL":35,"Assignable":36,"=":37,"AssignObj":38,"ObjAssignable":39,":":40,"ThisProperty":41,"RETURN":42,"HERECOMMENT":43,"PARAM_START":44,"ParamList":45,"PARAM_END":46,"FuncGlyph":47,"->":48,"=>":49,"OptComma":50,",":51,"Param":52,"ParamVar":53,"...":54,"Array":55,"Object":56,"Splat":57,"SimpleAssignable":58,"Accessor":59,"Parenthetical":60,"Range":61,"This":62,".":63,"?.":64,"::":65,"Index":66,"INDEX_START":67,"IndexValue":68,"INDEX_END":69,"INDEX_SOAK":70,"INDEX_PROTO":71,"Slice":72,"{":73,"AssignList":74,"}":75,"CLASS":76,"EXTENDS":77,"OptFuncExist":78,"Arguments":79,"SUPER":80,"FUNC_EXIST":81,"CALL_START":82,"CALL_END":83,"ArgList":84,"THIS":85,"@":86,"[":87,"]":88,"RangeDots":89,"..":90,"Arg":91,"SimpleArgs":92,"TRY":93,"Catch":94,"FINALLY":95,"CATCH":96,"THROW":97,"(":98,")":99,"WhileSource":100,"WHILE":101,"WHEN":102,"UNTIL":103,"Loop":104,"LOOP":105,"ForBody":106,"FOR":107,"ForStart":108,"ForSource":109,"ForVariables":110,"OWN":111,"ForValue":112,"FORIN":113,"FOROF":114,"BY":115,"SWITCH":116,"Whens":117,"ELSE":118,"When":119,"LEADING_WHEN":120,"IfBlock":121,"IF":122,"POST_IF":123,"UNARY":124,"-":125,"+":126,"--":127,"++":128,"?":129,"MATH":130,"SHIFT":131,"COMPARE":132,"LOGIC":133,"RELATION":134,"COMPOUND_ASSIGN":135,"$accept":0,"$end":1},
-terminals_: {2:"error",6:"TERMINATOR",13:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"BOOL",37:"=",40:":",42:"RETURN",43:"HERECOMMENT",44:"PARAM_START",46:"PARAM_END",48:"->",49:"=>",51:",",54:"...",63:".",64:"?.",65:"::",67:"INDEX_START",69:"INDEX_END",70:"INDEX_SOAK",71:"INDEX_PROTO",73:"{",75:"}",76:"CLASS",77:"EXTENDS",80:"SUPER",81:"FUNC_EXIST",82:"CALL_START",83:"CALL_END",85:"THIS",86:"@",87:"[",88:"]",90:"..",93:"TRY",95:"FINALLY",96:"CATCH",97:"THROW",98:"(",99:")",101:"WHILE",102:"WHEN",103:"UNTIL",105:"LOOP",107:"FOR",111:"OWN",113:"FORIN",114:"FOROF",115:"BY",116:"SWITCH",118:"ELSE",120:"LEADING_WHEN",122:"IF",123:"POST_IF",124:"UNARY",125:"-",126:"+",127:"--",128:"++",129:"?",130:"MATH",131:"SHIFT",132:"COMPARE",133:"LOGIC",134:"RELATION",135:"COMPOUND_ASSIGN"},
-productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[18,3],[18,5],[38,1],[38,3],[38,5],[38,1],[39,1],[39,1],[39,1],[10,2],[10,1],[12,1],[16,5],[16,2],[47,1],[47,1],[50,0],[50,1],[45,0],[45,1],[45,3],[52,1],[52,2],[52,3],[53,1],[53,1],[53,1],[53,1],[57,2],[58,1],[58,2],[58,2],[58,1],[36,1],[36,1],[36,1],[14,1],[14,1],[14,1],[14,1],[14,1],[59,2],[59,2],[59,2],[59,1],[59,1],[66,3],[66,2],[66,2],[68,1],[68,1],[56,4],[74,0],[74,1],[74,3],[74,4],[74,6],[24,1],[24,2],[24,3],[24,4],[24,2],[24,3],[24,4],[24,5],[15,3],[15,3],[15,1],[15,2],[78,0],[78,1],[79,2],[79,4],[62,1],[62,1],[41,2],[55,2],[55,4],[89,1],[89,1],[61,5],[72,3],[72,2],[72,2],[84,1],[84,3],[84,4],[84,4],[84,6],[91,1],[91,1],[92,1],[92,3],[20,2],[20,3],[20,4],[20,5],[94,3],[11,2],[60,3],[60,5],[100,2],[100,4],[100,2],[100,4],[21,2],[21,2],[21,2],[21,1],[104,2],[104,2],[22,2],[22,2],[22,2],[106,2],[106,2],[108,2],[108,3],[112,1],[112,1],[112,1],[110,1],[110,3],[109,2],[109,2],[109,4],[109,4],[109,4],[109,6],[109,6],[23,5],[23,7],[23,4],[23,6],[117,1],[117,2],[119,3],[119,4],[121,3],[121,5],[19,1],[19,3],[19,3],[19,3],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,5],[17,3]],
+symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Comment":11,"STATEMENT":12,"Value":13,"Invocation":14,"Code":15,"Operation":16,"Assign":17,"If":18,"Try":19,"While":20,"For":21,"Switch":22,"Class":23,"Throw":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"Index":69,"INDEX_START":70,"IndexValue":71,"INDEX_END":72,"INDEX_SOAK":73,"Slice":74,"{":75,"AssignList":76,"}":77,"CLASS":78,"EXTENDS":79,"OptFuncExist":80,"Arguments":81,"SUPER":82,"FUNC_EXIST":83,"CALL_START":84,"CALL_END":85,"ArgList":86,"THIS":87,"@":88,"[":89,"]":90,"RangeDots":91,"..":92,"Arg":93,"SimpleArgs":94,"TRY":95,"Catch":96,"FINALLY":97,"CATCH":98,"THROW":99,"(":100,")":101,"WhileSource":102,"WHILE":103,"WHEN":104,"UNTIL":105,"Loop":106,"LOOP":107,"ForBody":108,"FOR":109,"ForStart":110,"ForSource":111,"ForVariables":112,"OWN":113,"ForValue":114,"FORIN":115,"FOROF":116,"BY":117,"SWITCH":118,"Whens":119,"ELSE":120,"When":121,"LEADING_WHEN":122,"IfBlock":123,"IF":124,"POST_IF":125,"UNARY":126,"-":127,"+":128,"--":129,"++":130,"?":131,"MATH":132,"SHIFT":133,"COMPARE":134,"LOGIC":135,"RELATION":136,"COMPOUND_ASSIGN":137,"$accept":0,"$end":1},
+terminals_: {2:"error",6:"TERMINATOR",12:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",70:"INDEX_START",72:"INDEX_END",73:"INDEX_SOAK",75:"{",77:"}",78:"CLASS",79:"EXTENDS",82:"SUPER",83:"FUNC_EXIST",84:"CALL_START",85:"CALL_END",87:"THIS",88:"@",89:"[",90:"]",92:"..",95:"TRY",97:"FINALLY",98:"CATCH",99:"THROW",100:"(",101:")",103:"WHILE",104:"WHEN",105:"UNTIL",107:"LOOP",109:"FOR",113:"OWN",115:"FORIN",116:"FOROF",117:"BY",118:"SWITCH",120:"ELSE",122:"LEADING_WHEN",124:"IF",125:"POST_IF",126:"UNARY",127:"-",128:"+",129:"--",130:"++",131:"?",132:"MATH",133:"SHIFT",134:"COMPARE",135:"LOGIC",136:"RELATION",137:"COMPOUND_ASSIGN"},
+productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,1],[62,2],[62,2],[62,2],[62,1],[62,1],[69,3],[69,2],[71,1],[71,1],[59,4],[76,0],[76,1],[76,3],[76,4],[76,6],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,2],[80,0],[80,1],[81,2],[81,4],[65,1],[65,1],[44,2],[58,2],[58,4],[91,1],[91,1],[64,5],[74,3],[74,2],[74,2],[74,1],[86,1],[86,3],[86,4],[86,4],[86,6],[93,1],[93,1],[94,1],[94,3],[19,2],[19,3],[19,4],[19,5],[96,3],[24,2],[63,3],[63,5],[102,2],[102,4],[102,2],[102,4],[20,2],[20,2],[20,2],[20,1],[106,2],[106,2],[21,2],[21,2],[21,2],[108,2],[108,2],[110,2],[110,3],[114,1],[114,1],[114,1],[114,1],[112,1],[112,3],[111,2],[111,2],[111,4],[111,4],[111,4],[111,6],[111,6],[22,5],[22,7],[22,4],[22,6],[119,1],[119,2],[121,3],[121,4],[123,3],[123,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,3]],
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
var $0 = $$.length - 1;
@@ -3979,9 +3272,9 @@ case 9:this.$ = $$[$0];
break;
case 10:this.$ = $$[$0];
break;
-case 11:this.$ = $$[$0];
+case 11:this.$ = new yy.Literal($$[$0]);
break;
-case 12:this.$ = new yy.Literal($$[$0]);
+case 12:this.$ = $$[$0];
break;
case 13:this.$ = $$[$0];
break;
@@ -4021,386 +3314,391 @@ case 30:this.$ = new yy.Literal($$[$0]);
break;
case 31:this.$ = new yy.Literal($$[$0]);
break;
-case 32:this.$ = (function () {
- var val;
- val = new yy.Literal($$[$0]);
- if ($$[$0] === 'undefined') {
- val.isUndefined = true;
- }
- return val;
- }());
+case 32:this.$ = new yy.Literal($$[$0]);
break;
-case 33:this.$ = new yy.Assign($$[$0-2], $$[$0]);
+case 33:this.$ = new yy.Undefined;
break;
-case 34:this.$ = new yy.Assign($$[$0-4], $$[$0-1]);
+case 34:this.$ = new yy.Null;
break;
-case 35:this.$ = new yy.Value($$[$0]);
+case 35:this.$ = new yy.Bool($$[$0]);
break;
-case 36:this.$ = new yy.Assign(new yy.Value($$[$0-2]), $$[$0], 'object');
+case 36:this.$ = new yy.Assign($$[$0-2], $$[$0]);
break;
-case 37:this.$ = new yy.Assign(new yy.Value($$[$0-4]), $$[$0-1], 'object');
+case 37:this.$ = new yy.Assign($$[$0-3], $$[$0]);
break;
-case 38:this.$ = $$[$0];
+case 38:this.$ = new yy.Assign($$[$0-4], $$[$0-1]);
break;
-case 39:this.$ = $$[$0];
+case 39:this.$ = new yy.Value($$[$0]);
break;
-case 40:this.$ = $$[$0];
+case 40:this.$ = new yy.Assign(new yy.Value($$[$0-2]), $$[$0], 'object');
break;
-case 41:this.$ = $$[$0];
+case 41:this.$ = new yy.Assign(new yy.Value($$[$0-4]), $$[$0-1], 'object');
break;
-case 42:this.$ = new yy.Return($$[$0]);
+case 42:this.$ = $$[$0];
break;
-case 43:this.$ = new yy.Return;
+case 43:this.$ = $$[$0];
break;
-case 44:this.$ = new yy.Comment($$[$0]);
+case 44:this.$ = $$[$0];
break;
-case 45:this.$ = new yy.Code($$[$0-3], $$[$0], $$[$0-1]);
+case 45:this.$ = $$[$0];
break;
-case 46:this.$ = new yy.Code([], $$[$0], $$[$0-1]);
+case 46:this.$ = new yy.Return($$[$0]);
break;
-case 47:this.$ = 'func';
+case 47:this.$ = new yy.Return;
break;
-case 48:this.$ = 'boundfunc';
+case 48:this.$ = new yy.Comment($$[$0]);
break;
-case 49:this.$ = $$[$0];
+case 49:this.$ = new yy.Code($$[$0-3], $$[$0], $$[$0-1]);
break;
-case 50:this.$ = $$[$0];
+case 50:this.$ = new yy.Code([], $$[$0], $$[$0-1]);
break;
-case 51:this.$ = [];
+case 51:this.$ = 'func';
break;
-case 52:this.$ = [$$[$0]];
+case 52:this.$ = 'boundfunc';
break;
-case 53:this.$ = $$[$0-2].concat($$[$0]);
+case 53:this.$ = $$[$0];
break;
-case 54:this.$ = new yy.Param($$[$0]);
+case 54:this.$ = $$[$0];
break;
-case 55:this.$ = new yy.Param($$[$0-1], null, true);
+case 55:this.$ = [];
break;
-case 56:this.$ = new yy.Param($$[$0-2], $$[$0]);
+case 56:this.$ = [$$[$0]];
break;
-case 57:this.$ = $$[$0];
+case 57:this.$ = $$[$0-2].concat($$[$0]);
break;
-case 58:this.$ = $$[$0];
+case 58:this.$ = $$[$0-3].concat($$[$0]);
break;
-case 59:this.$ = $$[$0];
+case 59:this.$ = $$[$0-5].concat($$[$0-2]);
break;
-case 60:this.$ = $$[$0];
+case 60:this.$ = new yy.Param($$[$0]);
break;
-case 61:this.$ = new yy.Splat($$[$0-1]);
+case 61:this.$ = new yy.Param($$[$0-1], null, true);
break;
-case 62:this.$ = new yy.Value($$[$0]);
+case 62:this.$ = new yy.Param($$[$0-2], $$[$0]);
break;
-case 63:this.$ = $$[$0-1].push($$[$0]);
+case 63:this.$ = $$[$0];
break;
-case 64:this.$ = new yy.Value($$[$0-1], [$$[$0]]);
+case 64:this.$ = $$[$0];
break;
case 65:this.$ = $$[$0];
break;
case 66:this.$ = $$[$0];
break;
-case 67:this.$ = new yy.Value($$[$0]);
+case 67:this.$ = new yy.Splat($$[$0-1]);
break;
case 68:this.$ = new yy.Value($$[$0]);
break;
-case 69:this.$ = $$[$0];
+case 69:this.$ = $$[$0-1].add($$[$0]);
break;
-case 70:this.$ = new yy.Value($$[$0]);
+case 70:this.$ = new yy.Value($$[$0-1], [].concat($$[$0]));
break;
-case 71:this.$ = new yy.Value($$[$0]);
+case 71:this.$ = $$[$0];
break;
-case 72:this.$ = new yy.Value($$[$0]);
+case 72:this.$ = $$[$0];
break;
-case 73:this.$ = $$[$0];
+case 73:this.$ = new yy.Value($$[$0]);
break;
-case 74:this.$ = new yy.Access($$[$0]);
+case 74:this.$ = new yy.Value($$[$0]);
break;
-case 75:this.$ = new yy.Access($$[$0], 'soak');
+case 75:this.$ = $$[$0];
break;
-case 76:this.$ = new yy.Access($$[$0], 'proto');
+case 76:this.$ = new yy.Value($$[$0]);
break;
-case 77:this.$ = new yy.Access(new yy.Literal('prototype'));
+case 77:this.$ = new yy.Value($$[$0]);
break;
-case 78:this.$ = $$[$0];
+case 78:this.$ = new yy.Value($$[$0]);
break;
-case 79:this.$ = $$[$0-1];
+case 79:this.$ = $$[$0];
break;
-case 80:this.$ = yy.extend($$[$0], {
+case 80:this.$ = new yy.Access($$[$0]);
+break;
+case 81:this.$ = new yy.Access($$[$0], 'soak');
+break;
+case 82:this.$ = [new yy.Access(new yy.Literal('prototype')), new yy.Access($$[$0])];
+break;
+case 83:this.$ = new yy.Access(new yy.Literal('prototype'));
+break;
+case 84:this.$ = $$[$0];
+break;
+case 85:this.$ = $$[$0-1];
+break;
+case 86:this.$ = yy.extend($$[$0], {
soak: true
});
break;
-case 81:this.$ = yy.extend($$[$0], {
- proto: true
- });
+case 87:this.$ = new yy.Index($$[$0]);
break;
-case 82:this.$ = new yy.Index($$[$0]);
+case 88:this.$ = new yy.Slice($$[$0]);
break;
-case 83:this.$ = new yy.Slice($$[$0]);
+case 89:this.$ = new yy.Obj($$[$0-2], $$[$0-3].generated);
break;
-case 84:this.$ = new yy.Obj($$[$0-2], $$[$0-3].generated);
+case 90:this.$ = [];
break;
-case 85:this.$ = [];
+case 91:this.$ = [$$[$0]];
break;
-case 86:this.$ = [$$[$0]];
+case 92:this.$ = $$[$0-2].concat($$[$0]);
break;
-case 87:this.$ = $$[$0-2].concat($$[$0]);
+case 93:this.$ = $$[$0-3].concat($$[$0]);
break;
-case 88:this.$ = $$[$0-3].concat($$[$0]);
+case 94:this.$ = $$[$0-5].concat($$[$0-2]);
break;
-case 89:this.$ = $$[$0-5].concat($$[$0-2]);
+case 95:this.$ = new yy.Class;
break;
-case 90:this.$ = new yy.Class;
+case 96:this.$ = new yy.Class(null, null, $$[$0]);
break;
-case 91:this.$ = new yy.Class(null, null, $$[$0]);
+case 97:this.$ = new yy.Class(null, $$[$0]);
break;
-case 92:this.$ = new yy.Class(null, $$[$0]);
+case 98:this.$ = new yy.Class(null, $$[$0-1], $$[$0]);
break;
-case 93:this.$ = new yy.Class(null, $$[$0-1], $$[$0]);
+case 99:this.$ = new yy.Class($$[$0]);
break;
-case 94:this.$ = new yy.Class($$[$0]);
+case 100:this.$ = new yy.Class($$[$0-1], null, $$[$0]);
break;
-case 95:this.$ = new yy.Class($$[$0-1], null, $$[$0]);
+case 101:this.$ = new yy.Class($$[$0-2], $$[$0]);
break;
-case 96:this.$ = new yy.Class($$[$0-2], $$[$0]);
+case 102:this.$ = new yy.Class($$[$0-3], $$[$0-1], $$[$0]);
break;
-case 97:this.$ = new yy.Class($$[$0-3], $$[$0-1], $$[$0]);
+case 103:this.$ = new yy.Call($$[$0-2], $$[$0], $$[$0-1]);
break;
-case 98:this.$ = new yy.Call($$[$0-2], $$[$0], $$[$0-1]);
+case 104:this.$ = new yy.Call($$[$0-2], $$[$0], $$[$0-1]);
break;
-case 99:this.$ = new yy.Call($$[$0-2], $$[$0], $$[$0-1]);
+case 105:this.$ = new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]);
break;
-case 100:this.$ = new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]);
+case 106:this.$ = new yy.Call('super', $$[$0]);
break;
-case 101:this.$ = new yy.Call('super', $$[$0]);
+case 107:this.$ = false;
break;
-case 102:this.$ = false;
+case 108:this.$ = true;
break;
-case 103:this.$ = true;
+case 109:this.$ = [];
break;
-case 104:this.$ = [];
+case 110:this.$ = $$[$0-2];
break;
-case 105:this.$ = $$[$0-2];
+case 111:this.$ = new yy.Value(new yy.Literal('this'));
break;
-case 106:this.$ = new yy.Value(new yy.Literal('this'));
+case 112:this.$ = new yy.Value(new yy.Literal('this'));
break;
-case 107:this.$ = new yy.Value(new yy.Literal('this'));
+case 113:this.$ = new yy.Value(new yy.Literal('this'), [new yy.Access($$[$0])], 'this');
break;
-case 108:this.$ = new yy.Value(new yy.Literal('this'), [new yy.Access($$[$0])], 'this');
+case 114:this.$ = new yy.Arr([]);
break;
-case 109:this.$ = new yy.Arr([]);
+case 115:this.$ = new yy.Arr($$[$0-2]);
break;
-case 110:this.$ = new yy.Arr($$[$0-2]);
+case 116:this.$ = 'inclusive';
break;
-case 111:this.$ = 'inclusive';
+case 117:this.$ = 'exclusive';
break;
-case 112:this.$ = 'exclusive';
+case 118:this.$ = new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]);
break;
-case 113:this.$ = new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]);
+case 119:this.$ = new yy.Range($$[$0-2], $$[$0], $$[$0-1]);
break;
-case 114:this.$ = new yy.Range($$[$0-2], $$[$0], $$[$0-1]);
+case 120:this.$ = new yy.Range($$[$0-1], null, $$[$0]);
break;
-case 115:this.$ = new yy.Range($$[$0-1], null, $$[$0]);
+case 121:this.$ = new yy.Range(null, $$[$0], $$[$0-1]);
break;
-case 116:this.$ = new yy.Range(null, $$[$0], $$[$0-1]);
+case 122:this.$ = new yy.Range(null, null, $$[$0]);
break;
-case 117:this.$ = [$$[$0]];
+case 123:this.$ = [$$[$0]];
break;
-case 118:this.$ = $$[$0-2].concat($$[$0]);
+case 124:this.$ = $$[$0-2].concat($$[$0]);
break;
-case 119:this.$ = $$[$0-3].concat($$[$0]);
+case 125:this.$ = $$[$0-3].concat($$[$0]);
break;
-case 120:this.$ = $$[$0-2];
+case 126:this.$ = $$[$0-2];
break;
-case 121:this.$ = $$[$0-5].concat($$[$0-2]);
+case 127:this.$ = $$[$0-5].concat($$[$0-2]);
break;
-case 122:this.$ = $$[$0];
+case 128:this.$ = $$[$0];
break;
-case 123:this.$ = $$[$0];
+case 129:this.$ = $$[$0];
break;
-case 124:this.$ = $$[$0];
+case 130:this.$ = $$[$0];
break;
-case 125:this.$ = [].concat($$[$0-2], $$[$0]);
+case 131:this.$ = [].concat($$[$0-2], $$[$0]);
break;
-case 126:this.$ = new yy.Try($$[$0]);
+case 132:this.$ = new yy.Try($$[$0]);
break;
-case 127:this.$ = new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]);
+case 133:this.$ = new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]);
break;
-case 128:this.$ = new yy.Try($$[$0-2], null, null, $$[$0]);
+case 134:this.$ = new yy.Try($$[$0-2], null, null, $$[$0]);
break;
-case 129:this.$ = new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]);
+case 135:this.$ = new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]);
break;
-case 130:this.$ = [$$[$0-1], $$[$0]];
+case 136:this.$ = [$$[$0-1], $$[$0]];
break;
-case 131:this.$ = new yy.Throw($$[$0]);
+case 137:this.$ = new yy.Throw($$[$0]);
break;
-case 132:this.$ = new yy.Parens($$[$0-1]);
+case 138:this.$ = new yy.Parens($$[$0-1]);
break;
-case 133:this.$ = new yy.Parens($$[$0-2]);
+case 139:this.$ = new yy.Parens($$[$0-2]);
break;
-case 134:this.$ = new yy.While($$[$0]);
+case 140:this.$ = new yy.While($$[$0]);
break;
-case 135:this.$ = new yy.While($$[$0-2], {
+case 141:this.$ = new yy.While($$[$0-2], {
guard: $$[$0]
});
break;
-case 136:this.$ = new yy.While($$[$0], {
+case 142:this.$ = new yy.While($$[$0], {
invert: true
});
break;
-case 137:this.$ = new yy.While($$[$0-2], {
+case 143:this.$ = new yy.While($$[$0-2], {
invert: true,
guard: $$[$0]
});
break;
-case 138:this.$ = $$[$0-1].addBody($$[$0]);
+case 144:this.$ = $$[$0-1].addBody($$[$0]);
break;
-case 139:this.$ = $$[$0].addBody(yy.Block.wrap([$$[$0-1]]));
+case 145:this.$ = $$[$0].addBody(yy.Block.wrap([$$[$0-1]]));
break;
-case 140:this.$ = $$[$0].addBody(yy.Block.wrap([$$[$0-1]]));
+case 146:this.$ = $$[$0].addBody(yy.Block.wrap([$$[$0-1]]));
break;
-case 141:this.$ = $$[$0];
+case 147:this.$ = $$[$0];
break;
-case 142:this.$ = new yy.While(new yy.Literal('true')).addBody($$[$0]);
+case 148:this.$ = new yy.While(new yy.Literal('true')).addBody($$[$0]);
break;
-case 143:this.$ = new yy.While(new yy.Literal('true')).addBody(yy.Block.wrap([$$[$0]]));
+case 149:this.$ = new yy.While(new yy.Literal('true')).addBody(yy.Block.wrap([$$[$0]]));
break;
-case 144:this.$ = new yy.For($$[$0-1], $$[$0]);
+case 150:this.$ = new yy.For($$[$0-1], $$[$0]);
break;
-case 145:this.$ = new yy.For($$[$0-1], $$[$0]);
+case 151:this.$ = new yy.For($$[$0-1], $$[$0]);
break;
-case 146:this.$ = new yy.For($$[$0], $$[$0-1]);
+case 152:this.$ = new yy.For($$[$0], $$[$0-1]);
break;
-case 147:this.$ = {
+case 153:this.$ = {
source: new yy.Value($$[$0])
};
break;
-case 148:this.$ = (function () {
+case 154:this.$ = (function () {
$$[$0].own = $$[$0-1].own;
$$[$0].name = $$[$0-1][0];
$$[$0].index = $$[$0-1][1];
return $$[$0];
}());
break;
-case 149:this.$ = $$[$0];
+case 155:this.$ = $$[$0];
break;
-case 150:this.$ = (function () {
+case 156:this.$ = (function () {
$$[$0].own = true;
return $$[$0];
}());
break;
-case 151:this.$ = $$[$0];
+case 157:this.$ = $$[$0];
break;
-case 152:this.$ = new yy.Value($$[$0]);
+case 158:this.$ = $$[$0];
break;
-case 153:this.$ = new yy.Value($$[$0]);
+case 159:this.$ = new yy.Value($$[$0]);
break;
-case 154:this.$ = [$$[$0]];
+case 160:this.$ = new yy.Value($$[$0]);
break;
-case 155:this.$ = [$$[$0-2], $$[$0]];
+case 161:this.$ = [$$[$0]];
break;
-case 156:this.$ = {
+case 162:this.$ = [$$[$0-2], $$[$0]];
+break;
+case 163:this.$ = {
source: $$[$0]
};
break;
-case 157:this.$ = {
+case 164:this.$ = {
source: $$[$0],
object: true
};
break;
-case 158:this.$ = {
+case 165:this.$ = {
source: $$[$0-2],
guard: $$[$0]
};
break;
-case 159:this.$ = {
+case 166:this.$ = {
source: $$[$0-2],
guard: $$[$0],
object: true
};
break;
-case 160:this.$ = {
+case 167:this.$ = {
source: $$[$0-2],
step: $$[$0]
};
break;
-case 161:this.$ = {
+case 168:this.$ = {
source: $$[$0-4],
guard: $$[$0-2],
step: $$[$0]
};
break;
-case 162:this.$ = {
+case 169:this.$ = {
source: $$[$0-4],
step: $$[$0-2],
guard: $$[$0]
};
break;
-case 163:this.$ = new yy.Switch($$[$0-3], $$[$0-1]);
+case 170:this.$ = new yy.Switch($$[$0-3], $$[$0-1]);
break;
-case 164:this.$ = new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]);
+case 171:this.$ = new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]);
break;
-case 165:this.$ = new yy.Switch(null, $$[$0-1]);
+case 172:this.$ = new yy.Switch(null, $$[$0-1]);
break;
-case 166:this.$ = new yy.Switch(null, $$[$0-3], $$[$0-1]);
+case 173:this.$ = new yy.Switch(null, $$[$0-3], $$[$0-1]);
break;
-case 167:this.$ = $$[$0];
+case 174:this.$ = $$[$0];
break;
-case 168:this.$ = $$[$0-1].concat($$[$0]);
+case 175:this.$ = $$[$0-1].concat($$[$0]);
break;
-case 169:this.$ = [[$$[$0-1], $$[$0]]];
+case 176:this.$ = [[$$[$0-1], $$[$0]]];
break;
-case 170:this.$ = [[$$[$0-2], $$[$0-1]]];
+case 177:this.$ = [[$$[$0-2], $$[$0-1]]];
break;
-case 171:this.$ = new yy.If($$[$0-1], $$[$0], {
+case 178:this.$ = new yy.If($$[$0-1], $$[$0], {
type: $$[$0-2]
});
break;
-case 172:this.$ = $$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], {
+case 179:this.$ = $$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], {
type: $$[$0-2]
}));
break;
-case 173:this.$ = $$[$0];
+case 180:this.$ = $$[$0];
break;
-case 174:this.$ = $$[$0-2].addElse($$[$0]);
+case 181:this.$ = $$[$0-2].addElse($$[$0]);
break;
-case 175:this.$ = new yy.If($$[$0], yy.Block.wrap([$$[$0-2]]), {
+case 182:this.$ = new yy.If($$[$0], yy.Block.wrap([$$[$0-2]]), {
type: $$[$0-1],
statement: true
});
break;
-case 176:this.$ = new yy.If($$[$0], yy.Block.wrap([$$[$0-2]]), {
+case 183:this.$ = new yy.If($$[$0], yy.Block.wrap([$$[$0-2]]), {
type: $$[$0-1],
statement: true
});
break;
-case 177:this.$ = new yy.Op($$[$0-1], $$[$0]);
+case 184:this.$ = new yy.Op($$[$0-1], $$[$0]);
break;
-case 178:this.$ = new yy.Op('-', $$[$0]);
+case 185:this.$ = new yy.Op('-', $$[$0]);
break;
-case 179:this.$ = new yy.Op('+', $$[$0]);
+case 186:this.$ = new yy.Op('+', $$[$0]);
break;
-case 180:this.$ = new yy.Op('--', $$[$0]);
+case 187:this.$ = new yy.Op('--', $$[$0]);
break;
-case 181:this.$ = new yy.Op('++', $$[$0]);
+case 188:this.$ = new yy.Op('++', $$[$0]);
break;
-case 182:this.$ = new yy.Op('--', $$[$0-1], null, true);
+case 189:this.$ = new yy.Op('--', $$[$0-1], null, true);
break;
-case 183:this.$ = new yy.Op('++', $$[$0-1], null, true);
+case 190:this.$ = new yy.Op('++', $$[$0-1], null, true);
break;
-case 184:this.$ = new yy.Existence($$[$0-1]);
+case 191:this.$ = new yy.Existence($$[$0-1]);
break;
-case 185:this.$ = new yy.Op('+', $$[$0-2], $$[$0]);
+case 192:this.$ = new yy.Op('+', $$[$0-2], $$[$0]);
break;
-case 186:this.$ = new yy.Op('-', $$[$0-2], $$[$0]);
+case 193:this.$ = new yy.Op('-', $$[$0-2], $$[$0]);
break;
-case 187:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+case 194:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
break;
-case 188:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+case 195:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
break;
-case 189:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+case 196:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
break;
-case 190:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+case 197:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
break;
-case 191:this.$ = (function () {
+case 198:this.$ = (function () {
if ($$[$0-1].charAt(0) === '!') {
return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert();
} else {
@@ -4408,16 +3706,16 @@ case 191:this.$ = (function () {
}
}());
break;
-case 192:this.$ = new yy.Assign($$[$0-2], $$[$0], $$[$0-1]);
+case 199:this.$ = new yy.Assign($$[$0-2], $$[$0], $$[$0-1]);
break;
-case 193:this.$ = new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]);
+case 200:this.$ = new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]);
break;
-case 194:this.$ = new yy.Extends($$[$0-2], $$[$0]);
+case 201:this.$ = new yy.Extends($$[$0-2], $$[$0]);
break;
}
},
-table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,5],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[3]},{1:[2,2],6:[1,71]},{6:[1,72]},{1:[2,4],6:[2,4],26:[2,4],99:[2,4]},{4:74,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[1,73],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,7],6:[2,7],26:[2,7],99:[2,7],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,8],6:[2,8],26:[2,8],99:[2,8],100:87,101:[1,62],103:[1,63],106:88,107:[1,65],108:66,123:[1,86]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],46:[2,13],51:[2,13],54:[2,13],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,13],70:[1,97],71:[1,98],75:[2,13],78:89,81:[1,91],82:[2,102],83:[2,13],88:[2,13],90:[2,13],99:[2,13],101:[2,13],102:[2,13],103:[2,13],107:[2,13],115:[2,13],123:[2,13],125:[2,13],126:[2,13],129:[2,13],130:[2,13],131:[2,13],132:[2,13],133:[2,13],134:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],46:[2,14],51:[2,14],54:[2,14],59:100,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,14],70:[1,97],71:[1,98],75:[2,14],78:99,81:[1,91],82:[2,102],83:[2,14],88:[2,14],90:[2,14],99:[2,14],101:[2,14],102:[2,14],103:[2,14],107:[2,14],115:[2,14],123:[2,14],125:[2,14],126:[2,14],129:[2,14],130:[2,14],131:[2,14],132:[2,14],133:[2,14],134:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],46:[2,15],51:[2,15],54:[2,15],69:[2,15],75:[2,15],83:[2,15],88:[2,15],90:[2,15],99:[2,15],101:[2,15],102:[2,15],103:[2,15],107:[2,15],115:[2,15],123:[2,15],125:[2,15],126:[2,15],129:[2,15],130:[2,15],131:[2,15],132:[2,15],133:[2,15],134:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],46:[2,16],51:[2,16],54:[2,16],69:[2,16],75:[2,16],83:[2,16],88:[2,16],90:[2,16],99:[2,16],101:[2,16],102:[2,16],103:[2,16],107:[2,16],115:[2,16],123:[2,16],125:[2,16],126:[2,16],129:[2,16],130:[2,16],131:[2,16],132:[2,16],133:[2,16],134:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],46:[2,17],51:[2,17],54:[2,17],69:[2,17],75:[2,17],83:[2,17],88:[2,17],90:[2,17],99:[2,17],101:[2,17],102:[2,17],103:[2,17],107:[2,17],115:[2,17],123:[2,17],125:[2,17],126:[2,17],129:[2,17],130:[2,17],131:[2,17],132:[2,17],133:[2,17],134:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],46:[2,18],51:[2,18],54:[2,18],69:[2,18],75:[2,18],83:[2,18],88:[2,18],90:[2,18],99:[2,18],101:[2,18],102:[2,18],103:[2,18],107:[2,18],115:[2,18],123:[2,18],125:[2,18],126:[2,18],129:[2,18],130:[2,18],131:[2,18],132:[2,18],133:[2,18],134:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],46:[2,19],51:[2,19],54:[2,19],69:[2,19],75:[2,19],83:[2,19],88:[2,19],90:[2,19],99:[2,19],101:[2,19],102:[2,19],103:[2,19],107:[2,19],115:[2,19],123:[2,19],125:[2,19],126:[2,19],129:[2,19],130:[2,19],131:[2,19],132:[2,19],133:[2,19],134:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],46:[2,20],51:[2,20],54:[2,20],69:[2,20],75:[2,20],83:[2,20],88:[2,20],90:[2,20],99:[2,20],101:[2,20],102:[2,20],103:[2,20],107:[2,20],115:[2,20],123:[2,20],125:[2,20],126:[2,20],129:[2,20],130:[2,20],131:[2,20],132:[2,20],133:[2,20],134:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],46:[2,21],51:[2,21],54:[2,21],69:[2,21],75:[2,21],83:[2,21],88:[2,21],90:[2,21],99:[2,21],101:[2,21],102:[2,21],103:[2,21],107:[2,21],115:[2,21],123:[2,21],125:[2,21],126:[2,21],129:[2,21],130:[2,21],131:[2,21],132:[2,21],133:[2,21],134:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],46:[2,22],51:[2,22],54:[2,22],69:[2,22],75:[2,22],83:[2,22],88:[2,22],90:[2,22],99:[2,22],101:[2,22],102:[2,22],103:[2,22],107:[2,22],115:[2,22],123:[2,22],125:[2,22],126:[2,22],129:[2,22],130:[2,22],131:[2,22],132:[2,22],133:[2,22],134:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],46:[2,23],51:[2,23],54:[2,23],69:[2,23],75:[2,23],83:[2,23],88:[2,23],90:[2,23],99:[2,23],101:[2,23],102:[2,23],103:[2,23],107:[2,23],115:[2,23],123:[2,23],125:[2,23],126:[2,23],129:[2,23],130:[2,23],131:[2,23],132:[2,23],133:[2,23],134:[2,23]},{1:[2,9],6:[2,9],26:[2,9],99:[2,9],101:[2,9],103:[2,9],107:[2,9],123:[2,9]},{1:[2,10],6:[2,10],26:[2,10],99:[2,10],101:[2,10],103:[2,10],107:[2,10],123:[2,10]},{1:[2,11],6:[2,11],26:[2,11],99:[2,11],101:[2,11],103:[2,11],107:[2,11],123:[2,11]},{1:[2,12],6:[2,12],26:[2,12],99:[2,12],101:[2,12],103:[2,12],107:[2,12],123:[2,12]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],37:[1,101],46:[2,69],51:[2,69],54:[2,69],63:[2,69],64:[2,69],65:[2,69],67:[2,69],69:[2,69],70:[2,69],71:[2,69],75:[2,69],81:[2,69],82:[2,69],83:[2,69],88:[2,69],90:[2,69],99:[2,69],101:[2,69],102:[2,69],103:[2,69],107:[2,69],115:[2,69],123:[2,69],125:[2,69],126:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],46:[2,70],51:[2,70],54:[2,70],63:[2,70],64:[2,70],65:[2,70],67:[2,70],69:[2,70],70:[2,70],71:[2,70],75:[2,70],81:[2,70],82:[2,70],83:[2,70],88:[2,70],90:[2,70],99:[2,70],101:[2,70],102:[2,70],103:[2,70],107:[2,70],115:[2,70],123:[2,70],125:[2,70],126:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],46:[2,71],51:[2,71],54:[2,71],63:[2,71],64:[2,71],65:[2,71],67:[2,71],69:[2,71],70:[2,71],71:[2,71],75:[2,71],81:[2,71],82:[2,71],83:[2,71],88:[2,71],90:[2,71],99:[2,71],101:[2,71],102:[2,71],103:[2,71],107:[2,71],115:[2,71],123:[2,71],125:[2,71],126:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],46:[2,72],51:[2,72],54:[2,72],63:[2,72],64:[2,72],65:[2,72],67:[2,72],69:[2,72],70:[2,72],71:[2,72],75:[2,72],81:[2,72],82:[2,72],83:[2,72],88:[2,72],90:[2,72],99:[2,72],101:[2,72],102:[2,72],103:[2,72],107:[2,72],115:[2,72],123:[2,72],125:[2,72],126:[2,72],129:[2,72],130:[2,72],131:[2,72],132:[2,72],133:[2,72],134:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],46:[2,73],51:[2,73],54:[2,73],63:[2,73],64:[2,73],65:[2,73],67:[2,73],69:[2,73],70:[2,73],71:[2,73],75:[2,73],81:[2,73],82:[2,73],83:[2,73],88:[2,73],90:[2,73],99:[2,73],101:[2,73],102:[2,73],103:[2,73],107:[2,73],115:[2,73],123:[2,73],125:[2,73],126:[2,73],129:[2,73],130:[2,73],131:[2,73],132:[2,73],133:[2,73],134:[2,73]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],46:[2,100],51:[2,100],54:[2,100],63:[2,100],64:[2,100],65:[2,100],67:[2,100],69:[2,100],70:[2,100],71:[2,100],75:[2,100],79:102,81:[2,100],82:[1,103],83:[2,100],88:[2,100],90:[2,100],99:[2,100],101:[2,100],102:[2,100],103:[2,100],107:[2,100],115:[2,100],123:[2,100],125:[2,100],126:[2,100],129:[2,100],130:[2,100],131:[2,100],132:[2,100],133:[2,100],134:[2,100]},{27:107,28:[1,70],41:108,45:104,46:[2,51],51:[2,51],52:105,53:106,55:109,56:110,73:[1,67],86:[1,111],87:[1,112]},{5:113,25:[1,5]},{8:114,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:116,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:117,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{14:119,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:118,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{14:119,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:122,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,66],6:[2,66],25:[2,66],26:[2,66],37:[2,66],46:[2,66],51:[2,66],54:[2,66],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,66],70:[2,66],71:[2,66],75:[2,66],77:[1,126],81:[2,66],82:[2,66],83:[2,66],88:[2,66],90:[2,66],99:[2,66],101:[2,66],102:[2,66],103:[2,66],107:[2,66],115:[2,66],123:[2,66],125:[2,66],126:[2,66],127:[1,123],128:[1,124],129:[2,66],130:[2,66],131:[2,66],132:[2,66],133:[2,66],134:[2,66],135:[1,125]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],46:[2,173],51:[2,173],54:[2,173],69:[2,173],75:[2,173],83:[2,173],88:[2,173],90:[2,173],99:[2,173],101:[2,173],102:[2,173],103:[2,173],107:[2,173],115:[2,173],118:[1,127],123:[2,173],125:[2,173],126:[2,173],129:[2,173],130:[2,173],131:[2,173],132:[2,173],133:[2,173],134:[2,173]},{5:128,25:[1,5]},{5:129,25:[1,5]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],46:[2,141],51:[2,141],54:[2,141],69:[2,141],75:[2,141],83:[2,141],88:[2,141],90:[2,141],99:[2,141],101:[2,141],102:[2,141],103:[2,141],107:[2,141],115:[2,141],123:[2,141],125:[2,141],126:[2,141],129:[2,141],130:[2,141],131:[2,141],132:[2,141],133:[2,141],134:[2,141]},{5:130,25:[1,5]},{8:131,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,132],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,90],5:133,6:[2,90],14:119,15:120,25:[1,5],26:[2,90],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,46:[2,90],51:[2,90],54:[2,90],55:47,56:48,58:135,60:25,61:26,62:27,69:[2,90],73:[1,67],75:[2,90],77:[1,134],80:[1,28],83:[2,90],85:[1,55],86:[1,56],87:[1,54],88:[2,90],90:[2,90],98:[1,53],99:[2,90],101:[2,90],102:[2,90],103:[2,90],107:[2,90],115:[2,90],123:[2,90],125:[2,90],126:[2,90],129:[2,90],130:[2,90],131:[2,90],132:[2,90],133:[2,90],134:[2,90]},{1:[2,43],6:[2,43],8:136,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[2,43],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],99:[2,43],100:39,101:[2,43],103:[2,43],104:40,105:[1,64],106:41,107:[2,43],108:66,116:[1,42],121:37,122:[1,61],123:[2,43],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:137,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,44],6:[2,44],25:[2,44],26:[2,44],51:[2,44],75:[2,44],99:[2,44],101:[2,44],103:[2,44],107:[2,44],123:[2,44]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],37:[2,67],46:[2,67],51:[2,67],54:[2,67],63:[2,67],64:[2,67],65:[2,67],67:[2,67],69:[2,67],70:[2,67],71:[2,67],75:[2,67],81:[2,67],82:[2,67],83:[2,67],88:[2,67],90:[2,67],99:[2,67],101:[2,67],102:[2,67],103:[2,67],107:[2,67],115:[2,67],123:[2,67],125:[2,67],126:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],37:[2,68],46:[2,68],51:[2,68],54:[2,68],63:[2,68],64:[2,68],65:[2,68],67:[2,68],69:[2,68],70:[2,68],71:[2,68],75:[2,68],81:[2,68],82:[2,68],83:[2,68],88:[2,68],90:[2,68],99:[2,68],101:[2,68],102:[2,68],103:[2,68],107:[2,68],115:[2,68],123:[2,68],125:[2,68],126:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],46:[2,29],51:[2,29],54:[2,29],63:[2,29],64:[2,29],65:[2,29],67:[2,29],69:[2,29],70:[2,29],71:[2,29],75:[2,29],81:[2,29],82:[2,29],83:[2,29],88:[2,29],90:[2,29],99:[2,29],101:[2,29],102:[2,29],103:[2,29],107:[2,29],115:[2,29],123:[2,29],125:[2,29],126:[2,29],129:[2,29],130:[2,29],131:[2,29],132:[2,29],133:[2,29],134:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],46:[2,30],51:[2,30],54:[2,30],63:[2,30],64:[2,30],65:[2,30],67:[2,30],69:[2,30],70:[2,30],71:[2,30],75:[2,30],81:[2,30],82:[2,30],83:[2,30],88:[2,30],90:[2,30],99:[2,30],101:[2,30],102:[2,30],103:[2,30],107:[2,30],115:[2,30],123:[2,30],125:[2,30],126:[2,30],129:[2,30],130:[2,30],131:[2,30],132:[2,30],133:[2,30],134:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],46:[2,31],51:[2,31],54:[2,31],63:[2,31],64:[2,31],65:[2,31],67:[2,31],69:[2,31],70:[2,31],71:[2,31],75:[2,31],81:[2,31],82:[2,31],83:[2,31],88:[2,31],90:[2,31],99:[2,31],101:[2,31],102:[2,31],103:[2,31],107:[2,31],115:[2,31],123:[2,31],125:[2,31],126:[2,31],129:[2,31],130:[2,31],131:[2,31],132:[2,31],133:[2,31],134:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],46:[2,32],51:[2,32],54:[2,32],63:[2,32],64:[2,32],65:[2,32],67:[2,32],69:[2,32],70:[2,32],71:[2,32],75:[2,32],81:[2,32],82:[2,32],83:[2,32],88:[2,32],90:[2,32],99:[2,32],101:[2,32],102:[2,32],103:[2,32],107:[2,32],115:[2,32],123:[2,32],125:[2,32],126:[2,32],129:[2,32],130:[2,32],131:[2,32],132:[2,32],133:[2,32],134:[2,32]},{4:138,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,139],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:140,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:142,85:[1,55],86:[1,56],87:[1,54],88:[1,141],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],46:[2,106],51:[2,106],54:[2,106],63:[2,106],64:[2,106],65:[2,106],67:[2,106],69:[2,106],70:[2,106],71:[2,106],75:[2,106],81:[2,106],82:[2,106],83:[2,106],88:[2,106],90:[2,106],99:[2,106],101:[2,106],102:[2,106],103:[2,106],107:[2,106],115:[2,106],123:[2,106],125:[2,106],126:[2,106],129:[2,106],130:[2,106],131:[2,106],132:[2,106],133:[2,106],134:[2,106]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],27:146,28:[1,70],46:[2,107],51:[2,107],54:[2,107],63:[2,107],64:[2,107],65:[2,107],67:[2,107],69:[2,107],70:[2,107],71:[2,107],75:[2,107],81:[2,107],82:[2,107],83:[2,107],88:[2,107],90:[2,107],99:[2,107],101:[2,107],102:[2,107],103:[2,107],107:[2,107],115:[2,107],123:[2,107],125:[2,107],126:[2,107],129:[2,107],130:[2,107],131:[2,107],132:[2,107],133:[2,107],134:[2,107]},{25:[2,47]},{25:[2,48]},{1:[2,62],6:[2,62],25:[2,62],26:[2,62],37:[2,62],46:[2,62],51:[2,62],54:[2,62],63:[2,62],64:[2,62],65:[2,62],67:[2,62],69:[2,62],70:[2,62],71:[2,62],75:[2,62],77:[2,62],81:[2,62],82:[2,62],83:[2,62],88:[2,62],90:[2,62],99:[2,62],101:[2,62],102:[2,62],103:[2,62],107:[2,62],115:[2,62],123:[2,62],125:[2,62],126:[2,62],127:[2,62],128:[2,62],129:[2,62],130:[2,62],131:[2,62],132:[2,62],133:[2,62],134:[2,62],135:[2,62]},{1:[2,65],6:[2,65],25:[2,65],26:[2,65],37:[2,65],46:[2,65],51:[2,65],54:[2,65],63:[2,65],64:[2,65],65:[2,65],67:[2,65],69:[2,65],70:[2,65],71:[2,65],75:[2,65],77:[2,65],81:[2,65],82:[2,65],83:[2,65],88:[2,65],90:[2,65],99:[2,65],101:[2,65],102:[2,65],103:[2,65],107:[2,65],115:[2,65],123:[2,65],125:[2,65],126:[2,65],127:[2,65],128:[2,65],129:[2,65],130:[2,65],131:[2,65],132:[2,65],133:[2,65],134:[2,65],135:[2,65]},{8:147,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:148,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:149,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{5:150,8:151,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,5],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{27:156,28:[1,70],55:157,56:158,61:152,73:[1,67],87:[1,54],110:153,111:[1,154],112:155},{109:159,113:[1,160],114:[1,161]},{6:[2,85],12:165,25:[2,85],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:163,39:164,41:168,43:[1,46],51:[2,85],74:162,75:[2,85],86:[1,111]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],40:[2,27],46:[2,27],51:[2,27],54:[2,27],63:[2,27],64:[2,27],65:[2,27],67:[2,27],69:[2,27],70:[2,27],71:[2,27],75:[2,27],81:[2,27],82:[2,27],83:[2,27],88:[2,27],90:[2,27],99:[2,27],101:[2,27],102:[2,27],103:[2,27],107:[2,27],115:[2,27],123:[2,27],125:[2,27],126:[2,27],129:[2,27],130:[2,27],131:[2,27],132:[2,27],133:[2,27],134:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],40:[2,28],46:[2,28],51:[2,28],54:[2,28],63:[2,28],64:[2,28],65:[2,28],67:[2,28],69:[2,28],70:[2,28],71:[2,28],75:[2,28],81:[2,28],82:[2,28],83:[2,28],88:[2,28],90:[2,28],99:[2,28],101:[2,28],102:[2,28],103:[2,28],107:[2,28],115:[2,28],123:[2,28],125:[2,28],126:[2,28],129:[2,28],130:[2,28],131:[2,28],132:[2,28],133:[2,28],134:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],37:[2,26],40:[2,26],46:[2,26],51:[2,26],54:[2,26],63:[2,26],64:[2,26],65:[2,26],67:[2,26],69:[2,26],70:[2,26],71:[2,26],75:[2,26],77:[2,26],81:[2,26],82:[2,26],83:[2,26],88:[2,26],90:[2,26],99:[2,26],101:[2,26],102:[2,26],103:[2,26],107:[2,26],113:[2,26],114:[2,26],115:[2,26],123:[2,26],125:[2,26],126:[2,26],127:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26]},{1:[2,6],6:[2,6],7:169,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[2,6],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],99:[2,6],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],46:[2,24],51:[2,24],54:[2,24],69:[2,24],75:[2,24],83:[2,24],88:[2,24],90:[2,24],95:[2,24],96:[2,24],99:[2,24],101:[2,24],102:[2,24],103:[2,24],107:[2,24],115:[2,24],118:[2,24],120:[2,24],123:[2,24],125:[2,24],126:[2,24],129:[2,24],130:[2,24],131:[2,24],132:[2,24],133:[2,24],134:[2,24]},{6:[1,71],26:[1,170]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],46:[2,184],51:[2,184],54:[2,184],69:[2,184],75:[2,184],83:[2,184],88:[2,184],90:[2,184],99:[2,184],101:[2,184],102:[2,184],103:[2,184],107:[2,184],115:[2,184],123:[2,184],125:[2,184],126:[2,184],129:[2,184],130:[2,184],131:[2,184],132:[2,184],133:[2,184],134:[2,184]},{8:171,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:172,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:173,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:174,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:175,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:176,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:177,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:178,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],46:[2,140],51:[2,140],54:[2,140],69:[2,140],75:[2,140],83:[2,140],88:[2,140],90:[2,140],99:[2,140],101:[2,140],102:[2,140],103:[2,140],107:[2,140],115:[2,140],123:[2,140],125:[2,140],126:[2,140],129:[2,140],130:[2,140],131:[2,140],132:[2,140],133:[2,140],134:[2,140]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],46:[2,145],51:[2,145],54:[2,145],69:[2,145],75:[2,145],83:[2,145],88:[2,145],90:[2,145],99:[2,145],101:[2,145],102:[2,145],103:[2,145],107:[2,145],115:[2,145],123:[2,145],125:[2,145],126:[2,145],129:[2,145],130:[2,145],131:[2,145],132:[2,145],133:[2,145],134:[2,145]},{8:179,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],46:[2,139],51:[2,139],54:[2,139],69:[2,139],75:[2,139],83:[2,139],88:[2,139],90:[2,139],99:[2,139],101:[2,139],102:[2,139],103:[2,139],107:[2,139],115:[2,139],123:[2,139],125:[2,139],126:[2,139],129:[2,139],130:[2,139],131:[2,139],132:[2,139],133:[2,139],134:[2,139]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],46:[2,144],51:[2,144],54:[2,144],69:[2,144],75:[2,144],83:[2,144],88:[2,144],90:[2,144],99:[2,144],101:[2,144],102:[2,144],103:[2,144],107:[2,144],115:[2,144],123:[2,144],125:[2,144],126:[2,144],129:[2,144],130:[2,144],131:[2,144],132:[2,144],133:[2,144],134:[2,144]},{79:180,82:[1,103]},{1:[2,63],6:[2,63],25:[2,63],26:[2,63],37:[2,63],46:[2,63],51:[2,63],54:[2,63],63:[2,63],64:[2,63],65:[2,63],67:[2,63],69:[2,63],70:[2,63],71:[2,63],75:[2,63],77:[2,63],81:[2,63],82:[2,63],83:[2,63],88:[2,63],90:[2,63],99:[2,63],101:[2,63],102:[2,63],103:[2,63],107:[2,63],115:[2,63],123:[2,63],125:[2,63],126:[2,63],127:[2,63],128:[2,63],129:[2,63],130:[2,63],131:[2,63],132:[2,63],133:[2,63],134:[2,63],135:[2,63]},{82:[2,103]},{27:181,28:[1,70]},{27:182,28:[1,70]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],27:183,28:[1,70],37:[2,77],46:[2,77],51:[2,77],54:[2,77],63:[2,77],64:[2,77],65:[2,77],67:[2,77],69:[2,77],70:[2,77],71:[2,77],75:[2,77],77:[2,77],81:[2,77],82:[2,77],83:[2,77],88:[2,77],90:[2,77],99:[2,77],101:[2,77],102:[2,77],103:[2,77],107:[2,77],115:[2,77],123:[2,77],125:[2,77],126:[2,77],127:[2,77],128:[2,77],129:[2,77],130:[2,77],131:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],37:[2,78],46:[2,78],51:[2,78],54:[2,78],63:[2,78],64:[2,78],65:[2,78],67:[2,78],69:[2,78],70:[2,78],71:[2,78],75:[2,78],77:[2,78],81:[2,78],82:[2,78],83:[2,78],88:[2,78],90:[2,78],99:[2,78],101:[2,78],102:[2,78],103:[2,78],107:[2,78],115:[2,78],123:[2,78],125:[2,78],126:[2,78],127:[2,78],128:[2,78],129:[2,78],130:[2,78],131:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78]},{8:185,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],54:[1,189],55:47,56:48,58:36,60:25,61:26,62:27,68:184,72:186,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],89:187,90:[1,188],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{66:190,67:[1,96],70:[1,97],71:[1,98]},{66:191,67:[1,96],70:[1,97],71:[1,98]},{79:192,82:[1,103]},{1:[2,64],6:[2,64],25:[2,64],26:[2,64],37:[2,64],46:[2,64],51:[2,64],54:[2,64],63:[2,64],64:[2,64],65:[2,64],67:[2,64],69:[2,64],70:[2,64],71:[2,64],75:[2,64],77:[2,64],81:[2,64],82:[2,64],83:[2,64],88:[2,64],90:[2,64],99:[2,64],101:[2,64],102:[2,64],103:[2,64],107:[2,64],115:[2,64],123:[2,64],125:[2,64],126:[2,64],127:[2,64],128:[2,64],129:[2,64],130:[2,64],131:[2,64],132:[2,64],133:[2,64],134:[2,64],135:[2,64]},{8:193,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,194],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],46:[2,101],51:[2,101],54:[2,101],63:[2,101],64:[2,101],65:[2,101],67:[2,101],69:[2,101],70:[2,101],71:[2,101],75:[2,101],81:[2,101],82:[2,101],83:[2,101],88:[2,101],90:[2,101],99:[2,101],101:[2,101],102:[2,101],103:[2,101],107:[2,101],115:[2,101],123:[2,101],125:[2,101],126:[2,101],129:[2,101],130:[2,101],131:[2,101],132:[2,101],133:[2,101],134:[2,101]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],83:[1,195],84:196,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{46:[1,198],51:[1,199]},{46:[2,52],51:[2,52]},{37:[1,201],46:[2,54],51:[2,54],54:[1,200]},{37:[2,57],46:[2,57],51:[2,57],54:[2,57]},{37:[2,58],46:[2,58],51:[2,58],54:[2,58]},{37:[2,59],46:[2,59],51:[2,59],54:[2,59]},{37:[2,60],46:[2,60],51:[2,60],54:[2,60]},{27:146,28:[1,70]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:142,85:[1,55],86:[1,56],87:[1,54],88:[1,141],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,46],6:[2,46],25:[2,46],26:[2,46],46:[2,46],51:[2,46],54:[2,46],69:[2,46],75:[2,46],83:[2,46],88:[2,46],90:[2,46],99:[2,46],101:[2,46],102:[2,46],103:[2,46],107:[2,46],115:[2,46],123:[2,46],125:[2,46],126:[2,46],129:[2,46],130:[2,46],131:[2,46],132:[2,46],133:[2,46],134:[2,46]},{1:[2,177],6:[2,177],25:[2,177],26:[2,177],46:[2,177],51:[2,177],54:[2,177],69:[2,177],75:[2,177],83:[2,177],88:[2,177],90:[2,177],99:[2,177],100:84,101:[2,177],102:[2,177],103:[2,177],106:85,107:[2,177],108:66,115:[2,177],123:[2,177],125:[2,177],126:[2,177],129:[1,75],130:[2,177],131:[2,177],132:[2,177],133:[2,177],134:[2,177]},{100:87,101:[1,62],103:[1,63],106:88,107:[1,65],108:66,123:[1,86]},{1:[2,178],6:[2,178],25:[2,178],26:[2,178],46:[2,178],51:[2,178],54:[2,178],69:[2,178],75:[2,178],83:[2,178],88:[2,178],90:[2,178],99:[2,178],100:84,101:[2,178],102:[2,178],103:[2,178],106:85,107:[2,178],108:66,115:[2,178],123:[2,178],125:[2,178],126:[2,178],129:[1,75],130:[2,178],131:[2,178],132:[2,178],133:[2,178],134:[2,178]},{1:[2,179],6:[2,179],25:[2,179],26:[2,179],46:[2,179],51:[2,179],54:[2,179],69:[2,179],75:[2,179],83:[2,179],88:[2,179],90:[2,179],99:[2,179],100:84,101:[2,179],102:[2,179],103:[2,179],106:85,107:[2,179],108:66,115:[2,179],123:[2,179],125:[2,179],126:[2,179],129:[1,75],130:[2,179],131:[2,179],132:[2,179],133:[2,179],134:[2,179]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],46:[2,180],51:[2,180],54:[2,180],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,180],70:[2,66],71:[2,66],75:[2,180],81:[2,66],82:[2,66],83:[2,180],88:[2,180],90:[2,180],99:[2,180],101:[2,180],102:[2,180],103:[2,180],107:[2,180],115:[2,180],123:[2,180],125:[2,180],126:[2,180],129:[2,180],130:[2,180],131:[2,180],132:[2,180],133:[2,180],134:[2,180]},{59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],70:[1,97],71:[1,98],78:89,81:[1,91],82:[2,102]},{59:100,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],70:[1,97],71:[1,98],78:99,81:[1,91],82:[2,102]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],46:[2,69],51:[2,69],54:[2,69],63:[2,69],64:[2,69],65:[2,69],67:[2,69],69:[2,69],70:[2,69],71:[2,69],75:[2,69],81:[2,69],82:[2,69],83:[2,69],88:[2,69],90:[2,69],99:[2,69],101:[2,69],102:[2,69],103:[2,69],107:[2,69],115:[2,69],123:[2,69],125:[2,69],126:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],46:[2,181],51:[2,181],54:[2,181],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,181],70:[2,66],71:[2,66],75:[2,181],81:[2,66],82:[2,66],83:[2,181],88:[2,181],90:[2,181],99:[2,181],101:[2,181],102:[2,181],103:[2,181],107:[2,181],115:[2,181],123:[2,181],125:[2,181],126:[2,181],129:[2,181],130:[2,181],131:[2,181],132:[2,181],133:[2,181],134:[2,181]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],46:[2,182],51:[2,182],54:[2,182],69:[2,182],75:[2,182],83:[2,182],88:[2,182],90:[2,182],99:[2,182],101:[2,182],102:[2,182],103:[2,182],107:[2,182],115:[2,182],123:[2,182],125:[2,182],126:[2,182],129:[2,182],130:[2,182],131:[2,182],132:[2,182],133:[2,182],134:[2,182]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],46:[2,183],51:[2,183],54:[2,183],69:[2,183],75:[2,183],83:[2,183],88:[2,183],90:[2,183],99:[2,183],101:[2,183],102:[2,183],103:[2,183],107:[2,183],115:[2,183],123:[2,183],125:[2,183],126:[2,183],129:[2,183],130:[2,183],131:[2,183],132:[2,183],133:[2,183],134:[2,183]},{8:202,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,203],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:204,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{5:205,25:[1,5],122:[1,206]},{1:[2,126],6:[2,126],25:[2,126],26:[2,126],46:[2,126],51:[2,126],54:[2,126],69:[2,126],75:[2,126],83:[2,126],88:[2,126],90:[2,126],94:207,95:[1,208],96:[1,209],99:[2,126],101:[2,126],102:[2,126],103:[2,126],107:[2,126],115:[2,126],123:[2,126],125:[2,126],126:[2,126],129:[2,126],130:[2,126],131:[2,126],132:[2,126],133:[2,126],134:[2,126]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],46:[2,138],51:[2,138],54:[2,138],69:[2,138],75:[2,138],83:[2,138],88:[2,138],90:[2,138],99:[2,138],101:[2,138],102:[2,138],103:[2,138],107:[2,138],115:[2,138],123:[2,138],125:[2,138],126:[2,138],129:[2,138],130:[2,138],131:[2,138],132:[2,138],133:[2,138],134:[2,138]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],46:[2,146],51:[2,146],54:[2,146],69:[2,146],75:[2,146],83:[2,146],88:[2,146],90:[2,146],99:[2,146],101:[2,146],102:[2,146],103:[2,146],107:[2,146],115:[2,146],123:[2,146],125:[2,146],126:[2,146],129:[2,146],130:[2,146],131:[2,146],132:[2,146],133:[2,146],134:[2,146]},{25:[1,210],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{117:211,119:212,120:[1,213]},{1:[2,91],6:[2,91],25:[2,91],26:[2,91],46:[2,91],51:[2,91],54:[2,91],69:[2,91],75:[2,91],83:[2,91],88:[2,91],90:[2,91],99:[2,91],101:[2,91],102:[2,91],103:[2,91],107:[2,91],115:[2,91],123:[2,91],125:[2,91],126:[2,91],129:[2,91],130:[2,91],131:[2,91],132:[2,91],133:[2,91],134:[2,91]},{14:214,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:215,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,94],5:216,6:[2,94],25:[1,5],26:[2,94],46:[2,94],51:[2,94],54:[2,94],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,94],70:[2,66],71:[2,66],75:[2,94],77:[1,217],81:[2,66],82:[2,66],83:[2,94],88:[2,94],90:[2,94],99:[2,94],101:[2,94],102:[2,94],103:[2,94],107:[2,94],115:[2,94],123:[2,94],125:[2,94],126:[2,94],129:[2,94],130:[2,94],131:[2,94],132:[2,94],133:[2,94],134:[2,94]},{1:[2,42],6:[2,42],26:[2,42],99:[2,42],100:84,101:[2,42],103:[2,42],106:85,107:[2,42],108:66,123:[2,42],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,131],6:[2,131],26:[2,131],99:[2,131],100:84,101:[2,131],103:[2,131],106:85,107:[2,131],108:66,123:[2,131],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,71],99:[1,218]},{4:219,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,122],25:[2,122],51:[2,122],54:[1,221],88:[2,122],89:220,90:[1,188],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],37:[2,109],46:[2,109],51:[2,109],54:[2,109],63:[2,109],64:[2,109],65:[2,109],67:[2,109],69:[2,109],70:[2,109],71:[2,109],75:[2,109],81:[2,109],82:[2,109],83:[2,109],88:[2,109],90:[2,109],99:[2,109],101:[2,109],102:[2,109],103:[2,109],107:[2,109],113:[2,109],114:[2,109],115:[2,109],123:[2,109],125:[2,109],126:[2,109],129:[2,109],130:[2,109],131:[2,109],132:[2,109],133:[2,109],134:[2,109]},{6:[2,49],25:[2,49],50:222,51:[1,223],88:[2,49]},{6:[2,117],25:[2,117],26:[2,117],51:[2,117],83:[2,117],88:[2,117]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:224,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,123],25:[2,123],26:[2,123],51:[2,123],83:[2,123],88:[2,123]},{1:[2,108],6:[2,108],25:[2,108],26:[2,108],37:[2,108],40:[2,108],46:[2,108],51:[2,108],54:[2,108],63:[2,108],64:[2,108],65:[2,108],67:[2,108],69:[2,108],70:[2,108],71:[2,108],75:[2,108],77:[2,108],81:[2,108],82:[2,108],83:[2,108],88:[2,108],90:[2,108],99:[2,108],101:[2,108],102:[2,108],103:[2,108],107:[2,108],115:[2,108],123:[2,108],125:[2,108],126:[2,108],127:[2,108],128:[2,108],129:[2,108],130:[2,108],131:[2,108],132:[2,108],133:[2,108],134:[2,108],135:[2,108]},{5:225,25:[1,5],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],46:[2,134],51:[2,134],54:[2,134],69:[2,134],75:[2,134],83:[2,134],88:[2,134],90:[2,134],99:[2,134],100:84,101:[1,62],102:[1,226],103:[1,63],106:85,107:[1,65],108:66,115:[2,134],123:[2,134],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],46:[2,136],51:[2,136],54:[2,136],69:[2,136],75:[2,136],83:[2,136],88:[2,136],90:[2,136],99:[2,136],100:84,101:[1,62],102:[1,227],103:[1,63],106:85,107:[1,65],108:66,115:[2,136],123:[2,136],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],46:[2,142],51:[2,142],54:[2,142],69:[2,142],75:[2,142],83:[2,142],88:[2,142],90:[2,142],99:[2,142],101:[2,142],102:[2,142],103:[2,142],107:[2,142],115:[2,142],123:[2,142],125:[2,142],126:[2,142],129:[2,142],130:[2,142],131:[2,142],132:[2,142],133:[2,142],134:[2,142]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],46:[2,143],51:[2,143],54:[2,143],69:[2,143],75:[2,143],83:[2,143],88:[2,143],90:[2,143],99:[2,143],100:84,101:[1,62],102:[2,143],103:[1,63],106:85,107:[1,65],108:66,115:[2,143],123:[2,143],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],46:[2,147],51:[2,147],54:[2,147],69:[2,147],75:[2,147],83:[2,147],88:[2,147],90:[2,147],99:[2,147],101:[2,147],102:[2,147],103:[2,147],107:[2,147],115:[2,147],123:[2,147],125:[2,147],126:[2,147],129:[2,147],130:[2,147],131:[2,147],132:[2,147],133:[2,147],134:[2,147]},{113:[2,149],114:[2,149]},{27:156,28:[1,70],55:157,56:158,73:[1,67],87:[1,112],110:228,112:155},{51:[1,229],113:[2,154],114:[2,154]},{51:[2,151],113:[2,151],114:[2,151]},{51:[2,152],113:[2,152],114:[2,152]},{51:[2,153],113:[2,153],114:[2,153]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],46:[2,148],51:[2,148],54:[2,148],69:[2,148],75:[2,148],83:[2,148],88:[2,148],90:[2,148],99:[2,148],101:[2,148],102:[2,148],103:[2,148],107:[2,148],115:[2,148],123:[2,148],125:[2,148],126:[2,148],129:[2,148],130:[2,148],131:[2,148],132:[2,148],133:[2,148],134:[2,148]},{8:230,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:231,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,49],25:[2,49],50:232,51:[1,233],75:[2,49]},{6:[2,86],25:[2,86],26:[2,86],51:[2,86],75:[2,86]},{6:[2,35],25:[2,35],26:[2,35],40:[1,234],51:[2,35],75:[2,35]},{6:[2,38],25:[2,38],26:[2,38],51:[2,38],75:[2,38]},{6:[2,39],25:[2,39],26:[2,39],40:[2,39],51:[2,39],75:[2,39]},{6:[2,40],25:[2,40],26:[2,40],40:[2,40],51:[2,40],75:[2,40]},{6:[2,41],25:[2,41],26:[2,41],40:[2,41],51:[2,41],75:[2,41]},{1:[2,5],6:[2,5],26:[2,5],99:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],46:[2,25],51:[2,25],54:[2,25],69:[2,25],75:[2,25],83:[2,25],88:[2,25],90:[2,25],95:[2,25],96:[2,25],99:[2,25],101:[2,25],102:[2,25],103:[2,25],107:[2,25],115:[2,25],118:[2,25],120:[2,25],123:[2,25],125:[2,25],126:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],46:[2,185],51:[2,185],54:[2,185],69:[2,185],75:[2,185],83:[2,185],88:[2,185],90:[2,185],99:[2,185],100:84,101:[2,185],102:[2,185],103:[2,185],106:85,107:[2,185],108:66,115:[2,185],123:[2,185],125:[2,185],126:[2,185],129:[1,75],130:[1,78],131:[2,185],132:[2,185],133:[2,185],134:[2,185]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],46:[2,186],51:[2,186],54:[2,186],69:[2,186],75:[2,186],83:[2,186],88:[2,186],90:[2,186],99:[2,186],100:84,101:[2,186],102:[2,186],103:[2,186],106:85,107:[2,186],108:66,115:[2,186],123:[2,186],125:[2,186],126:[2,186],129:[1,75],130:[1,78],131:[2,186],132:[2,186],133:[2,186],134:[2,186]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],46:[2,187],51:[2,187],54:[2,187],69:[2,187],75:[2,187],83:[2,187],88:[2,187],90:[2,187],99:[2,187],100:84,101:[2,187],102:[2,187],103:[2,187],106:85,107:[2,187],108:66,115:[2,187],123:[2,187],125:[2,187],126:[2,187],129:[1,75],130:[2,187],131:[2,187],132:[2,187],133:[2,187],134:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],46:[2,188],51:[2,188],54:[2,188],69:[2,188],75:[2,188],83:[2,188],88:[2,188],90:[2,188],99:[2,188],100:84,101:[2,188],102:[2,188],103:[2,188],106:85,107:[2,188],108:66,115:[2,188],123:[2,188],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[2,188],132:[2,188],133:[2,188],134:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],46:[2,189],51:[2,189],54:[2,189],69:[2,189],75:[2,189],83:[2,189],88:[2,189],90:[2,189],99:[2,189],100:84,101:[2,189],102:[2,189],103:[2,189],106:85,107:[2,189],108:66,115:[2,189],123:[2,189],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[2,189],133:[2,189],134:[1,82]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],46:[2,190],51:[2,190],54:[2,190],69:[2,190],75:[2,190],83:[2,190],88:[2,190],90:[2,190],99:[2,190],100:84,101:[2,190],102:[2,190],103:[2,190],106:85,107:[2,190],108:66,115:[2,190],123:[2,190],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[2,190],134:[1,82]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],46:[2,191],51:[2,191],54:[2,191],69:[2,191],75:[2,191],83:[2,191],88:[2,191],90:[2,191],99:[2,191],100:84,101:[2,191],102:[2,191],103:[2,191],106:85,107:[2,191],108:66,115:[2,191],123:[2,191],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[2,191],133:[2,191],134:[2,191]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],46:[2,176],51:[2,176],54:[2,176],69:[2,176],75:[2,176],83:[2,176],88:[2,176],90:[2,176],99:[2,176],100:84,101:[1,62],102:[2,176],103:[1,63],106:85,107:[1,65],108:66,115:[2,176],123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],46:[2,175],51:[2,175],54:[2,175],69:[2,175],75:[2,175],83:[2,175],88:[2,175],90:[2,175],99:[2,175],100:84,101:[1,62],102:[2,175],103:[1,63],106:85,107:[1,65],108:66,115:[2,175],123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],46:[2,98],51:[2,98],54:[2,98],63:[2,98],64:[2,98],65:[2,98],67:[2,98],69:[2,98],70:[2,98],71:[2,98],75:[2,98],81:[2,98],82:[2,98],83:[2,98],88:[2,98],90:[2,98],99:[2,98],101:[2,98],102:[2,98],103:[2,98],107:[2,98],115:[2,98],123:[2,98],125:[2,98],126:[2,98],129:[2,98],130:[2,98],131:[2,98],132:[2,98],133:[2,98],134:[2,98]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],37:[2,74],46:[2,74],51:[2,74],54:[2,74],63:[2,74],64:[2,74],65:[2,74],67:[2,74],69:[2,74],70:[2,74],71:[2,74],75:[2,74],77:[2,74],81:[2,74],82:[2,74],83:[2,74],88:[2,74],90:[2,74],99:[2,74],101:[2,74],102:[2,74],103:[2,74],107:[2,74],115:[2,74],123:[2,74],125:[2,74],126:[2,74],127:[2,74],128:[2,74],129:[2,74],130:[2,74],131:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],37:[2,75],46:[2,75],51:[2,75],54:[2,75],63:[2,75],64:[2,75],65:[2,75],67:[2,75],69:[2,75],70:[2,75],71:[2,75],75:[2,75],77:[2,75],81:[2,75],82:[2,75],83:[2,75],88:[2,75],90:[2,75],99:[2,75],101:[2,75],102:[2,75],103:[2,75],107:[2,75],115:[2,75],123:[2,75],125:[2,75],126:[2,75],127:[2,75],128:[2,75],129:[2,75],130:[2,75],131:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],37:[2,76],46:[2,76],51:[2,76],54:[2,76],63:[2,76],64:[2,76],65:[2,76],67:[2,76],69:[2,76],70:[2,76],71:[2,76],75:[2,76],77:[2,76],81:[2,76],82:[2,76],83:[2,76],88:[2,76],90:[2,76],99:[2,76],101:[2,76],102:[2,76],103:[2,76],107:[2,76],115:[2,76],123:[2,76],125:[2,76],126:[2,76],127:[2,76],128:[2,76],129:[2,76],130:[2,76],131:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76]},{69:[1,235]},{54:[1,189],69:[2,82],89:236,90:[1,188],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{69:[2,83]},{8:237,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{13:[2,111],28:[2,111],30:[2,111],31:[2,111],33:[2,111],34:[2,111],35:[2,111],42:[2,111],43:[2,111],44:[2,111],48:[2,111],49:[2,111],69:[2,111],73:[2,111],76:[2,111],80:[2,111],85:[2,111],86:[2,111],87:[2,111],93:[2,111],97:[2,111],98:[2,111],101:[2,111],103:[2,111],105:[2,111],107:[2,111],116:[2,111],122:[2,111],124:[2,111],125:[2,111],126:[2,111],127:[2,111],128:[2,111]},{13:[2,112],28:[2,112],30:[2,112],31:[2,112],33:[2,112],34:[2,112],35:[2,112],42:[2,112],43:[2,112],44:[2,112],48:[2,112],49:[2,112],69:[2,112],73:[2,112],76:[2,112],80:[2,112],85:[2,112],86:[2,112],87:[2,112],93:[2,112],97:[2,112],98:[2,112],101:[2,112],103:[2,112],105:[2,112],107:[2,112],116:[2,112],122:[2,112],124:[2,112],125:[2,112],126:[2,112],127:[2,112],128:[2,112]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],37:[2,80],46:[2,80],51:[2,80],54:[2,80],63:[2,80],64:[2,80],65:[2,80],67:[2,80],69:[2,80],70:[2,80],71:[2,80],75:[2,80],77:[2,80],81:[2,80],82:[2,80],83:[2,80],88:[2,80],90:[2,80],99:[2,80],101:[2,80],102:[2,80],103:[2,80],107:[2,80],115:[2,80],123:[2,80],125:[2,80],126:[2,80],127:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],37:[2,81],46:[2,81],51:[2,81],54:[2,81],63:[2,81],64:[2,81],65:[2,81],67:[2,81],69:[2,81],70:[2,81],71:[2,81],75:[2,81],77:[2,81],81:[2,81],82:[2,81],83:[2,81],88:[2,81],90:[2,81],99:[2,81],101:[2,81],102:[2,81],103:[2,81],107:[2,81],115:[2,81],123:[2,81],125:[2,81],126:[2,81],127:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],46:[2,99],51:[2,99],54:[2,99],63:[2,99],64:[2,99],65:[2,99],67:[2,99],69:[2,99],70:[2,99],71:[2,99],75:[2,99],81:[2,99],82:[2,99],83:[2,99],88:[2,99],90:[2,99],99:[2,99],101:[2,99],102:[2,99],103:[2,99],107:[2,99],115:[2,99],123:[2,99],125:[2,99],126:[2,99],129:[2,99],130:[2,99],131:[2,99],132:[2,99],133:[2,99],134:[2,99]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],46:[2,33],51:[2,33],54:[2,33],69:[2,33],75:[2,33],83:[2,33],88:[2,33],90:[2,33],99:[2,33],100:84,101:[2,33],102:[2,33],103:[2,33],106:85,107:[2,33],108:66,115:[2,33],123:[2,33],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:238,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],46:[2,104],51:[2,104],54:[2,104],63:[2,104],64:[2,104],65:[2,104],67:[2,104],69:[2,104],70:[2,104],71:[2,104],75:[2,104],81:[2,104],82:[2,104],83:[2,104],88:[2,104],90:[2,104],99:[2,104],101:[2,104],102:[2,104],103:[2,104],107:[2,104],115:[2,104],123:[2,104],125:[2,104],126:[2,104],129:[2,104],130:[2,104],131:[2,104],132:[2,104],133:[2,104],134:[2,104]},{6:[2,49],25:[2,49],50:239,51:[1,223],83:[2,49]},{6:[2,122],25:[2,122],26:[2,122],51:[2,122],54:[1,240],83:[2,122],88:[2,122],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{47:241,48:[1,57],49:[1,58]},{27:107,28:[1,70],41:108,52:242,53:106,55:109,56:110,73:[1,67],86:[1,111],87:[1,112]},{46:[2,55],51:[2,55]},{8:243,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],46:[2,192],51:[2,192],54:[2,192],69:[2,192],75:[2,192],83:[2,192],88:[2,192],90:[2,192],99:[2,192],100:84,101:[2,192],102:[2,192],103:[2,192],106:85,107:[2,192],108:66,115:[2,192],123:[2,192],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:244,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],46:[2,194],51:[2,194],54:[2,194],69:[2,194],75:[2,194],83:[2,194],88:[2,194],90:[2,194],99:[2,194],100:84,101:[2,194],102:[2,194],103:[2,194],106:85,107:[2,194],108:66,115:[2,194],123:[2,194],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],46:[2,174],51:[2,174],54:[2,174],69:[2,174],75:[2,174],83:[2,174],88:[2,174],90:[2,174],99:[2,174],101:[2,174],102:[2,174],103:[2,174],107:[2,174],115:[2,174],123:[2,174],125:[2,174],126:[2,174],129:[2,174],130:[2,174],131:[2,174],132:[2,174],133:[2,174],134:[2,174]},{8:245,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,127],6:[2,127],25:[2,127],26:[2,127],46:[2,127],51:[2,127],54:[2,127],69:[2,127],75:[2,127],83:[2,127],88:[2,127],90:[2,127],95:[1,246],99:[2,127],101:[2,127],102:[2,127],103:[2,127],107:[2,127],115:[2,127],123:[2,127],125:[2,127],126:[2,127],129:[2,127],130:[2,127],131:[2,127],132:[2,127],133:[2,127],134:[2,127]},{5:247,25:[1,5]},{27:248,28:[1,70]},{117:249,119:212,120:[1,213]},{26:[1,250],118:[1,251],119:252,120:[1,213]},{26:[2,167],118:[2,167],120:[2,167]},{8:254,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],92:253,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,92],5:255,6:[2,92],25:[1,5],26:[2,92],46:[2,92],51:[2,92],54:[2,92],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,92],70:[1,97],71:[1,98],75:[2,92],78:89,81:[1,91],82:[2,102],83:[2,92],88:[2,92],90:[2,92],99:[2,92],101:[2,92],102:[2,92],103:[2,92],107:[2,92],115:[2,92],123:[2,92],125:[2,92],126:[2,92],129:[2,92],130:[2,92],131:[2,92],132:[2,92],133:[2,92],134:[2,92]},{1:[2,66],6:[2,66],25:[2,66],26:[2,66],46:[2,66],51:[2,66],54:[2,66],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,66],70:[2,66],71:[2,66],75:[2,66],81:[2,66],82:[2,66],83:[2,66],88:[2,66],90:[2,66],99:[2,66],101:[2,66],102:[2,66],103:[2,66],107:[2,66],115:[2,66],123:[2,66],125:[2,66],126:[2,66],129:[2,66],130:[2,66],131:[2,66],132:[2,66],133:[2,66],134:[2,66]},{1:[2,95],6:[2,95],25:[2,95],26:[2,95],46:[2,95],51:[2,95],54:[2,95],69:[2,95],75:[2,95],83:[2,95],88:[2,95],90:[2,95],99:[2,95],101:[2,95],102:[2,95],103:[2,95],107:[2,95],115:[2,95],123:[2,95],125:[2,95],126:[2,95],129:[2,95],130:[2,95],131:[2,95],132:[2,95],133:[2,95],134:[2,95]},{14:256,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:215,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],46:[2,132],51:[2,132],54:[2,132],63:[2,132],64:[2,132],65:[2,132],67:[2,132],69:[2,132],70:[2,132],71:[2,132],75:[2,132],81:[2,132],82:[2,132],83:[2,132],88:[2,132],90:[2,132],99:[2,132],101:[2,132],102:[2,132],103:[2,132],107:[2,132],115:[2,132],123:[2,132],125:[2,132],126:[2,132],129:[2,132],130:[2,132],131:[2,132],132:[2,132],133:[2,132],134:[2,132]},{6:[1,71],26:[1,257]},{8:258,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,61],13:[2,112],25:[2,61],28:[2,112],30:[2,112],31:[2,112],33:[2,112],34:[2,112],35:[2,112],42:[2,112],43:[2,112],44:[2,112],48:[2,112],49:[2,112],51:[2,61],73:[2,112],76:[2,112],80:[2,112],85:[2,112],86:[2,112],87:[2,112],88:[2,61],93:[2,112],97:[2,112],98:[2,112],101:[2,112],103:[2,112],105:[2,112],107:[2,112],116:[2,112],122:[2,112],124:[2,112],125:[2,112],126:[2,112],127:[2,112],128:[2,112]},{6:[1,260],25:[1,261],88:[1,259]},{6:[2,50],8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[2,50],26:[2,50],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],83:[2,50],85:[1,55],86:[1,56],87:[1,54],88:[2,50],91:262,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,49],25:[2,49],26:[2,49],50:263,51:[1,223]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],46:[2,171],51:[2,171],54:[2,171],69:[2,171],75:[2,171],83:[2,171],88:[2,171],90:[2,171],99:[2,171],101:[2,171],102:[2,171],103:[2,171],107:[2,171],115:[2,171],118:[2,171],123:[2,171],125:[2,171],126:[2,171],129:[2,171],130:[2,171],131:[2,171],132:[2,171],133:[2,171],134:[2,171]},{8:264,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:265,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{113:[2,150],114:[2,150]},{27:156,28:[1,70],55:157,56:158,73:[1,67],87:[1,112],112:266},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],46:[2,156],51:[2,156],54:[2,156],69:[2,156],75:[2,156],83:[2,156],88:[2,156],90:[2,156],99:[2,156],100:84,101:[2,156],102:[1,267],103:[2,156],106:85,107:[2,156],108:66,115:[1,268],123:[2,156],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],46:[2,157],51:[2,157],54:[2,157],69:[2,157],75:[2,157],83:[2,157],88:[2,157],90:[2,157],99:[2,157],100:84,101:[2,157],102:[1,269],103:[2,157],106:85,107:[2,157],108:66,115:[2,157],123:[2,157],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,271],25:[1,272],75:[1,270]},{6:[2,50],12:165,25:[2,50],26:[2,50],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:273,39:164,41:168,43:[1,46],75:[2,50],86:[1,111]},{8:274,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,275],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],37:[2,79],46:[2,79],51:[2,79],54:[2,79],63:[2,79],64:[2,79],65:[2,79],67:[2,79],69:[2,79],70:[2,79],71:[2,79],75:[2,79],77:[2,79],81:[2,79],82:[2,79],83:[2,79],88:[2,79],90:[2,79],99:[2,79],101:[2,79],102:[2,79],103:[2,79],107:[2,79],115:[2,79],123:[2,79],125:[2,79],126:[2,79],127:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79]},{8:276,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,69:[2,115],73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{69:[2,116],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,277],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,260],25:[1,261],83:[1,278]},{6:[2,61],25:[2,61],26:[2,61],51:[2,61],83:[2,61],88:[2,61]},{5:279,25:[1,5]},{46:[2,53],51:[2,53]},{46:[2,56],51:[2,56],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,280],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{5:281,25:[1,5],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{5:282,25:[1,5]},{1:[2,128],6:[2,128],25:[2,128],26:[2,128],46:[2,128],51:[2,128],54:[2,128],69:[2,128],75:[2,128],83:[2,128],88:[2,128],90:[2,128],99:[2,128],101:[2,128],102:[2,128],103:[2,128],107:[2,128],115:[2,128],123:[2,128],125:[2,128],126:[2,128],129:[2,128],130:[2,128],131:[2,128],132:[2,128],133:[2,128],134:[2,128]},{5:283,25:[1,5]},{26:[1,284],118:[1,285],119:252,120:[1,213]},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],46:[2,165],51:[2,165],54:[2,165],69:[2,165],75:[2,165],83:[2,165],88:[2,165],90:[2,165],99:[2,165],101:[2,165],102:[2,165],103:[2,165],107:[2,165],115:[2,165],123:[2,165],125:[2,165],126:[2,165],129:[2,165],130:[2,165],131:[2,165],132:[2,165],133:[2,165],134:[2,165]},{5:286,25:[1,5]},{26:[2,168],118:[2,168],120:[2,168]},{5:287,25:[1,5],51:[1,288]},{25:[2,124],51:[2,124],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,93],6:[2,93],25:[2,93],26:[2,93],46:[2,93],51:[2,93],54:[2,93],69:[2,93],75:[2,93],83:[2,93],88:[2,93],90:[2,93],99:[2,93],101:[2,93],102:[2,93],103:[2,93],107:[2,93],115:[2,93],123:[2,93],125:[2,93],126:[2,93],129:[2,93],130:[2,93],131:[2,93],132:[2,93],133:[2,93],134:[2,93]},{1:[2,96],5:289,6:[2,96],25:[1,5],26:[2,96],46:[2,96],51:[2,96],54:[2,96],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,96],70:[1,97],71:[1,98],75:[2,96],78:89,81:[1,91],82:[2,102],83:[2,96],88:[2,96],90:[2,96],99:[2,96],101:[2,96],102:[2,96],103:[2,96],107:[2,96],115:[2,96],123:[2,96],125:[2,96],126:[2,96],129:[2,96],130:[2,96],131:[2,96],132:[2,96],133:[2,96],134:[2,96]},{99:[1,290]},{88:[1,291],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],37:[2,110],46:[2,110],51:[2,110],54:[2,110],63:[2,110],64:[2,110],65:[2,110],67:[2,110],69:[2,110],70:[2,110],71:[2,110],75:[2,110],81:[2,110],82:[2,110],83:[2,110],88:[2,110],90:[2,110],99:[2,110],101:[2,110],102:[2,110],103:[2,110],107:[2,110],113:[2,110],114:[2,110],115:[2,110],123:[2,110],125:[2,110],126:[2,110],129:[2,110],130:[2,110],131:[2,110],132:[2,110],133:[2,110],134:[2,110]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],91:292,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:293,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,118],25:[2,118],26:[2,118],51:[2,118],83:[2,118],88:[2,118]},{6:[1,260],25:[1,261],26:[1,294]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],46:[2,135],51:[2,135],54:[2,135],69:[2,135],75:[2,135],83:[2,135],88:[2,135],90:[2,135],99:[2,135],100:84,101:[1,62],102:[2,135],103:[1,63],106:85,107:[1,65],108:66,115:[2,135],123:[2,135],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],46:[2,137],51:[2,137],54:[2,137],69:[2,137],75:[2,137],83:[2,137],88:[2,137],90:[2,137],99:[2,137],100:84,101:[1,62],102:[2,137],103:[1,63],106:85,107:[1,65],108:66,115:[2,137],123:[2,137],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{113:[2,155],114:[2,155]},{8:295,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:296,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:297,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],37:[2,84],46:[2,84],51:[2,84],54:[2,84],63:[2,84],64:[2,84],65:[2,84],67:[2,84],69:[2,84],70:[2,84],71:[2,84],75:[2,84],81:[2,84],82:[2,84],83:[2,84],88:[2,84],90:[2,84],99:[2,84],101:[2,84],102:[2,84],103:[2,84],107:[2,84],113:[2,84],114:[2,84],115:[2,84],123:[2,84],125:[2,84],126:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84]},{12:165,27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:298,39:164,41:168,43:[1,46],86:[1,111]},{6:[2,85],12:165,25:[2,85],26:[2,85],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:163,39:164,41:168,43:[1,46],51:[2,85],74:299,86:[1,111]},{6:[2,87],25:[2,87],26:[2,87],51:[2,87],75:[2,87]},{6:[2,36],25:[2,36],26:[2,36],51:[2,36],75:[2,36],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:300,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{69:[2,114],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],46:[2,34],51:[2,34],54:[2,34],69:[2,34],75:[2,34],83:[2,34],88:[2,34],90:[2,34],99:[2,34],101:[2,34],102:[2,34],103:[2,34],107:[2,34],115:[2,34],123:[2,34],125:[2,34],126:[2,34],129:[2,34],130:[2,34],131:[2,34],132:[2,34],133:[2,34],134:[2,34]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],46:[2,105],51:[2,105],54:[2,105],63:[2,105],64:[2,105],65:[2,105],67:[2,105],69:[2,105],70:[2,105],71:[2,105],75:[2,105],81:[2,105],82:[2,105],83:[2,105],88:[2,105],90:[2,105],99:[2,105],101:[2,105],102:[2,105],103:[2,105],107:[2,105],115:[2,105],123:[2,105],125:[2,105],126:[2,105],129:[2,105],130:[2,105],131:[2,105],132:[2,105],133:[2,105],134:[2,105]},{1:[2,45],6:[2,45],25:[2,45],26:[2,45],46:[2,45],51:[2,45],54:[2,45],69:[2,45],75:[2,45],83:[2,45],88:[2,45],90:[2,45],99:[2,45],101:[2,45],102:[2,45],103:[2,45],107:[2,45],115:[2,45],123:[2,45],125:[2,45],126:[2,45],129:[2,45],130:[2,45],131:[2,45],132:[2,45],133:[2,45],134:[2,45]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],46:[2,193],51:[2,193],54:[2,193],69:[2,193],75:[2,193],83:[2,193],88:[2,193],90:[2,193],99:[2,193],101:[2,193],102:[2,193],103:[2,193],107:[2,193],115:[2,193],123:[2,193],125:[2,193],126:[2,193],129:[2,193],130:[2,193],131:[2,193],132:[2,193],133:[2,193],134:[2,193]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],46:[2,172],51:[2,172],54:[2,172],69:[2,172],75:[2,172],83:[2,172],88:[2,172],90:[2,172],99:[2,172],101:[2,172],102:[2,172],103:[2,172],107:[2,172],115:[2,172],118:[2,172],123:[2,172],125:[2,172],126:[2,172],129:[2,172],130:[2,172],131:[2,172],132:[2,172],133:[2,172],134:[2,172]},{1:[2,129],6:[2,129],25:[2,129],26:[2,129],46:[2,129],51:[2,129],54:[2,129],69:[2,129],75:[2,129],83:[2,129],88:[2,129],90:[2,129],99:[2,129],101:[2,129],102:[2,129],103:[2,129],107:[2,129],115:[2,129],123:[2,129],125:[2,129],126:[2,129],129:[2,129],130:[2,129],131:[2,129],132:[2,129],133:[2,129],134:[2,129]},{1:[2,130],6:[2,130],25:[2,130],26:[2,130],46:[2,130],51:[2,130],54:[2,130],69:[2,130],75:[2,130],83:[2,130],88:[2,130],90:[2,130],95:[2,130],99:[2,130],101:[2,130],102:[2,130],103:[2,130],107:[2,130],115:[2,130],123:[2,130],125:[2,130],126:[2,130],129:[2,130],130:[2,130],131:[2,130],132:[2,130],133:[2,130],134:[2,130]},{1:[2,163],6:[2,163],25:[2,163],26:[2,163],46:[2,163],51:[2,163],54:[2,163],69:[2,163],75:[2,163],83:[2,163],88:[2,163],90:[2,163],99:[2,163],101:[2,163],102:[2,163],103:[2,163],107:[2,163],115:[2,163],123:[2,163],125:[2,163],126:[2,163],129:[2,163],130:[2,163],131:[2,163],132:[2,163],133:[2,163],134:[2,163]},{5:301,25:[1,5]},{26:[1,302]},{6:[1,303],26:[2,169],118:[2,169],120:[2,169]},{8:304,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],46:[2,97],51:[2,97],54:[2,97],69:[2,97],75:[2,97],83:[2,97],88:[2,97],90:[2,97],99:[2,97],101:[2,97],102:[2,97],103:[2,97],107:[2,97],115:[2,97],123:[2,97],125:[2,97],126:[2,97],129:[2,97],130:[2,97],131:[2,97],132:[2,97],133:[2,97],134:[2,97]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],46:[2,133],51:[2,133],54:[2,133],63:[2,133],64:[2,133],65:[2,133],67:[2,133],69:[2,133],70:[2,133],71:[2,133],75:[2,133],81:[2,133],82:[2,133],83:[2,133],88:[2,133],90:[2,133],99:[2,133],101:[2,133],102:[2,133],103:[2,133],107:[2,133],115:[2,133],123:[2,133],125:[2,133],126:[2,133],129:[2,133],130:[2,133],131:[2,133],132:[2,133],133:[2,133],134:[2,133]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],46:[2,113],51:[2,113],54:[2,113],63:[2,113],64:[2,113],65:[2,113],67:[2,113],69:[2,113],70:[2,113],71:[2,113],75:[2,113],81:[2,113],82:[2,113],83:[2,113],88:[2,113],90:[2,113],99:[2,113],101:[2,113],102:[2,113],103:[2,113],107:[2,113],115:[2,113],123:[2,113],125:[2,113],126:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113]},{6:[2,119],25:[2,119],26:[2,119],51:[2,119],83:[2,119],88:[2,119]},{6:[2,49],25:[2,49],26:[2,49],50:305,51:[1,223]},{6:[2,120],25:[2,120],26:[2,120],51:[2,120],83:[2,120],88:[2,120]},{1:[2,158],6:[2,158],25:[2,158],26:[2,158],46:[2,158],51:[2,158],54:[2,158],69:[2,158],75:[2,158],83:[2,158],88:[2,158],90:[2,158],99:[2,158],100:84,101:[2,158],102:[2,158],103:[2,158],106:85,107:[2,158],108:66,115:[1,306],123:[2,158],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,160],6:[2,160],25:[2,160],26:[2,160],46:[2,160],51:[2,160],54:[2,160],69:[2,160],75:[2,160],83:[2,160],88:[2,160],90:[2,160],99:[2,160],100:84,101:[2,160],102:[1,307],103:[2,160],106:85,107:[2,160],108:66,115:[2,160],123:[2,160],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,159],6:[2,159],25:[2,159],26:[2,159],46:[2,159],51:[2,159],54:[2,159],69:[2,159],75:[2,159],83:[2,159],88:[2,159],90:[2,159],99:[2,159],100:84,101:[2,159],102:[2,159],103:[2,159],106:85,107:[2,159],108:66,115:[2,159],123:[2,159],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[2,88],25:[2,88],26:[2,88],51:[2,88],75:[2,88]},{6:[2,49],25:[2,49],26:[2,49],50:308,51:[1,233]},{26:[1,309],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,310]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],46:[2,166],51:[2,166],54:[2,166],69:[2,166],75:[2,166],83:[2,166],88:[2,166],90:[2,166],99:[2,166],101:[2,166],102:[2,166],103:[2,166],107:[2,166],115:[2,166],123:[2,166],125:[2,166],126:[2,166],129:[2,166],130:[2,166],131:[2,166],132:[2,166],133:[2,166],134:[2,166]},{26:[2,170],118:[2,170],120:[2,170]},{25:[2,125],51:[2,125],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,260],25:[1,261],26:[1,311]},{8:312,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:313,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[1,271],25:[1,272],26:[1,314]},{6:[2,37],25:[2,37],26:[2,37],51:[2,37],75:[2,37]},{1:[2,164],6:[2,164],25:[2,164],26:[2,164],46:[2,164],51:[2,164],54:[2,164],69:[2,164],75:[2,164],83:[2,164],88:[2,164],90:[2,164],99:[2,164],101:[2,164],102:[2,164],103:[2,164],107:[2,164],115:[2,164],123:[2,164],125:[2,164],126:[2,164],129:[2,164],130:[2,164],131:[2,164],132:[2,164],133:[2,164],134:[2,164]},{6:[2,121],25:[2,121],26:[2,121],51:[2,121],83:[2,121],88:[2,121]},{1:[2,161],6:[2,161],25:[2,161],26:[2,161],46:[2,161],51:[2,161],54:[2,161],69:[2,161],75:[2,161],83:[2,161],88:[2,161],90:[2,161],99:[2,161],100:84,101:[2,161],102:[2,161],103:[2,161],106:85,107:[2,161],108:66,115:[2,161],123:[2,161],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,162],6:[2,162],25:[2,162],26:[2,162],46:[2,162],51:[2,162],54:[2,162],69:[2,162],75:[2,162],83:[2,162],88:[2,162],90:[2,162],99:[2,162],100:84,101:[2,162],102:[2,162],103:[2,162],106:85,107:[2,162],108:66,115:[2,162],123:[2,162],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[2,89],25:[2,89],26:[2,89],51:[2,89],75:[2,89]}],
-defaultActions: {57:[2,47],58:[2,48],72:[2,3],91:[2,103],186:[2,83]},
+table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],101:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,7],6:[2,7],26:[2,7],101:[2,7],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,8],6:[2,8],26:[2,8],101:[2,8],102:90,103:[1,65],105:[1,66],108:91,109:[1,68],110:69,125:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:98,70:[1,99],72:[2,12],73:[1,100],77:[2,12],80:92,83:[1,94],84:[2,107],85:[2,12],90:[2,12],92:[2,12],101:[2,12],103:[2,12],104:[2,12],105:[2,12],109:[2,12],117:[2,12],125:[2,12],127:[2,12],128:[2,12],131:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:102,66:[1,95],67:[1,96],68:[1,97],69:98,70:[1,99],72:[2,13],73:[1,100],77:[2,13],80:101,83:[1,94],84:[2,107],85:[2,13],90:[2,13],92:[2,13],101:[2,13],103:[2,13],104:[2,13],105:[2,13],109:[2,13],117:[2,13],125:[2,13],127:[2,13],128:[2,13],131:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],72:[2,14],77:[2,14],85:[2,14],90:[2,14],92:[2,14],101:[2,14],103:[2,14],104:[2,14],105:[2,14],109:[2,14],117:[2,14],125:[2,14],127:[2,14],128:[2,14],131:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],72:[2,15],77:[2,15],85:[2,15],90:[2,15],92:[2,15],101:[2,15],103:[2,15],104:[2,15],105:[2,15],109:[2,15],117:[2,15],125:[2,15],127:[2,15],128:[2,15],131:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],72:[2,16],77:[2,16],85:[2,16],90:[2,16],92:[2,16],101:[2,16],103:[2,16],104:[2,16],105:[2,16],109:[2,16],117:[2,16],125:[2,16],127:[2,16],128:[2,16],131:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],72:[2,17],77:[2,17],85:[2,17],90:[2,17],92:[2,17],101:[2,17],103:[2,17],104:[2,17],105:[2,17],109:[2,17],117:[2,17],125:[2,17],127:[2,17],128:[2,17],131:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],72:[2,18],77:[2,18],85:[2,18],90:[2,18],92:[2,18],101:[2,18],103:[2,18],104:[2,18],105:[2,18],109:[2,18],117:[2,18],125:[2,18],127:[2,18],128:[2,18],131:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],72:[2,19],77:[2,19],85:[2,19],90:[2,19],92:[2,19],101:[2,19],103:[2,19],104:[2,19],105:[2,19],109:[2,19],117:[2,19],125:[2,19],127:[2,19],128:[2,19],131:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],72:[2,20],77:[2,20],85:[2,20],90:[2,20],92:[2,20],101:[2,20],103:[2,20],104:[2,20],105:[2,20],109:[2,20],117:[2,20],125:[2,20],127:[2,20],128:[2,20],131:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],72:[2,21],77:[2,21],85:[2,21],90:[2,21],92:[2,21],101:[2,21],103:[2,21],104:[2,21],105:[2,21],109:[2,21],117:[2,21],125:[2,21],127:[2,21],128:[2,21],131:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],72:[2,22],77:[2,22],85:[2,22],90:[2,22],92:[2,22],101:[2,22],103:[2,22],104:[2,22],105:[2,22],109:[2,22],117:[2,22],125:[2,22],127:[2,22],128:[2,22],131:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],72:[2,23],77:[2,23],85:[2,23],90:[2,23],92:[2,23],101:[2,23],103:[2,23],104:[2,23],105:[2,23],109:[2,23],117:[2,23],125:[2,23],127:[2,23],128:[2,23],131:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23]},{1:[2,9],6:[2,9],26:[2,9],101:[2,9],103:[2,9],105:[2,9],109:[2,9],125:[2,9]},{1:[2,10],6:[2,10],26:[2,10],101:[2,10],103:[2,10],105:[2,10],109:[2,10],125:[2,10]},{1:[2,11],6:[2,11],26:[2,11],101:[2,11],103:[2,11],105:[2,11],109:[2,11],125:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,103],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],70:[2,75],72:[2,75],73:[2,75],77:[2,75],83:[2,75],84:[2,75],85:[2,75],90:[2,75],92:[2,75],101:[2,75],103:[2,75],104:[2,75],105:[2,75],109:[2,75],117:[2,75],125:[2,75],127:[2,75],128:[2,75],131:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],70:[2,76],72:[2,76],73:[2,76],77:[2,76],83:[2,76],84:[2,76],85:[2,76],90:[2,76],92:[2,76],101:[2,76],103:[2,76],104:[2,76],105:[2,76],109:[2,76],117:[2,76],125:[2,76],127:[2,76],128:[2,76],131:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],70:[2,77],72:[2,77],73:[2,77],77:[2,77],83:[2,77],84:[2,77],85:[2,77],90:[2,77],92:[2,77],101:[2,77],103:[2,77],104:[2,77],105:[2,77],109:[2,77],117:[2,77],125:[2,77],127:[2,77],128:[2,77],131:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],70:[2,78],72:[2,78],73:[2,78],77:[2,78],83:[2,78],84:[2,78],85:[2,78],90:[2,78],92:[2,78],101:[2,78],103:[2,78],104:[2,78],105:[2,78],109:[2,78],117:[2,78],125:[2,78],127:[2,78],128:[2,78],131:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],70:[2,79],72:[2,79],73:[2,79],77:[2,79],83:[2,79],84:[2,79],85:[2,79],90:[2,79],92:[2,79],101:[2,79],103:[2,79],104:[2,79],105:[2,79],109:[2,79],117:[2,79],125:[2,79],127:[2,79],128:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],70:[2,105],72:[2,105],73:[2,105],77:[2,105],81:104,83:[2,105],84:[1,105],85:[2,105],90:[2,105],92:[2,105],101:[2,105],103:[2,105],104:[2,105],105:[2,105],109:[2,105],117:[2,105],125:[2,105],127:[2,105],128:[2,105],131:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105]},{6:[2,55],25:[2,55],27:109,28:[1,73],44:110,48:106,49:[2,55],54:[2,55],55:107,56:108,58:111,59:112,75:[1,70],88:[1,113],89:[1,114]},{5:115,25:[1,5]},{8:116,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:118,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:119,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{13:121,14:122,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:123,44:63,58:47,59:48,61:120,63:25,64:26,65:27,75:[1,70],82:[1,28],87:[1,58],88:[1,59],89:[1,57],100:[1,56]},{13:121,14:122,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:123,44:63,58:47,59:48,61:124,63:25,64:26,65:27,75:[1,70],82:[1,28],87:[1,58],88:[1,59],89:[1,57],100:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],70:[2,72],72:[2,72],73:[2,72],77:[2,72],79:[1,128],83:[2,72],84:[2,72],85:[2,72],90:[2,72],92:[2,72],101:[2,72],103:[2,72],104:[2,72],105:[2,72],109:[2,72],117:[2,72],125:[2,72],127:[2,72],128:[2,72],129:[1,125],130:[1,126],131:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[1,127]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],72:[2,180],77:[2,180],85:[2,180],90:[2,180],92:[2,180],101:[2,180],103:[2,180],104:[2,180],105:[2,180],109:[2,180],117:[2,180],120:[1,129],125:[2,180],127:[2,180],128:[2,180],131:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180]},{5:130,25:[1,5]},{5:131,25:[1,5]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],72:[2,147],77:[2,147],85:[2,147],90:[2,147],92:[2,147],101:[2,147],103:[2,147],104:[2,147],105:[2,147],109:[2,147],117:[2,147],125:[2,147],127:[2,147],128:[2,147],131:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147]},{5:132,25:[1,5]},{8:133,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,134],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,95],5:135,6:[2,95],13:121,14:122,25:[1,5],26:[2,95],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:123,44:63,49:[2,95],54:[2,95],57:[2,95],58:47,59:48,61:137,63:25,64:26,65:27,72:[2,95],75:[1,70],77:[2,95],79:[1,136],82:[1,28],85:[2,95],87:[1,58],88:[1,59],89:[1,57],90:[2,95],92:[2,95],100:[1,56],101:[2,95],103:[2,95],104:[2,95],105:[2,95],109:[2,95],117:[2,95],125:[2,95],127:[2,95],128:[2,95],131:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95]},{8:138,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,47],6:[2,47],8:139,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],101:[2,47],102:39,103:[2,47],105:[2,47],106:40,107:[1,67],108:41,109:[2,47],110:69,118:[1,42],123:37,124:[1,64],125:[2,47],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],77:[2,48],101:[2,48],103:[2,48],105:[2,48],109:[2,48],125:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],70:[2,73],72:[2,73],73:[2,73],77:[2,73],83:[2,73],84:[2,73],85:[2,73],90:[2,73],92:[2,73],101:[2,73],103:[2,73],104:[2,73],105:[2,73],109:[2,73],117:[2,73],125:[2,73],127:[2,73],128:[2,73],131:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],70:[2,74],72:[2,74],73:[2,74],77:[2,74],83:[2,74],84:[2,74],85:[2,74],90:[2,74],92:[2,74],101:[2,74],103:[2,74],104:[2,74],105:[2,74],109:[2,74],117:[2,74],125:[2,74],127:[2,74],128:[2,74],131:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],70:[2,29],72:[2,29],73:[2,29],77:[2,29],83:[2,29],84:[2,29],85:[2,29],90:[2,29],92:[2,29],101:[2,29],103:[2,29],104:[2,29],105:[2,29],109:[2,29],117:[2,29],125:[2,29],127:[2,29],128:[2,29],131:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],70:[2,30],72:[2,30],73:[2,30],77:[2,30],83:[2,30],84:[2,30],85:[2,30],90:[2,30],92:[2,30],101:[2,30],103:[2,30],104:[2,30],105:[2,30],109:[2,30],117:[2,30],125:[2,30],127:[2,30],128:[2,30],131:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],70:[2,31],72:[2,31],73:[2,31],77:[2,31],83:[2,31],84:[2,31],85:[2,31],90:[2,31],92:[2,31],101:[2,31],103:[2,31],104:[2,31],105:[2,31],109:[2,31],117:[2,31],125:[2,31],127:[2,31],128:[2,31],131:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],70:[2,32],72:[2,32],73:[2,32],77:[2,32],83:[2,32],84:[2,32],85:[2,32],90:[2,32],92:[2,32],101:[2,32],103:[2,32],104:[2,32],105:[2,32],109:[2,32],117:[2,32],125:[2,32],127:[2,32],128:[2,32],131:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],70:[2,33],72:[2,33],73:[2,33],77:[2,33],83:[2,33],84:[2,33],85:[2,33],90:[2,33],92:[2,33],101:[2,33],103:[2,33],104:[2,33],105:[2,33],109:[2,33],117:[2,33],125:[2,33],127:[2,33],128:[2,33],131:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],70:[2,34],72:[2,34],73:[2,34],77:[2,34],83:[2,34],84:[2,34],85:[2,34],90:[2,34],92:[2,34],101:[2,34],103:[2,34],104:[2,34],105:[2,34],109:[2,34],117:[2,34],125:[2,34],127:[2,34],128:[2,34],131:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],70:[2,35],72:[2,35],73:[2,35],77:[2,35],83:[2,35],84:[2,35],85:[2,35],90:[2,35],92:[2,35],101:[2,35],103:[2,35],104:[2,35],105:[2,35],109:[2,35],117:[2,35],125:[2,35],127:[2,35],128:[2,35],131:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35]},{4:140,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,141],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:142,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,146],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:147,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],86:144,87:[1,58],88:[1,59],89:[1,57],90:[1,143],93:145,95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],70:[2,111],72:[2,111],73:[2,111],77:[2,111],83:[2,111],84:[2,111],85:[2,111],90:[2,111],92:[2,111],101:[2,111],103:[2,111],104:[2,111],105:[2,111],109:[2,111],117:[2,111],125:[2,111],127:[2,111],128:[2,111],131:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:148,28:[1,73],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],70:[2,112],72:[2,112],73:[2,112],77:[2,112],83:[2,112],84:[2,112],85:[2,112],90:[2,112],92:[2,112],101:[2,112],103:[2,112],104:[2,112],105:[2,112],109:[2,112],117:[2,112],125:[2,112],127:[2,112],128:[2,112],131:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],70:[2,68],72:[2,68],73:[2,68],77:[2,68],79:[2,68],83:[2,68],84:[2,68],85:[2,68],90:[2,68],92:[2,68],101:[2,68],103:[2,68],104:[2,68],105:[2,68],109:[2,68],117:[2,68],125:[2,68],127:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],70:[2,71],72:[2,71],73:[2,71],77:[2,71],79:[2,71],83:[2,71],84:[2,71],85:[2,71],90:[2,71],92:[2,71],101:[2,71],103:[2,71],104:[2,71],105:[2,71],109:[2,71],117:[2,71],125:[2,71],127:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71]},{8:149,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:150,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:151,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{5:152,8:153,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{27:158,28:[1,73],44:159,58:160,59:161,64:154,75:[1,70],88:[1,113],89:[1,57],112:155,113:[1,156],114:157},{111:162,115:[1,163],116:[1,164]},{6:[2,90],11:168,25:[2,90],27:169,28:[1,73],29:170,30:[1,71],31:[1,72],41:166,42:167,44:171,46:[1,46],54:[2,90],76:165,77:[2,90],88:[1,113]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],70:[2,27],72:[2,27],73:[2,27],77:[2,27],83:[2,27],84:[2,27],85:[2,27],90:[2,27],92:[2,27],101:[2,27],103:[2,27],104:[2,27],105:[2,27],109:[2,27],117:[2,27],125:[2,27],127:[2,27],128:[2,27],131:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],70:[2,28],72:[2,28],73:[2,28],77:[2,28],83:[2,28],84:[2,28],85:[2,28],90:[2,28],92:[2,28],101:[2,28],103:[2,28],104:[2,28],105:[2,28],109:[2,28],117:[2,28],125:[2,28],127:[2,28],128:[2,28],131:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],70:[2,26],72:[2,26],73:[2,26],77:[2,26],79:[2,26],83:[2,26],84:[2,26],85:[2,26],90:[2,26],92:[2,26],101:[2,26],103:[2,26],104:[2,26],105:[2,26],109:[2,26],115:[2,26],116:[2,26],117:[2,26],125:[2,26],127:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,6],6:[2,6],7:172,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],101:[2,6],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],72:[2,24],77:[2,24],85:[2,24],90:[2,24],92:[2,24],97:[2,24],98:[2,24],101:[2,24],103:[2,24],104:[2,24],105:[2,24],109:[2,24],117:[2,24],120:[2,24],122:[2,24],125:[2,24],127:[2,24],128:[2,24],131:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24]},{6:[1,74],26:[1,173]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],72:[2,191],77:[2,191],85:[2,191],90:[2,191],92:[2,191],101:[2,191],103:[2,191],104:[2,191],105:[2,191],109:[2,191],117:[2,191],125:[2,191],127:[2,191],128:[2,191],131:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191]},{8:174,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:175,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:176,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:177,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:178,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:179,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:180,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:181,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],72:[2,146],77:[2,146],85:[2,146],90:[2,146],92:[2,146],101:[2,146],103:[2,146],104:[2,146],105:[2,146],109:[2,146],117:[2,146],125:[2,146],127:[2,146],128:[2,146],131:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],72:[2,151],77:[2,151],85:[2,151],90:[2,151],92:[2,151],101:[2,151],103:[2,151],104:[2,151],105:[2,151],109:[2,151],117:[2,151],125:[2,151],127:[2,151],128:[2,151],131:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151]},{8:182,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],72:[2,145],77:[2,145],85:[2,145],90:[2,145],92:[2,145],101:[2,145],103:[2,145],104:[2,145],105:[2,145],109:[2,145],117:[2,145],125:[2,145],127:[2,145],128:[2,145],131:[2,145],132:[2,145],133:[2,145],134:[2,145],135:[2,145],136:[2,145]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],72:[2,150],77:[2,150],85:[2,150],90:[2,150],92:[2,150],101:[2,150],103:[2,150],104:[2,150],105:[2,150],109:[2,150],117:[2,150],125:[2,150],127:[2,150],128:[2,150],131:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150]},{81:183,84:[1,105]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],70:[2,69],72:[2,69],73:[2,69],77:[2,69],79:[2,69],83:[2,69],84:[2,69],85:[2,69],90:[2,69],92:[2,69],101:[2,69],103:[2,69],104:[2,69],105:[2,69],109:[2,69],117:[2,69],125:[2,69],127:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69]},{84:[2,108]},{27:184,28:[1,73]},{27:185,28:[1,73]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:186,28:[1,73],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],70:[2,83],72:[2,83],73:[2,83],77:[2,83],79:[2,83],83:[2,83],84:[2,83],85:[2,83],90:[2,83],92:[2,83],101:[2,83],103:[2,83],104:[2,83],105:[2,83],109:[2,83],117:[2,83],125:[2,83],127:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],70:[2,84],72:[2,84],73:[2,84],77:[2,84],79:[2,84],83:[2,84],84:[2,84],85:[2,84],90:[2,84],92:[2,84],101:[2,84],103:[2,84],104:[2,84],105:[2,84],109:[2,84],117:[2,84],125:[2,84],127:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84]},{8:188,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,192],58:47,59:48,61:36,63:25,64:26,65:27,71:187,74:189,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],91:190,92:[1,191],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{69:193,70:[1,99],73:[1,100]},{81:194,84:[1,105]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],70:[2,70],72:[2,70],73:[2,70],77:[2,70],79:[2,70],83:[2,70],84:[2,70],85:[2,70],90:[2,70],92:[2,70],101:[2,70],103:[2,70],104:[2,70],105:[2,70],109:[2,70],117:[2,70],125:[2,70],127:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70]},{6:[1,196],8:195,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,197],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],70:[2,106],72:[2,106],73:[2,106],77:[2,106],83:[2,106],84:[2,106],85:[2,106],90:[2,106],92:[2,106],101:[2,106],103:[2,106],104:[2,106],105:[2,106],109:[2,106],117:[2,106],125:[2,106],127:[2,106],128:[2,106],131:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106]},{8:200,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,146],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:147,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],85:[1,198],86:199,87:[1,58],88:[1,59],89:[1,57],93:145,95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{6:[2,53],25:[2,53],49:[1,201],53:203,54:[1,202]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,205],49:[2,60],54:[2,60],57:[1,204]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:148,28:[1,73]},{8:200,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,146],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:147,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],86:144,87:[1,58],88:[1,59],89:[1,57],90:[1,143],93:145,95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],72:[2,50],77:[2,50],85:[2,50],90:[2,50],92:[2,50],101:[2,50],103:[2,50],104:[2,50],105:[2,50],109:[2,50],117:[2,50],125:[2,50],127:[2,50],128:[2,50],131:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],72:[2,184],77:[2,184],85:[2,184],90:[2,184],92:[2,184],101:[2,184],102:87,103:[2,184],104:[2,184],105:[2,184],108:88,109:[2,184],110:69,117:[2,184],125:[2,184],127:[2,184],128:[2,184],131:[1,78],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184]},{102:90,103:[1,65],105:[1,66],108:91,109:[1,68],110:69,125:[1,89]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],72:[2,185],77:[2,185],85:[2,185],90:[2,185],92:[2,185],101:[2,185],102:87,103:[2,185],104:[2,185],105:[2,185],108:88,109:[2,185],110:69,117:[2,185],125:[2,185],127:[2,185],128:[2,185],131:[1,78],132:[2,185],133:[2,185],134:[2,185],135:[2,185],136:[2,185]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],72:[2,186],77:[2,186],85:[2,186],90:[2,186],92:[2,186],101:[2,186],102:87,103:[2,186],104:[2,186],105:[2,186],108:88,109:[2,186],110:69,117:[2,186],125:[2,186],127:[2,186],128:[2,186],131:[1,78],132:[2,186],133:[2,186],134:[2,186],135:[2,186],136:[2,186]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],66:[2,72],67:[2,72],68:[2,72],70:[2,72],72:[2,187],73:[2,72],77:[2,187],83:[2,72],84:[2,72],85:[2,187],90:[2,187],92:[2,187],101:[2,187],103:[2,187],104:[2,187],105:[2,187],109:[2,187],117:[2,187],125:[2,187],127:[2,187],128:[2,187],131:[2,187],132:[2,187],133:[2,187],134:[2,187],135:[2,187],136:[2,187]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:98,70:[1,99],73:[1,100],80:92,83:[1,94],84:[2,107]},{62:102,66:[1,95],67:[1,96],68:[1,97],69:98,70:[1,99],73:[1,100],80:101,83:[1,94],84:[2,107]},{66:[2,75],67:[2,75],68:[2,75],70:[2,75],73:[2,75],83:[2,75],84:[2,75]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],66:[2,72],67:[2,72],68:[2,72],70:[2,72],72:[2,188],73:[2,72],77:[2,188],83:[2,72],84:[2,72],85:[2,188],90:[2,188],92:[2,188],101:[2,188],103:[2,188],104:[2,188],105:[2,188],109:[2,188],117:[2,188],125:[2,188],127:[2,188],128:[2,188],131:[2,188],132:[2,188],133:[2,188],134:[2,188],135:[2,188],136:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],72:[2,189],77:[2,189],85:[2,189],90:[2,189],92:[2,189],101:[2,189],103:[2,189],104:[2,189],105:[2,189],109:[2,189],117:[2,189],125:[2,189],127:[2,189],128:[2,189],131:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],72:[2,190],77:[2,190],85:[2,190],90:[2,190],92:[2,190],101:[2,190],103:[2,190],104:[2,190],105:[2,190],109:[2,190],117:[2,190],125:[2,190],127:[2,190],128:[2,190],131:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190]},{8:206,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,207],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:208,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{5:209,25:[1,5],124:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],72:[2,132],77:[2,132],85:[2,132],90:[2,132],92:[2,132],96:211,97:[1,212],98:[1,213],101:[2,132],103:[2,132],104:[2,132],105:[2,132],109:[2,132],117:[2,132],125:[2,132],127:[2,132],128:[2,132],131:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],72:[2,144],77:[2,144],85:[2,144],90:[2,144],92:[2,144],101:[2,144],103:[2,144],104:[2,144],105:[2,144],109:[2,144],117:[2,144],125:[2,144],127:[2,144],128:[2,144],131:[2,144],132:[2,144],133:[2,144],134:[2,144],135:[2,144],136:[2,144]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],72:[2,152],77:[2,152],85:[2,152],90:[2,152],92:[2,152],101:[2,152],103:[2,152],104:[2,152],105:[2,152],109:[2,152],117:[2,152],125:[2,152],127:[2,152],128:[2,152],131:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152]},{25:[1,214],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{119:215,121:216,122:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],72:[2,96],77:[2,96],85:[2,96],90:[2,96],92:[2,96],101:[2,96],103:[2,96],104:[2,96],105:[2,96],109:[2,96],117:[2,96],125:[2,96],127:[2,96],128:[2,96],131:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96]},{8:218,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,99],5:219,6:[2,99],25:[1,5],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,72],67:[2,72],68:[2,72],70:[2,72],72:[2,99],73:[2,72],77:[2,99],79:[1,220],83:[2,72],84:[2,72],85:[2,99],90:[2,99],92:[2,99],101:[2,99],103:[2,99],104:[2,99],105:[2,99],109:[2,99],117:[2,99],125:[2,99],127:[2,99],128:[2,99],131:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],72:[2,137],77:[2,137],85:[2,137],90:[2,137],92:[2,137],101:[2,137],102:87,103:[2,137],104:[2,137],105:[2,137],108:88,109:[2,137],110:69,117:[2,137],125:[2,137],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,46],6:[2,46],26:[2,46],101:[2,46],102:87,103:[2,46],105:[2,46],108:88,109:[2,46],110:69,125:[2,46],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{6:[1,74],101:[1,221]},{4:222,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],90:[2,128],91:223,92:[1,191],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],70:[2,114],72:[2,114],73:[2,114],77:[2,114],83:[2,114],84:[2,114],85:[2,114],90:[2,114],92:[2,114],101:[2,114],103:[2,114],104:[2,114],105:[2,114],109:[2,114],115:[2,114],116:[2,114],117:[2,114],125:[2,114],127:[2,114],128:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114]},{6:[2,53],25:[2,53],53:225,54:[1,226],90:[2,53]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],85:[2,123],90:[2,123]},{8:200,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,146],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:147,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],86:227,87:[1,58],88:[1,59],89:[1,57],93:145,95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],85:[2,129],90:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],70:[2,113],72:[2,113],73:[2,113],77:[2,113],79:[2,113],83:[2,113],84:[2,113],85:[2,113],90:[2,113],92:[2,113],101:[2,113],103:[2,113],104:[2,113],105:[2,113],109:[2,113],115:[2,113],116:[2,113],117:[2,113],125:[2,113],127:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{5:228,25:[1,5],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],72:[2,140],77:[2,140],85:[2,140],90:[2,140],92:[2,140],101:[2,140],102:87,103:[1,65],104:[1,229],105:[1,66],108:88,109:[1,68],110:69,117:[2,140],125:[2,140],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],72:[2,142],77:[2,142],85:[2,142],90:[2,142],92:[2,142],101:[2,142],102:87,103:[1,65],104:[1,230],105:[1,66],108:88,109:[1,68],110:69,117:[2,142],125:[2,142],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],72:[2,148],77:[2,148],85:[2,148],90:[2,148],92:[2,148],101:[2,148],103:[2,148],104:[2,148],105:[2,148],109:[2,148],117:[2,148],125:[2,148],127:[2,148],128:[2,148],131:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],72:[2,149],77:[2,149],85:[2,149],90:[2,149],92:[2,149],101:[2,149],102:87,103:[1,65],104:[2,149],105:[1,66],108:88,109:[1,68],110:69,117:[2,149],125:[2,149],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],72:[2,153],77:[2,153],85:[2,153],90:[2,153],92:[2,153],101:[2,153],103:[2,153],104:[2,153],105:[2,153],109:[2,153],117:[2,153],125:[2,153],127:[2,153],128:[2,153],131:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153]},{115:[2,155],116:[2,155]},{27:158,28:[1,73],44:159,58:160,59:161,75:[1,70],88:[1,113],89:[1,114],112:231,114:157},{54:[1,232],115:[2,161],116:[2,161]},{54:[2,157],115:[2,157],116:[2,157]},{54:[2,158],115:[2,158],116:[2,158]},{54:[2,159],115:[2,159],116:[2,159]},{54:[2,160],115:[2,160],116:[2,160]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],72:[2,154],77:[2,154],85:[2,154],90:[2,154],92:[2,154],101:[2,154],103:[2,154],104:[2,154],105:[2,154],109:[2,154],117:[2,154],125:[2,154],127:[2,154],128:[2,154],131:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154]},{8:233,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:234,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{6:[2,53],25:[2,53],53:235,54:[1,236],77:[2,53]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],77:[2,91]},{6:[2,39],25:[2,39],26:[2,39],43:[1,237],54:[2,39],77:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],77:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],77:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],77:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],77:[2,45]},{1:[2,5],6:[2,5],26:[2,5],101:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],72:[2,25],77:[2,25],85:[2,25],90:[2,25],92:[2,25],97:[2,25],98:[2,25],101:[2,25],103:[2,25],104:[2,25],105:[2,25],109:[2,25],117:[2,25],120:[2,25],122:[2,25],125:[2,25],127:[2,25],128:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],72:[2,192],77:[2,192],85:[2,192],90:[2,192],92:[2,192],101:[2,192],102:87,103:[2,192],104:[2,192],105:[2,192],108:88,109:[2,192],110:69,117:[2,192],125:[2,192],127:[2,192],128:[2,192],131:[1,78],132:[1,81],133:[2,192],134:[2,192],135:[2,192],136:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],72:[2,193],77:[2,193],85:[2,193],90:[2,193],92:[2,193],101:[2,193],102:87,103:[2,193],104:[2,193],105:[2,193],108:88,109:[2,193],110:69,117:[2,193],125:[2,193],127:[2,193],128:[2,193],131:[1,78],132:[1,81],133:[2,193],134:[2,193],135:[2,193],136:[2,193]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],72:[2,194],77:[2,194],85:[2,194],90:[2,194],92:[2,194],101:[2,194],102:87,103:[2,194],104:[2,194],105:[2,194],108:88,109:[2,194],110:69,117:[2,194],125:[2,194],127:[2,194],128:[2,194],131:[1,78],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],72:[2,195],77:[2,195],85:[2,195],90:[2,195],92:[2,195],101:[2,195],102:87,103:[2,195],104:[2,195],105:[2,195],108:88,109:[2,195],110:69,117:[2,195],125:[2,195],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[2,195],134:[2,195],135:[2,195],136:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],72:[2,196],77:[2,196],85:[2,196],90:[2,196],92:[2,196],101:[2,196],102:87,103:[2,196],104:[2,196],105:[2,196],108:88,109:[2,196],110:69,117:[2,196],125:[2,196],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[2,196],135:[2,196],136:[1,85]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],72:[2,197],77:[2,197],85:[2,197],90:[2,197],92:[2,197],101:[2,197],102:87,103:[2,197],104:[2,197],105:[2,197],108:88,109:[2,197],110:69,117:[2,197],125:[2,197],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[2,197],136:[1,85]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],72:[2,198],77:[2,198],85:[2,198],90:[2,198],92:[2,198],101:[2,198],102:87,103:[2,198],104:[2,198],105:[2,198],108:88,109:[2,198],110:69,117:[2,198],125:[2,198],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[2,198],135:[2,198],136:[2,198]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],72:[2,183],77:[2,183],85:[2,183],90:[2,183],92:[2,183],101:[2,183],102:87,103:[1,65],104:[2,183],105:[1,66],108:88,109:[1,68],110:69,117:[2,183],125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],72:[2,182],77:[2,182],85:[2,182],90:[2,182],92:[2,182],101:[2,182],102:87,103:[1,65],104:[2,182],105:[1,66],108:88,109:[1,68],110:69,117:[2,182],125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],70:[2,103],72:[2,103],73:[2,103],77:[2,103],83:[2,103],84:[2,103],85:[2,103],90:[2,103],92:[2,103],101:[2,103],103:[2,103],104:[2,103],105:[2,103],109:[2,103],117:[2,103],125:[2,103],127:[2,103],128:[2,103],131:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],70:[2,80],72:[2,80],73:[2,80],77:[2,80],79:[2,80],83:[2,80],84:[2,80],85:[2,80],90:[2,80],92:[2,80],101:[2,80],103:[2,80],104:[2,80],105:[2,80],109:[2,80],117:[2,80],125:[2,80],127:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],70:[2,81],72:[2,81],73:[2,81],77:[2,81],79:[2,81],83:[2,81],84:[2,81],85:[2,81],90:[2,81],92:[2,81],101:[2,81],103:[2,81],104:[2,81],105:[2,81],109:[2,81],117:[2,81],125:[2,81],127:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],70:[2,82],72:[2,82],73:[2,82],77:[2,82],79:[2,82],83:[2,82],84:[2,82],85:[2,82],90:[2,82],92:[2,82],101:[2,82],103:[2,82],104:[2,82],105:[2,82],109:[2,82],117:[2,82],125:[2,82],127:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82]},{72:[1,238]},{57:[1,192],72:[2,87],91:239,92:[1,191],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{72:[2,88]},{8:240,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,72:[2,122],75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{12:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],72:[2,116],75:[2,116],78:[2,116],82:[2,116],87:[2,116],88:[2,116],89:[2,116],95:[2,116],99:[2,116],100:[2,116],103:[2,116],105:[2,116],107:[2,116],109:[2,116],118:[2,116],124:[2,116],126:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],72:[2,117],75:[2,117],78:[2,117],82:[2,117],87:[2,117],88:[2,117],89:[2,117],95:[2,117],99:[2,117],100:[2,117],103:[2,117],105:[2,117],107:[2,117],109:[2,117],118:[2,117],124:[2,117],126:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],70:[2,86],72:[2,86],73:[2,86],77:[2,86],79:[2,86],83:[2,86],84:[2,86],85:[2,86],90:[2,86],92:[2,86],101:[2,86],103:[2,86],104:[2,86],105:[2,86],109:[2,86],117:[2,86],125:[2,86],127:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],70:[2,104],72:[2,104],73:[2,104],77:[2,104],83:[2,104],84:[2,104],85:[2,104],90:[2,104],92:[2,104],101:[2,104],103:[2,104],104:[2,104],105:[2,104],109:[2,104],117:[2,104],125:[2,104],127:[2,104],128:[2,104],131:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],72:[2,36],77:[2,36],85:[2,36],90:[2,36],92:[2,36],101:[2,36],102:87,103:[2,36],104:[2,36],105:[2,36],108:88,109:[2,36],110:69,117:[2,36],125:[2,36],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{8:241,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:242,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],70:[2,109],72:[2,109],73:[2,109],77:[2,109],83:[2,109],84:[2,109],85:[2,109],90:[2,109],92:[2,109],101:[2,109],103:[2,109],104:[2,109],105:[2,109],109:[2,109],117:[2,109],125:[2,109],127:[2,109],128:[2,109],131:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109]},{6:[2,53],25:[2,53],53:243,54:[1,226],85:[2,53]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],85:[2,128],90:[2,128],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{50:245,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:109,28:[1,73],44:110,55:246,56:108,58:111,59:112,75:[1,70],88:[1,113],89:[1,114]},{6:[1,247],25:[1,248]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:249,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],72:[2,199],77:[2,199],85:[2,199],90:[2,199],92:[2,199],101:[2,199],102:87,103:[2,199],104:[2,199],105:[2,199],108:88,109:[2,199],110:69,117:[2,199],125:[2,199],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{8:250,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],72:[2,201],77:[2,201],85:[2,201],90:[2,201],92:[2,201],101:[2,201],102:87,103:[2,201],104:[2,201],105:[2,201],108:88,109:[2,201],110:69,117:[2,201],125:[2,201],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],72:[2,181],77:[2,181],85:[2,181],90:[2,181],92:[2,181],101:[2,181],103:[2,181],104:[2,181],105:[2,181],109:[2,181],117:[2,181],125:[2,181],127:[2,181],128:[2,181],131:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181]},{8:251,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],72:[2,133],77:[2,133],85:[2,133],90:[2,133],92:[2,133],97:[1,252],101:[2,133],103:[2,133],104:[2,133],105:[2,133],109:[2,133],117:[2,133],125:[2,133],127:[2,133],128:[2,133],131:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133]},{5:253,25:[1,5]},{27:254,28:[1,73]},{119:255,121:216,122:[1,217]},{26:[1,256],120:[1,257],121:258,122:[1,217]},{26:[2,174],120:[2,174],122:[2,174]},{8:260,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],94:259,95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,97],5:261,6:[2,97],25:[1,5],26:[2,97],49:[2,97],54:[2,97],57:[2,97],72:[2,97],77:[2,97],85:[2,97],90:[2,97],92:[2,97],101:[2,97],102:87,103:[1,65],104:[2,97],105:[1,66],108:88,109:[1,68],110:69,117:[2,97],125:[2,97],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],72:[2,100],77:[2,100],85:[2,100],90:[2,100],92:[2,100],101:[2,100],103:[2,100],104:[2,100],105:[2,100],109:[2,100],117:[2,100],125:[2,100],127:[2,100],128:[2,100],131:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100]},{8:262,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],66:[2,138],67:[2,138],68:[2,138],70:[2,138],72:[2,138],73:[2,138],77:[2,138],83:[2,138],84:[2,138],85:[2,138],90:[2,138],92:[2,138],101:[2,138],103:[2,138],104:[2,138],105:[2,138],109:[2,138],117:[2,138],125:[2,138],127:[2,138],128:[2,138],131:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138]},{6:[1,74],26:[1,263]},{8:264,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{6:[2,67],12:[2,117],25:[2,67],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,67],75:[2,117],78:[2,117],82:[2,117],87:[2,117],88:[2,117],89:[2,117],90:[2,67],95:[2,117],99:[2,117],100:[2,117],103:[2,117],105:[2,117],107:[2,117],109:[2,117],118:[2,117],124:[2,117],126:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117]},{6:[1,266],25:[1,267],90:[1,265]},{6:[2,54],8:200,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:147,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],85:[2,54],87:[1,58],88:[1,59],89:[1,57],90:[2,54],93:268,95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:269,54:[1,226]},{1:[2,178],6:[2,178],25:[2,178],26:[2,178],49:[2,178],54:[2,178],57:[2,178],72:[2,178],77:[2,178],85:[2,178],90:[2,178],92:[2,178],101:[2,178],103:[2,178],104:[2,178],105:[2,178],109:[2,178],117:[2,178],120:[2,178],125:[2,178],127:[2,178],128:[2,178],131:[2,178],132:[2,178],133:[2,178],134:[2,178],135:[2,178],136:[2,178]},{8:270,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:271,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{115:[2,156],116:[2,156]},{27:158,28:[1,73],44:159,58:160,59:161,75:[1,70],88:[1,113],89:[1,114],114:272},{1:[2,163],6:[2,163],25:[2,163],26:[2,163],49:[2,163],54:[2,163],57:[2,163],72:[2,163],77:[2,163],85:[2,163],90:[2,163],92:[2,163],101:[2,163],102:87,103:[2,163],104:[1,273],105:[2,163],108:88,109:[2,163],110:69,117:[1,274],125:[2,163],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,164],6:[2,164],25:[2,164],26:[2,164],49:[2,164],54:[2,164],57:[2,164],72:[2,164],77:[2,164],85:[2,164],90:[2,164],92:[2,164],101:[2,164],102:87,103:[2,164],104:[1,275],105:[2,164],108:88,109:[2,164],110:69,117:[2,164],125:[2,164],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{6:[1,277],25:[1,278],77:[1,276]},{6:[2,54],11:168,25:[2,54],26:[2,54],27:169,28:[1,73],29:170,30:[1,71],31:[1,72],41:279,42:167,44:171,46:[1,46],77:[2,54],88:[1,113]},{8:280,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,281],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],70:[2,85],72:[2,85],73:[2,85],77:[2,85],79:[2,85],83:[2,85],84:[2,85],85:[2,85],90:[2,85],92:[2,85],101:[2,85],103:[2,85],104:[2,85],105:[2,85],109:[2,85],117:[2,85],125:[2,85],127:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85]},{8:282,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,72:[2,120],75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{72:[2,121],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],72:[2,37],77:[2,37],85:[2,37],90:[2,37],92:[2,37],101:[2,37],102:87,103:[2,37],104:[2,37],105:[2,37],108:88,109:[2,37],110:69,117:[2,37],125:[2,37],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{26:[1,283],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{6:[1,266],25:[1,267],85:[1,284]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],85:[2,67],90:[2,67]},{5:285,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:109,28:[1,73],44:110,55:286,56:108,58:111,59:112,75:[1,70],88:[1,113],89:[1,114]},{6:[2,55],25:[2,55],26:[2,55],27:109,28:[1,73],44:110,48:287,54:[2,55],55:107,56:108,58:111,59:112,75:[1,70],88:[1,113],89:[1,114]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{26:[1,288],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{5:289,25:[1,5],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{5:290,25:[1,5]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],72:[2,134],77:[2,134],85:[2,134],90:[2,134],92:[2,134],101:[2,134],103:[2,134],104:[2,134],105:[2,134],109:[2,134],117:[2,134],125:[2,134],127:[2,134],128:[2,134],131:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134]},{5:291,25:[1,5]},{26:[1,292],120:[1,293],121:258,122:[1,217]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],72:[2,172],77:[2,172],85:[2,172],90:[2,172],92:[2,172],101:[2,172],103:[2,172],104:[2,172],105:[2,172],109:[2,172],117:[2,172],125:[2,172],127:[2,172],128:[2,172],131:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172]},{5:294,25:[1,5]},{26:[2,175],120:[2,175],122:[2,175]},{5:295,25:[1,5],54:[1,296]},{25:[2,130],54:[2,130],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],72:[2,98],77:[2,98],85:[2,98],90:[2,98],92:[2,98],101:[2,98],103:[2,98],104:[2,98],105:[2,98],109:[2,98],117:[2,98],125:[2,98],127:[2,98],128:[2,98],131:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98]},{1:[2,101],5:297,6:[2,101],25:[1,5],26:[2,101],49:[2,101],54:[2,101],57:[2,101],72:[2,101],77:[2,101],85:[2,101],90:[2,101],92:[2,101],101:[2,101],102:87,103:[1,65],104:[2,101],105:[1,66],108:88,109:[1,68],110:69,117:[2,101],125:[2,101],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{101:[1,298]},{90:[1,299],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],70:[2,115],72:[2,115],73:[2,115],77:[2,115],83:[2,115],84:[2,115],85:[2,115],90:[2,115],92:[2,115],101:[2,115],103:[2,115],104:[2,115],105:[2,115],109:[2,115],115:[2,115],116:[2,115],117:[2,115],125:[2,115],127:[2,115],128:[2,115],131:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115]},{8:200,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:147,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],93:300,95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:200,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,146],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:147,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],86:301,87:[1,58],88:[1,59],89:[1,57],93:145,95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],85:[2,124],90:[2,124]},{6:[1,266],25:[1,267],26:[1,302]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],72:[2,141],77:[2,141],85:[2,141],90:[2,141],92:[2,141],101:[2,141],102:87,103:[1,65],104:[2,141],105:[1,66],108:88,109:[1,68],110:69,117:[2,141],125:[2,141],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],72:[2,143],77:[2,143],85:[2,143],90:[2,143],92:[2,143],101:[2,143],102:87,103:[1,65],104:[2,143],105:[1,66],108:88,109:[1,68],110:69,117:[2,143],125:[2,143],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{115:[2,162],116:[2,162]},{8:303,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:304,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:305,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],70:[2,89],72:[2,89],73:[2,89],77:[2,89],83:[2,89],84:[2,89],85:[2,89],90:[2,89],92:[2,89],101:[2,89],103:[2,89],104:[2,89],105:[2,89],109:[2,89],115:[2,89],116:[2,89],117:[2,89],125:[2,89],127:[2,89],128:[2,89],131:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89]},{11:168,27:169,28:[1,73],29:170,30:[1,71],31:[1,72],41:306,42:167,44:171,46:[1,46],88:[1,113]},{6:[2,90],11:168,25:[2,90],26:[2,90],27:169,28:[1,73],29:170,30:[1,71],31:[1,72],41:166,42:167,44:171,46:[1,46],54:[2,90],76:307,88:[1,113]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],77:[2,92]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],77:[2,40],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{8:308,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{72:[2,119],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],72:[2,38],77:[2,38],85:[2,38],90:[2,38],92:[2,38],101:[2,38],103:[2,38],104:[2,38],105:[2,38],109:[2,38],117:[2,38],125:[2,38],127:[2,38],128:[2,38],131:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],70:[2,110],72:[2,110],73:[2,110],77:[2,110],83:[2,110],84:[2,110],85:[2,110],90:[2,110],92:[2,110],101:[2,110],103:[2,110],104:[2,110],105:[2,110],109:[2,110],117:[2,110],125:[2,110],127:[2,110],128:[2,110],131:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],72:[2,49],77:[2,49],85:[2,49],90:[2,49],92:[2,49],101:[2,49],103:[2,49],104:[2,49],105:[2,49],109:[2,49],117:[2,49],125:[2,49],127:[2,49],128:[2,49],131:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:309,54:[1,202]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],72:[2,200],77:[2,200],85:[2,200],90:[2,200],92:[2,200],101:[2,200],103:[2,200],104:[2,200],105:[2,200],109:[2,200],117:[2,200],125:[2,200],127:[2,200],128:[2,200],131:[2,200],132:[2,200],133:[2,200],134:[2,200],135:[2,200],136:[2,200]},{1:[2,179],6:[2,179],25:[2,179],26:[2,179],49:[2,179],54:[2,179],57:[2,179],72:[2,179],77:[2,179],85:[2,179],90:[2,179],92:[2,179],101:[2,179],103:[2,179],104:[2,179],105:[2,179],109:[2,179],117:[2,179],120:[2,179],125:[2,179],127:[2,179],128:[2,179],131:[2,179],132:[2,179],133:[2,179],134:[2,179],135:[2,179],136:[2,179]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],72:[2,135],77:[2,135],85:[2,135],90:[2,135],92:[2,135],101:[2,135],103:[2,135],104:[2,135],105:[2,135],109:[2,135],117:[2,135],125:[2,135],127:[2,135],128:[2,135],131:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],72:[2,136],77:[2,136],85:[2,136],90:[2,136],92:[2,136],97:[2,136],101:[2,136],103:[2,136],104:[2,136],105:[2,136],109:[2,136],117:[2,136],125:[2,136],127:[2,136],128:[2,136],131:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],72:[2,170],77:[2,170],85:[2,170],90:[2,170],92:[2,170],101:[2,170],103:[2,170],104:[2,170],105:[2,170],109:[2,170],117:[2,170],125:[2,170],127:[2,170],128:[2,170],131:[2,170],132:[2,170],133:[2,170],134:[2,170],135:[2,170],136:[2,170]},{5:310,25:[1,5]},{26:[1,311]},{6:[1,312],26:[2,176],120:[2,176],122:[2,176]},{8:313,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],72:[2,102],77:[2,102],85:[2,102],90:[2,102],92:[2,102],101:[2,102],103:[2,102],104:[2,102],105:[2,102],109:[2,102],117:[2,102],125:[2,102],127:[2,102],128:[2,102],131:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],66:[2,139],67:[2,139],68:[2,139],70:[2,139],72:[2,139],73:[2,139],77:[2,139],83:[2,139],84:[2,139],85:[2,139],90:[2,139],92:[2,139],101:[2,139],103:[2,139],104:[2,139],105:[2,139],109:[2,139],117:[2,139],125:[2,139],127:[2,139],128:[2,139],131:[2,139],132:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],70:[2,118],72:[2,118],73:[2,118],77:[2,118],83:[2,118],84:[2,118],85:[2,118],90:[2,118],92:[2,118],101:[2,118],103:[2,118],104:[2,118],105:[2,118],109:[2,118],117:[2,118],125:[2,118],127:[2,118],128:[2,118],131:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],85:[2,125],90:[2,125]},{6:[2,53],25:[2,53],26:[2,53],53:314,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],85:[2,126],90:[2,126]},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],72:[2,165],77:[2,165],85:[2,165],90:[2,165],92:[2,165],101:[2,165],102:87,103:[2,165],104:[2,165],105:[2,165],108:88,109:[2,165],110:69,117:[1,315],125:[2,165],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],72:[2,167],77:[2,167],85:[2,167],90:[2,167],92:[2,167],101:[2,167],102:87,103:[2,167],104:[1,316],105:[2,167],108:88,109:[2,167],110:69,117:[2,167],125:[2,167],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],72:[2,166],77:[2,166],85:[2,166],90:[2,166],92:[2,166],101:[2,166],102:87,103:[2,166],104:[2,166],105:[2,166],108:88,109:[2,166],110:69,117:[2,166],125:[2,166],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],77:[2,93]},{6:[2,53],25:[2,53],26:[2,53],53:317,54:[1,236]},{26:[1,318],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{6:[1,247],25:[1,248],26:[1,319]},{26:[1,320]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],72:[2,173],77:[2,173],85:[2,173],90:[2,173],92:[2,173],101:[2,173],103:[2,173],104:[2,173],105:[2,173],109:[2,173],117:[2,173],125:[2,173],127:[2,173],128:[2,173],131:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173]},{26:[2,177],120:[2,177],122:[2,177]},{25:[2,131],54:[2,131],102:87,103:[1,65],105:[1,66],108:88,109:[1,68],110:69,125:[1,86],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{6:[1,266],25:[1,267],26:[1,321]},{8:322,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{8:323,9:117,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,75:[1,70],78:[1,43],82:[1,28],87:[1,58],88:[1,59],89:[1,57],95:[1,38],99:[1,44],100:[1,56],102:39,103:[1,65],105:[1,66],106:40,107:[1,67],108:41,109:[1,68],110:69,118:[1,42],123:37,124:[1,64],126:[1,31],127:[1,32],128:[1,33],129:[1,34],130:[1,35]},{6:[1,277],25:[1,278],26:[1,324]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],77:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],72:[2,171],77:[2,171],85:[2,171],90:[2,171],92:[2,171],101:[2,171],103:[2,171],104:[2,171],105:[2,171],109:[2,171],117:[2,171],125:[2,171],127:[2,171],128:[2,171],131:[2,171],132:[2,171],133:[2,171],134:[2,171],135:[2,171],136:[2,171]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],85:[2,127],90:[2,127]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],72:[2,168],77:[2,168],85:[2,168],90:[2,168],92:[2,168],101:[2,168],102:87,103:[2,168],104:[2,168],105:[2,168],108:88,109:[2,168],110:69,117:[2,168],125:[2,168],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],72:[2,169],77:[2,169],85:[2,169],90:[2,169],92:[2,169],101:[2,169],102:87,103:[2,169],104:[2,169],105:[2,169],108:88,109:[2,169],110:69,117:[2,169],125:[2,169],127:[1,80],128:[1,79],131:[1,78],132:[1,81],133:[1,82],134:[1,83],135:[1,84],136:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],77:[2,94]}],
+defaultActions: {60:[2,51],61:[2,52],75:[2,3],94:[2,108],189:[2,88]},
parseError: function parseError(str, hash) {
throw new Error(str);
},
@@ -4434,8 +3732,6 @@ parse: function parse(input) {
TERROR = 2,
EOF = 1;
- //this.reductionCount = this.shiftCount = 0;
-
this.lexer.setInput(input);
this.lexer.yy = this.yy;
this.yy.lexer = this.lexer;
@@ -4456,40 +3752,33 @@ parse: function parse(input) {
function lex() {
var token;
token = self.lexer.lex() || 1; // $end = 1
- // if token isn't its numeric value, convert
if (typeof token !== 'number') {
token = self.symbols_[token] || token;
}
return token;
- };
+ }
var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
while (true) {
- // retreive state number from top of stack
state = stack[stack.length-1];
-
- // use default actions if available
if (this.defaultActions[state]) {
action = this.defaultActions[state];
} else {
if (symbol == null)
symbol = lex();
- // read action for current state and first input
action = table[state] && table[state][symbol];
}
-
- // handle parse error
+ _handle_error:
if (typeof action === 'undefined' || !action.length || !action[0]) {
if (!recovering) {
- // Report error
expected = [];
for (p in table[state]) if (this.terminals_[p] && p > 2) {
expected.push("'"+this.terminals_[p]+"'");
}
var errStr = '';
if (this.lexer.showPosition) {
- errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+'\nExpecting '+expected.join(', ');
+ errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
} else {
errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
(symbol == 1 /*EOF*/ ? "end of input" :
@@ -4498,24 +3787,17 @@ parse: function parse(input) {
this.parseError(errStr,
{text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
}
-
- // just recovered from another error
if (recovering == 3) {
if (symbol == EOF) {
throw new Error(errStr || 'Parsing halted.');
}
-
- // discard current lookahead and grab another
yyleng = this.lexer.yyleng;
yytext = this.lexer.yytext;
yylineno = this.lexer.yylineno;
yyloc = this.lexer.yylloc;
symbol = lex();
}
-
- // try to recover from error
while (1) {
- // check for error recovery rule in this state
if ((TERROR.toString()) in table[state]) {
break;
}
@@ -4532,8 +3814,6 @@ parse: function parse(input) {
action = table[state] && table[state][TERROR];
recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
}
-
- // this shouldn't happen, unless resolve defaults are off
if (action[0] instanceof Array && action.length > 1) {
throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
}
@@ -4541,7 +3821,6 @@ parse: function parse(input) {
switch (action[0]) {
case 1: // shift
- //this.shiftCount++;
stack.push(symbol);
vstack.push(this.lexer.yytext);
@@ -4562,13 +3841,9 @@ parse: function parse(input) {
break;
case 2: // reduce
- //this.reductionCount++;
len = this.productions_[action[1]][1];
-
- // perform semantic action
yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
- // default location, uses first token for firsts, last for lasts
yyval._$ = {
first_line: lstack[lstack.length-(len||1)].first_line,
last_line: lstack[lstack.length-1].last_line,
@@ -4580,8 +3855,6 @@ parse: function parse(input) {
if (typeof r !== 'undefined') {
return r;
}
-
- // pop off stack
if (len) {
stack = stack.slice(0,-1*len*2);
vstack = vstack.slice(0, -1*len);
@@ -4591,7 +3864,6 @@ parse: function parse(input) {
stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
vstack.push(yyval.$);
lstack.push(yyval._$);
- // goto new state = table[STATE][NONTERMINAL]
newState = table[stack[stack.length-2]][stack[stack.length-1]];
stack.push(newState);
break;
@@ -4604,66 +3876,49 @@ parse: function parse(input) {
return true;
}};
+undefined
module.exports = parser;
-});/**
- * Copyright (c) 2011 Jeremy Ashkenas
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coffee/scope', 'ace/mode/coffee/helpers'], function(require, exports, module) {
- var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, Comment, Existence, Extends, For, IDENTIFIER, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, Push, Range, Return, SIMPLENUM, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, compact, del, ends, extend, flatten, last, merge, multident, starts, unfoldSoak, utility, _ref;
- var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
- for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
- function ctor() { this.constructor = child; }
- ctor.prototype = parent.prototype;
- child.prototype = new ctor;
- child.__super__ = parent.prototype;
- return child;
- }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = Array.prototype.indexOf || function(item) {
- for (var i = 0, l = this.length; i < l; i++) {
- if (this[i] === item) return i;
- }
- return -1;
- };
+
+
+});
+
+define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coffee/scope', 'ace/mode/coffee/lexer', 'ace/mode/coffee/helpers'], function(require, exports, module) {
+
+ var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, compact, del, ends, extend, flatten, last, merge, multident, some, starts, unfoldSoak, utility, _ref, _ref1,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
Scope = require('./scope').Scope;
- _ref = require('./helpers'), compact = _ref.compact, flatten = _ref.flatten, extend = _ref.extend, merge = _ref.merge, del = _ref.del, starts = _ref.starts, ends = _ref.ends, last = _ref.last;
+
+ _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED;
+
+ _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some;
+
exports.extend = extend;
+
YES = function() {
return true;
};
+
NO = function() {
return false;
};
+
THIS = function() {
return this;
};
+
NEGATE = function() {
this.negated = !this.negated;
return this;
};
+
exports.Base = Base = (function() {
+
function Base() {}
+
Base.prototype.compile = function(o, lvl) {
var node;
o = extend({}, o);
@@ -4678,13 +3933,15 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return node.compileClosure(o);
}
};
+
Base.prototype.compileClosure = function(o) {
- if (this.jumps() || this instanceof Throw) {
+ if (this.jumps()) {
throw SyntaxError('cannot use a pure statement in an expression.');
}
o.sharedScope = true;
return Closure.wrap(this).compileNode(o);
};
+
Base.prototype.cache = function(o, level, reused) {
var ref, sub;
if (!this.isComplex()) {
@@ -4700,6 +3957,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
}
};
+
Base.prototype.compileLoopReference = function(o, name) {
var src, tmp;
src = tmp = this.compile(o, LEVEL_LIST);
@@ -4708,9 +3966,17 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return [src, tmp];
};
- Base.prototype.makeReturn = function() {
- return new Return(this);
+
+ Base.prototype.makeReturn = function(res) {
+ var me;
+ me = this.unwrapAll();
+ if (res) {
+ return new Call(new Literal("" + res + ".push"), [me]);
+ } else {
+ return new Return(me);
+ }
};
+
Base.prototype.contains = function(pred) {
var contains;
contains = false;
@@ -4722,11 +3988,13 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
});
return contains;
};
+
Base.prototype.containsType = function(type) {
return this instanceof type || this.contains(function(node) {
return node instanceof type;
});
};
+
Base.prototype.lastNonComment = function(list) {
var i;
i = list.length;
@@ -4737,6 +4005,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return null;
};
+
Base.prototype.toString = function(idt, name) {
var tree;
if (idt == null) {
@@ -4754,8 +4023,9 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
});
return tree;
};
+
Base.prototype.eachChild = function(func) {
- var attr, child, _i, _j, _len, _len2, _ref2, _ref3;
+ var attr, child, _i, _j, _len, _len1, _ref2, _ref3;
if (!this.children) {
return this;
}
@@ -4764,7 +4034,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
attr = _ref2[_i];
if (this[attr]) {
_ref3 = flatten([this[attr]]);
- for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) {
+ for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
child = _ref3[_j];
if (func(child) === false) {
return this;
@@ -4774,6 +4044,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return this;
};
+
Base.prototype.traverseChildren = function(crossScope, func) {
return this.eachChild(function(child) {
if (func(child) === false) {
@@ -4782,9 +4053,11 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return child.traverseChildren(crossScope, func);
});
};
+
Base.prototype.invert = function() {
return new Op('!', this);
};
+
Base.prototype.unwrapAll = function() {
var node;
node = this;
@@ -4793,34 +4066,53 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return node;
};
+
Base.prototype.children = [];
+
Base.prototype.isStatement = NO;
+
Base.prototype.jumps = NO;
+
Base.prototype.isComplex = YES;
+
Base.prototype.isChainable = NO;
+
Base.prototype.isAssignable = NO;
+
Base.prototype.unwrap = THIS;
+
Base.prototype.unfoldSoak = NO;
+
Base.prototype.assigns = NO;
+
return Base;
+
})();
- exports.Block = Block = (function() {
- __extends(Block, Base);
+
+ exports.Block = Block = (function(_super) {
+
+ __extends(Block, _super);
+
function Block(nodes) {
this.expressions = compact(flatten(nodes || []));
}
+
Block.prototype.children = ['expressions'];
+
Block.prototype.push = function(node) {
this.expressions.push(node);
return this;
};
+
Block.prototype.pop = function() {
return this.expressions.pop();
};
+
Block.prototype.unshift = function(node) {
this.expressions.unshift(node);
return this;
};
+
Block.prototype.unwrap = function() {
if (this.expressions.length === 1) {
return this.expressions[0];
@@ -4828,9 +4120,11 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return this;
}
};
+
Block.prototype.isEmpty = function() {
return !this.expressions.length;
};
+
Block.prototype.isStatement = function(o) {
var exp, _i, _len, _ref2;
_ref2 = this.expressions;
@@ -4842,6 +4136,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return false;
};
+
Block.prototype.jumps = function(o) {
var exp, _i, _len, _ref2;
_ref2 = this.expressions;
@@ -4852,13 +4147,14 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
}
};
- Block.prototype.makeReturn = function() {
+
+ Block.prototype.makeReturn = function(res) {
var expr, len;
len = this.expressions.length;
while (len--) {
expr = this.expressions[len];
if (!(expr instanceof Comment)) {
- this.expressions[len] = expr.makeReturn();
+ this.expressions[len] = expr.makeReturn(res);
if (expr instanceof Return && !expr.expression) {
this.expressions.splice(len, 1);
}
@@ -4867,6 +4163,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return this;
};
+
Block.prototype.compile = function(o, level) {
if (o == null) {
o = {};
@@ -4877,6 +4174,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return this.compileRoot(o);
}
};
+
Block.prototype.compileNode = function(o) {
var code, codes, node, top, _i, _len, _ref2;
this.tab = o.indent;
@@ -4887,16 +4185,28 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
node = _ref2[_i];
node = node.unwrapAll();
node = node.unfoldSoak(o) || node;
- if (top) {
+ if (node instanceof Block) {
+ codes.push(node.compileNode(o));
+ } else if (top) {
node.front = true;
code = node.compile(o);
- codes.push(node.isStatement(o) ? code : this.tab + code + ';');
+ if (!node.isStatement(o)) {
+ code = "" + this.tab + code + ";";
+ if (node instanceof Literal) {
+ code = "" + code + "\n";
+ }
+ }
+ codes.push(code);
} else {
codes.push(node.compile(o, LEVEL_LIST));
}
}
if (top) {
- return codes.join('\n');
+ if (this.spaced) {
+ return "\n" + (codes.join('\n\n')) + "\n";
+ } else {
+ return codes.join('\n');
+ }
}
code = codes.join(', ') || 'void 0';
if (codes.length > 1 && o.level >= LEVEL_LIST) {
@@ -4905,23 +4215,49 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return code;
}
};
+
Block.prototype.compileRoot = function(o) {
- var code;
- o.indent = this.tab = o.bare ? '' : TAB;
+ var code, exp, i, prelude, preludeExps, rest;
+ o.indent = o.bare ? '' : TAB;
o.scope = new Scope(null, this, null);
o.level = LEVEL_TOP;
+ this.spaced = true;
+ prelude = "";
+ if (!o.bare) {
+ preludeExps = (function() {
+ var _i, _len, _ref2, _results;
+ _ref2 = this.expressions;
+ _results = [];
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
+ exp = _ref2[i];
+ if (!(exp.unwrap() instanceof Comment)) {
+ break;
+ }
+ _results.push(exp);
+ }
+ return _results;
+ }).call(this);
+ rest = this.expressions.slice(preludeExps.length);
+ this.expressions = preludeExps;
+ if (preludeExps.length) {
+ prelude = "" + (this.compileNode(merge(o, {
+ indent: ''
+ }))) + "\n";
+ }
+ this.expressions = rest;
+ }
code = this.compileWithDeclarations(o);
if (o.bare) {
return code;
- } else {
- return "(function() {\n" + code + "\n}).call(this);\n";
}
+ return "" + prelude + "(function() {\n" + code + "\n}).call(this);\n";
};
+
Block.prototype.compileWithDeclarations = function(o) {
- var assigns, code, declars, exp, i, post, rest, scope, _len, _ref2;
+ var assigns, code, declars, exp, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4;
code = post = '';
_ref2 = this.expressions;
- for (i = 0, _len = _ref2.length; i < _len; i++) {
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
exp = _ref2[i];
exp = exp.unwrap();
if (!(exp instanceof Comment || exp instanceof Literal)) {
@@ -4932,8 +4268,9 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
level: LEVEL_TOP
});
if (i) {
- rest = this.expressions.splice(i, this.expressions.length);
- code = this.compileNode(o);
+ rest = this.expressions.splice(i, 9e9);
+ _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1];
+ _ref4 = [this.compileNode(o), spaced], code = _ref4[0], this.spaced = _ref4[1];
this.expressions = rest;
}
post = this.compileNode(o);
@@ -4941,84 +4278,177 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
if (scope.expressions === this) {
declars = o.scope.hasDeclarations();
assigns = scope.hasAssignments;
- if ((declars || assigns) && i) {
- code += '\n';
- }
- if (declars) {
- code += "" + this.tab + "var " + (scope.declaredVariables().join(', ')) + ";\n";
- }
- if (assigns) {
- code += "" + this.tab + "var " + (multident(scope.assignedVariables().join(', '), this.tab)) + ";\n";
+ if (declars || assigns) {
+ if (i) {
+ code += '\n';
+ }
+ code += "" + this.tab + "var ";
+ if (declars) {
+ code += scope.declaredVariables().join(', ');
+ }
+ if (assigns) {
+ if (declars) {
+ code += ",\n" + (this.tab + TAB);
+ }
+ code += scope.assignedVariables().join(",\n" + (this.tab + TAB));
+ }
+ code += ';\n';
}
}
return code + post;
};
+
Block.wrap = function(nodes) {
if (nodes.length === 1 && nodes[0] instanceof Block) {
return nodes[0];
}
return new Block(nodes);
};
+
return Block;
- })();
- exports.Literal = Literal = (function() {
- __extends(Literal, Base);
+
+ })(Base);
+
+ exports.Literal = Literal = (function(_super) {
+
+ __extends(Literal, _super);
+
function Literal(value) {
this.value = value;
}
+
Literal.prototype.makeReturn = function() {
if (this.isStatement()) {
return this;
} else {
- return new Return(this);
+ return Literal.__super__.makeReturn.apply(this, arguments);
}
};
+
Literal.prototype.isAssignable = function() {
return IDENTIFIER.test(this.value);
};
+
Literal.prototype.isStatement = function() {
var _ref2;
return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger';
};
+
Literal.prototype.isComplex = NO;
+
Literal.prototype.assigns = function(name) {
return name === this.value;
};
+
Literal.prototype.jumps = function(o) {
- if (!this.isStatement()) {
- return false;
+ if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) {
+ return this;
}
- if (!(o && (o.loop || o.block && (this.value !== 'continue')))) {
+ if (this.value === 'continue' && !(o != null ? o.loop : void 0)) {
return this;
- } else {
- return false;
}
};
+
Literal.prototype.compileNode = function(o) {
- var code;
- code = this.isUndefined ? o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0' : this.value.reserved ? "\"" + this.value + "\"" : this.value;
+ var code, _ref2;
+ code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value;
if (this.isStatement()) {
return "" + this.tab + code + ";";
} else {
return code;
}
};
+
Literal.prototype.toString = function() {
return ' "' + this.value + '"';
};
+
return Literal;
- })();
- exports.Return = Return = (function() {
- __extends(Return, Base);
+
+ })(Base);
+
+ exports.Undefined = (function(_super) {
+
+ __extends(Undefined, _super);
+
+ function Undefined() {
+ return Undefined.__super__.constructor.apply(this, arguments);
+ }
+
+ Undefined.prototype.isAssignable = NO;
+
+ Undefined.prototype.isComplex = NO;
+
+ Undefined.prototype.compileNode = function(o) {
+ if (o.level >= LEVEL_ACCESS) {
+ return '(void 0)';
+ } else {
+ return 'void 0';
+ }
+ };
+
+ return Undefined;
+
+ })(Base);
+
+ exports.Null = (function(_super) {
+
+ __extends(Null, _super);
+
+ function Null() {
+ return Null.__super__.constructor.apply(this, arguments);
+ }
+
+ Null.prototype.isAssignable = NO;
+
+ Null.prototype.isComplex = NO;
+
+ Null.prototype.compileNode = function() {
+ return "null";
+ };
+
+ return Null;
+
+ })(Base);
+
+ exports.Bool = (function(_super) {
+
+ __extends(Bool, _super);
+
+ Bool.prototype.isAssignable = NO;
+
+ Bool.prototype.isComplex = NO;
+
+ Bool.prototype.compileNode = function() {
+ return this.val;
+ };
+
+ function Bool(val) {
+ this.val = val;
+ }
+
+ return Bool;
+
+ })(Base);
+
+ exports.Return = Return = (function(_super) {
+
+ __extends(Return, _super);
+
function Return(expr) {
if (expr && !expr.unwrap().isUndefined) {
this.expression = expr;
}
}
+
Return.prototype.children = ['expression'];
+
Return.prototype.isStatement = YES;
+
Return.prototype.makeReturn = THIS;
+
Return.prototype.jumps = THIS;
+
Return.prototype.compile = function(o, level) {
var expr, _ref2;
expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0;
@@ -5028,13 +4458,19 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return Return.__super__.compile.call(this, o, level);
}
};
+
Return.prototype.compileNode = function(o) {
- return this.tab + ("return" + (this.expression ? ' ' + this.expression.compile(o, LEVEL_PAREN) : '') + ";");
+ return this.tab + ("return" + [this.expression ? " " + (this.expression.compile(o, LEVEL_PAREN)) : void 0] + ";");
};
+
return Return;
- })();
- exports.Value = Value = (function() {
- __extends(Value, Base);
+
+ })(Base);
+
+ exports.Value = Value = (function(_super) {
+
+ __extends(Value, _super);
+
function Value(base, props, tag) {
if (!props && base instanceof Value) {
return base;
@@ -5046,26 +4482,38 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return this;
}
+
Value.prototype.children = ['base', 'properties'];
- Value.prototype.push = function(prop) {
- this.properties.push(prop);
+
+ Value.prototype.add = function(props) {
+ this.properties = this.properties.concat(props);
return this;
};
+
Value.prototype.hasProperties = function() {
return !!this.properties.length;
};
+
Value.prototype.isArray = function() {
return !this.properties.length && this.base instanceof Arr;
};
+
Value.prototype.isComplex = function() {
return this.hasProperties() || this.base.isComplex();
};
+
Value.prototype.isAssignable = function() {
return this.hasProperties() || this.base.isAssignable();
};
+
Value.prototype.isSimpleNumber = function() {
return this.base instanceof Literal && SIMPLENUM.test(this.base.value);
};
+
+ Value.prototype.isString = function() {
+ return this.base instanceof Literal && IS_STRING.test(this.base.value);
+ };
+
Value.prototype.isAtomic = function() {
var node, _i, _len, _ref2;
_ref2 = this.properties.concat(this.base);
@@ -5077,31 +4525,30 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return true;
};
+
Value.prototype.isStatement = function(o) {
return !this.properties.length && this.base.isStatement(o);
};
+
Value.prototype.assigns = function(name) {
return !this.properties.length && this.base.assigns(name);
};
+
Value.prototype.jumps = function(o) {
return !this.properties.length && this.base.jumps(o);
};
+
Value.prototype.isObject = function(onlyGenerated) {
if (this.properties.length) {
return false;
}
return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated);
};
+
Value.prototype.isSplice = function() {
return last(this.properties) instanceof Slice;
};
- Value.prototype.makeReturn = function() {
- if (this.properties.length) {
- return Value.__super__.makeReturn.call(this);
- } else {
- return this.base.makeReturn();
- }
- };
+
Value.prototype.unwrap = function() {
if (this.properties.length) {
return this;
@@ -5109,6 +4556,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return this.base;
}
};
+
Value.prototype.cacheReference = function(o) {
var base, bref, name, nref;
name = last(this.properties);
@@ -5128,15 +4576,16 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
name = new Index(new Assign(nref, name.index));
nref = new Index(nref);
}
- return [base.push(name), new Value(bref || base.base, [nref || name])];
+ return [base.add(name), new Value(bref || base.base, [nref || name])];
};
+
Value.prototype.compileNode = function(o) {
var code, prop, props, _i, _len;
this.base.front = this.front;
props = this.properties;
code = this.base.compile(o, props.length ? LEVEL_ACCESS : null);
- if (props[0] instanceof Access && this.isSimpleNumber()) {
- code = "(" + code + ")";
+ if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(code)) {
+ code = "" + code + ".";
}
for (_i = 0, _len = props.length; _i < _len; _i++) {
prop = props[_i];
@@ -5144,59 +4593,75 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return code;
};
+
Value.prototype.unfoldSoak = function(o) {
- var result;
+ var result,
+ _this = this;
if (this.unfoldedSoak != null) {
return this.unfoldedSoak;
}
- result = __bind(function() {
- var fst, i, ifn, prop, ref, snd, _len, _ref2;
- if (ifn = this.base.unfoldSoak(o)) {
- Array.prototype.push.apply(ifn.body.properties, this.properties);
+ result = (function() {
+ var fst, i, ifn, prop, ref, snd, _i, _len, _ref2;
+ if (ifn = _this.base.unfoldSoak(o)) {
+ Array.prototype.push.apply(ifn.body.properties, _this.properties);
return ifn;
}
- _ref2 = this.properties;
- for (i = 0, _len = _ref2.length; i < _len; i++) {
+ _ref2 = _this.properties;
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
prop = _ref2[i];
- if (prop.soak) {
- prop.soak = false;
- fst = new Value(this.base, this.properties.slice(0, i));
- snd = new Value(this.base, this.properties.slice(i));
- if (fst.isComplex()) {
- ref = new Literal(o.scope.freeVariable('ref'));
- fst = new Parens(new Assign(ref, fst));
- snd.base = ref;
- }
- return new If(new Existence(fst), snd, {
- soak: true
- });
+ if (!prop.soak) {
+ continue;
+ }
+ prop.soak = false;
+ fst = new Value(_this.base, _this.properties.slice(0, i));
+ snd = new Value(_this.base, _this.properties.slice(i));
+ if (fst.isComplex()) {
+ ref = new Literal(o.scope.freeVariable('ref'));
+ fst = new Parens(new Assign(ref, fst));
+ snd.base = ref;
}
+ return new If(new Existence(fst), snd, {
+ soak: true
+ });
}
return null;
- }, this)();
+ })();
return this.unfoldedSoak = result || false;
};
+
return Value;
- })();
- exports.Comment = Comment = (function() {
- __extends(Comment, Base);
+
+ })(Base);
+
+ exports.Comment = Comment = (function(_super) {
+
+ __extends(Comment, _super);
+
function Comment(comment) {
this.comment = comment;
}
+
Comment.prototype.isStatement = YES;
+
Comment.prototype.makeReturn = THIS;
+
Comment.prototype.compileNode = function(o, level) {
var code;
- code = '/*' + multident(this.comment, this.tab) + '*/';
+ code = '/*' + multident(this.comment, this.tab) + ("\n" + this.tab + "*/\n");
if ((level || o.level) === LEVEL_TOP) {
code = o.indent + code;
}
return code;
};
+
return Comment;
- })();
- exports.Call = Call = (function() {
- __extends(Call, Base);
+
+ })(Base);
+
+ exports.Call = Call = (function(_super) {
+
+ __extends(Call, _super);
+
function Call(variable, args, soak) {
this.args = args != null ? args : [];
this.soak = soak;
@@ -5204,33 +4669,48 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
this.isSuper = variable === 'super';
this.variable = this.isSuper ? null : variable;
}
+
Call.prototype.children = ['variable', 'args'];
+
Call.prototype.newInstance = function() {
- var base;
- base = this.variable.base || this.variable;
- if (base instanceof Call) {
+ var base, _ref2;
+ base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable;
+ if (base instanceof Call && !base.isNew) {
base.newInstance();
} else {
this.isNew = true;
}
return this;
};
+
Call.prototype.superReference = function(o) {
- var method, name;
- method = o.scope.method;
+ var accesses, method, name;
+ method = o.scope.namedMethod();
if (!method) {
throw SyntaxError('cannot call super outside of a function.');
}
name = method.name;
- if (!name) {
+ if (name == null) {
throw SyntaxError('cannot call super on an anonymous function.');
}
if (method.klass) {
- return "" + method.klass + ".__super__." + name;
+ accesses = [new Access(new Literal('__super__'))];
+ if (method["static"]) {
+ accesses.push(new Access(new Literal('constructor')));
+ }
+ accesses.push(new Access(new Literal(name)));
+ return (new Value(new Literal(method.klass), accesses)).compile(o);
} else {
return "" + name + ".__super__.constructor";
}
};
+
+ Call.prototype.superThis = function(o) {
+ var method;
+ method = o.scope.method;
+ return (method && !method.klass && method.context) || "this";
+ };
+
Call.prototype.unfoldSoak = function(o) {
var call, ifn, left, list, rite, _i, _len, _ref2, _ref3;
if (this.soak) {
@@ -5280,8 +4760,9 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return ifn;
};
+
Call.prototype.filterImplicitObjects = function(list) {
- var node, nodes, obj, prop, properties, _i, _j, _len, _len2, _ref2;
+ var node, nodes, obj, prop, properties, _i, _j, _len, _len1, _ref2;
nodes = [];
for (_i = 0, _len = list.length; _i < _len; _i++) {
node = list[_i];
@@ -5291,9 +4772,9 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
obj = null;
_ref2 = node.base.properties;
- for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) {
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
prop = _ref2[_j];
- if (prop instanceof Assign) {
+ if (prop instanceof Assign || prop instanceof Comment) {
if (!obj) {
nodes.push(obj = new Obj(properties = [], true));
}
@@ -5306,6 +4787,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return nodes;
};
+
Call.prototype.compileNode = function(o) {
var arg, args, code, _ref2;
if ((_ref2 = this.variable) != null) {
@@ -5325,22 +4807,24 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return _results;
})()).join(', ');
if (this.isSuper) {
- return this.superReference(o) + (".call(this" + (args && ', ' + args) + ")");
+ return this.superReference(o) + (".call(" + (this.superThis(o)) + (args && ', ' + args) + ")");
} else {
return (this.isNew ? 'new ' : '') + this.variable.compile(o, LEVEL_ACCESS) + ("(" + args + ")");
}
};
+
Call.prototype.compileSuper = function(args, o) {
- return "" + (this.superReference(o)) + ".call(this" + (args.length ? ', ' : '') + args + ")";
+ return "" + (this.superReference(o)) + ".call(" + (this.superThis(o)) + (args.length ? ', ' : '') + args + ")";
};
+
Call.prototype.compileSplat = function(o, splatArgs) {
var base, fun, idt, name, ref;
if (this.isSuper) {
- return "" + (this.superReference(o)) + ".apply(this, " + splatArgs + ")";
+ return "" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", " + splatArgs + ")";
}
if (this.isNew) {
idt = this.tab + TAB;
- return "(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return typeof result === \"object\" ? result : child;\n" + this.tab + "})(" + (this.variable.compile(o, LEVEL_LIST)) + ", " + splatArgs + ", function() {})";
+ return "(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args), t = typeof result;\n" + idt + "return t == \"object\" || t == \"function\" ? result || child : child;\n" + this.tab + "})(" + (this.variable.compile(o, LEVEL_LIST)) + ", " + splatArgs + ", function(){})";
}
base = new Value(this.variable);
if ((name = base.properties.pop()) && base.isComplex()) {
@@ -5360,68 +4844,100 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return "" + fun + ".apply(" + ref + ", " + splatArgs + ")";
};
+
return Call;
- })();
- exports.Extends = Extends = (function() {
- __extends(Extends, Base);
+
+ })(Base);
+
+ exports.Extends = Extends = (function(_super) {
+
+ __extends(Extends, _super);
+
function Extends(child, parent) {
this.child = child;
this.parent = parent;
}
+
Extends.prototype.children = ['child', 'parent'];
+
Extends.prototype.compile = function(o) {
- utility('hasProp');
return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compile(o);
};
+
return Extends;
- })();
- exports.Access = Access = (function() {
- __extends(Access, Base);
+
+ })(Base);
+
+ exports.Access = Access = (function(_super) {
+
+ __extends(Access, _super);
+
function Access(name, tag) {
this.name = name;
this.name.asKey = true;
- this.proto = tag === 'proto' ? '.prototype' : '';
this.soak = tag === 'soak';
}
+
Access.prototype.children = ['name'];
+
Access.prototype.compile = function(o) {
var name;
name = this.name.compile(o);
- return this.proto + (IS_STRING.test(name) ? "[" + name + "]" : "." + name);
+ if (IDENTIFIER.test(name)) {
+ return "." + name;
+ } else {
+ return "[" + name + "]";
+ }
};
+
Access.prototype.isComplex = NO;
+
return Access;
- })();
- exports.Index = Index = (function() {
- __extends(Index, Base);
+
+ })(Base);
+
+ exports.Index = Index = (function(_super) {
+
+ __extends(Index, _super);
+
function Index(index) {
this.index = index;
}
+
Index.prototype.children = ['index'];
+
Index.prototype.compile = function(o) {
- return (this.proto ? '.prototype' : '') + ("[" + (this.index.compile(o, LEVEL_PAREN)) + "]");
+ return "[" + (this.index.compile(o, LEVEL_PAREN)) + "]";
};
+
Index.prototype.isComplex = function() {
return this.index.isComplex();
};
+
return Index;
- })();
- exports.Range = Range = (function() {
- __extends(Range, Base);
+
+ })(Base);
+
+ exports.Range = Range = (function(_super) {
+
+ __extends(Range, _super);
+
Range.prototype.children = ['from', 'to'];
+
function Range(from, to, tag) {
this.from = from;
this.to = to;
this.exclusive = tag === 'exclusive';
this.equals = this.exclusive ? '' : '=';
}
+
Range.prototype.compileVariables = function(o) {
var step, _ref2, _ref3, _ref4, _ref5;
o = merge(o, {
top: true
});
- _ref2 = this.from.cache(o, LEVEL_LIST), this.from = _ref2[0], this.fromVar = _ref2[1];
- _ref3 = this.to.cache(o, LEVEL_LIST), this.to = _ref3[0], this.toVar = _ref3[1];
+ _ref2 = this.from.cache(o, LEVEL_LIST), this.fromC = _ref2[0], this.fromVar = _ref2[1];
+ _ref3 = this.to.cache(o, LEVEL_LIST), this.toC = _ref3[0], this.toVar = _ref3[1];
if (step = del(o, 'step')) {
_ref4 = step.cache(o, LEVEL_LIST), this.step = _ref4[0], this.stepVar = _ref4[1];
}
@@ -5430,8 +4946,9 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return this.stepNum = this.stepVar.match(SIMPLENUM);
}
};
+
Range.prototype.compileNode = function(o) {
- var cond, condPart, from, gt, idx, known, lt, stepPart, to, varPart, _ref2, _ref3;
+ var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3;
if (!this.fromVar) {
this.compileVariables(o);
}
@@ -5440,26 +4957,35 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
known = this.fromNum && this.toNum;
idx = del(o, 'index');
- varPart = "" + idx + " = " + this.from;
- if (this.to !== this.toVar) {
- varPart += ", " + this.to;
+ idxName = del(o, 'name');
+ namedIndex = idxName && idxName !== idx;
+ varPart = "" + idx + " = " + this.fromC;
+ if (this.toC !== this.toVar) {
+ varPart += ", " + this.toC;
}
if (this.step !== this.stepVar) {
varPart += ", " + this.step;
}
_ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1];
- condPart = this.stepNum ? condPart = +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [+this.fromNum, +this.toNum], from = _ref3[0], to = _ref3[1], _ref3), condPart = from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = "" + this.fromVar + " <= " + this.toVar, condPart = "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
- stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? from <= to ? "" + idx + "++" : "" + idx + "--" : "" + cond + " ? " + idx + "++ : " + idx + "--";
+ condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [+this.fromNum, +this.toNum], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
+ stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--";
+ if (namedIndex) {
+ varPart = "" + idxName + " = " + varPart;
+ }
+ if (namedIndex) {
+ stepPart = "" + idxName + " = " + stepPart;
+ }
return "" + varPart + "; " + condPart + "; " + stepPart;
};
+
Range.prototype.compileArray = function(o) {
- var body, cond, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results;
+ var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results;
if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) {
range = (function() {
_results = [];
for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); }
return _results;
- }).apply(this, arguments);
+ }).apply(this);
if (this.exclusive) {
range.pop();
}
@@ -5473,50 +4999,68 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
o.index = i;
body = this.compileNode(o);
} else {
- vars = ("" + i + " = " + this.from) + (this.to !== this.toVar ? ", " + this.to : '');
+ vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : '');
cond = "" + this.fromVar + " <= " + this.toVar;
body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--";
}
post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent;
- return "(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this, arguments)";
+ hasArgs = function(node) {
+ return node != null ? node.contains(function(n) {
+ return n instanceof Literal && n.value === 'arguments' && !n.asKey;
+ }) : void 0;
+ };
+ if (hasArgs(this.from) || hasArgs(this.to)) {
+ args = ', arguments';
+ }
+ return "(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")";
};
+
return Range;
- })();
- exports.Slice = Slice = (function() {
- __extends(Slice, Base);
+
+ })(Base);
+
+ exports.Slice = Slice = (function(_super) {
+
+ __extends(Slice, _super);
+
Slice.prototype.children = ['range'];
+
function Slice(range) {
this.range = range;
Slice.__super__.constructor.call(this);
}
+
Slice.prototype.compileNode = function(o) {
var compiled, from, fromStr, to, toStr, _ref2;
_ref2 = this.range, to = _ref2.to, from = _ref2.from;
fromStr = from && from.compile(o, LEVEL_PAREN) || '0';
compiled = to && to.compile(o, LEVEL_PAREN);
if (to && !(!this.range.exclusive && +compiled === -1)) {
- toStr = ', ' + (this.range.exclusive ? compiled : SIMPLENUM.test(compiled) ? (+compiled + 1).toString() : "(" + compiled + " + 1) || 9e9");
+ toStr = ', ' + (this.range.exclusive ? compiled : SIMPLENUM.test(compiled) ? "" + (+compiled + 1) : (compiled = to.compile(o, LEVEL_ACCESS), "+" + compiled + " + 1 || 9e9"));
}
return ".slice(" + fromStr + (toStr || '') + ")";
};
+
return Slice;
- })();
- exports.Obj = Obj = (function() {
- __extends(Obj, Base);
+
+ })(Base);
+
+ exports.Obj = Obj = (function(_super) {
+
+ __extends(Obj, _super);
+
function Obj(props, generated) {
this.generated = generated != null ? generated : false;
this.objects = this.properties = props || [];
}
+
Obj.prototype.children = ['properties'];
+
Obj.prototype.compileNode = function(o) {
var i, idt, indent, join, lastNoncom, node, obj, prop, props, _i, _len;
props = this.properties;
if (!props.length) {
- if (this.front) {
- return '({})';
- } else {
- return '{}';
- }
+ return (this.front ? '({})' : '{}');
}
if (this.generated) {
for (_i = 0, _len = props.length; _i < _len; _i++) {
@@ -5529,9 +5073,9 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
idt = o.indent += TAB;
lastNoncom = this.lastNonComment(this.properties);
props = (function() {
- var _len2, _results;
+ var _j, _len1, _results;
_results = [];
- for (i = 0, _len2 = props.length; i < _len2; i++) {
+ for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) {
prop = props[i];
join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n';
indent = prop instanceof Comment ? '' : idt;
@@ -5556,6 +5100,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return obj;
}
};
+
Obj.prototype.assigns = function(name) {
var prop, _i, _len, _ref2;
_ref2 = this.properties;
@@ -5567,15 +5112,23 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return false;
};
+
return Obj;
- })();
- exports.Arr = Arr = (function() {
- __extends(Arr, Base);
+
+ })(Base);
+
+ exports.Arr = Arr = (function(_super) {
+
+ __extends(Arr, _super);
+
function Arr(objs) {
this.objects = objs || [];
}
+
Arr.prototype.children = ['objects'];
+
Arr.prototype.filterImplicitObjects = Call.prototype.filterImplicitObjects;
+
Arr.prototype.compileNode = function(o) {
var code, obj, objs;
if (!this.objects.length) {
@@ -5601,6 +5154,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return "[" + code + "]";
}
};
+
Arr.prototype.assigns = function(name) {
var obj, _i, _len, _ref2;
_ref2 = this.objects;
@@ -5612,10 +5166,15 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return false;
};
+
return Arr;
- })();
- exports.Class = Class = (function() {
- __extends(Class, Base);
+
+ })(Base);
+
+ exports.Class = Class = (function(_super) {
+
+ __extends(Class, _super);
+
function Class(variable, parent, body) {
this.variable = variable;
this.parent = parent;
@@ -5623,15 +5182,21 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
this.boundFuncs = [];
this.body.classBody = true;
}
+
Class.prototype.children = ['variable', 'parent', 'body'];
+
Class.prototype.determineName = function() {
var decl, tail;
if (!this.variable) {
return null;
}
decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value;
+ if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) {
+ throw SyntaxError("variable name may not be " + decl);
+ }
return decl && (decl = IDENTIFIER.test(decl) && decl);
};
+
Class.prototype.setContext = function(name) {
return this.body.traverseChildren(false, function(node) {
if (node.classBody) {
@@ -5647,19 +5212,21 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
});
};
+
Class.prototype.addBoundFunctions = function(o) {
- var bname, bvar, _i, _len, _ref2, _results;
+ var bvar, lhs, _i, _len, _ref2, _results;
if (this.boundFuncs.length) {
_ref2 = this.boundFuncs;
_results = [];
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
bvar = _ref2[_i];
- bname = bvar.compile(o);
- _results.push(this.ctor.body.unshift(new Literal("this." + bname + " = " + (utility('bind')) + "(this." + bname + ", this)")));
+ lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o);
+ _results.push(this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")));
}
return _results;
}
};
+
Class.prototype.addProperties = function(node, name, o) {
var assign, base, exprs, func, props;
props = node.base.properties.slice(0);
@@ -5685,12 +5252,17 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
assign = new Assign(new Literal(this.externalCtor), func);
}
} else {
- if (!assign.variable["this"]) {
- assign.variable = new Value(new Literal(name), [new Access(base, 'proto')]);
- }
- if (func instanceof Code && func.bound) {
- this.boundFuncs.push(base);
- func.bound = false;
+ if (assign.variable["this"]) {
+ func["static"] = true;
+ if (func.bound) {
+ func.context = name;
+ }
+ } else {
+ assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]);
+ if (func instanceof Code && func.bound) {
+ this.boundFuncs.push(base);
+ func.bound = false;
+ }
}
}
}
@@ -5700,24 +5272,37 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}).call(this);
return compact(exprs);
};
+
Class.prototype.walkBody = function(name, o) {
- return this.traverseChildren(false, __bind(function(child) {
- var exps, i, node, _len, _ref2;
+ var _this = this;
+ return this.traverseChildren(false, function(child) {
+ var exps, i, node, _i, _len, _ref2;
if (child instanceof Class) {
return false;
}
if (child instanceof Block) {
_ref2 = exps = child.expressions;
- for (i = 0, _len = _ref2.length; i < _len; i++) {
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
node = _ref2[i];
if (node instanceof Value && node.isObject(true)) {
- exps[i] = this.addProperties(node, name, o);
+ exps[i] = _this.addProperties(node, name, o);
}
}
return child.expressions = exps = flatten(exps);
}
- }, this));
+ });
+ };
+
+ Class.prototype.hoistDirectivePrologue = function() {
+ var expressions, index, node;
+ index = 0;
+ expressions = this.body.expressions;
+ while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) {
+ ++index;
+ }
+ return this.directives = expressions.splice(0, index);
};
+
Class.prototype.ensureConstructor = function(name) {
if (!this.ctor) {
this.ctor = new Code;
@@ -5727,53 +5312,85 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
if (this.externalCtor) {
this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)"));
}
+ this.ctor.body.makeReturn();
this.body.expressions.unshift(this.ctor);
}
this.ctor.ctor = this.ctor.name = name;
this.ctor.klass = null;
return this.ctor.noReturn = true;
};
+
Class.prototype.compileNode = function(o) {
- var decl, klass, lname, name;
+ var call, decl, klass, lname, name, params, _ref2;
decl = this.determineName();
- name = decl || this.name || '_Class';
+ name = decl || '_Class';
+ if (name.reserved) {
+ name = "_" + name;
+ }
lname = new Literal(name);
+ this.hoistDirectivePrologue();
this.setContext(name);
this.walkBody(name, o);
this.ensureConstructor(name);
- if (this.parent) {
- this.body.expressions.unshift(new Extends(lname, this.parent));
- }
+ this.body.spaced = true;
if (!(this.ctor instanceof Code)) {
this.body.expressions.unshift(this.ctor);
}
this.body.expressions.push(lname);
+ (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives);
this.addBoundFunctions(o);
- klass = new Parens(Closure.wrap(this.body), true);
+ call = Closure.wrap(this.body);
+ if (this.parent) {
+ this.superClass = new Literal(o.scope.freeVariable('super', false));
+ this.body.expressions.unshift(new Extends(lname, this.superClass));
+ call.args.push(this.parent);
+ params = call.variable.params || call.variable.base.params;
+ params.push(new Param(this.superClass));
+ }
+ klass = new Parens(call, true);
if (this.variable) {
klass = new Assign(this.variable, klass);
}
return klass.compile(o);
};
+
return Class;
- })();
- exports.Assign = Assign = (function() {
- __extends(Assign, Base);
+
+ })(Base);
+
+ exports.Assign = Assign = (function(_super) {
+
+ __extends(Assign, _super);
+
function Assign(variable, value, context, options) {
+ var forbidden, name, _ref2;
this.variable = variable;
this.value = value;
this.context = context;
this.param = options && options.param;
+ this.subpattern = options && options.subpattern;
+ forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0);
+ if (forbidden && this.context !== 'object') {
+ throw SyntaxError("variable name may not be \"" + name + "\"");
+ }
}
+
Assign.prototype.children = ['variable', 'value'];
+
+ Assign.prototype.isStatement = function(o) {
+ return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0;
+ };
+
Assign.prototype.assigns = function(name) {
return this[this.context === 'object' ? 'value' : 'variable'].assigns(name);
};
+
Assign.prototype.unfoldSoak = function(o) {
return unfoldSoak(o, this, 'variable');
};
+
Assign.prototype.compileNode = function(o) {
- var isValue, match, name, val, _ref2;
+ var isValue, match, name, val, varBase, _ref2, _ref3, _ref4, _ref5;
if (isValue = this.variable instanceof Value) {
if (this.variable.isArray() || this.variable.isObject()) {
return this.compilePatternMatch(o);
@@ -5786,21 +5403,23 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
}
name = this.variable.compile(o, LEVEL_LIST);
- if (!(this.context || this.variable.isAssignable())) {
- throw SyntaxError("\"" + (this.variable.compile(o)) + "\" cannot be assigned.");
- }
- if (!(this.context || isValue && (this.variable.namespaced || this.variable.hasProperties()))) {
- if (this.param) {
- o.scope.add(name, 'var');
- } else {
- o.scope.find(name);
+ if (!this.context) {
+ if (!(varBase = this.variable.unwrapAll()).isAssignable()) {
+ throw SyntaxError("\"" + (this.variable.compile(o)) + "\" cannot be assigned.");
+ }
+ if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) {
+ if (this.param) {
+ o.scope.add(name, 'var');
+ } else {
+ o.scope.find(name);
+ }
}
}
if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) {
- this.value.name = match[2];
if (match[1]) {
this.value.klass = match[1];
}
+ this.value.name = (_ref3 = (_ref4 = (_ref5 = match[2]) != null ? _ref5 : match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5];
}
val = this.value.compile(o, LEVEL_LIST);
if (this.context === 'object') {
@@ -5813,8 +5432,9 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return "(" + val + ")";
}
};
+
Assign.prototype.compilePatternMatch = function(o) {
- var acc, assigns, code, i, idx, isObject, ivar, obj, objects, olen, ref, rest, splat, top, val, value, vvar, _len, _ref2, _ref3, _ref4, _ref5;
+ var acc, assigns, code, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
top = o.level === LEVEL_TOP;
value = this.value;
objects = this.variable.base.objects;
@@ -5829,10 +5449,10 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
isObject = this.variable.isObject();
if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) {
if (obj instanceof Assign) {
- _ref2 = obj, idx = _ref2.variable.base, obj = _ref2.value;
+ _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value;
} else {
if (obj.base instanceof Parens) {
- _ref3 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref3[0], idx = _ref3[1];
+ _ref4 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref4[0], idx = _ref4[1];
} else {
idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0);
}
@@ -5840,6 +5460,9 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
acc = IDENTIFIER.test(idx.unwrap().value || 0);
value = new Value(value);
value.properties.push(new (acc ? Access : Index)(idx));
+ if (_ref5 = obj.unwrap().value, __indexOf.call(RESERVED, _ref5) >= 0) {
+ throw new SyntaxError("assignment to a reserved word: " + (obj.compile(o)) + " = " + (value.compile(o)));
+ }
return new Assign(obj, value, null, {
param: this.param
}).compile(o, LEVEL_TOP);
@@ -5851,21 +5474,23 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
assigns.push("" + (ref = o.scope.freeVariable('ref')) + " = " + vvar);
vvar = ref;
}
- for (i = 0, _len = objects.length; i < _len; i++) {
+ for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) {
obj = objects[i];
idx = i;
if (isObject) {
if (obj instanceof Assign) {
- _ref4 = obj, idx = _ref4.variable.base, obj = _ref4.value;
+ _ref6 = obj, (_ref7 = _ref6.variable, idx = _ref7.base), obj = _ref6.value;
} else {
if (obj.base instanceof Parens) {
- _ref5 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref5[0], idx = _ref5[1];
+ _ref8 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref8[0], idx = _ref8[1];
} else {
idx = obj["this"] ? obj.properties[0].name : obj;
}
}
}
if (!splat && obj instanceof Splat) {
+ name = obj.name.unwrap().value;
+ obj = obj.unwrap();
val = "" + olen + " <= " + vvar + ".length ? " + (utility('slice')) + ".call(" + vvar + ", " + i;
if (rest = olen - i - 1) {
ivar = o.scope.freeVariable('i');
@@ -5876,9 +5501,10 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
val = new Literal(val);
splat = "" + ivar + "++";
} else {
+ name = obj.unwrap().value;
if (obj instanceof Splat) {
obj = obj.name.compile(o);
- throw SyntaxError("multiple splats are disallowed in an assignment: " + obj + " ...");
+ throw new SyntaxError("multiple splats are disallowed in an assignment: " + obj + "...");
}
if (typeof idx === 'number') {
idx = new Literal(splat || idx);
@@ -5888,11 +5514,15 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
val = new Value(new Literal(vvar), [new (acc ? Access : Index)(idx)]);
}
+ if ((name != null) && __indexOf.call(RESERVED, name) >= 0) {
+ throw new SyntaxError("assignment to a reserved word: " + (obj.compile(o)) + " = " + (val.compile(o)));
+ }
assigns.push(new Assign(obj, val, null, {
- param: this.param
- }).compile(o, LEVEL_TOP));
+ param: this.param,
+ subpattern: true
+ }).compile(o, LEVEL_LIST));
}
- if (!top) {
+ if (!(top || this.subpattern)) {
assigns.push(vvar);
}
code = assigns.join(', ');
@@ -5902,14 +5532,19 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return "(" + code + ")";
}
};
+
Assign.prototype.compileConditional = function(o) {
- var left, rite, _ref2;
- _ref2 = this.variable.cacheReference(o), left = _ref2[0], rite = _ref2[1];
+ var left, right, _ref2;
+ _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1];
+ if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) {
+ throw new Error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been defined.");
+ }
if (__indexOf.call(this.context, "?") >= 0) {
o.isExistentialEquals = true;
}
- return new Op(this.context.slice(0, -1), left, new Assign(rite, this.value, '=')).compile(o);
+ return new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compile(o);
};
+
Assign.prototype.compileSplice = function(o) {
var code, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4;
_ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive;
@@ -5922,7 +5557,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
to += 1;
}
} else {
- to = to.compile(o) + ' - ' + fromRef;
+ to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef;
if (!exclusive) {
to += ' + 1';
}
@@ -5938,58 +5573,79 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return code;
}
};
+
return Assign;
- })();
- exports.Code = Code = (function() {
- __extends(Code, Base);
+
+ })(Base);
+
+ exports.Code = Code = (function(_super) {
+
+ __extends(Code, _super);
+
function Code(params, body, tag) {
this.params = params || [];
this.body = body || new Block;
this.bound = tag === 'boundfunc';
if (this.bound) {
- this.context = 'this';
+ this.context = '_this';
}
}
+
Code.prototype.children = ['params', 'body'];
+
Code.prototype.isStatement = function() {
return !!this.ctor;
};
+
Code.prototype.jumps = NO;
+
Code.prototype.compileNode = function(o) {
- var code, exprs, i, idt, lit, p, param, ref, splats, v, val, vars, wasEmpty, _i, _j, _k, _len, _len2, _len3, _len4, _ref2, _ref3, _ref4, _ref5;
+ var code, exprs, i, idt, lit, name, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
o.scope = new Scope(o.scope, this.body, this);
o.scope.shared = del(o, 'sharedScope');
o.indent += TAB;
delete o.bare;
- vars = [];
+ delete o.isExistentialEquals;
+ params = [];
exprs = [];
- _ref2 = this.params;
+ _ref2 = this.paramNames();
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
- param = _ref2[_i];
- if (param.splat) {
- _ref3 = this.params;
- for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) {
- p = _ref3[_j];
- if (p.name.value) {
- o.scope.add(p.name.value, 'var', true);
- }
+ name = _ref2[_i];
+ if (!o.scope.check(name)) {
+ o.scope.parameter(name);
+ }
+ }
+ _ref3 = this.params;
+ for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
+ param = _ref3[_j];
+ if (!param.splat) {
+ continue;
+ }
+ _ref4 = this.params;
+ for (_k = 0, _len2 = _ref4.length; _k < _len2; _k++) {
+ p = _ref4[_k].name;
+ if (p["this"]) {
+ p = p.properties[0].name;
+ }
+ if (p.value) {
+ o.scope.add(p.value, 'var', true);
}
- splats = new Assign(new Value(new Arr((function() {
- var _k, _len3, _ref4, _results;
- _ref4 = this.params;
- _results = [];
- for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) {
- p = _ref4[_k];
- _results.push(p.asReference(o));
- }
- return _results;
- }).call(this))), new Value(new Literal('arguments')));
- break;
}
+ splats = new Assign(new Value(new Arr((function() {
+ var _l, _len3, _ref5, _results;
+ _ref5 = this.params;
+ _results = [];
+ for (_l = 0, _len3 = _ref5.length; _l < _len3; _l++) {
+ p = _ref5[_l];
+ _results.push(p.asReference(o));
+ }
+ return _results;
+ }).call(this))), new Value(new Literal('arguments')));
+ break;
}
- _ref4 = this.params;
- for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) {
- param = _ref4[_k];
+ _ref5 = this.params;
+ for (_l = 0, _len3 = _ref5.length; _l < _len3; _l++) {
+ param = _ref5[_l];
if (param.isComplex()) {
val = ref = param.asReference(o);
if (param.value) {
@@ -6007,7 +5663,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
}
if (!splats) {
- vars.push(ref);
+ params.push(ref);
}
}
wasEmpty = this.body.isEmpty();
@@ -6015,23 +5671,37 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
exprs.unshift(splats);
}
if (exprs.length) {
- (_ref5 = this.body.expressions).unshift.apply(_ref5, exprs);
+ (_ref6 = this.body.expressions).unshift.apply(_ref6, exprs);
+ }
+ for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) {
+ p = params[i];
+ o.scope.parameter(params[i] = p.compile(o));
}
- if (!splats) {
- for (i = 0, _len4 = vars.length; i < _len4; i++) {
- v = vars[i];
- o.scope.parameter(vars[i] = v.compile(o));
+ uniqs = [];
+ _ref7 = this.paramNames();
+ for (_n = 0, _len5 = _ref7.length; _n < _len5; _n++) {
+ name = _ref7[_n];
+ if (__indexOf.call(uniqs, name) >= 0) {
+ throw SyntaxError("multiple parameters named '" + name + "'");
}
+ uniqs.push(name);
}
if (!(wasEmpty || this.noReturn)) {
this.body.makeReturn();
}
+ if (this.bound) {
+ if ((_ref8 = o.scope.parent.method) != null ? _ref8.bound : void 0) {
+ this.bound = this.context = o.scope.parent.method.context;
+ } else if (!this["static"]) {
+ o.scope.parent.assign('_this', 'this');
+ }
+ }
idt = o.indent;
code = 'function';
if (this.ctor) {
code += ' ' + this.name;
}
- code += '(' + vars.join(', ') + ') {';
+ code += '(' + params.join(', ') + ') {';
if (!this.body.isEmpty()) {
code += "\n" + (this.body.compileWithDeclarations(o)) + "\n" + this.tab;
}
@@ -6039,33 +5709,54 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
if (this.ctor) {
return this.tab + code;
}
- if (this.bound) {
- return utility('bind') + ("(" + code + ", " + this.context + ")");
- }
if (this.front || (o.level >= LEVEL_ACCESS)) {
return "(" + code + ")";
} else {
return code;
}
};
+
+ Code.prototype.paramNames = function() {
+ var names, param, _i, _len, _ref2;
+ names = [];
+ _ref2 = this.params;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ param = _ref2[_i];
+ names.push.apply(names, param.names());
+ }
+ return names;
+ };
+
Code.prototype.traverseChildren = function(crossScope, func) {
if (crossScope) {
return Code.__super__.traverseChildren.call(this, crossScope, func);
}
};
+
return Code;
- })();
- exports.Param = Param = (function() {
- __extends(Param, Base);
+
+ })(Base);
+
+ exports.Param = Param = (function(_super) {
+
+ __extends(Param, _super);
+
function Param(name, value, splat) {
+ var _ref2;
this.name = name;
this.value = value;
this.splat = splat;
+ if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) {
+ throw SyntaxError("parameter name \"" + name + "\" is not allowed");
+ }
}
+
Param.prototype.children = ['name', 'value'];
+
Param.prototype.compile = function(o) {
return this.name.compile(o, LEVEL_LIST);
};
+
Param.prototype.asReference = function(o) {
var node;
if (this.reference) {
@@ -6075,7 +5766,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
if (node["this"]) {
node = node.properties[0].name;
if (node.value.reserved) {
- node = new Literal('_' + node.value);
+ node = new Literal(o.scope.freeVariable(node.value));
}
} else if (node.isComplex()) {
node = new Literal(o.scope.freeVariable('arg'));
@@ -6086,21 +5777,74 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return this.reference = node;
};
+
Param.prototype.isComplex = function() {
return this.name.isComplex();
};
+
+ Param.prototype.names = function(name) {
+ var atParam, names, obj, _i, _len, _ref2;
+ if (name == null) {
+ name = this.name;
+ }
+ atParam = function(obj) {
+ var value;
+ value = obj.properties[0].name.value;
+ if (value.reserved) {
+ return [];
+ } else {
+ return [value];
+ }
+ };
+ if (name instanceof Literal) {
+ return [name.value];
+ }
+ if (name instanceof Value) {
+ return atParam(name);
+ }
+ names = [];
+ _ref2 = name.objects;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ obj = _ref2[_i];
+ if (obj instanceof Assign) {
+ names.push(obj.value.unwrap().value);
+ } else if (obj instanceof Splat) {
+ names.push(obj.name.unwrap().value);
+ } else if (obj instanceof Value) {
+ if (obj.isArray() || obj.isObject()) {
+ names.push.apply(names, this.names(obj.base));
+ } else if (obj["this"]) {
+ names.push.apply(names, atParam(obj));
+ } else {
+ names.push(obj.base.value);
+ }
+ } else {
+ throw SyntaxError("illegal parameter " + (obj.compile()));
+ }
+ }
+ return names;
+ };
+
return Param;
- })();
- exports.Splat = Splat = (function() {
- __extends(Splat, Base);
+
+ })(Base);
+
+ exports.Splat = Splat = (function(_super) {
+
+ __extends(Splat, _super);
+
Splat.prototype.children = ['name'];
+
Splat.prototype.isAssignable = YES;
+
function Splat(name) {
this.name = name.compile ? name : new Literal(name);
}
+
Splat.prototype.assigns = function(name) {
return this.name.assigns(name);
};
+
Splat.prototype.compile = function(o) {
if (this.index != null) {
return this.compileParam(o);
@@ -6108,8 +5852,13 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return this.name.compile(o);
}
};
+
+ Splat.prototype.unwrap = function() {
+ return this.name;
+ };
+
Splat.compileSplattedArray = function(o, list, apply) {
- var args, base, code, i, index, node, _len;
+ var args, base, code, i, index, node, _i, _len;
index = -1;
while ((node = list[++index]) && !(node instanceof Splat)) {
continue;
@@ -6125,7 +5874,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return "" + (utility('slice')) + ".call(" + code + ")";
}
args = list.slice(index);
- for (i = 0, _len = args.length; i < _len; i++) {
+ for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) {
node = args[i];
code = node.compile(o, LEVEL_LIST);
args[i] = node instanceof Splat ? "" + (utility('slice')) + ".call(" + code + ")" : "[" + code + "]";
@@ -6134,35 +5883,51 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return args[0] + (".concat(" + (args.slice(1).join(', ')) + ")");
}
base = (function() {
- var _i, _len2, _ref2, _results;
+ var _j, _len1, _ref2, _results;
_ref2 = list.slice(0, index);
_results = [];
- for (_i = 0, _len2 = _ref2.length; _i < _len2; _i++) {
- node = _ref2[_i];
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
+ node = _ref2[_j];
_results.push(node.compile(o, LEVEL_LIST));
}
return _results;
})();
return "[" + (base.join(', ')) + "].concat(" + (args.join(', ')) + ")";
};
+
return Splat;
- })();
- exports.While = While = (function() {
- __extends(While, Base);
+
+ })(Base);
+
+ exports.While = While = (function(_super) {
+
+ __extends(While, _super);
+
function While(condition, options) {
this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition;
this.guard = options != null ? options.guard : void 0;
}
+
While.prototype.children = ['condition', 'guard', 'body'];
+
While.prototype.isStatement = YES;
- While.prototype.makeReturn = function() {
- this.returns = true;
- return this;
+
+ While.prototype.makeReturn = function(res) {
+ if (res) {
+ return While.__super__.makeReturn.apply(this, arguments);
+ } else {
+ this.returns = !this.jumps({
+ loop: true
+ });
+ return this;
+ }
};
+
While.prototype.addBody = function(body) {
this.body = body;
return this;
};
+
While.prototype.jumps = function() {
var expressions, node, _i, _len;
expressions = this.body.expressions;
@@ -6179,6 +5944,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return false;
};
+
While.prototype.compileNode = function(o) {
var body, code, rvar, set;
o.indent += TAB;
@@ -6187,15 +5953,18 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
if (body.isEmpty()) {
body = '';
} else {
- if (o.level > LEVEL_TOP || this.returns) {
- rvar = o.scope.freeVariable('results');
+ if (this.returns) {
+ body.makeReturn(rvar = o.scope.freeVariable('results'));
set = "" + this.tab + rvar + " = [];\n";
- if (body) {
- body = Push.wrap(rvar, body);
- }
}
if (this.guard) {
- body = Block.wrap([new If(this.guard, body)]);
+ if (body.expressions.length > 1) {
+ body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
+ } else {
+ if (this.guard) {
+ body = Block.wrap([new If(this.guard, body)]);
+ }
+ }
}
body = "\n" + (body.compile(o, LEVEL_TOP)) + "\n" + this.tab;
}
@@ -6205,23 +5974,25 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return code;
};
+
return While;
- })();
- exports.Op = Op = (function() {
+
+ })(Base);
+
+ exports.Op = Op = (function(_super) {
var CONVERSIONS, INVERSIONS;
- __extends(Op, Base);
+
+ __extends(Op, _super);
+
function Op(op, first, second, flip) {
- var call;
if (op === 'in') {
return new In(first, second);
}
if (op === 'do') {
- call = new Call(first, first.params || []);
- call["do"] = true;
- return call;
+ return this.generateDo(first);
}
if (op === 'new') {
- if (first instanceof Call && !first["do"]) {
+ if (first instanceof Call && !first["do"] && !first.isNew) {
return first.newInstance();
}
if (first instanceof Code && first.bound || first["do"]) {
@@ -6234,28 +6005,36 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
this.flip = !!flip;
return this;
}
+
CONVERSIONS = {
'==': '===',
'!=': '!==',
'of': 'in'
};
+
INVERSIONS = {
'!==': '===',
'===': '!=='
};
+
Op.prototype.children = ['first', 'second'];
+
Op.prototype.isSimpleNumber = NO;
+
Op.prototype.isUnary = function() {
return !this.second;
};
+
Op.prototype.isComplex = function() {
var _ref2;
return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex();
};
+
Op.prototype.isChainable = function() {
var _ref2;
return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!==';
};
+
Op.prototype.invert = function() {
var allInvertable, curr, fst, op, _ref2;
if (this.isChainable() && this.first.isChainable()) {
@@ -6289,22 +6068,52 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return new Op('!', this);
}
};
+
Op.prototype.unfoldSoak = function(o) {
var _ref2;
return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first');
};
+
+ Op.prototype.generateDo = function(exp) {
+ var call, func, param, passedParams, ref, _i, _len, _ref2;
+ passedParams = [];
+ func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp;
+ _ref2 = func.params || [];
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ param = _ref2[_i];
+ if (param.value) {
+ passedParams.push(param.value);
+ delete param.value;
+ } else {
+ passedParams.push(param);
+ }
+ }
+ call = new Call(exp, passedParams);
+ call["do"] = true;
+ return call;
+ };
+
Op.prototype.compileNode = function(o) {
- var code;
+ var code, isChain, _ref2, _ref3;
+ isChain = this.isChainable() && this.first.isChainable();
+ if (!isChain) {
+ this.first.front = this.front;
+ }
+ if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) {
+ throw SyntaxError('delete operand may not be argument or var');
+ }
+ if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) {
+ throw SyntaxError('prefix increment/decrement may not have eval or arguments operand');
+ }
if (this.isUnary()) {
return this.compileUnary(o);
}
- if (this.isChainable() && this.first.isChainable()) {
+ if (isChain) {
return this.compileChain(o);
}
if (this.operator === '?') {
return this.compileExistence(o);
}
- this.first.front = this.front;
code = this.first.compile(o, LEVEL_OP) + ' ' + this.operator + ' ' + this.second.compile(o, LEVEL_OP);
if (o.level <= LEVEL_OP) {
return code;
@@ -6312,6 +6121,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return "(" + code + ")";
}
};
+
Op.prototype.compileChain = function(o) {
var code, fst, shared, _ref2;
_ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1];
@@ -6319,6 +6129,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
code = "" + fst + " " + (this.invert ? '&&' : '||') + " " + (shared.compile(o)) + " " + this.operator + " " + (this.second.compile(o, LEVEL_OP));
return "(" + code + ")";
};
+
Op.prototype.compileExistence = function(o) {
var fst, ref;
if (this.first.isComplex()) {
@@ -6332,13 +6143,18 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
type: 'if'
}).addElse(this.second).compile(o);
};
+
Op.prototype.compileUnary = function(o) {
- var op, parts;
+ var op, parts, plusMinus;
+ if (o.level >= LEVEL_ACCESS) {
+ return (new Parens(this)).compile(o);
+ }
parts = [op = this.operator];
- if ((op === 'new' || op === 'typeof' || op === 'delete') || (op === '+' || op === '-') && this.first instanceof Op && this.first.operator === op) {
+ plusMinus = op === '+' || op === '-';
+ if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) {
parts.push(' ');
}
- if (op === 'new' && this.first.isStatement(o)) {
+ if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) {
this.first = new Parens(this.first);
}
parts.push(this.first.compile(o, LEVEL_OP));
@@ -6347,29 +6163,39 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return parts.join('');
};
+
Op.prototype.toString = function(idt) {
return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator);
};
+
return Op;
- })();
- exports.In = In = (function() {
- __extends(In, Base);
+
+ })(Base);
+
+ exports.In = In = (function(_super) {
+
+ __extends(In, _super);
+
function In(object, array) {
this.object = object;
this.array = array;
}
+
In.prototype.children = ['object', 'array'];
+
In.prototype.invert = NEGATE;
+
In.prototype.compileNode = function(o) {
var hasSplat, obj, _i, _len, _ref2;
if (this.array instanceof Value && this.array.isArray()) {
_ref2 = this.array.base.objects;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
obj = _ref2[_i];
- if (obj instanceof Splat) {
- hasSplat = true;
- break;
+ if (!(obj instanceof Splat)) {
+ continue;
}
+ hasSplat = true;
+ break;
}
if (!hasSplat) {
return this.compileOrTest(o);
@@ -6377,23 +6203,24 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return this.compileLoopTest(o);
};
+
In.prototype.compileOrTest = function(o) {
var cmp, cnj, i, item, ref, sub, tests, _ref2, _ref3;
+ if (this.array.base.objects.length === 0) {
+ return "" + (!!this.negated);
+ }
_ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1];
_ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1];
tests = (function() {
- var _len, _ref4, _results;
+ var _i, _len, _ref4, _results;
_ref4 = this.array.base.objects;
_results = [];
- for (i = 0, _len = _ref4.length; i < _len; i++) {
+ for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
item = _ref4[i];
- _results.push((i ? ref : sub) + cmp + item.compile(o, LEVEL_OP));
+ _results.push((i ? ref : sub) + cmp + item.compile(o, LEVEL_ACCESS));
}
return _results;
}).call(this);
- if (tests.length === 0) {
- return 'false';
- }
tests = tests.join(cnj);
if (o.level < LEVEL_OP) {
return tests;
@@ -6401,6 +6228,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return "(" + tests + ")";
}
};
+
In.prototype.compileLoopTest = function(o) {
var code, ref, sub, _ref2;
_ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1];
@@ -6415,91 +6243,147 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return "(" + code + ")";
}
};
+
In.prototype.toString = function(idt) {
return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : ''));
};
+
return In;
- })();
- exports.Try = Try = (function() {
- __extends(Try, Base);
+
+ })(Base);
+
+ exports.Try = Try = (function(_super) {
+
+ __extends(Try, _super);
+
function Try(attempt, error, recovery, ensure) {
this.attempt = attempt;
this.error = error;
this.recovery = recovery;
this.ensure = ensure;
}
+
Try.prototype.children = ['attempt', 'recovery', 'ensure'];
+
Try.prototype.isStatement = YES;
+
Try.prototype.jumps = function(o) {
var _ref2;
return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0);
};
- Try.prototype.makeReturn = function() {
+
+ Try.prototype.makeReturn = function(res) {
if (this.attempt) {
- this.attempt = this.attempt.makeReturn();
+ this.attempt = this.attempt.makeReturn(res);
}
if (this.recovery) {
- this.recovery = this.recovery.makeReturn();
+ this.recovery = this.recovery.makeReturn(res);
}
return this;
};
+
Try.prototype.compileNode = function(o) {
- var catchPart, errorPart;
+ var catchPart, ensurePart, errorPart, tryPart;
o.indent += TAB;
errorPart = this.error ? " (" + (this.error.compile(o)) + ") " : ' ';
- catchPart = this.recovery ? " catch" + errorPart + "{\n" + (this.recovery.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}" : !(this.ensure || this.recovery) ? ' catch (_e) {}' : void 0;
- return ("" + this.tab + "try {\n" + (this.attempt.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}" + (catchPart || '')) + (this.ensure ? " finally {\n" + (this.ensure.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}" : '');
+ tryPart = this.attempt.compile(o, LEVEL_TOP);
+ catchPart = (function() {
+ var _ref2;
+ if (this.recovery) {
+ if (_ref2 = this.error.value, __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) {
+ throw SyntaxError("catch variable may not be \"" + this.error.value + "\"");
+ }
+ if (!o.scope.check(this.error.value)) {
+ o.scope.add(this.error.value, 'param');
+ }
+ return " catch" + errorPart + "{\n" + (this.recovery.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}";
+ } else if (!(this.ensure || this.recovery)) {
+ return ' catch (_error) {}';
+ }
+ }).call(this);
+ ensurePart = this.ensure ? " finally {\n" + (this.ensure.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}" : '';
+ return "" + this.tab + "try {\n" + tryPart + "\n" + this.tab + "}" + (catchPart || '') + ensurePart;
};
+
return Try;
- })();
- exports.Throw = Throw = (function() {
- __extends(Throw, Base);
+
+ })(Base);
+
+ exports.Throw = Throw = (function(_super) {
+
+ __extends(Throw, _super);
+
function Throw(expression) {
this.expression = expression;
}
+
Throw.prototype.children = ['expression'];
+
Throw.prototype.isStatement = YES;
+
Throw.prototype.jumps = NO;
+
Throw.prototype.makeReturn = THIS;
+
Throw.prototype.compileNode = function(o) {
return this.tab + ("throw " + (this.expression.compile(o)) + ";");
};
+
return Throw;
- })();
- exports.Existence = Existence = (function() {
- __extends(Existence, Base);
+
+ })(Base);
+
+ exports.Existence = Existence = (function(_super) {
+
+ __extends(Existence, _super);
+
function Existence(expression) {
this.expression = expression;
}
+
Existence.prototype.children = ['expression'];
+
Existence.prototype.invert = NEGATE;
+
Existence.prototype.compileNode = function(o) {
var cmp, cnj, code, _ref2;
+ this.expression.front = this.front;
code = this.expression.compile(o, LEVEL_OP);
- code = IDENTIFIER.test(code) && !o.scope.check(code) ? ((_ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1], _ref2), "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null") : "" + code + " " + (this.negated ? '==' : '!=') + " null";
+ if (IDENTIFIER.test(code) && !o.scope.check(code)) {
+ _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1];
+ code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null";
+ } else {
+ code = "" + code + " " + (this.negated ? '==' : '!=') + " null";
+ }
if (o.level <= LEVEL_COND) {
return code;
} else {
return "(" + code + ")";
}
};
+
return Existence;
- })();
- exports.Parens = Parens = (function() {
- __extends(Parens, Base);
+
+ })(Base);
+
+ exports.Parens = Parens = (function(_super) {
+
+ __extends(Parens, _super);
+
function Parens(body) {
this.body = body;
}
+
Parens.prototype.children = ['body'];
+
Parens.prototype.unwrap = function() {
return this.body;
};
+
Parens.prototype.isComplex = function() {
return this.body.isComplex();
};
- Parens.prototype.makeReturn = function() {
- return this.body.makeReturn();
- };
+
Parens.prototype.compileNode = function(o) {
var bare, code, expr;
expr = this.body.unwrap();
@@ -6515,10 +6399,15 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return "(" + code + ")";
}
};
+
return Parens;
- })();
- exports.For = For = (function() {
- __extends(For, Base);
+
+ })(Base);
+
+ exports.For = For = (function(_super) {
+
+ __extends(For, _super);
+
function For(body, source) {
var _ref2;
this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index;
@@ -6541,15 +6430,11 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
this.returns = false;
}
+
For.prototype.children = ['body', 'source', 'guard', 'step'];
- For.prototype.isStatement = YES;
- For.prototype.jumps = While.prototype.jumps;
- For.prototype.makeReturn = function() {
- this.returns = true;
- return this;
- };
+
For.prototype.compileNode = function(o) {
- var body, defPart, forPart, forVarPart, guardPart, idt1, index, ivar, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, stepPart, stepvar, svar, varPart, _ref2;
+ var body, defPart, forPart, forVarPart, guardPart, idt1, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, stepPart, stepvar, svar, varPart, _ref2;
body = Block.wrap([this.body]);
lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0;
if (lastJumps && lastJumps instanceof Return) {
@@ -6560,19 +6445,17 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
name = this.name && this.name.compile(o, LEVEL_LIST);
index = this.index && this.index.compile(o, LEVEL_LIST);
if (name && !this.pattern) {
- scope.find(name, {
- immediate: true
- });
+ scope.find(name);
}
if (index) {
- scope.find(index, {
- immediate: true
- });
+ scope.find(index);
}
if (this.returns) {
rvar = scope.freeVariable('results');
}
- ivar = (this.range ? name : index) || scope.freeVariable('i');
+ ivar = (this.object && index) || scope.freeVariable('i');
+ kvar = (this.range && name) || index || ivar;
+ kvarAssign = kvar !== ivar ? "" + kvar + " = " : "";
if (this.step && !this.range) {
stepvar = scope.freeVariable("step");
}
@@ -6586,6 +6469,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
if (this.range) {
forPart = source.compile(merge(o, {
index: ivar,
+ name: name,
step: this.step
}));
} else {
@@ -6595,34 +6479,43 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
svar = ref;
}
if (name && !this.pattern) {
- namePart = "" + name + " = " + svar + "[" + ivar + "]";
+ namePart = "" + name + " = " + svar + "[" + kvar + "]";
}
if (!this.object) {
lvar = scope.freeVariable('len');
- forVarPart = ("" + ivar + " = 0, " + lvar + " = " + svar + ".length") + (this.step ? ", " + stepvar + " = " + (this.step.compile(o, LEVEL_OP)) : '');
- stepPart = this.step ? "" + ivar + " += " + stepvar : "" + ivar + "++";
+ forVarPart = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length";
+ if (this.step) {
+ forVarPart += ", " + stepvar + " = " + (this.step.compile(o, LEVEL_OP));
+ }
+ stepPart = "" + kvarAssign + (this.step ? "" + ivar + " += " + stepvar : (kvar !== ivar ? "++" + ivar : "" + ivar + "++"));
forPart = "" + forVarPart + "; " + ivar + " < " + lvar + "; " + stepPart;
}
}
if (this.returns) {
resultPart = "" + this.tab + rvar + " = [];\n";
returnResult = "\n" + this.tab + "return " + rvar + ";";
- body = Push.wrap(rvar, body);
+ body.makeReturn(rvar);
}
if (this.guard) {
- body = Block.wrap([new If(this.guard, body)]);
+ if (body.expressions.length > 1) {
+ body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
+ } else {
+ if (this.guard) {
+ body = Block.wrap([new If(this.guard, body)]);
+ }
+ }
}
if (this.pattern) {
- body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + ivar + "]")));
+ body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]")));
}
defPart += this.pluckDirectCall(o, body);
if (namePart) {
varPart = "\n" + idt1 + namePart + ";";
}
if (this.object) {
- forPart = "" + ivar + " in " + svar;
+ forPart = "" + kvar + " in " + svar;
if (this.own) {
- guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + ivar + ")) continue;";
+ guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;";
}
}
body = body.compile(merge(o, {
@@ -6633,11 +6526,12 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return "" + defPart + (resultPart || '') + this.tab + "for (" + forPart + ") {" + guardPart + varPart + body + this.tab + "}" + (returnResult || '');
};
+
For.prototype.pluckDirectCall = function(o, body) {
- var base, defs, expr, fn, idx, ref, val, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
+ var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
defs = '';
_ref2 = body.expressions;
- for (idx = 0, _len = _ref2.length; idx < _len; idx++) {
+ for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) {
expr = _ref2[idx];
expr = expr.unwrapAll();
if (!(expr instanceof Call)) {
@@ -6652,24 +6546,31 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
base = new Value(ref);
if (val.base) {
_ref7 = [base, val], val.base = _ref7[0], base = _ref7[1];
- args.unshift(new Literal('this'));
}
body.expressions[idx] = new Call(base, expr.args);
defs += this.tab + new Assign(ref, fn).compile(o, LEVEL_TOP) + ';\n';
}
return defs;
};
+
return For;
- })();
- exports.Switch = Switch = (function() {
- __extends(Switch, Base);
+
+ })(While);
+
+ exports.Switch = Switch = (function(_super) {
+
+ __extends(Switch, _super);
+
function Switch(subject, cases, otherwise) {
this.subject = subject;
this.cases = cases;
this.otherwise = otherwise;
}
+
Switch.prototype.children = ['subject', 'cases', 'otherwise'];
+
Switch.prototype.isStatement = YES;
+
Switch.prototype.jumps = function(o) {
var block, conds, _i, _len, _ref2, _ref3, _ref4;
if (o == null) {
@@ -6686,29 +6587,34 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0;
};
- Switch.prototype.makeReturn = function() {
+
+ Switch.prototype.makeReturn = function(res) {
var pair, _i, _len, _ref2, _ref3;
_ref2 = this.cases;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
pair = _ref2[_i];
- pair[1].makeReturn();
+ pair[1].makeReturn(res);
+ }
+ if (res) {
+ this.otherwise || (this.otherwise = new Block([new Literal('void 0')]));
}
if ((_ref3 = this.otherwise) != null) {
- _ref3.makeReturn();
+ _ref3.makeReturn(res);
}
return this;
};
+
Switch.prototype.compileNode = function(o) {
- var block, body, code, cond, conditions, expr, i, idt1, idt2, _i, _len, _len2, _ref2, _ref3, _ref4, _ref5;
+ var block, body, code, cond, conditions, expr, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4, _ref5;
idt1 = o.indent + TAB;
idt2 = o.indent = idt1 + TAB;
code = this.tab + ("switch (" + (((_ref2 = this.subject) != null ? _ref2.compile(o, LEVEL_PAREN) : void 0) || false) + ") {\n");
_ref3 = this.cases;
- for (i = 0, _len = _ref3.length; i < _len; i++) {
+ for (i = _i = 0, _len = _ref3.length; _i < _len; i = ++_i) {
_ref4 = _ref3[i], conditions = _ref4[0], block = _ref4[1];
_ref5 = flatten([conditions]);
- for (_i = 0, _len2 = _ref5.length; _i < _len2; _i++) {
- cond = _ref5[_i];
+ for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) {
+ cond = _ref5[_j];
if (!this.subject) {
cond = cond.invert();
}
@@ -6731,10 +6637,15 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return code + this.tab + '}';
};
+
return Switch;
- })();
- exports.If = If = (function() {
- __extends(If, Base);
+
+ })(Base);
+
+ exports.If = If = (function(_super) {
+
+ __extends(If, _super);
+
function If(condition, body, options) {
this.body = body;
if (options == null) {
@@ -6745,15 +6656,19 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
this.isChain = false;
this.soak = options.soak;
}
+
If.prototype.children = ['condition', 'body', 'elseBody'];
+
If.prototype.bodyNode = function() {
var _ref2;
return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0;
};
+
If.prototype.elseBodyNode = function() {
var _ref2;
return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0;
};
+
If.prototype.addElse = function(elseBody) {
if (this.isChain) {
this.elseBodyNode().addElse(elseBody);
@@ -6763,14 +6678,17 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return this;
};
+
If.prototype.isStatement = function(o) {
var _ref2;
return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0);
};
+
If.prototype.jumps = function(o) {
var _ref2;
return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0);
};
+
If.prototype.compileNode = function(o) {
if (this.isStatement(o)) {
return this.compileStatement(o);
@@ -6778,11 +6696,16 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return this.compileExpression(o);
}
};
- If.prototype.makeReturn = function() {
- this.body && (this.body = new Block([this.body.makeReturn()]));
- this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn()]));
+
+ If.prototype.makeReturn = function(res) {
+ if (res) {
+ this.elseBody || (this.elseBody = new Block([new Literal('void 0')]));
+ }
+ this.body && (this.body = new Block([this.body.makeReturn(res)]));
+ this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)]));
return this;
};
+
If.prototype.ensureBlock = function(node) {
if (node instanceof Block) {
return node;
@@ -6790,6 +6713,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return new Block([node]);
}
};
+
If.prototype.compileStatement = function(o) {
var body, child, cond, exeq, ifPart;
child = del(o, 'chainChild');
@@ -6801,11 +6725,8 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
cond = this.condition.compile(o, LEVEL_PAREN);
o.indent += TAB;
- body = this.ensureBlock(this.body).compile(o);
- if (body) {
- body = "\n" + body + "\n" + this.tab;
- }
- ifPart = "if (" + cond + ") {" + body + "}";
+ body = this.ensureBlock(this.body);
+ ifPart = "if (" + cond + ") {\n" + (body.compile(o)) + "\n" + this.tab + "}";
if (!child) {
ifPart = this.tab + ifPart;
}
@@ -6814,6 +6735,7 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
}
return ifPart + ' else ' + (this.isChain ? (o.indent = this.tab, o.chainChild = true, this.elseBody.unwrap().compile(o, LEVEL_TOP)) : "{\n" + (this.elseBody.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}");
};
+
If.prototype.compileExpression = function(o) {
var alt, body, code, cond;
cond = this.condition.compile(o, LEVEL_COND);
@@ -6826,19 +6748,15 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return code;
}
};
+
If.prototype.unfoldSoak = function() {
return this.soak && this;
};
+
return If;
- })();
- Push = {
- wrap: function(name, exps) {
- if (exps.isEmpty() || last(exps.expressions).jumps()) {
- return exps;
- }
- return exps.push(new Call(new Value(new Literal(name), [new Access(new Literal('push'))]), [exps.pop()]));
- }
- };
+
+ })(Base);
+
Closure = {
wrap: function(expressions, statement, noReturn) {
var args, call, func, mentionsArgs, meth;
@@ -6867,9 +6785,10 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
return node instanceof Literal && node.value === 'arguments' && !node.asKey;
},
literalThis: function(node) {
- return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound);
+ return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper);
}
};
+
unfoldSoak = function(o, parent, name) {
var ifn;
if (!(ifn = parent[name].unfoldSoak(o))) {
@@ -6879,64 +6798,74 @@ define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coff
ifn.body = new Value(parent);
return ifn;
};
+
UTILITIES = {
- "extends": 'function(child, parent) {\n for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor;\n child.__super__ = parent.prototype;\n return child;\n}',
- bind: 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }',
- indexOf: 'Array.prototype.indexOf || function(item) {\n for (var i = 0, l = this.length; i < l; i++) {\n if (this[i] === item) return i;\n }\n return -1;\n}',
- hasProp: 'Object.prototype.hasOwnProperty',
- slice: 'Array.prototype.slice'
+ "extends": function() {
+ return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }";
+ },
+ bind: function() {
+ return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }';
+ },
+ indexOf: function() {
+ return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }";
+ },
+ hasProp: function() {
+ return '{}.hasOwnProperty';
+ },
+ slice: function() {
+ return '[].slice';
+ }
};
+
LEVEL_TOP = 1;
+
LEVEL_PAREN = 2;
+
LEVEL_LIST = 3;
+
LEVEL_COND = 4;
+
LEVEL_OP = 5;
+
LEVEL_ACCESS = 6;
+
TAB = ' ';
- IDENTIFIER = /^[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*$/;
+
+ IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
+
+ IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$");
+
SIMPLENUM = /^[+-]?\d+$/;
- METHOD_DEF = /^(?:([$A-Za-z_][$\w\x7f-\uffff]*)\.prototype\.)?([$A-Za-z_][$\w\x7f-\uffff]*)$/;
+
+ METHOD_DEF = RegExp("^(?:(" + IDENTIFIER_STR + ")\\.prototype(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + IDENTIFIER_STR + ")$");
+
IS_STRING = /^['"]/;
+
utility = function(name) {
var ref;
ref = "__" + name;
- Scope.root.assign(ref, UTILITIES[name]);
+ Scope.root.assign(ref, UTILITIES[name]());
return ref;
};
+
multident = function(code, tab) {
- return code.replace(/\n/g, '$&' + tab);
+ code = code.replace(/\n/g, '$&' + tab);
+ return code.replace(/\s+$/, '');
};
+
+
});
-/**
- * Copyright (c) 2011 Jeremy Ashkenas
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
define('ace/mode/coffee/scope', ['require', 'exports', 'module' , 'ace/mode/coffee/helpers'], function(require, exports, module) {
+
var Scope, extend, last, _ref;
+
_ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
+
exports.Scope = Scope = (function() {
+
Scope.root = null;
+
function Scope(parent, expressions, method) {
this.parent = parent;
this.expressions = expressions;
@@ -6952,13 +6881,13 @@ define('ace/mode/coffee/scope', ['require', 'exports', 'module' , 'ace/mode/coff
Scope.root = this;
}
}
+
Scope.prototype.add = function(name, type, immediate) {
- var pos;
if (this.shared && !immediate) {
return this.parent.add(name, type, immediate);
}
- if (typeof (pos = this.positions[name]) === 'number') {
- return this.variables[pos].type = type;
+ if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
+ return this.variables[this.positions[name]].type = type;
} else {
return this.positions[name] = this.variables.push({
name: name,
@@ -6966,89 +6895,111 @@ define('ace/mode/coffee/scope', ['require', 'exports', 'module' , 'ace/mode/coff
}) - 1;
}
};
- Scope.prototype.find = function(name, options) {
- if (this.check(name, options)) {
+
+ Scope.prototype.namedMethod = function() {
+ if (this.method.name || !this.parent) {
+ return this.method;
+ }
+ return this.parent.namedMethod();
+ };
+
+ Scope.prototype.find = function(name) {
+ if (this.check(name)) {
return true;
}
this.add(name, 'var');
return false;
};
+
Scope.prototype.parameter = function(name) {
if (this.shared && this.parent.check(name, true)) {
return;
}
return this.add(name, 'param');
};
- Scope.prototype.check = function(name, immediate) {
- var found, _ref2;
- found = !!this.type(name);
- if (found || immediate) {
- return found;
- }
- return !!((_ref2 = this.parent) != null ? _ref2.check(name) : void 0);
+
+ Scope.prototype.check = function(name) {
+ var _ref1;
+ return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
};
+
Scope.prototype.temporary = function(name, index) {
if (name.length > 1) {
- return '_' + name + (index > 1 ? index : '');
+ return '_' + name + (index > 1 ? index - 1 : '');
} else {
return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
}
};
+
Scope.prototype.type = function(name) {
- var v, _i, _len, _ref2;
- _ref2 = this.variables;
- for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
- v = _ref2[_i];
+ var v, _i, _len, _ref1;
+ _ref1 = this.variables;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
if (v.name === name) {
return v.type;
}
}
return null;
};
- Scope.prototype.freeVariable = function(type) {
+
+ Scope.prototype.freeVariable = function(name, reserve) {
var index, temp;
+ if (reserve == null) {
+ reserve = true;
+ }
index = 0;
- while (this.check((temp = this.temporary(type, index)))) {
+ while (this.check((temp = this.temporary(name, index)))) {
index++;
}
- this.add(temp, 'var', true);
+ if (reserve) {
+ this.add(temp, 'var', true);
+ }
return temp;
};
+
Scope.prototype.assign = function(name, value) {
this.add(name, {
value: value,
assigned: true
- });
+ }, true);
return this.hasAssignments = true;
};
+
Scope.prototype.hasDeclarations = function() {
return !!this.declaredVariables().length;
};
+
Scope.prototype.declaredVariables = function() {
- var realVars, tempVars, v, _i, _len, _ref2;
+ var realVars, tempVars, v, _i, _len, _ref1;
realVars = [];
tempVars = [];
- _ref2 = this.variables;
- for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
- v = _ref2[_i];
+ _ref1 = this.variables;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
if (v.type === 'var') {
(v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
}
}
return realVars.sort().concat(tempVars.sort());
};
+
Scope.prototype.assignedVariables = function() {
- var v, _i, _len, _ref2, _results;
- _ref2 = this.variables;
+ var v, _i, _len, _ref1, _results;
+ _ref1 = this.variables;
_results = [];
- for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
- v = _ref2[_i];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
if (v.type.assigned) {
_results.push("" + v.name + " = " + v.type.value);
}
}
return _results;
};
+
return Scope;
+
})();
-});
+
+
+}); \ No newline at end of file
diff --git a/contexts/data/lib/ace/worker-css.js b/contexts/data/lib/ace/worker-css.js
index 7b17906..f4cc2cb 100644
--- a/contexts/data/lib/ace/worker-css.js
+++ b/contexts/data/lib/ace/worker-css.js
@@ -1,8 +1,16 @@
"no use strict";
+if (typeof window != "undefined" && window.document)
+ throw "atempt to load ace worker into main window instead of webWorker";
+
var console = {
- log: function(msg) {
- postMessage({type: "log", data: msg});
+ log: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ },
+ error: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
}
};
var window = {
@@ -18,11 +26,11 @@ var normalizeModule = function(parentId, moduleName) {
// normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- var moduleName = base + "/" + moduleName;
+ moduleName = base + "/" + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- var moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -30,13 +38,16 @@ var normalizeModule = function(parentId, moduleName) {
};
var require = function(parentId, id) {
- var id = normalizeModule(parentId, id);
-
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = normalizeModule(parentId, id);
+
var module = require.modules[id];
if (module) {
if (!module.initialized) {
- module.exports = module.factory().exports;
module.initialized = true;
+ module.exports = module.factory().exports;
}
return module.exports;
}
@@ -56,6 +67,10 @@ require.tlns = {};
var define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = require.id;
+ }
} else if (arguments.length == 1) {
factory = id;
id = require.id;
@@ -123,7 +138,10 @@ var sender;
onmessage = function(e) {
var msg = e.data;
if (msg.command) {
- main[msg.command].apply(main, msg.args);
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
}
else if (msg.init) {
initBaseUrls(msg.tlns);
@@ -137,40 +155,16 @@ onmessage = function(e) {
}
};
// vim:set ts=4 sts=4 sw=4 st:
-// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Irakli Gozalishvili Copyright (C) 2010 MIT License
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
-"use strict";
+
require("./regexp");
require("./es5-shim");
-});/**
- * Based on code from:
- *
- * XRegExp 1.5.0
- * (c) 2007-2010 Steven Levithan
- * MIT License
- * <http://xregexp.com>
- * Provides an augmented, extensible, cross-browser implementation of regular expressions,
- * including support for additional syntax, flags, and methods
- */
+});
define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
- //---------------------------------
- // Private variables
- //---------------------------------
var real = {
exec: RegExp.prototype.exec,
@@ -186,25 +180,14 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
return !x.lastIndex;
}();
- //---------------------------------
- // Overriden native methods
- //---------------------------------
-
- // Adds named capture support (with backreferences returned as `result.name`), and fixes two
- // cross-browser issues per ES3:
- // - Captured values for nonparticipating capturing groups should be returned as `undefined`,
- // rather than the empty string.
- // - `lastIndex` should not be incremented after zero-length matches.
+ if (compliantLastIndexIncrement && compliantExecNpcg)
+ return;
RegExp.prototype.exec = function (str) {
var match = real.exec.apply(this, arguments),
name, r2;
- if (match) {
- // Fix browsers whose `exec` methods don't consistently return `undefined` for
- // nonparticipating capturing groups
+ if ( typeof(str) == 'string' && match) {
if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
- // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
- // matching due to characters outside the match
real.replace.call(str.slice(match.index), r2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined)
@@ -212,7 +195,6 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
}
});
}
- // Attach named capture properties
if (this._xregexp && this._xregexp.captureNames) {
for (var i = 1; i < match.length; i++) {
name = this._xregexp.captureNames[i - 1];
@@ -220,38 +202,27 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
match[name] = match[i];
}
}
- // Fix browsers that increment `lastIndex` after zero-length matches
if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
}
return match;
};
-
- // Don't override `test` if it won't change anything
if (!compliantLastIndexIncrement) {
- // Fix browser bug in native method
RegExp.prototype.test = function (str) {
- // Use the native `exec` to skip some processing overhead, even though the overriden
- // `exec` would take care of the `lastIndex` fix
var match = real.exec.call(this, str);
- // Fix browsers that increment `lastIndex` after zero-length matches
if (match && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
return !!match;
};
}
- //---------------------------------
- // Private helper functions
- //---------------------------------
-
function getNativeFlags (regex) {
return (regex.global ? "g" : "") +
(regex.ignoreCase ? "i" : "") +
(regex.multiline ? "m" : "") +
(regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
(regex.sticky ? "y" : "");
- };
+ }
function indexOf (array, item, from) {
if (Array.prototype.indexOf) // Use the native array method if available
@@ -261,94 +232,21 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
return i;
}
return -1;
- };
+ }
-});// vim: ts=4 sts=4 sw=4 expandtab
-// -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
-// -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
-// -- kossnocorp Sasha Koss XXX TODO License or CLA
-// -- bryanforbes Bryan Forbes XXX TODO License or CLA
-// -- killdream Quildreen Motta Copyright (C) 2011 MIT Licence
-// -- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD License
-// -- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
-// -- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
-// -- iwyg XXX TODO License or CLA
-// -- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
-// -- xavierm02 Montillet Xavier XXX TODO License or CLA
-// -- Raynos Raynos XXX TODO License or CLA
-// -- samsonjs Sami Samhuri Copyright (C) 2010 MIT License
-// -- rwldrn Rick Waldron Copyright (C) 2011 MIT License
-// -- lexer Alexey Zakharov XXX TODO License or CLA
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
+});
define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-/**
- * Brings an environment as close to ECMAScript 5 compliance
- * as is possible with the facilities of erstwhile engines.
- *
- * Annotated ES5: http://es5.github.com/ (specific links below)
- * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
- *
- * @module
- */
-
-/*whatsupdoc*/
-
-//
-// Function
-// ========
-//
-
-// ES-5 15.3.4.5
-// http://es5.github.com/#x15.3.4.5
-
if (!Function.prototype.bind) {
Function.prototype.bind = function bind(that) { // .length is 1
- // 1. Let Target be the this value.
var target = this;
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
if (typeof target != "function")
throw new TypeError(); // TODO message
- // 3. Let A be a new (possibly empty) internal list of all of the
- // argument values provided after thisArg (arg1, arg2 etc), in order.
- // XXX slicedArgs will stand in for "A" if used
var args = slice.call(arguments, 1); // for normal call
- // 4. Let F be a new native ECMAScript object.
- // 11. Set the [[Prototype]] internal property of F to the standard
- // built-in Function prototype object as specified in 15.3.3.1.
- // 12. Set the [[Call]] internal property of F as described in
- // 15.3.4.5.1.
- // 13. Set the [[Construct]] internal property of F as described in
- // 15.3.4.5.2.
- // 14. Set the [[HasInstance]] internal property of F as described in
- // 15.3.4.5.3.
var bound = function () {
if (this instanceof bound) {
- // 15.3.4.5.2 [[Construct]]
- // When the [[Construct]] internal method of a function object,
- // F that was created using the bind function is called with a
- // list of arguments ExtraArgs, the following steps are taken:
- // 1. Let target be the value of F's [[TargetFunction]]
- // internal property.
- // 2. If target has no [[Construct]] internal method, a
- // TypeError exception is thrown.
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Construct]] internal
- // method of target providing args as the arguments.
var F = function(){};
F.prototype = target.prototype;
@@ -363,25 +261,6 @@ if (!Function.prototype.bind) {
return self;
} else {
- // 15.3.4.5.1 [[Call]]
- // When the [[Call]] internal method of a function object, F,
- // which was created using the bind function is called with a
- // this value and a list of arguments ExtraArgs, the following
- // steps are taken:
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
- // property.
- // 3. Let target be the value of F's [[TargetFunction]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Call]] internal method
- // of target providing boundThis as the this value and
- // providing args as the arguments.
-
- // equiv: target.call(this, ...boundArgs, ...args)
return target.apply(
that,
args.concat(slice.call(arguments))
@@ -390,53 +269,15 @@ if (!Function.prototype.bind) {
}
};
- // XXX bound.length is never writable, so don't even try
- //
- // 15. If the [[Class]] internal property of Target is "Function", then
- // a. Let L be the length property of Target minus the length of A.
- // b. Set the length own property of F to either 0 or L, whichever is
- // larger.
- // 16. Else set the length own property of F to 0.
- // 17. Set the attributes of the length own property of F to the values
- // specified in 15.3.5.1.
-
- // TODO
- // 18. Set the [[Extensible]] internal property of F to true.
-
- // TODO
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
- // 20. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
- // false.
- // 21. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
- // and false.
-
- // TODO
- // NOTE Function objects created using Function.prototype.bind do not
- // have a prototype property or the [[Code]], [[FormalParameters]], and
- // [[Scope]] internal properties.
- // XXX can't delete prototype in pure-js.
-
- // 22. Return F.
return bound;
};
}
-
-// Shortcut to an often accessed properties, in order to avoid multiple
-// dereference that costs universally.
-// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
-// us it in defining shortcuts.
var call = Function.prototype.call;
var prototypeOfArray = Array.prototype;
var prototypeOfObject = Object.prototype;
var slice = prototypeOfArray.slice;
var toString = call.bind(prototypeOfObject.toString);
var owns = call.bind(prototypeOfObject.hasOwnProperty);
-
-// If JS engine supports accessors creating shortcuts.
var defineGetter;
var defineSetter;
var lookupGetter;
@@ -448,70 +289,35 @@ if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
}
-
-//
-// Array
-// =====
-//
-
-// ES5 15.4.3.2
-// http://es5.github.com/#x15.4.3.2
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
if (!Array.isArray) {
Array.isArray = function isArray(obj) {
return toString(obj) == "[object Array]";
};
}
-
-// The IsCallable() check in the Array functions
-// has been replaced with a strict check on the
-// internal class of the object to trap cases where
-// the provided function was actually a regular
-// expression literal, which in V8 and
-// JavaScriptCore is a typeof "function". Only in
-// V8 are regular expression literals permitted as
-// reduce parameters, so it is desirable in the
-// general case for the shim to match the more
-// strict and common behavior of rejecting regular
-// expressions.
-
-// ES5 15.4.4.18
-// http://es5.github.com/#x15.4.4.18
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
if (!Array.prototype.forEach) {
Array.prototype.forEach = function forEach(fun /*, thisp*/) {
var self = toObject(this),
thisp = arguments[1],
i = 0,
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
while (i < length) {
if (i in self) {
- // Invoke the callback function with call, passing arguments:
- // context, property value, property key, thisArg object context
fun.call(thisp, self[i], i, self);
}
i++;
}
};
}
-
-// ES5 15.4.4.19
-// http://es5.github.com/#x15.4.4.19
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
if (!Array.prototype.map) {
Array.prototype.map = function map(fun /*, thisp*/) {
var self = toObject(this),
length = self.length >>> 0,
result = Array(length),
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -523,18 +329,12 @@ if (!Array.prototype.map) {
return result;
};
}
-
-// ES5 15.4.4.20
-// http://es5.github.com/#x15.4.4.20
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
if (!Array.prototype.filter) {
Array.prototype.filter = function filter(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
result = [],
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -546,17 +346,11 @@ if (!Array.prototype.filter) {
return result;
};
}
-
-// ES5 15.4.4.16
-// http://es5.github.com/#x15.4.4.16
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
if (!Array.prototype.every) {
Array.prototype.every = function every(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -568,17 +362,11 @@ if (!Array.prototype.every) {
return true;
};
}
-
-// ES5 15.4.4.17
-// http://es5.github.com/#x15.4.4.17
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
if (!Array.prototype.some) {
Array.prototype.some = function some(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -590,21 +378,13 @@ if (!Array.prototype.some) {
return false;
};
}
-
-// ES5 15.4.4.21
-// http://es5.github.com/#x15.4.4.21
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
if (!Array.prototype.reduce) {
Array.prototype.reduce = function reduce(fun /*, initial*/) {
var self = toObject(this),
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
-
- // no value to return if no initial value and an empty array
if (!length && arguments.length == 1)
throw new TypeError(); // TODO message
@@ -618,8 +398,6 @@ if (!Array.prototype.reduce) {
result = self[i++];
break;
}
-
- // if array contains no values, no initial value to return
if (++i >= length)
throw new TypeError(); // TODO message
} while (true);
@@ -633,21 +411,13 @@ if (!Array.prototype.reduce) {
return result;
};
}
-
-// ES5 15.4.4.22
-// http://es5.github.com/#x15.4.4.22
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
if (!Array.prototype.reduceRight) {
Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
var self = toObject(this),
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
-
- // no value to return if no initial value, empty array
if (!length && arguments.length == 1)
throw new TypeError(); // TODO message
@@ -660,8 +430,6 @@ if (!Array.prototype.reduceRight) {
result = self[i--];
break;
}
-
- // if array contains no values, no initial value to return
if (--i < 0)
throw new TypeError(); // TODO message
} while (true);
@@ -675,10 +443,6 @@ if (!Array.prototype.reduceRight) {
return result;
};
}
-
-// ES5 15.4.4.14
-// http://es5.github.com/#x15.4.4.14
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
var self = toObject(this),
@@ -690,8 +454,6 @@ if (!Array.prototype.indexOf) {
var i = 0;
if (arguments.length > 1)
i = toInteger(arguments[1]);
-
- // handle negative indices
i = i >= 0 ? i : Math.max(0, length + i);
for (; i < length; i++) {
if (i in self && self[i] === sought) {
@@ -701,10 +463,6 @@ if (!Array.prototype.indexOf) {
return -1;
};
}
-
-// ES5 15.4.4.15
-// http://es5.github.com/#x15.4.4.15
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
if (!Array.prototype.lastIndexOf) {
Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
var self = toObject(this),
@@ -715,7 +473,6 @@ if (!Array.prototype.lastIndexOf) {
var i = length - 1;
if (arguments.length > 1)
i = Math.min(i, toInteger(arguments[1]));
- // handle negative indices
i = i >= 0 ? i : length - Math.abs(i);
for (; i >= 0; i--) {
if (i in self && sought === self[i])
@@ -724,18 +481,7 @@ if (!Array.prototype.lastIndexOf) {
return -1;
};
}
-
-//
-// Object
-// ======
-//
-
-// ES5 15.2.3.2
-// http://es5.github.com/#x15.2.3.2
if (!Object.getPrototypeOf) {
- // https://github.com/kriskowal/es5-shim/issues#issue/2
- // http://ejohn.org/blog/objectgetprototypeof/
- // recommended by fschaefer on github
Object.getPrototypeOf = function getPrototypeOf(object) {
return object.__proto__ || (
object.constructor ?
@@ -744,84 +490,73 @@ if (!Object.getPrototypeOf) {
);
};
}
-
-// ES5 15.2.3.3
-// http://es5.github.com/#x15.2.3.3
if (!Object.getOwnPropertyDescriptor) {
var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
"non-object: ";
Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
if ((typeof object != "object" && typeof object != "function") || object === null)
throw new TypeError(ERR_NON_OBJECT + object);
- // If object does not owns property return undefined immediately.
if (!owns(object, property))
return;
var descriptor, getter, setter;
-
- // If object has a property then it's for sure both `enumerable` and
- // `configurable`.
descriptor = { enumerable: true, configurable: true };
-
- // If JS engine supports accessor properties then property may be a
- // getter or setter.
if (supportsAccessors) {
- // Unfortunately `__lookupGetter__` will return a getter even
- // if object has own non getter property along with a same named
- // inherited getter. To avoid misbehavior we temporary remove
- // `__proto__` so that `__lookupGetter__` will return getter only
- // if it's owned by an object.
var prototype = object.__proto__;
object.__proto__ = prototypeOfObject;
var getter = lookupGetter(object, property);
var setter = lookupSetter(object, property);
-
- // Once we have getter and setter we can put values back.
object.__proto__ = prototype;
if (getter || setter) {
if (getter) descriptor.get = getter;
if (setter) descriptor.set = setter;
-
- // If it was accessor property we're done and return here
- // in order to avoid adding `value` to the descriptor.
return descriptor;
}
}
-
- // If we got this far we know that object has an own property that is
- // not an accessor so we set it as a value and return descriptor.
descriptor.value = object[property];
return descriptor;
};
}
-
-// ES5 15.2.3.4
-// http://es5.github.com/#x15.2.3.4
if (!Object.getOwnPropertyNames) {
Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
return Object.keys(object);
};
}
-
-// ES5 15.2.3.5
-// http://es5.github.com/#x15.2.3.5
if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
Object.create = function create(prototype, properties) {
var object;
if (prototype === null) {
- object = { "__proto__": null };
+ object = createEmpty();
} else {
if (typeof prototype != "object")
throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
var Type = function () {};
Type.prototype = prototype;
object = new Type();
- // IE has no built-in implementation of `Object.getPrototypeOf`
- // neither `__proto__`, but this manually setting `__proto__` will
- // guarantee that `Object.getPrototypeOf` will work as expected with
- // objects created using `Object.create`
object.__proto__ = prototype;
}
if (properties !== void 0)
@@ -830,29 +565,13 @@ if (!Object.create) {
};
}
-// ES5 15.2.3.6
-// http://es5.github.com/#x15.2.3.6
-
-// Patch for WebKit and IE8 standard mode
-// Designed by hax <hax.github.com>
-// related issue: https://github.com/kriskowal/es5-shim/issues#issue/5
-// IE8 Reference:
-// http://msdn.microsoft.com/en-us/library/dd282900.aspx
-// http://msdn.microsoft.com/en-us/library/dd229916.aspx
-// WebKit Bugs:
-// https://bugs.webkit.org/show_bug.cgi?id=36423
-
function doesDefinePropertyWork(object) {
try {
Object.defineProperty(object, "sentinel", {});
return "sentinel" in object;
} catch (exception) {
- // returns falsy
}
}
-
-// check whether defineProperty works if it's given. Otherwise,
-// shim partially.
if (Object.defineProperty) {
var definePropertyWorksOnObject = doesDefinePropertyWork({});
var definePropertyWorksOnDom = typeof document == "undefined" ||
@@ -873,48 +592,21 @@ if (!Object.defineProperty || definePropertyFallback) {
throw new TypeError(ERR_NON_OBJECT_TARGET + object);
if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
-
- // make a valiant attempt to use the real defineProperty
- // for I8's DOM elements.
if (definePropertyFallback) {
try {
return definePropertyFallback.call(Object, object, property, descriptor);
} catch (exception) {
- // try the shim if the real one doesn't work
}
}
-
- // If it's a data property.
if (owns(descriptor, "value")) {
- // fail silently if "writable", "enumerable", or "configurable"
- // are requested but not supported
- /*
- // alternate approach:
- if ( // can't implement these features; allow false but not true
- !(owns(descriptor, "writable") ? descriptor.writable : true) ||
- !(owns(descriptor, "enumerable") ? descriptor.enumerable : true) ||
- !(owns(descriptor, "configurable") ? descriptor.configurable : true)
- )
- throw new RangeError(
- "This implementation of Object.defineProperty does not " +
- "support configurable, enumerable, or writable."
- );
- */
if (supportsAccessors && (lookupGetter(object, property) ||
lookupSetter(object, property)))
{
- // As accessors are supported only on engines implementing
- // `__proto__` we can safely override `__proto__` while defining
- // a property to make sure that we don't hit an inherited
- // accessor.
var prototype = object.__proto__;
object.__proto__ = prototypeOfObject;
- // Deleting a property anyway since getter / setter may be
- // defined on object itself.
delete object[property];
object[property] = descriptor.value;
- // Setting original `__proto__` back now.
object.__proto__ = prototype;
} else {
object[property] = descriptor.value;
@@ -922,7 +614,6 @@ if (!Object.defineProperty || definePropertyFallback) {
} else {
if (!supportsAccessors)
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- // If we got that far then getters and setters can be defined !!
if (owns(descriptor, "get"))
defineGetter(object, property, descriptor.get);
if (owns(descriptor, "set"))
@@ -932,9 +623,6 @@ if (!Object.defineProperty || definePropertyFallback) {
return object;
};
}
-
-// ES5 15.2.3.7
-// http://es5.github.com/#x15.2.3.7
if (!Object.defineProperties) {
Object.defineProperties = function defineProperties(object, properties) {
for (var property in properties) {
@@ -944,30 +632,16 @@ if (!Object.defineProperties) {
return object;
};
}
-
-// ES5 15.2.3.8
-// http://es5.github.com/#x15.2.3.8
if (!Object.seal) {
Object.seal = function seal(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// ES5 15.2.3.9
-// http://es5.github.com/#x15.2.3.9
if (!Object.freeze) {
Object.freeze = function freeze(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// detect a Rhino bug and patch it
try {
Object.freeze(function () {});
} catch (exception) {
@@ -981,43 +655,26 @@ try {
};
})(Object.freeze);
}
-
-// ES5 15.2.3.10
-// http://es5.github.com/#x15.2.3.10
if (!Object.preventExtensions) {
Object.preventExtensions = function preventExtensions(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// ES5 15.2.3.11
-// http://es5.github.com/#x15.2.3.11
if (!Object.isSealed) {
Object.isSealed = function isSealed(object) {
return false;
};
}
-
-// ES5 15.2.3.12
-// http://es5.github.com/#x15.2.3.12
if (!Object.isFrozen) {
Object.isFrozen = function isFrozen(object) {
return false;
};
}
-
-// ES5 15.2.3.13
-// http://es5.github.com/#x15.2.3.13
if (!Object.isExtensible) {
Object.isExtensible = function isExtensible(object) {
- // 1. If Type(O) is not Object throw a TypeError exception.
if (Object(object) === object) {
throw new TypeError(); // TODO message
}
- // 2. Return the Boolean value of the [[Extensible]] internal property of O.
var name = '';
while (owns(object, name)) {
name += '?';
@@ -1028,11 +685,7 @@ if (!Object.isExtensible) {
return returnValue;
};
}
-
-// ES5 15.2.3.14
-// http://es5.github.com/#x15.2.3.14
if (!Object.keys) {
- // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
var hasDontEnumBug = true,
dontEnums = [
"toString",
@@ -1073,26 +726,11 @@ if (!Object.keys) {
};
}
-
-//
-// Date
-// ====
-//
-
-// ES5 15.9.5.43
-// http://es5.github.com/#x15.9.5.43
-// This function returns a String value represent the instance in time
-// represented by this Date object. The format of the String is the Date Time
-// string format defined in 15.9.1.15. All fields are present in the String.
-// The time zone is always UTC, denoted by the suffix Z. If the time value of
-// this object is not a finite Number a RangeError exception is thrown.
if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
Date.prototype.toISOString = function toISOString() {
var result, length, value, year;
if (!isFinite(this))
throw new RangeError;
-
- // the date time string format is specified in 15.9.1.15.
result = [this.getUTCMonth() + 1, this.getUTCDate(),
this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
year = this.getUTCFullYear();
@@ -1101,76 +739,32 @@ if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().inde
length = result.length;
while (length--) {
value = result[length];
- // pad months, days, hours, minutes, and seconds to have two digits.
if (value < 10)
result[length] = "0" + value;
}
- // pad milliseconds to have three digits.
return year + "-" + result.slice(0, 2).join("-") + "T" + result.slice(2).join(":") + "." +
("000" + this.getUTCMilliseconds()).slice(-3) + "Z";
}
}
-
-// ES5 15.9.4.4
-// http://es5.github.com/#x15.9.4.4
if (!Date.now) {
Date.now = function now() {
return new Date().getTime();
};
}
-
-// ES5 15.9.5.44
-// http://es5.github.com/#x15.9.5.44
-// This function provides a String representation of a Date object for use by
-// JSON.stringify (15.12.3).
if (!Date.prototype.toJSON) {
Date.prototype.toJSON = function toJSON(key) {
- // When the toJSON method is called with argument key, the following
- // steps are taken:
-
- // 1. Let O be the result of calling ToObject, giving it the this
- // value as its argument.
- // 2. Let tv be ToPrimitive(O, hint Number).
- // 3. If tv is a Number and is not finite, return null.
- // XXX
- // 4. Let toISO be the result of calling the [[Get]] internal method of
- // O with argument "toISOString".
- // 5. If IsCallable(toISO) is false, throw a TypeError exception.
if (typeof this.toISOString != "function")
throw new TypeError(); // TODO message
- // 6. Return the result of calling the [[Call]] internal method of
- // toISO with O as the this value and an empty argument list.
return this.toISOString();
-
- // NOTE 1 The argument is ignored.
-
- // NOTE 2 The toJSON function is intentionally generic; it does not
- // require that its this value be a Date object. Therefore, it can be
- // transferred to other kinds of objects for use as a method. However,
- // it does require that any such object have a toISOString method. An
- // object is free to use the argument key to filter its
- // stringification.
};
}
-
-// ES5 15.9.4.2
-// http://es5.github.com/#x15.9.4.2
-// based on work shared by Daniel Friesen (dantman)
-// http://gist.github.com/303249
if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
- // XXX global assignment won't work in embeddings that use
- // an alternate object for the context.
Date = (function(NativeDate) {
-
- // Date.length === 7
var Date = function Date(Y, M, D, h, m, s, ms) {
var length = arguments.length;
if (this instanceof NativeDate) {
var date = length == 1 && String(Y) === Y ? // isString(Y)
- // We explicitly pass it through parse:
new NativeDate(Date.parse(Y)) :
- // We have to manually make calls depending on argument
- // length here
length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
length >= 5 ? new NativeDate(Y, M, D, h, m) :
@@ -1179,14 +773,11 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
length >= 2 ? new NativeDate(Y, M) :
length >= 1 ? new NativeDate(Y) :
new NativeDate();
- // Prevent mixups with unfixed Date object
date.constructor = Date;
return date;
}
return NativeDate.apply(this, arguments);
};
-
- // 15.9.1.15 Date Time String Format.
var isoDateExpression = new RegExp("^" +
"(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + 6-digit extended year
"(?:-(\\d{2})" + // optional month capture
@@ -1207,59 +798,33 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
")" +
")?)?)?)?" +
"$");
-
- // Copy any custom methods a 3rd party library may have added
for (var key in NativeDate)
Date[key] = NativeDate[key];
-
- // Copy "native" methods explicitly; they may be non-enumerable
Date.now = NativeDate.now;
Date.UTC = NativeDate.UTC;
Date.prototype = NativeDate.prototype;
Date.prototype.constructor = Date;
-
- // Upgrade Date.parse to handle simplified ISO 8601 strings
Date.parse = function parse(string) {
var match = isoDateExpression.exec(string);
if (match) {
match.shift(); // kill match[0], the full match
- // parse months, days, hours, minutes, seconds, and milliseconds
for (var i = 1; i < 7; i++) {
- // provide default values if necessary
match[i] = +(match[i] || (i < 3 ? 1 : 0));
- // match[1] is the month. Months are 0-11 in JavaScript
- // `Date` objects, but 1-12 in ISO notation, so we
- // decrement.
if (i == 1)
match[i]--;
}
-
- // parse the UTC offset component
var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
-
- // compute the explicit time zone offset if specified
var offset = 0;
if (sign) {
- // detect invalid offsets and return early
if (hourOffset > 23 || minuteOffset > 59)
return NaN;
-
- // express the provided time zone offset in minutes. The offset is
- // negative for time zones west of UTC; positive otherwise.
offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == "+" ? -1 : 1);
}
-
- // Date.UTC for years between 0 and 99 converts year to 1900 + year
- // The Gregorian calendar has a 400-year cycle, so
- // to Date.UTC(year + 400, .... ) - 12622780800000 == Date.UTC(year, ...),
- // where 12622780800000 - number of milliseconds in Gregorian calendar 400 years
var year = +match[0];
if (0 <= year && year <= 99) {
match[0] = year + 400;
return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
}
-
- // compute a new UTC date value, accounting for the optional offset
return NativeDate.UTC.apply(this, match) + offset;
}
return NativeDate.parse.apply(this, arguments);
@@ -1268,20 +833,10 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
return Date;
})(Date);
}
-
-//
-// String
-// ======
-//
-
-// ES5 15.5.4.20
-// http://es5.github.com/#x15.5.4.20
var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
"\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
"\u2029\uFEFF";
if (!String.prototype.trim || ws.trim()) {
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript
- // http://perfectionkills.com/whitespace-deviations/
ws = "[" + ws + "]";
var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
trimEndRegexp = new RegExp(ws + ws + "*$");
@@ -1289,15 +844,6 @@ if (!String.prototype.trim || ws.trim()) {
return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
};
}
-
-//
-// Util
-// ======
-//
-
-// ES5 9.4
-// http://es5.github.com/#x9.4
-// http://jsperf.com/to-integer
var toInteger = function (n) {
n = +n;
if (n !== n) // isNaN
@@ -1308,61 +854,19 @@ var toInteger = function (n) {
};
var prepareString = "a"[0] != "a",
- // ES5 9.9
- // http://es5.github.com/#x9.9
toObject = function (o) {
if (o == null) { // this matches both null and undefined
throw new TypeError(); // TODO message
}
- // If the implementation doesn't support by-index access of
- // string characters (ex. IE < 7), split the string
if (prepareString && typeof o == "string" && o) {
return o.split("");
}
return Object(o);
};
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Mike de Boer <mike AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
+
var EventEmitter = {};
@@ -1376,8 +880,11 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!listeners.length && !defaultHandler)
return;
- e = e || {};
- e.type = eventName;
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
if (!e.stopPropagation) {
e.stopPropagation = function() {
@@ -1398,7 +905,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
}
if (defaultHandler && !e.defaultPrevented)
- defaultHandler(e);
+ return defaultHandler(e);
};
EventEmitter.setDefaultHandler = function(eventName, callback) {
@@ -1416,7 +923,7 @@ EventEmitter.addEventListener = function(eventName, callback) {
var listeners = this._eventRegistry[eventName];
if (!listeners)
- var listeners = this._eventRegistry[eventName] = [];
+ listeners = this._eventRegistry[eventName] = [];
if (listeners.indexOf(callback) == -1)
listeners.push(callback);
@@ -1441,45 +948,10 @@ EventEmitter.removeAllListeners = function(eventName) {
exports.EventEmitter = EventEmitter;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
+
exports.inherits = (function() {
var tempCtor = function() {};
@@ -1502,73 +974,242 @@ exports.implement = function(proto, mixin) {
};
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/css_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/css/csslint'], function(require, exports, module) {
-"use strict";
+
+define('ace/mode/css_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/worker/mirror', 'ace/mode/css/csslint'], function(require, exports, module) {
+
var oop = require("../lib/oop");
+var lang = require("../lib/lang");
var Mirror = require("../worker/mirror").Mirror;
var CSSLint = require("./css/csslint").CSSLint;
var Worker = exports.Worker = function(sender) {
Mirror.call(this, sender);
- this.setTimeout(200);
+ this.setTimeout(400);
+ this.ruleset = null;
+ this.setDisabledRules("ids");
+ this.setInfoRules("adjoining-classes|qualified-headings|zero-units|gradients|import|outline-none");
};
oop.inherits(Worker, Mirror);
(function() {
-
+ this.setInfoRules = function(ruleNames) {
+ if (typeof ruleNames == "string")
+ ruleNames = ruleNames.split("|");
+ this.infoRules = lang.arrayToMap(ruleNames);
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.setDisabledRules = function(ruleNames) {
+ if (!ruleNames) {
+ this.ruleset = null;
+ } else {
+ if (typeof ruleNames == "string")
+ ruleNames = ruleNames.split("|");
+ var all = {};
+
+ CSSLint.getRules().forEach(function(x){
+ all[x.id] = true;
+ });
+ ruleNames.forEach(function(x) {
+ delete all[x];
+ });
+
+ this.ruleset = all;
+ }
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
this.onUpdate = function() {
var value = this.doc.getValue();
-
- var result = CSSLint.verify(value);
+ var infoRules = this.infoRules;
+
+ var result = CSSLint.verify(value, this.ruleset);
this.sender.emit("csslint", result.messages.map(function(msg) {
- delete msg.rule;
- return msg;
+ return {
+ row: msg.line - 1,
+ column: msg.col - 1,
+ text: msg.message,
+ type: infoRules[msg.rule.id] ? "info" : msg.type
+ }
}));
};
-
+
}).call(Worker.prototype);
-});define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
+});
+
+define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ return new Array(count + 1).join(string);
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+ return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+ return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+ var copy = {};
+ for (var key in obj) {
+ copy[key] = obj[key];
+ }
+ return copy;
+};
+
+exports.copyArray = function(array){
+ var copy = [];
+ for (var i=0, l=array.length; i<l; i++) {
+ if (array[i] && typeof array[i] == "object")
+ copy[i] = this.copyObject( array[i] );
+ else
+ copy[i] = array[i];
+ }
+ return copy;
+};
+
+exports.deepCopy = function (obj) {
+ if (typeof obj != "object") {
+ return obj;
+ }
+
+ var copy = obj.constructor();
+ for (var key in obj) {
+ if (typeof obj[key] == "object") {
+ copy[key] = this.deepCopy(obj[key]);
+ } else {
+ copy[key] = obj[key];
+ }
+ }
+ return copy;
+};
+
+exports.arrayToMap = function(arr) {
+ var map = {};
+ for (var i=0; i<arr.length; i++) {
+ map[arr[i]] = 1;
+ }
+ return map;
+
+};
+
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
+exports.arrayRemove = function(array, value) {
+ for (var i = 0; i <= array.length; i++) {
+ if (value === array[i]) {
+ array.splice(i, 1);
+ }
+ }
+};
+
+exports.escapeRegExp = function(str) {
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
+exports.deferredCall = function(fcn) {
+
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var deferred = function(timeout) {
+ deferred.cancel();
+ timer = setTimeout(callback, timeout || 0);
+ return deferred;
+ };
+
+ deferred.schedule = deferred;
+
+ deferred.call = function() {
+ this.cancel();
+ fcn();
+ return deferred;
+ };
+
+ deferred.cancel = function() {
+ clearTimeout(timer);
+ timer = null;
+ return deferred;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = _self;
+ _self.schedule = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || 0);
+ };
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+
var Document = require("../document").Document;
var lang = require("../lib/lang");
@@ -1604,50 +1245,14 @@ var Mirror = exports.Mirror = function(sender) {
};
this.onUpdate = function() {
- // abstract method
};
}).call(Mirror.prototype);
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
-"use strict";
+
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1656,14 +1261,10 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
-
- if (Array.isArray(text)) {
- this.insertLines(0, text);
- }
- // There has to be one line at least in the document. If you pass an empty
- // string to the insert function, nothing will happen. Workaround.
- else if (text.length == 0) {
+ if (text.length == 0) {
this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this.insertLines(0, text);
} else {
this.insert({row: 0, column:0}, text);
}
@@ -1672,22 +1273,17 @@ var Document = function(text) {
(function() {
oop.implement(this, EventEmitter);
-
this.setValue = function(text) {
var len = this.getLength();
this.remove(new Range(0, 0, len, this.getLine(len-1).length));
this.insert({row: 0, column:0}, text);
};
-
this.getValue = function() {
return this.getAllLines().join(this.getNewLineCharacter());
};
-
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
-
- // check for IE split bug
if ("aaa".split(/a/).length == 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
@@ -1698,6 +1294,7 @@ var Document = function(text) {
};
+
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
if (match) {
@@ -1706,18 +1303,17 @@ var Document = function(text) {
this.$autoNewLine = "\n";
}
};
-
this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
+ switch (this.$newLineMode) {
case "windows":
- return "\r\n";
+ return "\r\n";
case "unix":
- return "\n";
+ return "\n";
- case "auto":
- return this.$autoNewLine;
- }
+ default:
+ return this.$autoNewLine;
+ }
};
this.$autoNewLine = "\n";
@@ -1728,48 +1324,33 @@ var Document = function(text) {
this.$newLineMode = newLineMode;
};
-
this.getNewLineMode = function() {
return this.$newLineMode;
};
-
this.isNewLine = function(text) {
return (text == "\r\n" || text == "\r" || text == "\n");
};
-
- /**
- * Get a verbatim copy of the given line as it is in the document
- */
this.getLine = function(row) {
return this.$lines[row] || "";
};
-
this.getLines = function(firstRow, lastRow) {
return this.$lines.slice(firstRow, lastRow + 1);
};
-
- /**
- * Returns all lines in the document as string array. Warning: The caller
- * should not modify this array!
- */
this.getAllLines = function() {
return this.getLines(0, this.getLength());
};
-
this.getLength = function() {
return this.$lines.length;
};
-
this.getTextRange = function(range) {
if (range.start.row == range.end.row) {
return this.$lines[range.start.row].substring(range.start.column,
range.end.column);
}
else {
- var lines = [];
- lines.push(this.$lines[range.start.row].substring(range.start.column));
- lines.push.apply(lines, this.getLines(range.start.row+1, range.end.row-1));
- lines.push(this.$lines[range.end.row].substring(0, range.end.column));
+ var lines = this.getLines(range.start.row+1, range.end.row-1);
+ lines.unshift((this.$lines[range.start.row] || "").substring(range.start.column));
+ lines.push((this.$lines[range.end.row] || "").substring(0, range.end.column));
return lines.join(this.getNewLineCharacter());
}
};
@@ -1782,13 +1363,11 @@ var Document = function(text) {
}
return position;
};
-
this.insert = function(position, text) {
- if (text.length == 0)
+ if (!text || text.length === 0)
return position;
position = this.$clipPosition(position);
-
if (this.getLength() <= 1)
this.$detectNewLine(text);
@@ -1804,10 +1383,13 @@ var Document = function(text) {
}
return position;
};
-
this.insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
+ if (lines.length > 0xFFFF) {
+ var end = this.insertLines(row, lines.slice(0xFFFF));
+ lines = lines.slice(0, 0xFFFF);
+ }
var args = [row, 0];
args.push.apply(args, lines);
@@ -1820,9 +1402,8 @@ var Document = function(text) {
lines: lines
};
this._emit("change", { data: delta });
- return range.end;
+ return end || range.end;
};
-
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
var line = this.$lines[position.row] || "";
@@ -1844,7 +1425,6 @@ var Document = function(text) {
return end;
};
-
this.insertInLine = function(position, text) {
if (text.length == 0)
return position;
@@ -1868,9 +1448,7 @@ var Document = function(text) {
return end;
};
-
this.remove = function(range) {
- // clip to document
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1900,7 +1478,6 @@ var Document = function(text) {
}
return range.start;
};
-
this.removeInLine = function(row, startColumn, endColumn) {
if (startColumn == endColumn)
return;
@@ -1919,14 +1496,6 @@ var Document = function(text) {
this._emit("change", { data: delta });
return range.start;
};
-
- /**
- * Removes a range of full lines
- *
- * @param firstRow {Integer} The first row to be removed
- * @param lastRow {Integer} The last row to be removed
- * @return {String[]} The removed lines
- */
this.removeLines = function(firstRow, lastRow) {
var range = new Range(firstRow, 0, lastRow + 1, 0);
var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
@@ -1940,7 +1509,6 @@ var Document = function(text) {
this._emit("change", { data: delta });
return removed;
};
-
this.removeNewLine = function(row) {
var firstLine = this.getLine(row);
var secondLine = this.getLine(row+1);
@@ -1957,13 +1525,9 @@ var Document = function(text) {
};
this._emit("change", { data: delta });
};
-
this.replace = function(range, text) {
if (text.length == 0 && range.isEmpty())
return range.start;
-
- // Shortcut: If the text we want to insert is the same as it is already
- // in the document, we don't have to replace anything.
if (text == this.getTextRange(range))
return range.end;
@@ -1977,7 +1541,6 @@ var Document = function(text) {
return end;
};
-
this.applyDeltas = function(deltas) {
for (var i=0; i<deltas.length; i++) {
var delta = deltas[i];
@@ -1993,7 +1556,6 @@ var Document = function(text) {
this.remove(range);
}
};
-
this.revertDeltas = function(deltas) {
for (var i=deltas.length-1; i>=0; i--) {
var delta = deltas[i];
@@ -2010,51 +1572,33 @@ var Document = function(text) {
this.insert(range.start, delta.text);
}
};
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length;
+
+ return index + newlineLength * i + pos.column;
+ };
}).call(Document.prototype);
exports.Document = Document;
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
var Range = function(startRow, startColumn, endRow, endColumn) {
this.start = {
row: startRow,
@@ -2067,36 +1611,21 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
};
};
-(function() {
- this.isEequal = function(range) {
+(function() {
+ this.isEqual = function(range) {
return this.start.row == range.start.row &&
this.end.row == range.end.row &&
this.start.column == range.start.column &&
this.end.column == range.end.column
- };
-
+ };
this.toString = function() {
return ("Range: [" + this.start.row + "/" + this.start.column +
"] -> [" + this.end.row + "/" + this.end.column + "]");
- };
+ };
this.contains = function(row, column) {
return this.compare(row, column) == 0;
- };
-
- /**
- * Compares this range (A) with another range (B), where B is the passed in
- * range.
- *
- * Return values:
- * -2: (B) is infront of (A) and doesn't intersect with (A)
- * -1: (B) begins before (A) but ends inside of (A)
- * 0: (B) is completly inside of (A) OR (A) is complety inside of (B)
- * +1: (B) begins inside of (A) but ends outside of (A)
- * +2: (B) is after (A) and doesn't intersect with (A)
- *
- * 42: FTW state: (B) ends in (A) but starts outside of (A)
- */
+ };
this.compareRange = function(range) {
var cmp,
end = range.end,
@@ -2124,24 +1653,23 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return 0;
}
}
- }
-
+ };
this.comparePoint = function(p) {
return this.compare(p.row, p.column);
- }
-
+ };
this.containsRange = function(range) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- }
-
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
this.isEnd = function(row, column) {
return this.end.row == row && this.end.column == column;
- }
-
+ };
this.isStart = function(row, column) {
return this.start.row == row && this.start.column == column;
- }
-
+ };
this.setStart = function(row, column) {
if (typeof row == "object") {
this.start.column = row.column;
@@ -2150,8 +1678,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.start.row = row;
this.start.column = column;
}
- }
-
+ };
this.setEnd = function(row, column) {
if (typeof row == "object") {
this.end.column = row.column;
@@ -2160,8 +1687,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.end.row = row;
this.end.column = column;
}
- }
-
+ };
this.inside = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isEnd(row, column) || this.isStart(row, column)) {
@@ -2171,8 +1697,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.insideStart = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isEnd(row, column)) {
@@ -2182,8 +1707,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.insideEnd = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isStart(row, column)) {
@@ -2193,8 +1717,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.compare = function(row, column) {
if (!this.isMultiLine()) {
if (row === this.start.row) {
@@ -2216,29 +1739,20 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return 0;
};
-
- /**
- * Like .compare(), but if isStart is true, return -1;
- */
this.compareStart = function(row, column) {
if (this.start.row == row && this.start.column == column) {
return -1;
} else {
return this.compare(row, column);
}
- }
-
- /**
- * Like .compare(), but if isEnd is true, return 1;
- */
+ };
this.compareEnd = function(row, column) {
if (this.end.row == row && this.end.column == column) {
return 1;
} else {
return this.compare(row, column);
}
- }
-
+ };
this.compareInside = function(row, column) {
if (this.end.row == row && this.end.column == column) {
return 1;
@@ -2247,8 +1761,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
} else {
return this.compare(row, column);
}
- }
-
+ };
this.clipRows = function(firstRow, lastRow) {
if (this.end.row > lastRow) {
var end = {
@@ -2279,7 +1792,6 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
return Range.fromPoints(start || this.start, end || this.end);
};
-
this.extend = function(row, column) {
var cmp = this.compare(row, column);
@@ -2296,22 +1808,18 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.isEmpty = function() {
return (this.start.row == this.end.row && this.start.column == this.end.column);
};
-
this.isMultiLine = function() {
return (this.start.row !== this.end.row);
};
-
this.clone = function() {
return Range.fromPoints(this.start, this.end);
};
-
this.collapseRows = function() {
if (this.end.column == 0)
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
else
return new Range(this.start.row, 0, this.end.row, 0)
};
-
this.toScreenRange = function(session) {
var screenPosStart =
session.documentToScreenPosition(this.start);
@@ -2325,61 +1833,19 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
};
}).call(Range.prototype);
-
-
Range.fromPoints = function(start, end) {
return new Range(start.row, start.column, end.row, end.column);
};
exports.Range = Range;
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
+
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
-/**
- * An Anchor is a floating pointer in the document. Whenever text is inserted or
- * deleted before the cursor, the position of the cursor is updated
- */
var Anchor = exports.Anchor = function(doc, row, column) {
this.document = doc;
@@ -2395,15 +1861,15 @@ var Anchor = exports.Anchor = function(doc, row, column) {
(function() {
oop.implement(this, EventEmitter);
-
+
this.getPosition = function() {
return this.$clipPositionToDocument(this.row, this.column);
};
-
+
this.getDocument = function() {
return this.document;
};
-
+
this.onChange = function(e) {
var delta = e.data;
var range = delta.range;
@@ -2496,11 +1962,10 @@ var Anchor = exports.Anchor = function(doc, row, column) {
value: pos
});
};
-
+
this.detach = function() {
this.document.removeEventListener("change", this.$onChange);
};
-
this.$clipPositionToDocument = function(row, column) {
var pos = {};
@@ -2526,280 +1991,41 @@ var Anchor = exports.Anchor = function(doc, row, column) {
}).call(Anchor.prototype);
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
-exports.stringReverse = function(string) {
- return string.split("").reverse().join("");
-};
-
-exports.stringRepeat = function (string, count) {
- return new Array(count + 1).join(string);
-};
-
-var trimBeginRegexp = /^\s\s*/;
-var trimEndRegexp = /\s\s*$/;
-
-exports.stringTrimLeft = function (string) {
- return string.replace(trimBeginRegexp, '');
-};
-
-exports.stringTrimRight = function (string) {
- return string.replace(trimEndRegexp, '');
-};
-
-exports.copyObject = function(obj) {
- var copy = {};
- for (var key in obj) {
- copy[key] = obj[key];
- }
- return copy;
-};
-
-exports.copyArray = function(array){
- var copy = [];
- for (var i=0, l=array.length; i<l; i++) {
- if (array[i] && typeof array[i] == "object")
- copy[i] = this.copyObject( array[i] );
- else
- copy[i] = array[i];
- }
- return copy;
-};
-
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
- return obj;
- }
-
- var copy = obj.constructor();
- for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
- }
- return copy;
-};
-
-exports.arrayToMap = function(arr) {
- var map = {};
- for (var i=0; i<arr.length; i++) {
- map[arr[i]] = 1;
- }
- return map;
-
-};
-
-/**
- * splice out of 'array' anything that === 'value'
- */
-exports.arrayRemove = function(array, value) {
- for (var i = 0; i <= array.length; i++) {
- if (value === array[i]) {
- array.splice(i, 1);
- }
- }
-};
-
-exports.escapeRegExp = function(str) {
- return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
-};
-
-exports.deferredCall = function(fcn) {
-
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var deferred = function(timeout) {
- deferred.cancel();
- timer = setTimeout(callback, timeout || 0);
- return deferred;
- };
-
- deferred.schedule = deferred;
-
- deferred.call = function() {
- this.cancel();
- fcn();
- return deferred;
- };
-
- deferred.cancel = function() {
- clearTimeout(timer);
- timer = null;
- return deferred;
- };
-
- return deferred;
-};
-
-});
-/*
-CSSLint
-Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-*/
define('ace/mode/css/csslint', ['require', 'exports', 'module' ], function(require, exports, module) {
-/*!
-Parser-Lib
-Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-*/
-/* Build time: 13-July-2011 04:35:28 */
var parserlib = {};
(function(){
-
-/**
- * A generic base to inherit from for any object
- * that needs event handling.
- * @class EventTarget
- * @constructor
- */
function EventTarget(){
-
- /**
- * The array of listeners for various events.
- * @type Object
- * @property _listeners
- * @private
- */
this._listeners = {};
}
EventTarget.prototype = {
-
- //restore constructor
constructor: EventTarget,
-
- /**
- * Adds a listener for a given event type.
- * @param {String} type The type of event to add a listener for.
- * @param {Function} listener The function to call when the event occurs.
- * @return {void}
- * @method addListener
- */
addListener: function(type, listener){
if (!this._listeners[type]){
this._listeners[type] = [];
}
this._listeners[type].push(listener);
- },
-
- /**
- * Fires an event based on the passed-in object.
- * @param {Object|String} event An object with at least a 'type' attribute
- * or a string indicating the event name.
- * @return {void}
- * @method fire
- */
+ },
fire: function(event){
if (typeof event == "string"){
event = { type: event };
}
- if (!event.target){
+ if (typeof event.target != "undefined"){
event.target = this;
}
- if (!event.type){
+ if (typeof event.type == "undefined"){
throw new Error("Event object missing 'type' property.");
}
if (this._listeners[event.type]){
-
- //create a copy of the array and use that so listeners can't chane
var listeners = this._listeners[event.type].concat();
for (var i=0, len=listeners.length; i < len; i++){
listeners[i].call(this, event);
}
}
},
-
- /**
- * Removes a listener for a given event type.
- * @param {String} type The type of event to remove a listener from.
- * @param {Function} listener The function to remove from the event.
- * @return {void}
- * @method removeListener
- */
removeListener: function(type, listener){
if (this._listeners[type]){
var listeners = this._listeners[type];
@@ -2814,147 +2040,47 @@ EventTarget.prototype = {
}
}
};
-/**
- * Convenient way to read through strings.
- * @namespace parserlib.util
- * @class StringReader
- * @constructor
- * @param {String} text The text to read.
- */
function StringReader(text){
-
- /**
- * The input text with line endings normalized.
- * @property _input
- * @type String
- * @private
- */
this._input = text.replace(/\n\r?/g, "\n");
-
-
- /**
- * The row for the character to be read next.
- * @property _line
- * @type int
- * @private
- */
this._line = 1;
-
-
- /**
- * The column for the character to be read next.
- * @property _col
- * @type int
- * @private
- */
this._col = 1;
-
- /**
- * The index of the character in the input to be read next.
- * @property _cursor
- * @type int
- * @private
- */
this._cursor = 0;
}
StringReader.prototype = {
-
- //restore constructor
constructor: StringReader,
-
- //-------------------------------------------------------------------------
- // Position info
- //-------------------------------------------------------------------------
-
- /**
- * Returns the column of the character to be read next.
- * @return {int} The column of the character to be read next.
- * @method getCol
- */
getCol: function(){
return this._col;
},
-
- /**
- * Returns the row of the character to be read next.
- * @return {int} The row of the character to be read next.
- * @method getLine
- */
getLine: function(){
return this._line ;
},
-
- /**
- * Determines if you're at the end of the input.
- * @return {Boolean} True if there's no more input, false otherwise.
- * @method eof
- */
eof: function(){
return (this._cursor == this._input.length);
},
-
- //-------------------------------------------------------------------------
- // Basic reading
- //-------------------------------------------------------------------------
-
- /**
- * Reads the next character without advancing the cursor.
- * @param {int} count How many characters to look ahead (default is 1).
- * @return {String} The next character or null if there is no next character.
- * @method peek
- */
peek: function(count){
var c = null;
count = (typeof count == "undefined" ? 1 : count);
-
- //if we're not at the end of the input...
if (this._cursor < this._input.length){
-
- //get character and increment cursor and column
c = this._input.charAt(this._cursor + count - 1);
}
return c;
},
-
- /**
- * Reads the next character from the input and adjusts the row and column
- * accordingly.
- * @return {String} The next character or null if there is no next character.
- * @method read
- */
read: function(){
var c = null;
-
- //if we're not at the end of the input...
if (this._cursor < this._input.length){
-
- //if the last character was a newline, increment row count
- //and reset column count
if (this._input.charAt(this._cursor) == "\n"){
this._line++;
this._col=1;
} else {
this._col++;
}
-
- //get character and increment cursor and column
c = this._input.charAt(this._cursor++);
}
return c;
},
-
- //-------------------------------------------------------------------------
- // Misc
- //-------------------------------------------------------------------------
-
- /**
- * Saves the current location so it can be returned to later.
- * @method mark
- * @return {void}
- */
mark: function(){
this._bookmark = {
cursor: this._cursor,
@@ -2971,29 +2097,10 @@ StringReader.prototype = {
delete this._bookmark;
}
},
-
- //-------------------------------------------------------------------------
- // Advanced reading
- //-------------------------------------------------------------------------
-
- /**
- * Reads up to and including the given string. Throws an error if that
- * string is not found.
- * @param {String} pattern The string to read.
- * @return {String} The string when it is found.
- * @throws Error when the string pattern is not found.
- * @method readTo
- */
readTo: function(pattern){
var buffer = "",
c;
-
- /*
- * First, buffer must be the same length as the pattern.
- * Then, buffer must end with the pattern or else reach the
- * end of the input.
- */
while (buffer.length < pattern.length || buffer.lastIndexOf(pattern) != buffer.length - pattern.length){
c = this.read();
if (c){
@@ -3006,17 +2113,6 @@ StringReader.prototype = {
return buffer;
},
-
- /**
- * Reads characters while each character causes the given
- * filter function to return true. The function is passed
- * in each character and either returns true to continue
- * reading or false to stop.
- * @param {Function} filter The function to read on each character.
- * @return {String} The string made up of all characters that passed the
- * filter check.
- * @method readWhile
- */
readWhile: function(filter){
var buffer = "",
@@ -3030,25 +2126,10 @@ StringReader.prototype = {
return buffer;
},
-
- /**
- * Reads characters that match either text or a regular expression and
- * returns those characters. If a match is found, the row and column
- * are adjusted; if no match is found, the reader's state is unchanged.
- * reading or false to stop.
- * @param {String|RegExp} matchter If a string, then the literal string
- * value is searched for. If a regular expression, then any string
- * matching the pattern is search for.
- * @return {String} The string made up of all characters that matched or
- * null if there was no match.
- * @method readMatch
- */
readMatch: function(matcher){
var source = this._input.substring(this._cursor),
value = null;
-
- //if it's a string, just do a straight match
if (typeof matcher == "string"){
if (source.indexOf(matcher) === 0){
value = this.readCount(matcher.length);
@@ -3061,15 +2142,6 @@ StringReader.prototype = {
return value;
},
-
-
- /**
- * Reads a given number of characters. If the end of the input is reached,
- * it reads only the remaining characters and does not throw an error.
- * @param {int} count The number of characters to read.
- * @return {String} The string made up the read characters.
- * @method readCount
- */
readCount: function(count){
var buffer = "";
@@ -3081,187 +2153,52 @@ StringReader.prototype = {
}
};
-/**
- * Type to use when a syntax error occurs.
- * @class SyntaxError
- * @namespace parserlib.util
- * @constructor
- * @param {String} message The error message.
- * @param {int} line The line at which the error occurred.
- * @param {int} col The column at which the error occurred.
- */
function SyntaxError(message, line, col){
-
- /**
- * The column at which the error occurred.
- * @type int
- * @property col
- */
this.col = col;
-
- /**
- * The line at which the error occurred.
- * @type int
- * @property line
- */
this.line = line;
-
- /**
- * The text representation of the unit.
- * @type String
- * @property text
- */
this.message = message;
}
-
-//inherit from Error
SyntaxError.prototype = new Error();
-/**
- * Base type to represent a single syntactic unit.
- * @class SyntaxUnit
- * @namespace parserlib.util
- * @constructor
- * @param {String} text The text of the unit.
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- */
-function SyntaxUnit(text, line, col){
-
-
- /**
- * The column of text on which the unit resides.
- * @type int
- * @property col
- */
+function SyntaxUnit(text, line, col, type){
this.col = col;
-
- /**
- * The line of text on which the unit resides.
- * @type int
- * @property line
- */
this.line = line;
-
- /**
- * The text representation of the unit.
- * @type String
- * @property text
- */
this.text = text;
-
+ this.type = type;
}
-
-/**
- * Create a new syntax unit based solely on the given token.
- * Convenience method for creating a new syntax unit when
- * it represents a single token instead of multiple.
- * @param {Object} token The token object to represent.
- * @return {parserlib.util.SyntaxUnit} The object representing the token.
- * @static
- * @method fromToken
- */
SyntaxUnit.fromToken = function(token){
return new SyntaxUnit(token.value, token.startLine, token.startCol);
};
SyntaxUnit.prototype = {
-
- //restore constructor
constructor: SyntaxUnit,
-
- /**
- * Returns the text representation of the unit.
- * @return {String} The text representation of the unit.
- * @method valueOf
- */
valueOf: function(){
return this.toString();
},
-
- /**
- * Returns the text representation of the unit.
- * @return {String} The text representation of the unit.
- * @method toString
- */
toString: function(){
return this.text;
}
};
-/**
- * Generic TokenStream providing base functionality.
- * @class TokenStreamBase
- * @namespace parserlib.util
- * @constructor
- * @param {String|StringReader} input The text to tokenize or a reader from
- * which to read the input.
- */
function TokenStreamBase(input, tokenData){
-
- /**
- * The string reader for easy access to the text.
- * @type StringReader
- * @property _reader
- * @private
- */
- //this._reader = (typeof input == "string") ? new StringReader(input) : input;
this._reader = input ? new StringReader(input.toString()) : null;
-
- /**
- * Token object for the last consumed token.
- * @type Token
- * @property _token
- * @private
- */
- this._token = null;
-
- /**
- * The array of token information.
- * @type Array
- * @property _tokenData
- * @private
- */
+ this._token = null;
this._tokenData = tokenData;
-
- /**
- * Lookahead token buffer.
- * @type Array
- * @property _lt
- * @private
- */
this._lt = [];
-
- /**
- * Lookahead token buffer index.
- * @type int
- * @property _ltIndex
- * @private
- */
this._ltIndex = 0;
this._ltIndexCache = [];
}
-
-/**
- * Accepts an array of token information and outputs
- * an array of token data containing key-value mappings
- * and matching functions that the TokenStream needs.
- * @param {Array} tokens An array of token descriptors.
- * @return {Array} An array of processed token data.
- * @method createTokenData
- * @static
- */
TokenStreamBase.createTokenData = function(tokens){
- var nameMap = [],
- typeMap = {},
- tokenData = tokens.concat([]),
- i = 0,
- len = tokenData.length+1;
+ var nameMap = [],
+ typeMap = {},
+ tokenData = tokens.concat([]),
+ i = 0,
+ len = tokenData.length+1;
tokenData.UNKNOWN = -1;
- tokenData.unshift({name:"EOF"});
+ tokenData.unshift({name:"EOF"});
for (; i < len; i++){
nameMap.push(tokenData[i].name);
@@ -3278,36 +2215,13 @@ TokenStreamBase.createTokenData = function(tokens){
tokenData.type = function(c){
return typeMap[c];
};
-
- return tokenData;
+
+ return tokenData;
};
TokenStreamBase.prototype = {
-
- //restore constructor
constructor: TokenStreamBase,
-
- //-------------------------------------------------------------------------
- // Matching methods
- //-------------------------------------------------------------------------
-
- /**
- * Determines if the next token matches the given token type.
- * If so, that token is consumed; if not, the token is placed
- * back onto the token stream. You can pass in any number of
- * token types and this will return true if any of the token
- * types is found.
- * @param {int|int[]} tokenTypes Either a single token type or an array of
- * token types that the next token might be. If an array is passed,
- * it's assumed that the token can be any of these.
- * @param {variant} channel (Optional) The channel to read from. If not
- * provided, reads from the default (unnamed) channel.
- * @return {Boolean} True if the token type matches, false if not.
- * @method match
- */
match: function(tokenTypes, channel){
-
- //always convert to an array, makes things easier
if (!(tokenTypes instanceof Array)){
tokenTypes = [tokenTypes];
}
@@ -3321,26 +2235,12 @@ TokenStreamBase.prototype = {
return true;
}
}
-
- //no match found, put the token back
this.unget();
return false;
- },
-
- /**
- * Determines if the next token matches the given token type.
- * If so, that token is consumed; if not, an error is thrown.
- * @param {int|int[]} tokenTypes Either a single token type or an array of
- * token types that the next token should be. If an array is passed,
- * it's assumed that the token must be one of these.
- * @param {variant} channel (Optional) The channel to read from. If not
- * provided, reads from the default (unnamed) channel.
- * @return {void}
- * @method mustMatch
- */
+ },
mustMatch: function(tokenTypes, channel){
- //always convert to an array, makes things easier
+ var token;
if (!(tokenTypes instanceof Array)){
tokenTypes = [tokenTypes];
}
@@ -3351,36 +2251,14 @@ TokenStreamBase.prototype = {
" at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
}
},
-
- //-------------------------------------------------------------------------
- // Consuming methods
- //-------------------------------------------------------------------------
-
- /**
- * Keeps reading from the token stream until either one of the specified
- * token types is found or until the end of the input is reached.
- * @param {int|int[]} tokenTypes Either a single token type or an array of
- * token types that the next token should be. If an array is passed,
- * it's assumed that the token must be one of these.
- * @param {variant} channel (Optional) The channel to read from. If not
- * provided, reads from the default (unnamed) channel.
- * @return {void}
- * @method advance
- */
advance: function(tokenTypes, channel){
- while(this.LA(0) != 0 && !this.match(tokenTypes, channel)){
+ while(this.LA(0) !== 0 && !this.match(tokenTypes, channel)){
this.get();
}
return this.LA(0);
- },
-
- /**
- * Consumes the next token from the token stream.
- * @return {int} The token type of the token that was just consumed.
- * @method get
- */
+ },
get: function(channel){
var tokenInfo = this._tokenData,
@@ -3391,102 +2269,57 @@ TokenStreamBase.prototype = {
found = false,
token,
info;
-
- //check the lookahead buffer first
if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){
i++;
this._token = this._lt[this._ltIndex++];
info = tokenInfo[this._token.type];
-
- //obey channels logic
while((info.channel !== undefined && channel !== info.channel) &&
this._ltIndex < this._lt.length){
this._token = this._lt[this._ltIndex++];
info = tokenInfo[this._token.type];
i++;
}
-
- //here be dragons
if ((info.channel === undefined || channel === info.channel) &&
this._ltIndex <= this._lt.length){
this._ltIndexCache.push(i);
return this._token.type;
}
}
-
- //call token retriever method
- token = this._getToken();
-
- //if it should be hidden, don't save a token
+ token = this._getToken();
if (token.type > -1 && !tokenInfo[token.type].hide){
-
- //apply token channel
token.channel = tokenInfo[token.type].channel;
-
- //save for later
this._token = token;
this._lt.push(token);
-
- //save space that will be moved (must be done before array is truncated)
this._ltIndexCache.push(this._lt.length - this._ltIndex + i);
-
- //keep the buffer under 5 items
if (this._lt.length > 5){
this._lt.shift();
}
-
- //also keep the shift buffer under 5 items
if (this._ltIndexCache.length > 5){
this._ltIndexCache.shift();
}
-
- //update lookahead index
this._ltIndex = this._lt.length;
}
-
- /*
- * Skip to the next token if:
- * 1. The token type is marked as hidden.
- * 2. The token type has a channel specified and it isn't the current channel.
- */
info = tokenInfo[token.type];
if (info &&
(info.hide ||
(info.channel !== undefined && channel !== info.channel))){
return this.get(channel);
} else {
- //return just the type
return token.type;
}
},
-
- /**
- * Looks ahead a certain number of tokens and returns the token type at
- * that position. This will throw an error if you lookahead past the
- * end of input, past the size of the lookahead buffer, or back past
- * the first token in the lookahead buffer.
- * @param {int} The index of the token type to retrieve. 0 for the
- * current token, 1 for the next, -1 for the previous, etc.
- * @return {int} The token type of the token in the given position.
- * @method LA
- */
LA: function(index){
var total = index,
tt;
if (index > 0){
- //TODO: Store 5 somewhere
if (index > 5){
throw new Error("Too much lookahead.");
}
-
- //get all those tokens
while(total){
tt = this.get();
total--;
}
-
- //unget all those tokens
while(total < index){
this.unget();
total++;
@@ -3505,78 +2338,28 @@ TokenStreamBase.prototype = {
return tt;
- },
-
- /**
- * Looks ahead a certain number of tokens and returns the token at
- * that position. This will throw an error if you lookahead past the
- * end of input, past the size of the lookahead buffer, or back past
- * the first token in the lookahead buffer.
- * @param {int} The index of the token type to retrieve. 0 for the
- * current token, 1 for the next, -1 for the previous, etc.
- * @return {Object} The token of the token in the given position.
- * @method LA
- */
+ },
LT: function(index){
-
- //lookahead first to prime the token buffer
this.LA(index);
-
- //now find the token, subtract one because _ltIndex is already at the next index
return this._lt[this._ltIndex+index-1];
},
-
- /**
- * Returns the token type for the next token in the stream without
- * consuming it.
- * @return {int} The token type of the next token in the stream.
- * @method peek
- */
peek: function(){
return this.LA(1);
},
-
- /**
- * Returns the actual token object for the last consumed token.
- * @return {Token} The token object for the last consumed token.
- * @method token
- */
token: function(){
return this._token;
},
-
- /**
- * Returns the name of the token for the given token type.
- * @param {int} tokenType The type of token to get the name of.
- * @return {String} The name of the token or "UNKNOWN_TOKEN" for any
- * invalid token type.
- * @method tokenName
- */
tokenName: function(tokenType){
if (tokenType < 0 || tokenType > this._tokenData.length){
return "UNKNOWN_TOKEN";
} else {
return this._tokenData[tokenType].name;
}
- },
-
- /**
- * Returns the token type value for the given token name.
- * @param {String} tokenName The name of the token whose value should be returned.
- * @return {int} The token type value for the given token name or -1
- * for an unknown token.
- * @method tokenName
- */
+ },
tokenType: function(tokenName){
return this._tokenData[tokenName] || -1;
- },
-
- /**
- * Returns the last consumed token to the token stream.
- * @method unget
- */
+ },
unget: function(){
- //if (this._ltIndex > -1){
if (this._ltIndexCache.length){
this._ltIndex -= this._ltIndexCache.pop();//--;
this._token = this._lt[this._ltIndex - 1];
@@ -3589,6 +2372,7 @@ TokenStreamBase.prototype = {
+
parserlib.util = {
StringReader: StringReader,
SyntaxError : SyntaxError,
@@ -3597,31 +2381,6 @@ EventTarget : EventTarget,
TokenStreamBase : TokenStreamBase
};
})();
-
-/*
-Parser-Lib
-Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-*/
-/* Build time: 13-July-2011 04:35:28 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -3629,6 +2388,7 @@ StringReader = parserlib.util.StringReader,
SyntaxError = parserlib.util.SyntaxError,
SyntaxUnit = parserlib.util.SyntaxUnit;
+
var Colors = {
aliceblue :"#f0f8ff",
antiquewhite :"#faebd7",
@@ -3697,7 +2457,7 @@ var Colors = {
lightcoral :"#f08080",
lightcyan :"#e0ffff",
lightgoldenrodyellow :"#fafad2",
- lightgrey :"#d3d3d3",
+ lightgray :"#d3d3d3",
lightgreen :"#90ee90",
lightpink :"#ffb6c1",
lightsalmon :"#ffa07a",
@@ -3771,28 +2531,10 @@ var Colors = {
yellow :"#ffff00",
yellowgreen :"#9acd32"
};
-/**
- * Represents a selector combinator (whitespace, +, >).
- * @namespace parserlib.css
- * @class Combinator
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- * @param {String} text The text representation of the unit.
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- */
function Combinator(text, line, col){
- SyntaxUnit.call(this, text, line, col);
-
- /**
- * The type of modifier.
- * @type String
- * @property type
- */
+ SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE);
this.type = "unknown";
-
- //pretty simple
if (/^\s+$/.test(text)){
this.type = "descendant";
} else if (text == ">"){
@@ -3807,274 +2549,27 @@ function Combinator(text, line, col){
Combinator.prototype = new SyntaxUnit();
Combinator.prototype.constructor = Combinator;
-
-
-
-var Level1Properties = {
-
- "background": 1,
- "background-attachment": 1,
- "background-color": 1,
- "background-image": 1,
- "background-position": 1,
- "background-repeat": 1,
-
- "border": 1,
- "border-bottom": 1,
- "border-bottom-width": 1,
- "border-color": 1,
- "border-left": 1,
- "border-left-width": 1,
- "border-right": 1,
- "border-right-width": 1,
- "border-style": 1,
- "border-top": 1,
- "border-top-width": 1,
- "border-width": 1,
-
- "clear": 1,
- "color": 1,
- "display": 1,
- "float": 1,
-
- "font": 1,
- "font-family": 1,
- "font-size": 1,
- "font-style": 1,
- "font-variant": 1,
- "font-weight": 1,
-
- "height": 1,
- "letter-spacing": 1,
- "line-height": 1,
-
- "list-style": 1,
- "list-style-image": 1,
- "list-style-position": 1,
- "list-style-type": 1,
-
- "margin": 1,
- "margin-bottom": 1,
- "margin-left": 1,
- "margin-right": 1,
- "margin-top": 1,
-
- "padding": 1,
- "padding-bottom": 1,
- "padding-left": 1,
- "padding-right": 1,
- "padding-top": 1,
-
- "text-align": 1,
- "text-decoration": 1,
- "text-indent": 1,
- "text-transform": 1,
-
- "vertical-align": 1,
- "white-space": 1,
- "width": 1,
- "word-spacing": 1
-
-};
-
-var Level2Properties = {
-
- //Aural
- "azimuth": 1,
- "cue-after": 1,
- "cue-before": 1,
- "cue": 1,
- "elevation": 1,
- "pause-after": 1,
- "pause-before": 1,
- "pause": 1,
- "pitch-range": 1,
- "pitch": 1,
- "play-during": 1,
- "richness": 1,
- "speak-header": 1,
- "speak-numeral": 1,
- "speak-punctuation": 1,
- "speak": 1,
- "speech-rate": 1,
- "stress": 1,
- "voice-family": 1,
- "volume": 1,
-
- //Paged
- "orphans": 1,
- "page-break-after": 1,
- "page-break-before": 1,
- "page-break-inside": 1,
- "widows": 1,
-
- //Interactive
- "cursor": 1,
- "outline-color": 1,
- "outline-style": 1,
- "outline-width": 1,
- "outline": 1,
-
- //Visual
- "background-attachment": 1,
- "background-color": 1,
- "background-image": 1,
- "background-position": 1,
- "background-repeat": 1,
- "background": 1,
- "border-collapse": 1,
- "border-color": 1,
- "border-spacing": 1,
- "border-style": 1,
- "border-top": 1,
- "border-top-color": 1,
- "border-top-style": 1,
- "border-top-width": 1,
- "border-width": 1,
- "border": 1,
- "bottom": 1,
- "caption-side": 1,
- "clear": 1,
- "clip": 1,
- "color": 1,
- "content": 1,
- "counter-increment": 1,
- "counter-reset": 1,
- "direction": 1,
- "display": 1,
- "empty-cells": 1,
- "float": 1,
- "font-family": 1,
- "font-size": 1,
- "font-style": 1,
- "font-variant": 1,
- "font-weight": 1,
- "font": 1,
- "height": 1,
- "left": 1,
- "letter-spacing": 1,
- "line-height": 1,
- "list-style-image": 1,
- "list-style-position": 1,
- "list-style-type": 1,
- "list-style": 1,
- "margin-right": 1,
- "margin-top": 1,
- "margin": 1,
- "max-height": 1,
- "max-width": 1,
- "min-height": 1,
- "min-width": 1,
- "overflow": 1,
- "padding-top": 1,
- "padding": 1,
- "position": 1,
- "quotes": 1,
- "right": 1,
- "table-layout": 1,
- "text-align": 1,
- "text-decoration": 1,
- "text-indent": 1,
- "text-transform": 1,
- "top": 1,
- "unicode-bidi": 1,
- "vertical-align": 1,
- "visibility": 1,
- "white-space": 1,
- "width": 1,
- "word-spacing": 1,
- "z-index": 1
-};
-/**
- * Represents a media feature, such as max-width:500.
- * @namespace parserlib.css
- * @class MediaFeature
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- * @param {SyntaxUnit} name The name of the feature.
- * @param {SyntaxUnit} value The value of the feature or null if none.
- */
function MediaFeature(name, value){
- SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol);
-
- /**
- * The name of the media feature
- * @type String
- * @property name
- */
+ SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE);
this.name = name;
-
- /**
- * The value for the feature or null if there is none.
- * @type SyntaxUnit
- * @property value
- */
this.value = value;
}
MediaFeature.prototype = new SyntaxUnit();
MediaFeature.prototype.constructor = MediaFeature;
-
-
-/**
- * Represents an individual media query.
- * @namespace parserlib.css
- * @class MediaQuery
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- * @param {String} modifier The modifier "not" or "only" (or null).
- * @param {String} mediaType The type of media (i.e., "print").
- * @param {Array} parts Array of selectors parts making up this selector.
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- */
function MediaQuery(modifier, mediaType, features, line, col){
- SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType + " " : "") + features.join(" and "), line, col);
-
- /**
- * The media modifier ("not" or "only")
- * @type String
- * @property modifier
- */
+ SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType + " " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);
this.modifier = modifier;
-
- /**
- * The mediaType (i.e., "print")
- * @type String
- * @property mediaType
- */
- this.mediaType = mediaType;
-
- /**
- * The parts that make up the selector.
- * @type Array
- * @property features
- */
+ this.mediaType = mediaType;
this.features = features;
}
MediaQuery.prototype = new SyntaxUnit();
MediaQuery.prototype.constructor = MediaQuery;
-
-
-/**
- * A CSS3 parser.
- * @namespace parserlib.css
- * @class Parser
- * @constructor
- * @param {Object} options (Optional) Various options for the parser:
- * starHack (true|false) to allow IE6 star hack as valid,
- * underscoreHack (true|false) to interpret leading underscores
- * as IE6-7 targeting for known properties, ieFilters (true|false)
- * to indicate that IE < 8 filters should be accepted and not throw
- * syntax errors.
- */
function Parser(options){
-
- //inherit event functionality
EventTarget.call(this);
@@ -4082,59 +2577,55 @@ function Parser(options){
this._tokenStream = null;
}
+Parser.DEFAULT_TYPE = 0;
+Parser.COMBINATOR_TYPE = 1;
+Parser.MEDIA_FEATURE_TYPE = 2;
+Parser.MEDIA_QUERY_TYPE = 3;
+Parser.PROPERTY_NAME_TYPE = 4;
+Parser.PROPERTY_VALUE_TYPE = 5;
+Parser.PROPERTY_VALUE_PART_TYPE = 6;
+Parser.SELECTOR_TYPE = 7;
+Parser.SELECTOR_PART_TYPE = 8;
+Parser.SELECTOR_SUB_PART_TYPE = 9;
Parser.prototype = function(){
var proto = new EventTarget(), //new prototype
prop,
additions = {
-
- //restore constructor
constructor: Parser,
+ DEFAULT_TYPE : 0,
+ COMBINATOR_TYPE : 1,
+ MEDIA_FEATURE_TYPE : 2,
+ MEDIA_QUERY_TYPE : 3,
+ PROPERTY_NAME_TYPE : 4,
+ PROPERTY_VALUE_TYPE : 5,
+ PROPERTY_VALUE_PART_TYPE : 6,
+ SELECTOR_TYPE : 7,
+ SELECTOR_PART_TYPE : 8,
+ SELECTOR_SUB_PART_TYPE : 9,
- //-----------------------------------------------------------------
- // Grammar
- //-----------------------------------------------------------------
-
- _stylesheet: function(){
-
- /*
- * stylesheet
- * : [ CHARSET_SYM S* STRING S* ';' ]?
- * [S|CDO|CDC]* [ import [S|CDO|CDC]* ]*
- * [ namespace [S|CDO|CDC]* ]*
- * [ [ ruleset | media | page | font_face | keyframes ] [S|CDO|CDC]* ]*
- * ;
- */
+ _stylesheet: function(){
var tokenStream = this._tokenStream,
charset = null,
+ count,
token,
tt;
this.fire("startstylesheet");
-
- //try to read character set
this._charset();
this._skipCruft();
-
- //try to read imports - may be more than one
while (tokenStream.peek() == Tokens.IMPORT_SYM){
this._import();
this._skipCruft();
}
-
- //try to read namespaces - may be more than one
while (tokenStream.peek() == Tokens.NAMESPACE_SYM){
this._namespace();
this._skipCruft();
}
-
- //get the next token
tt = tokenStream.peek();
-
- //try to read the rest
while(tt > Tokens.EOF){
try {
@@ -4155,14 +2646,36 @@ Parser.prototype = function(){
case Tokens.KEYFRAMES_SYM:
this._keyframes();
this._skipCruft();
- break;
+ break;
+ case Tokens.UNKNOWN_SYM: //unknown @ rule
+ tokenStream.get();
+ if (!this.options.strict){
+ this.fire({
+ type: "error",
+ error: null,
+ message: "Unknown @ rule: " + tokenStream.LT(0).value + ".",
+ line: tokenStream.LT(0).startLine,
+ col: tokenStream.LT(0).startCol
+ });
+ count=0;
+ while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) == Tokens.LBRACE){
+ count++; //keep track of nesting depth
+ }
+
+ while(count){
+ tokenStream.advance([Tokens.RBRACE]);
+ count--;
+ }
+
+ } else {
+ throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol);
+ }
+ break;
case Tokens.S:
this._readWhitespace();
break;
default:
if(!this._ruleset()){
-
- //error handling for known issues
switch(tt){
case Tokens.CHARSET_SYM:
token = tokenStream.LT(1);
@@ -4238,34 +2751,23 @@ Parser.prototype = function(){
}
},
- _import: function(emit){
- /*
- * import
- * : IMPORT_SYM S*
- * [STRING|URI] S* media_query_list? ';' S*
- */
+ _import: function(emit){
var tokenStream = this._tokenStream,
tt,
uri,
importToken,
mediaList = [];
-
- //read import symbol
tokenStream.mustMatch(Tokens.IMPORT_SYM);
importToken = tokenStream.token();
this._readWhitespace();
tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
-
- //grab the URI value
uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
this._readWhitespace();
mediaList = this._media_query_list();
-
- //must end with a semicolon
tokenStream.mustMatch(Tokens.SEMICOLON);
this._readWhitespace();
@@ -4281,41 +2783,26 @@ Parser.prototype = function(){
},
- _namespace: function(emit){
- /*
- * namespace
- * : NAMESPACE_SYM S* [namespace_prefix S*]? [STRING|URI] S* ';' S*
- */
+ _namespace: function(emit){
var tokenStream = this._tokenStream,
line,
col,
prefix,
uri;
-
- //read import symbol
tokenStream.mustMatch(Tokens.NAMESPACE_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this._readWhitespace();
-
- //it's a namespace prefix - no _namespace_prefix() method because it's just an IDENT
if (tokenStream.match(Tokens.IDENT)){
prefix = tokenStream.token().value;
this._readWhitespace();
}
tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
- /*if (!tokenStream.match(Tokens.STRING)){
- tokenStream.mustMatch(Tokens.URI);
- }*/
-
- //grab the URI value
uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
this._readWhitespace();
-
- //must end with a semicolon
tokenStream.mustMatch(Tokens.SEMICOLON);
this._readWhitespace();
@@ -4332,17 +2819,10 @@ Parser.prototype = function(){
},
_media: function(){
- /*
- * media
- * : MEDIA_SYM S* media_query_list S* '{' S* ruleset* '}' S*
- * ;
- */
var tokenStream = this._tokenStream,
line,
col,
mediaList;// = [];
-
- //look for @media
tokenStream.mustMatch(Tokens.MEDIA_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
@@ -4379,15 +2859,7 @@ Parser.prototype = function(){
col: col
});
},
-
-
- //CSS3 Media Queries
_media_query_list: function(){
- /*
- * media_query_list
- * : S* [media_query [ ',' S* media_query ]* ]?
- * ;
- */
var tokenStream = this._tokenStream,
mediaList = [];
@@ -4405,19 +2877,7 @@ Parser.prototype = function(){
return mediaList;
},
-
- /*
- * Note: "expression" in the grammar maps to the _media_expression
- * method.
-
- */
_media_query: function(){
- /*
- * media_query
- * : [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
- * | expression [ AND S* expression ]*
- * ;
- */
var tokenStream = this._tokenStream,
type = null,
ident = null,
@@ -4426,8 +2886,6 @@ Parser.prototype = function(){
if (tokenStream.match(Tokens.IDENT)){
ident = tokenStream.token().value.toLowerCase();
-
- //since there's no custom tokens for these, need to manually check
if (ident != "only" && ident != "not"){
tokenStream.unget();
ident = null;
@@ -4466,31 +2924,10 @@ Parser.prototype = function(){
return new MediaQuery(ident, type, expressions, token.startLine, token.startCol);
},
-
- //CSS3 Media Queries
_media_type: function(){
- /*
- * media_type
- * : IDENT
- * ;
- */
return this._media_feature();
},
-
- /**
- * Note: in CSS3 Media Queries, this is called "expression".
- * Renamed here to avoid conflict with CSS3 Selectors
- * definition of "expression". Also note that "expr" in the
- * grammar now maps to "expression" from CSS3 selectors.
- * @method _media_expression
- * @private
- */
_media_expression: function(){
- /*
- * expression
- * : '(' S* media_feature S* [ ':' S* expr ]? ')' S*
- * ;
- */
var tokenStream = this._tokenStream,
feature = null,
token,
@@ -4512,36 +2949,19 @@ Parser.prototype = function(){
return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null));
},
-
- //CSS3 Media Queries
_media_feature: function(){
- /*
- * media_feature
- * : IDENT
- * ;
- */
var tokenStream = this._tokenStream;
tokenStream.mustMatch(Tokens.IDENT);
return SyntaxUnit.fromToken(tokenStream.token());
},
-
- //CSS3 Paged Media
- _page: function(){
- /*
- * page:
- * PAGE_SYM S* IDENT? pseudo_page? S*
- * '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
- * ;
- */
+ _page: function(){
var tokenStream = this._tokenStream,
line,
col,
identifier = null,
pseudoPage = null;
-
- //look for @page
tokenStream.mustMatch(Tokens.PAGE_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
@@ -4550,14 +2970,10 @@ Parser.prototype = function(){
if (tokenStream.match(Tokens.IDENT)){
identifier = tokenStream.token().value;
-
- //The value 'auto' may not be used as a page name and MUST be treated as a syntax error.
if (identifier.toLowerCase() === "auto"){
this._unexpectedToken(tokenStream.token());
}
}
-
- //see if there's a colon upcoming
if (tokenStream.peek() == Tokens.COLON){
pseudoPage = this._pseudo_page();
}
@@ -4583,14 +2999,7 @@ Parser.prototype = function(){
});
},
-
- //CSS3 Paged Media
_margin: function(){
- /*
- * margin :
- * margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S*
- * ;
- */
var tokenStream = this._tokenStream,
line,
col,
@@ -4620,31 +3029,8 @@ Parser.prototype = function(){
return false;
}
},
-
- //CSS3 Paged Media
_margin_sym: function(){
- /*
- * margin_sym :
- * TOPLEFTCORNER_SYM |
- * TOPLEFT_SYM |
- * TOPCENTER_SYM |
- * TOPRIGHT_SYM |
- * TOPRIGHTCORNER_SYM |
- * BOTTOMLEFTCORNER_SYM |
- * BOTTOMLEFT_SYM |
- * BOTTOMCENTER_SYM |
- * BOTTOMRIGHT_SYM |
- * BOTTOMRIGHTCORNER_SYM |
- * LEFTTOP_SYM |
- * LEFTMIDDLE_SYM |
- * LEFTBOTTOM_SYM |
- * RIGHTTOP_SYM |
- * RIGHTMIDDLE_SYM |
- * RIGHTBOTTOM_SYM
- * ;
- */
-
var tokenStream = this._tokenStream;
if(tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM,
@@ -4663,34 +3049,19 @@ Parser.prototype = function(){
},
_pseudo_page: function(){
- /*
- * pseudo_page
- * : ':' IDENT
- * ;
- */
var tokenStream = this._tokenStream;
tokenStream.mustMatch(Tokens.COLON);
tokenStream.mustMatch(Tokens.IDENT);
- //TODO: CSS3 Paged Media says only "left", "center", and "right" are allowed
-
return tokenStream.token().value;
},
- _font_face: function(){
- /*
- * font_face
- * : FONT_FACE_SYM S*
- * '{' S* declaration [ ';' S* declaration ]* '}' S*
- * ;
- */
+ _font_face: function(){
var tokenStream = this._tokenStream,
line,
col;
-
- //look for @page
tokenStream.mustMatch(Tokens.FONT_FACE_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
@@ -4712,13 +3083,7 @@ Parser.prototype = function(){
});
},
- _operator: function(){
-
- /*
- * operator
- * : '/' S* | ',' S* | /( empty )/
- * ;
- */
+ _operator: function(){
var tokenStream = this._tokenStream,
token = null;
@@ -4731,13 +3096,7 @@ Parser.prototype = function(){
},
- _combinator: function(){
-
- /*
- * combinator
- * : PLUS S* | GREATER S* | TILDE S* | S+
- * ;
- */
+ _combinator: function(){
var tokenStream = this._tokenStream,
value = null,
@@ -4753,12 +3112,6 @@ Parser.prototype = function(){
},
_unary_operator: function(){
-
- /*
- * unary_operator
- * : '-' | '+'
- * ;
- */
var tokenStream = this._tokenStream;
@@ -4770,12 +3123,6 @@ Parser.prototype = function(){
},
_property: function(){
-
- /*
- * property
- * : IDENT S*
- * ;
- */
var tokenStream = this._tokenStream,
value = null,
@@ -4784,8 +3131,6 @@ Parser.prototype = function(){
token,
line,
col;
-
- //check for star hack - throws error if not allowed
if (tokenStream.peek() == Tokens.STAR && this.options.starHack){
tokenStream.get();
token = tokenStream.token();
@@ -4797,8 +3142,6 @@ Parser.prototype = function(){
if(tokenStream.match(Tokens.IDENT)){
token = tokenStream.token();
tokenValue = token.value;
-
- //check for underscore hack - no error if not allowed because it's valid CSS syntax
if (tokenValue.charAt(0) == "_" && this.options.underscoreHack){
hack = "_";
tokenValue = tokenValue.substring(1);
@@ -4810,31 +3153,15 @@ Parser.prototype = function(){
return value;
},
-
- //Augmented with CSS3 Selectors
- _ruleset: function(){
- /*
- * ruleset
- * : selectors_group
- * '{' S* declaration? [ ';' S* declaration? ]* '}' S*
- * ;
- */
+ _ruleset: function(){
var tokenStream = this._tokenStream,
tt,
selectors;
-
-
- /*
- * Error Recovery: If even a single selector fails to parse,
- * then the entire ruleset should be thrown away.
- */
try {
selectors = this._selectors_group();
} catch (ex){
if (ex instanceof SyntaxError && !this.options.strict){
-
- //fire error event
this.fire({
type: "error",
error: ex,
@@ -4842,26 +3169,17 @@ Parser.prototype = function(){
line: ex.line,
col: ex.col
});
-
- //skip over everything until closing brace
tt = tokenStream.advance([Tokens.RBRACE]);
if (tt == Tokens.RBRACE){
- //if there's a right brace, the rule is finished so don't do anything
} else {
- //otherwise, rethrow the error because it wasn't handled properly
throw ex;
}
} else {
- //not a syntax error, rethrow it
throw ex;
}
-
- //trigger parser to continue
return true;
}
-
- //if it got here, all selectors parsed
if (selectors){
this.fire({
@@ -4885,15 +3203,7 @@ Parser.prototype = function(){
return selectors;
},
-
- //CSS3 Selectors
- _selectors_group: function(){
-
- /*
- * selectors_group
- * : selector [ COMMA S* selector ]*
- * ;
- */
+ _selectors_group: function(){
var tokenStream = this._tokenStream,
selectors = [],
selector;
@@ -4915,22 +3225,13 @@ Parser.prototype = function(){
return selectors.length ? selectors : null;
},
-
- //CSS3 Selectors
_selector: function(){
- /*
- * selector
- * : simple_selector_sequence [ combinator simple_selector_sequence ]*
- * ;
- */
var tokenStream = this._tokenStream,
selector = [],
nextSelector = null,
combinator = null,
ws = null;
-
- //if there's no simple selector, then there's no selector
nextSelector = this._simple_selector_sequence();
if (nextSelector === null){
return null;
@@ -4939,34 +3240,20 @@ Parser.prototype = function(){
selector.push(nextSelector);
do {
-
- //look for a combinator
combinator = this._combinator();
if (combinator !== null){
selector.push(combinator);
nextSelector = this._simple_selector_sequence();
-
- //there must be a next selector
if (nextSelector === null){
- this._unexpectedToken(this.LT(1));
+ this._unexpectedToken(tokenStream.LT(1));
} else {
-
- //nextSelector is an instance of SelectorPart
selector.push(nextSelector);
}
} else {
-
- //if there's not whitespace, we're done
if (this._readWhitespace()){
-
- //add whitespace separator
ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol);
-
- //combinator is not required
combinator = this._combinator();
-
- //selector is required if there's a combinator
nextSelector = this._simple_selector_sequence();
if (nextSelector === null){
if (combinator !== null){
@@ -4991,29 +3278,13 @@ Parser.prototype = function(){
return new Selector(selector, selector[0].line, selector[0].col);
},
-
- //CSS3 Selectors
_simple_selector_sequence: function(){
- /*
- * simple_selector_sequence
- * : [ type_selector | universal ]
- * [ HASH | class | attrib | pseudo | negation ]*
- * | [ HASH | class | attrib | pseudo | negation ]+
- * ;
- */
var tokenStream = this._tokenStream,
-
- //parts of a simple selector
elementName = null,
modifiers = [],
-
- //complete selector text
selectorText= "",
-
- //the different parts after the element name to search for
components = [
- //HASH
function(){
return tokenStream.match(Tokens.HASH) ?
new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
@@ -5030,9 +3301,6 @@ Parser.prototype = function(){
found = false,
line,
col;
-
-
- //get starting line and column for the selector
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol;
@@ -5046,20 +3314,14 @@ Parser.prototype = function(){
}
while(true){
-
- //whitespace means we're done
if (tokenStream.peek() === Tokens.S){
break;
}
-
- //check for each component
while(i < len && component === null){
component = components[i++].call(this);
}
if (component === null){
-
- //we don't have a selector
if (selectorText === ""){
return null;
} else {
@@ -5078,26 +3340,13 @@ Parser.prototype = function(){
new SelectorPart(elementName, modifiers, selectorText, line, col) :
null;
},
-
- //CSS3 Selectors
_type_selector: function(){
- /*
- * type_selector
- * : [ namespace_prefix ]? element_name
- * ;
- */
var tokenStream = this._tokenStream,
ns = this._namespace_prefix(),
elementName = this._element_name();
if (!elementName){
- /*
- * Need to back out the namespace that was read due to both
- * type_selector and universal reading namespace_prefix
- * first. Kind of hacky, but only way I can figure out
- * right now how to not change the grammar.
- */
if (ns){
tokenStream.unget();
if (ns.length > 1){
@@ -5114,14 +3363,7 @@ Parser.prototype = function(){
return elementName;
}
},
-
- //CSS3 Selectors
- _class: function(){
- /*
- * class
- * : '.' IDENT
- * ;
- */
+ _class: function(){
var tokenStream = this._tokenStream,
token;
@@ -5135,14 +3377,7 @@ Parser.prototype = function(){
}
},
-
- //CSS3 Selectors
- _element_name: function(){
- /*
- * element_name
- * : IDENT
- * ;
- */
+ _element_name: function(){
var tokenStream = this._tokenStream,
token;
@@ -5155,18 +3390,9 @@ Parser.prototype = function(){
return null;
}
},
-
- //CSS3 Selectors
_namespace_prefix: function(){
- /*
- * namespace_prefix
- * : [ IDENT | '*' ]? '|'
- * ;
- */
var tokenStream = this._tokenStream,
value = "";
-
- //verify that this is a namespace prefix
if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE){
if(tokenStream.match([Tokens.IDENT, Tokens.STAR])){
@@ -5180,14 +3406,7 @@ Parser.prototype = function(){
return value.length ? value : null;
},
-
- //CSS3 Selectors
_universal: function(){
- /*
- * universal
- * : [ namespace_prefix ]? '*'
- * ;
- */
var tokenStream = this._tokenStream,
value = "",
ns;
@@ -5204,21 +3423,7 @@ Parser.prototype = function(){
return value.length ? value : null;
},
-
- //CSS3 Selectors
_attrib: function(){
- /*
- * attrib
- * : '[' S* [ namespace_prefix ]? IDENT S*
- * [ [ PREFIXMATCH |
- * SUFFIXMATCH |
- * SUBSTRINGMATCH |
- * '=' |
- * INCLUDES |
- * DASHMATCH ] S* [ IDENT | STRING ] S*
- * ]? ']'
- * ;
- */
var tokenStream = this._tokenStream,
value = null,
@@ -5258,15 +3463,7 @@ Parser.prototype = function(){
return null;
}
},
-
- //CSS3 Selectors
- _pseudo: function(){
-
- /*
- * pseudo
- * : ':' ':'? [ IDENT | functional_pseudo ]
- * ;
- */
+ _pseudo: function(){
var tokenStream = this._tokenStream,
pseudo = null,
@@ -5297,14 +3494,7 @@ Parser.prototype = function(){
return pseudo;
},
-
- //CSS3 Selectors
- _functional_pseudo: function(){
- /*
- * functional_pseudo
- * : FUNCTION S* expression ')'
- * ;
- */
+ _functional_pseudo: function(){
var tokenStream = this._tokenStream,
value = null;
@@ -5319,14 +3509,7 @@ Parser.prototype = function(){
return value;
},
-
- //CSS3 Selectors
_expression: function(){
- /*
- * expression
- * : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
- * ;
- */
var tokenStream = this._tokenStream,
value = "";
@@ -5343,14 +3526,7 @@ Parser.prototype = function(){
return value.length ? value : null;
},
-
- //CSS3 Selectors
_negation: function(){
- /*
- * negation
- * : NOT S* negation_arg S* ')'
- * ;
- */
var tokenStream = this._tokenStream,
line,
@@ -5376,14 +3552,7 @@ Parser.prototype = function(){
return subpart;
},
-
- //CSS3 Selectors
- _negation_arg: function(){
- /*
- * negation_arg
- * : type_selector | universal | HASH | class | attrib | pseudo
- * ;
- */
+ _negation_arg: function(){
var tokenStream = this._tokenStream,
args = [
@@ -5414,13 +3583,9 @@ Parser.prototype = function(){
arg = args[i].call(this);
i++;
}
-
- //must be a negation arg
if (arg === null){
this._unexpectedToken(tokenStream.LT(1));
}
-
- //it's an element name
if (arg.type == "elementName"){
part = new SelectorPart(arg, [], arg.toString(), line, col);
} else {
@@ -5430,19 +3595,15 @@ Parser.prototype = function(){
return part;
},
- _declaration: function(){
-
- /*
- * declaration
- * : property ':' S* expr prio?
- * | /( empty )/
- * ;
- */
+ _declaration: function(){
var tokenStream = this._tokenStream,
property = null,
expr = null,
- prio = null;
+ prio = null,
+ error = null,
+ invalid = null,
+ propertyName= "";
property = this._property();
if (property !== null){
@@ -5451,13 +3612,23 @@ Parser.prototype = function(){
this._readWhitespace();
expr = this._expr();
-
- //if there's no parts for the value, it's an error
if (!expr || expr.length === 0){
this._unexpectedToken(tokenStream.LT(1));
}
prio = this._prio();
+ propertyName = property.toString();
+ if (this.options.starHack && property.hack == "*" ||
+ this.options.underscoreHack && property.hack == "_") {
+
+ propertyName = property.text;
+ }
+
+ try {
+ this._validateProperty(propertyName, expr);
+ } catch (ex) {
+ invalid = ex;
+ }
this.fire({
type: "property",
@@ -5465,7 +3636,8 @@ Parser.prototype = function(){
value: expr,
important: prio,
line: property.line,
- col: property.col
+ col: property.col,
+ invalid: invalid
});
return true;
@@ -5475,11 +3647,6 @@ Parser.prototype = function(){
},
_prio: function(){
- /*
- * prio
- * : IMPORTANT_SYM S*
- * ;
- */
var tokenStream = this._tokenStream,
result = tokenStream.match(Tokens.IMPORTANT_SYM);
@@ -5489,15 +3656,9 @@ Parser.prototype = function(){
},
_expr: function(){
- /*
- * expr
- * : term [ operator term ]*
- * ;
- */
var tokenStream = this._tokenStream,
values = [],
- //valueParts = [],
value = null,
operator = null;
@@ -5508,12 +3669,9 @@ Parser.prototype = function(){
do {
operator = this._operator();
-
- //if there's an operator, keep building up the value parts
if (operator){
values.push(operator);
} /*else {
- //if there's not an operator, you have a full value
values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
valueParts = [];
}*/
@@ -5527,40 +3685,23 @@ Parser.prototype = function(){
}
} while(true);
}
-
- //cleanup
- /*if (valueParts.length){
- values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
- }*/
- return values.length > 0 ? new PropertyValue(values, values[0].startLine, values[0].startCol) : null;
+ return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null;
},
- _term: function(){
-
- /*
- * term
- * : unary_operator?
- * [ NUMBER S* | PERCENTAGE S* | LENGTH S* | ANGLE S* |
- * TIME S* | FREQ S* | function | ie_function ]
- * | STRING S* | IDENT S* | URI S* | UNICODERANGE S* | hexcolor
- * ;
- */
+ _term: function(){
var tokenStream = this._tokenStream,
unary = null,
value = null,
+ token,
line,
col;
-
- //returns the operator or null
unary = this._unary_operator();
if (unary !== null){
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
}
-
- //exception for IE filters
if (tokenStream.peek() == Tokens.IE_FUNCTION && this.options.ieFilters){
value = this._ie_function();
@@ -5568,8 +3709,6 @@ Parser.prototype = function(){
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
}
-
- //see if there's a simple match
} else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH,
Tokens.ANGLE, Tokens.TIME,
Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])){
@@ -5581,40 +3720,25 @@ Parser.prototype = function(){
}
this._readWhitespace();
} else {
-
- //see if it's a color
- value = this._hexcolor();
- if (value === null){
-
- //if there's no unary, get the start of the next token for line/col info
+ token = this._hexcolor();
+ if (token === null){
if (unary === null){
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol;
}
-
- //has to be a function
if (value === null){
-
- /*
- * This checks for alpha(opacity=0) style of IE
- * functions. IE_FUNCTION only presents progid: style.
- */
if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
value = this._ie_function();
} else {
value = this._function();
}
}
-
- /*if (value === null){
- return null;
- //throw new Error("Expected identifier at line " + tokenStream.token().startLine + ", character " + tokenStream.token().startCol + ".");
- }*/
} else {
+ value = token.value;
if (unary === null){
- line = tokenStream.token().startLine;
- col = tokenStream.token().startCol;
+ line = token.startLine;
+ col = token.startCol;
}
}
@@ -5627,24 +3751,43 @@ Parser.prototype = function(){
},
_function: function(){
-
- /*
- * function
- * : FUNCTION S* expr ')' S*
- * ;
- */
var tokenStream = this._tokenStream,
functionText = null,
- expr = null;
+ expr = null,
+ lt;
if (tokenStream.match(Tokens.FUNCTION)){
functionText = tokenStream.token().value;
this._readWhitespace();
expr = this._expr();
+ functionText += expr;
+ if (this.options.ieFilters && tokenStream.peek() == Tokens.EQUALS){
+ do {
+
+ if (this._readWhitespace()){
+ functionText += tokenStream.token().value;
+ }
+ if (tokenStream.LA(0) == Tokens.COMMA){
+ functionText += tokenStream.token().value;
+ }
+
+ tokenStream.match(Tokens.IDENT);
+ functionText += tokenStream.token().value;
+
+ tokenStream.match(Tokens.EQUALS);
+ functionText += tokenStream.token().value;
+ lt = tokenStream.peek();
+ while(lt != Tokens.COMMA && lt != Tokens.S && lt != Tokens.RPAREN){
+ tokenStream.get();
+ functionText += tokenStream.token().value;
+ lt = tokenStream.peek();
+ }
+ } while(tokenStream.match([Tokens.COMMA, Tokens.S]));
+ }
tokenStream.match(Tokens.RPAREN);
- functionText += expr + ")";
+ functionText += ")";
this._readWhitespace();
}
@@ -5652,19 +3795,11 @@ Parser.prototype = function(){
},
_ie_function: function(){
-
- /* (My own extension)
- * ie_function
- * : IE_FUNCTION S* IDENT '=' term [S* ','? IDENT '=' term]+ ')' S*
- * ;
- */
var tokenStream = this._tokenStream,
functionText = null,
expr = null,
lt;
-
- //IE function can begin like a regular function, too
if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){
functionText = tokenStream.token().value;
@@ -5673,8 +3808,6 @@ Parser.prototype = function(){
if (this._readWhitespace()){
functionText += tokenStream.token().value;
}
-
- //might be second time in the loop
if (tokenStream.LA(0) == Tokens.COMMA){
functionText += tokenStream.token().value;
}
@@ -5684,8 +3817,6 @@ Parser.prototype = function(){
tokenStream.match(Tokens.EQUALS);
functionText += tokenStream.token().value;
-
- //functionText += this._term();
lt = tokenStream.peek();
while(lt != Tokens.COMMA && lt != Tokens.S && lt != Tokens.RPAREN){
tokenStream.get();
@@ -5703,23 +3834,12 @@ Parser.prototype = function(){
},
_hexcolor: function(){
- /*
- * There is a constraint on the color that it must
- * have either 3 or 6 hex-digits (i.e., [0-9a-fA-F])
- * after the "#"; e.g., "#000" is OK, but "#abcd" is not.
- *
- * hexcolor
- * : HASH S*
- * ;
- */
var tokenStream = this._tokenStream,
- token,
- color = null;
-
+ token = null,
+ color;
+
if(tokenStream.match(Tokens.HASH)){
-
- //need to do some validation here
token = tokenStream.token();
color = token.value;
@@ -5729,26 +3849,22 @@ Parser.prototype = function(){
this._readWhitespace();
}
- return color;
+ return token;
},
- //-----------------------------------------------------------------
- // Animations methods
- //-----------------------------------------------------------------
-
_keyframes: function(){
-
- /*
- * keyframes:
- * : KEYFRAMES_SYM S* keyframe_name S* '{' S* keyframe_rule* '}' {
- * ;
- */
var tokenStream = this._tokenStream,
token,
tt,
- name;
+ name,
+ prefix = "";
tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
+ token = tokenStream.token();
+ if (/^@\-([^\-]+)\-/.test(token.value)) {
+ prefix = RegExp.$1;
+ }
+
this._readWhitespace();
name = this._keyframe_name();
@@ -5758,14 +3874,13 @@ Parser.prototype = function(){
this.fire({
type: "startkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
tt = tokenStream.peek();
-
- //check for key
while(tt == Tokens.IDENT || tt == Tokens.PERCENTAGE) {
this._keyframe_rule();
this._readWhitespace();
@@ -5775,8 +3890,9 @@ Parser.prototype = function(){
this.fire({
type: "endkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -5785,13 +3901,6 @@ Parser.prototype = function(){
},
_keyframe_name: function(){
-
- /*
- * keyframe_name:
- * : IDENT
- * | STRING
- * ;
- */
var tokenStream = this._tokenStream,
token;
@@ -5800,13 +3909,6 @@ Parser.prototype = function(){
},
_keyframe_rule: function(){
-
- /*
- * keyframe_rule:
- * : key_list S*
- * '{' S* declaration [ ';' S* declaration ]* '}' S*
- * ;
- */
var tokenStream = this._tokenStream,
token,
keyList = this._key_list();
@@ -5830,18 +3932,10 @@ Parser.prototype = function(){
},
_key_list: function(){
-
- /*
- * key_list:
- * : key [ S* ',' S* key]*
- * ;
- */
var tokenStream = this._tokenStream,
token,
key,
keyList = [];
-
- //must be least one key
keyList.push(this._key());
this._readWhitespace();
@@ -5856,14 +3950,6 @@ Parser.prototype = function(){
},
_key: function(){
- /*
- * There is a restriction that IDENT can be only "from" or "to".
- *
- * key
- * : PERCENTAGE
- * | IDENT
- * ;
- */
var tokenStream = this._tokenStream,
token;
@@ -5879,50 +3965,13 @@ Parser.prototype = function(){
tokenStream.unget();
}
-
- //if it gets here, there wasn't a valid token, so time to explode
this._unexpectedToken(tokenStream.LT(1));
},
-
- //-----------------------------------------------------------------
- // Helper methods
- //-----------------------------------------------------------------
-
- /**
- * Not part of CSS grammar, but useful for skipping over
- * combination of white space and HTML-style comments.
- * @return {void}
- * @method _skipCruft
- * @private
- */
_skipCruft: function(){
while(this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])){
- //noop
}
},
-
- /**
- * Not part of CSS grammar, but this pattern occurs frequently
- * in the official CSS grammar. Split out here to eliminate
- * duplicate code.
- * @param {Boolean} checkStart Indicates if the rule should check
- * for the left brace at the beginning.
- * @param {Boolean} readMargins Indicates if the rule should check
- * for margin patterns.
- * @return {void}
- * @method _readDeclarations
- * @private
- */
_readDeclarations: function(checkStart, readMargins){
- /*
- * Reads the pattern
- * S* '{' S* declaration [ ';' S* declaration ]* '}' S*
- * or
- * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
- * Note that this is how it is described in CSS3 Paged Media, but is actually incorrect.
- * A semicolon is only necessary following a delcaration is there's another declaration
- * or margin afterwards.
- */
var tokenStream = this._tokenStream,
tt;
@@ -5939,8 +3988,7 @@ Parser.prototype = function(){
while(true){
- if (readMargins && this._margin()){
- //noop
+ if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
} else if (this._declaration()){
if (!tokenStream.match(Tokens.SEMICOLON)){
break;
@@ -5948,10 +3996,6 @@ Parser.prototype = function(){
} else {
break;
}
-
- //if ((!this._margin() && !this._declaration()) || !tokenStream.match(Tokens.SEMICOLON)){
- // break;
- //}
this._readWhitespace();
}
@@ -5960,8 +4004,6 @@ Parser.prototype = function(){
} catch (ex) {
if (ex instanceof SyntaxError && !this.options.strict){
-
- //fire error event
this.fire({
type: "error",
error: ex,
@@ -5969,36 +4011,19 @@ Parser.prototype = function(){
line: ex.line,
col: ex.col
});
-
- //see if there's another declaration
tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]);
if (tt == Tokens.SEMICOLON){
- //if there's a semicolon, then there might be another declaration
- this._readDeclarations(false, readMargins);
- } else if (tt == Tokens.RBRACE){
- //if there's a right brace, the rule is finished so don't do anything
- } else {
- //otherwise, rethrow the error because it wasn't handled properly
+ this._readDeclarations(false, readMargins);
+ } else if (tt != Tokens.RBRACE){
throw ex;
}
} else {
- //not a syntax error, rethrow it
throw ex;
}
}
},
-
- /**
- * In some cases, you can end up with two white space tokens in a
- * row. Instead of making a change in every function that looks for
- * white space, this function is used to match as much white space
- * as necessary.
- * @method _readWhitespace
- * @return {String} The white space if found, empty string if not.
- * @private
- */
_readWhitespace: function(){
var tokenStream = this._tokenStream,
@@ -6010,34 +4035,17 @@ Parser.prototype = function(){
return ws;
},
-
-
- /**
- * Throws an error when an unexpected token is found.
- * @param {Object} token The token that was found.
- * @method _unexpectedToken
- * @return {void}
- * @private
- */
_unexpectedToken: function(token){
throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
},
-
- /**
- * Helper method used for parsing subparts of a style sheet.
- * @return {void}
- * @method _verifyEnd
- * @private
- */
_verifyEnd: function(){
if (this._tokenStream.LA(1) != Tokens.EOF){
this._unexpectedToken(this._tokenStream.LT(1));
}
},
-
- //-----------------------------------------------------------------
- // Parsing methods
- //-----------------------------------------------------------------
+ _validateProperty: function(property, value){
+ Validation.validate(property, value);
+ },
parse: function(input){
this._tokenStream = new TokenStream(input, Tokens);
@@ -6045,202 +4053,558 @@ Parser.prototype = function(){
},
parseStyleSheet: function(input){
- //just passthrough
return this.parse(input);
},
parseMediaQuery: function(input){
this._tokenStream = new TokenStream(input, Tokens);
var result = this._media_query();
-
- //if there's anything more, then it's an invalid selector
this._verifyEnd();
-
- //otherwise return result
return result;
- },
-
- /**
- * Parses a property value (everything after the semicolon).
- * @return {parserlib.css.PropertyValue} The property value.
- * @throws parserlib.util.SyntaxError If an unexpected token is found.
- * @method parserPropertyValue
- */
+ },
parsePropertyValue: function(input){
this._tokenStream = new TokenStream(input, Tokens);
this._readWhitespace();
var result = this._expr();
-
- //okay to have a trailing white space
this._readWhitespace();
-
- //if there's anything more, then it's an invalid selector
this._verifyEnd();
-
- //otherwise return result
return result;
},
-
- /**
- * Parses a complete CSS rule, including selectors and
- * properties.
- * @param {String} input The text to parser.
- * @return {Boolean} True if the parse completed successfully, false if not.
- * @method parseRule
- */
parseRule: function(input){
this._tokenStream = new TokenStream(input, Tokens);
-
- //skip any leading white space
this._readWhitespace();
var result = this._ruleset();
-
- //skip any trailing white space
this._readWhitespace();
-
- //if there's anything more, then it's an invalid selector
this._verifyEnd();
-
- //otherwise return result
return result;
},
-
- /**
- * Parses a single CSS selector (no comma)
- * @param {String} input The text to parse as a CSS selector.
- * @return {Selector} An object representing the selector.
- * @throws parserlib.util.SyntaxError If an unexpected token is found.
- * @method parseSelector
- */
parseSelector: function(input){
this._tokenStream = new TokenStream(input, Tokens);
-
- //skip any leading white space
this._readWhitespace();
var result = this._selector();
-
- //skip any trailing white space
this._readWhitespace();
-
- //if there's anything more, then it's an invalid selector
this._verifyEnd();
-
- //otherwise return result
return result;
+ },
+ parseStyleAttribute: function(input){
+ input += "}"; // for error recovery in _readDeclarations()
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._readDeclarations();
}
-
};
-
- //copy over onto prototype
for (prop in additions){
- proto[prop] = additions[prop];
+ if (additions.hasOwnProperty(prop)){
+ proto[prop] = additions[prop];
+ }
}
return proto;
}();
-
-
-/*
-nth
- : S* [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? |
- ['-'|'+']? INTEGER | {O}{D}{D} | {E}{V}{E}{N} ] S*
- ;
-*/
-/**
- * Represents a selector combinator (whitespace, +, >).
- * @namespace parserlib.css
- * @class PropertyName
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- * @param {String} text The text representation of the unit.
- * @param {String} hack The type of IE hack applied ("*", "_", or null).
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- */
+var Properties = {
+ "alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>",
+ "alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
+ "animation" : 1,
+ "animation-delay" : { multi: "<time>", comma: true },
+ "animation-direction" : { multi: "normal | alternate", comma: true },
+ "animation-duration" : { multi: "<time>", comma: true },
+ "animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "animation-name" : { multi: "none | <ident>", comma: true },
+ "animation-play-state" : { multi: "running | paused", comma: true },
+ "animation-timing-function" : 1,
+ "-moz-animation-delay" : { multi: "<time>", comma: true },
+ "-moz-animation-direction" : { multi: "normal | alternate", comma: true },
+ "-moz-animation-duration" : { multi: "<time>", comma: true },
+ "-moz-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "-moz-animation-name" : { multi: "none | <ident>", comma: true },
+ "-moz-animation-play-state" : { multi: "running | paused", comma: true },
+
+ "-ms-animation-delay" : { multi: "<time>", comma: true },
+ "-ms-animation-direction" : { multi: "normal | alternate", comma: true },
+ "-ms-animation-duration" : { multi: "<time>", comma: true },
+ "-ms-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "-ms-animation-name" : { multi: "none | <ident>", comma: true },
+ "-ms-animation-play-state" : { multi: "running | paused", comma: true },
+
+ "-webkit-animation-delay" : { multi: "<time>", comma: true },
+ "-webkit-animation-direction" : { multi: "normal | alternate", comma: true },
+ "-webkit-animation-duration" : { multi: "<time>", comma: true },
+ "-webkit-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "-webkit-animation-name" : { multi: "none | <ident>", comma: true },
+ "-webkit-animation-play-state" : { multi: "running | paused", comma: true },
+
+ "-o-animation-delay" : { multi: "<time>", comma: true },
+ "-o-animation-direction" : { multi: "normal | alternate", comma: true },
+ "-o-animation-duration" : { multi: "<time>", comma: true },
+ "-o-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "-o-animation-name" : { multi: "none | <ident>", comma: true },
+ "-o-animation-play-state" : { multi: "running | paused", comma: true },
+
+ "appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | inherit",
+ "azimuth" : function (expression) {
+ var simple = "<angle> | leftwards | rightwards | inherit",
+ direction = "left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",
+ behind = false,
+ valid = false,
+ part;
+
+ if (!ValidationTypes.isAny(expression, simple)) {
+ if (ValidationTypes.isAny(expression, "behind")) {
+ behind = true;
+ valid = true;
+ }
+
+ if (ValidationTypes.isAny(expression, direction)) {
+ valid = true;
+ if (!behind) {
+ ValidationTypes.isAny(expression, "behind");
+ }
+ }
+ }
+
+ if (expression.hasNext()) {
+ part = expression.next();
+ if (valid) {
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (<'azimuth'>) but found '" + part + "'.", part.line, part.col);
+ }
+ }
+ },
+ "backface-visibility" : "visible | hidden",
+ "background" : 1,
+ "background-attachment" : { multi: "<attachment>", comma: true },
+ "background-clip" : { multi: "<box>", comma: true },
+ "background-color" : "<color> | inherit",
+ "background-image" : { multi: "<bg-image>", comma: true },
+ "background-origin" : { multi: "<box>", comma: true },
+ "background-position" : { multi: "<bg-position>", comma: true },
+ "background-repeat" : { multi: "<repeat-style>" },
+ "background-size" : { multi: "<bg-size>", comma: true },
+ "baseline-shift" : "baseline | sub | super | <percentage> | <length>",
+ "behavior" : 1,
+ "binding" : 1,
+ "bleed" : "<length>",
+ "bookmark-label" : "<content> | <attr> | <string>",
+ "bookmark-level" : "none | <integer>",
+ "bookmark-state" : "open | closed",
+ "bookmark-target" : "none | <uri> | <attr>",
+ "border" : "<border-width> || <border-style> || <color>",
+ "border-bottom" : "<border-width> || <border-style> || <color>",
+ "border-bottom-color" : "<color>",
+ "border-bottom-left-radius" : "<x-one-radius>",
+ "border-bottom-right-radius" : "<x-one-radius>",
+ "border-bottom-style" : "<border-style>",
+ "border-bottom-width" : "<border-width>",
+ "border-collapse" : "collapse | separate | inherit",
+ "border-color" : { multi: "<color> | inherit", max: 4 },
+ "border-image" : 1,
+ "border-image-outset" : { multi: "<length> | <number>", max: 4 },
+ "border-image-repeat" : { multi: "stretch | repeat | round", max: 2 },
+ "border-image-slice" : function(expression) {
+
+ var valid = false,
+ numeric = "<number> | <percentage>",
+ fill = false,
+ count = 0,
+ max = 4,
+ part;
+
+ if (ValidationTypes.isAny(expression, "fill")) {
+ fill = true;
+ valid = true;
+ }
+
+ while (expression.hasNext() && count < max) {
+ valid = ValidationTypes.isAny(expression, numeric);
+ if (!valid) {
+ break;
+ }
+ count++;
+ }
+
+
+ if (!fill) {
+ ValidationTypes.isAny(expression, "fill");
+ } else {
+ valid = true;
+ }
+
+ if (expression.hasNext()) {
+ part = expression.next();
+ if (valid) {
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected ([<number> | <percentage>]{1,4} && fill?) but found '" + part + "'.", part.line, part.col);
+ }
+ }
+ },
+ "border-image-source" : "<image> | none",
+ "border-image-width" : { multi: "<length> | <percentage> | <number> | auto", max: 4 },
+ "border-left" : "<border-width> || <border-style> || <color>",
+ "border-left-color" : "<color> | inherit",
+ "border-left-style" : "<border-style>",
+ "border-left-width" : "<border-width>",
+ "border-radius" : function(expression) {
+
+ var valid = false,
+ numeric = "<length> | <percentage>",
+ slash = false,
+ fill = false,
+ count = 0,
+ max = 8,
+ part;
+
+ while (expression.hasNext() && count < max) {
+ valid = ValidationTypes.isAny(expression, numeric);
+ if (!valid) {
+
+ if (expression.peek() == "/" && count > 1 && !slash) {
+ slash = true;
+ max = count + 5;
+ expression.next();
+ } else {
+ break;
+ }
+ }
+ count++;
+ }
+
+ if (expression.hasNext()) {
+ part = expression.next();
+ if (valid) {
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (<'border-radius'>) but found '" + part + "'.", part.line, part.col);
+ }
+ }
+ },
+ "border-right" : "<border-width> || <border-style> || <color>",
+ "border-right-color" : "<color> | inherit",
+ "border-right-style" : "<border-style>",
+ "border-right-width" : "<border-width>",
+ "border-spacing" : { multi: "<length> | inherit", max: 2 },
+ "border-style" : { multi: "<border-style>", max: 4 },
+ "border-top" : "<border-width> || <border-style> || <color>",
+ "border-top-color" : "<color> | inherit",
+ "border-top-left-radius" : "<x-one-radius>",
+ "border-top-right-radius" : "<x-one-radius>",
+ "border-top-style" : "<border-style>",
+ "border-top-width" : "<border-width>",
+ "border-width" : { multi: "<border-width>", max: 4 },
+ "bottom" : "<margin-width> | inherit",
+ "box-align" : "start | end | center | baseline | stretch", //http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/
+ "box-decoration-break" : "slice |clone",
+ "box-direction" : "normal | reverse | inherit",
+ "box-flex" : "<number>",
+ "box-flex-group" : "<integer>",
+ "box-lines" : "single | multiple",
+ "box-ordinal-group" : "<integer>",
+ "box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
+ "box-pack" : "start | end | center | justify",
+ "box-shadow" : function (expression) {
+ var result = false,
+ part;
+
+ if (!ValidationTypes.isAny(expression, "none")) {
+ Validation.multiProperty("<shadow>", expression, true, Infinity);
+ } else {
+ if (expression.hasNext()) {
+ part = expression.next();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ }
+ }
+ },
+ "box-sizing" : "content-box | border-box | inherit",
+ "break-after" : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column",
+ "break-before" : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column",
+ "break-inside" : "auto | avoid | avoid-page | avoid-column",
+ "caption-side" : "top | bottom | inherit",
+ "clear" : "none | right | left | both | inherit",
+ "clip" : 1,
+ "color" : "<color> | inherit",
+ "color-profile" : 1,
+ "column-count" : "<integer> | auto", //http://www.w3.org/TR/css3-multicol/
+ "column-fill" : "auto | balance",
+ "column-gap" : "<length> | normal",
+ "column-rule" : "<border-width> || <border-style> || <color>",
+ "column-rule-color" : "<color>",
+ "column-rule-style" : "<border-style>",
+ "column-rule-width" : "<border-width>",
+ "column-span" : "none | all",
+ "column-width" : "<length> | auto",
+ "columns" : 1,
+ "content" : 1,
+ "counter-increment" : 1,
+ "counter-reset" : 1,
+ "crop" : "<shape> | auto",
+ "cue" : "cue-after | cue-before | inherit",
+ "cue-after" : 1,
+ "cue-before" : 1,
+ "cursor" : 1,
+ "direction" : "ltr | rtl | inherit",
+ "display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit",
+ "dominant-baseline" : 1,
+ "drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
+ "drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
+ "drop-initial-before-adjust" : "before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>",
+ "drop-initial-before-align" : "caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
+ "drop-initial-size" : "auto | line | <length> | <percentage>",
+ "drop-initial-value" : "initial | <integer>",
+ "elevation" : "<angle> | below | level | above | higher | lower | inherit",
+ "empty-cells" : "show | hide | inherit",
+ "filter" : 1,
+ "fit" : "fill | hidden | meet | slice",
+ "fit-position" : 1,
+ "float" : "left | right | none | inherit",
+ "float-offset" : 1,
+ "font" : 1,
+ "font-family" : 1,
+ "font-size" : "<absolute-size> | <relative-size> | <length> | <percentage> | inherit",
+ "font-size-adjust" : "<number> | none | inherit",
+ "font-stretch" : "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit",
+ "font-style" : "normal | italic | oblique | inherit",
+ "font-variant" : "normal | small-caps | inherit",
+ "font-weight" : "normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit",
+ "grid-cell-stacking" : "columns | rows | layer",
+ "grid-column" : 1,
+ "grid-columns" : 1,
+ "grid-column-align" : "start | end | center | stretch",
+ "grid-column-sizing" : 1,
+ "grid-column-span" : "<integer>",
+ "grid-flow" : "none | rows | columns",
+ "grid-layer" : "<integer>",
+ "grid-row" : 1,
+ "grid-rows" : 1,
+ "grid-row-align" : "start | end | center | stretch",
+ "grid-row-span" : "<integer>",
+ "grid-row-sizing" : 1,
+ "hanging-punctuation" : 1,
+ "height" : "<margin-width> | inherit",
+ "hyphenate-after" : "<integer> | auto",
+ "hyphenate-before" : "<integer> | auto",
+ "hyphenate-character" : "<string> | auto",
+ "hyphenate-lines" : "no-limit | <integer>",
+ "hyphenate-resource" : 1,
+ "hyphens" : "none | manual | auto",
+ "icon" : 1,
+ "image-orientation" : "angle | auto",
+ "image-rendering" : 1,
+ "image-resolution" : 1,
+ "inline-box-align" : "initial | last | <integer>",
+ "left" : "<margin-width> | inherit",
+ "letter-spacing" : "<length> | normal | inherit",
+ "line-height" : "<number> | <length> | <percentage> | normal | inherit",
+ "line-break" : "auto | loose | normal | strict",
+ "line-stacking" : 1,
+ "line-stacking-ruby" : "exclude-ruby | include-ruby",
+ "line-stacking-shift" : "consider-shifts | disregard-shifts",
+ "line-stacking-strategy" : "inline-line-height | block-line-height | max-height | grid-height",
+ "list-style" : 1,
+ "list-style-image" : "<uri> | none | inherit",
+ "list-style-position" : "inside | outside | inherit",
+ "list-style-type" : "disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit",
+ "margin" : { multi: "<margin-width> | inherit", max: 4 },
+ "margin-bottom" : "<margin-width> | inherit",
+ "margin-left" : "<margin-width> | inherit",
+ "margin-right" : "<margin-width> | inherit",
+ "margin-top" : "<margin-width> | inherit",
+ "mark" : 1,
+ "mark-after" : 1,
+ "mark-before" : 1,
+ "marks" : 1,
+ "marquee-direction" : 1,
+ "marquee-play-count" : 1,
+ "marquee-speed" : 1,
+ "marquee-style" : 1,
+ "max-height" : "<length> | <percentage> | none | inherit",
+ "max-width" : "<length> | <percentage> | none | inherit",
+ "min-height" : "<length> | <percentage> | inherit",
+ "min-width" : "<length> | <percentage> | inherit",
+ "move-to" : 1,
+ "nav-down" : 1,
+ "nav-index" : 1,
+ "nav-left" : 1,
+ "nav-right" : 1,
+ "nav-up" : 1,
+ "opacity" : "<number> | inherit",
+ "orphans" : "<integer> | inherit",
+ "outline" : 1,
+ "outline-color" : "<color> | invert | inherit",
+ "outline-offset" : 1,
+ "outline-style" : "<border-style> | inherit",
+ "outline-width" : "<border-width> | inherit",
+ "overflow" : "visible | hidden | scroll | auto | inherit",
+ "overflow-style" : 1,
+ "overflow-x" : 1,
+ "overflow-y" : 1,
+ "padding" : { multi: "<padding-width> | inherit", max: 4 },
+ "padding-bottom" : "<padding-width> | inherit",
+ "padding-left" : "<padding-width> | inherit",
+ "padding-right" : "<padding-width> | inherit",
+ "padding-top" : "<padding-width> | inherit",
+ "page" : 1,
+ "page-break-after" : "auto | always | avoid | left | right | inherit",
+ "page-break-before" : "auto | always | avoid | left | right | inherit",
+ "page-break-inside" : "auto | avoid | inherit",
+ "page-policy" : 1,
+ "pause" : 1,
+ "pause-after" : 1,
+ "pause-before" : 1,
+ "perspective" : 1,
+ "perspective-origin" : 1,
+ "phonemes" : 1,
+ "pitch" : 1,
+ "pitch-range" : 1,
+ "play-during" : 1,
+ "pointer-events" : "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
+ "position" : "static | relative | absolute | fixed | inherit",
+ "presentation-level" : 1,
+ "punctuation-trim" : 1,
+ "quotes" : 1,
+ "rendering-intent" : 1,
+ "resize" : 1,
+ "rest" : 1,
+ "rest-after" : 1,
+ "rest-before" : 1,
+ "richness" : 1,
+ "right" : "<margin-width> | inherit",
+ "rotation" : 1,
+ "rotation-point" : 1,
+ "ruby-align" : 1,
+ "ruby-overhang" : 1,
+ "ruby-position" : 1,
+ "ruby-span" : 1,
+ "size" : 1,
+ "speak" : "normal | none | spell-out | inherit",
+ "speak-header" : "once | always | inherit",
+ "speak-numeral" : "digits | continuous | inherit",
+ "speak-punctuation" : "code | none | inherit",
+ "speech-rate" : 1,
+ "src" : 1,
+ "stress" : 1,
+ "string-set" : 1,
+
+ "table-layout" : "auto | fixed | inherit",
+ "tab-size" : "<integer> | <length>",
+ "target" : 1,
+ "target-name" : 1,
+ "target-new" : 1,
+ "target-position" : 1,
+ "text-align" : "left | right | center | justify | inherit" ,
+ "text-align-last" : 1,
+ "text-decoration" : 1,
+ "text-emphasis" : 1,
+ "text-height" : 1,
+ "text-indent" : "<length> | <percentage> | inherit",
+ "text-justify" : "auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida",
+ "text-outline" : 1,
+ "text-overflow" : 1,
+ "text-rendering" : "auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit",
+ "text-shadow" : 1,
+ "text-transform" : "capitalize | uppercase | lowercase | none | inherit",
+ "text-wrap" : "normal | none | avoid",
+ "top" : "<margin-width> | inherit",
+ "transform" : 1,
+ "transform-origin" : 1,
+ "transform-style" : 1,
+ "transition" : 1,
+ "transition-delay" : 1,
+ "transition-duration" : 1,
+ "transition-property" : 1,
+ "transition-timing-function" : 1,
+ "unicode-bidi" : "normal | embed | bidi-override | inherit",
+ "user-modify" : "read-only | read-write | write-only | inherit",
+ "user-select" : "none | text | toggle | element | elements | all | inherit",
+ "vertical-align" : "<percentage> | <length> | baseline | sub | super | top | text-top | middle | bottom | text-bottom | inherit",
+ "visibility" : "visible | hidden | collapse | inherit",
+ "voice-balance" : 1,
+ "voice-duration" : 1,
+ "voice-family" : 1,
+ "voice-pitch" : 1,
+ "voice-pitch-range" : 1,
+ "voice-rate" : 1,
+ "voice-stress" : 1,
+ "voice-volume" : 1,
+ "volume" : 1,
+ "white-space" : "normal | pre | nowrap | pre-wrap | pre-line | inherit",
+ "white-space-collapse" : 1,
+ "widows" : "<integer> | inherit",
+ "width" : "<length> | <percentage> | auto | inherit" ,
+ "word-break" : "normal | keep-all | break-all",
+ "word-spacing" : "<length> | normal | inherit",
+ "word-wrap" : 1,
+ "z-index" : "<integer> | auto | inherit",
+ "zoom" : "<number> | <percentage> | normal"
+};
function PropertyName(text, hack, line, col){
- SyntaxUnit.call(this, (hack||"") + text, line, col);
-
- /**
- * The type of IE hack applied ("*", "_", or null).
- * @type String
- * @property hack
- */
+ SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_NAME_TYPE);
this.hack = hack;
}
PropertyName.prototype = new SyntaxUnit();
PropertyName.prototype.constructor = PropertyName;
-
-
-/**
- * Represents a single part of a CSS property value, meaning that it represents
- * just everything single part between ":" and ";". If there are multiple values
- * separated by commas, this type represents just one of the values.
- * @param {String[]} parts An array of value parts making up this value.
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- * @namespace parserlib.css
- * @class PropertyValue
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- */
+PropertyName.prototype.toString = function(){
+ return (this.hack ? this.hack : "") + this.text;
+};
function PropertyValue(parts, line, col){
- SyntaxUnit.call(this, parts.join(" "), line, col);
-
- /**
- * The parts that make up the selector.
- * @type Array
- * @property parts
- */
+ SyntaxUnit.call(this, parts.join(" "), line, col, Parser.PROPERTY_VALUE_TYPE);
this.parts = parts;
}
PropertyValue.prototype = new SyntaxUnit();
PropertyValue.prototype.constructor = PropertyValue;
-
-
-/**
- * Represents a single part of a CSS property value, meaning that it represents
- * just one part of the data between ":" and ";".
- * @param {String} text The text representation of the unit.
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- * @namespace parserlib.css
- * @class PropertyValuePart
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- */
+function PropertyValueIterator(value){
+ this._i = 0;
+ this._parts = value.parts;
+ this._marks = [];
+ this.value = value;
+
+}
+PropertyValueIterator.prototype.count = function(){
+ return this._parts.length;
+};
+PropertyValueIterator.prototype.isFirst = function(){
+ return this._i === 0;
+};
+PropertyValueIterator.prototype.hasNext = function(){
+ return (this._i < this._parts.length);
+};
+PropertyValueIterator.prototype.mark = function(){
+ this._marks.push(this._i);
+};
+PropertyValueIterator.prototype.peek = function(count){
+ return this.hasNext() ? this._parts[this._i + (count || 0)] : null;
+};
+PropertyValueIterator.prototype.next = function(){
+ return this.hasNext() ? this._parts[this._i++] : null;
+};
+PropertyValueIterator.prototype.previous = function(){
+ return this._i > 0 ? this._parts[--this._i] : null;
+};
+PropertyValueIterator.prototype.restore = function(){
+ if (this._marks.length){
+ this._i = this._marks.pop();
+ }
+};
function PropertyValuePart(text, line, col){
- SyntaxUnit.apply(this,arguments);
-
- /**
- * Indicates the type of value unit.
- * @type String
- * @property type
- */
+ SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE);
this.type = "unknown";
-
- //figure out what type of data it is
var temp;
-
- //it is a measurement?
if (/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)){ //dimension
this.type = "dimension";
this.value = +RegExp.$1;
this.units = RegExp.$2;
-
- //try to narrow down
switch(this.units.toLowerCase()){
case "em":
@@ -6252,6 +4616,7 @@ function PropertyValuePart(text, line, col){
case "in":
case "pt":
case "pc":
+ case "ch":
this.type = "length";
break;
@@ -6276,8 +4641,6 @@ function PropertyValuePart(text, line, col){
this.type = "resolution";
break;
- //default
-
}
} else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
@@ -6315,9 +4678,36 @@ function PropertyValuePart(text, line, col){
this.red = +RegExp.$1 * 255 / 100;
this.green = +RegExp.$2 * 255 / 100;
this.blue = +RegExp.$3 * 255 / 100;
+ } else if (/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(text)){ //rgba() color with absolute numbers
+ this.type = "color";
+ this.red = +RegExp.$1;
+ this.green = +RegExp.$2;
+ this.blue = +RegExp.$3;
+ this.alpha = +RegExp.$4;
+ } else if (/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)){ //rgba() color with percentages
+ this.type = "color";
+ this.red = +RegExp.$1 * 255 / 100;
+ this.green = +RegExp.$2 * 255 / 100;
+ this.blue = +RegExp.$3 * 255 / 100;
+ this.alpha = +RegExp.$4;
+ } else if (/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)){ //hsl()
+ this.type = "color";
+ this.hue = +RegExp.$1;
+ this.saturation = +RegExp.$2 / 100;
+ this.lightness = +RegExp.$3 / 100;
+ } else if (/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)){ //hsla() color with percentages
+ this.type = "color";
+ this.hue = +RegExp.$1;
+ this.saturation = +RegExp.$2 / 100;
+ this.lightness = +RegExp.$3 / 100;
+ this.alpha = +RegExp.$4;
} else if (/^url\(["']?([^\)"']+)["']?\)/i.test(text)){ //URI
this.type = "uri";
this.uri = RegExp.$1;
+ } else if (/^([^\(]+)\(/i.test(text)){
+ this.type = "function";
+ this.name = RegExp.$1;
+ this.value = text;
} else if (/^["'][^"']*["']/.test(text)){ //string
this.type = "string";
this.value = eval(text);
@@ -6338,163 +4728,170 @@ function PropertyValuePart(text, line, col){
}
PropertyValuePart.prototype = new SyntaxUnit();
-PropertyValuePart.prototype.constructor = PropertyValue;
-
-/**
- * Create a new syntax unit based solely on the given token.
- * Convenience method for creating a new syntax unit when
- * it represents a single token instead of multiple.
- * @param {Object} token The token object to represent.
- * @return {parserlib.css.PropertyValuePart} The object representing the token.
- * @static
- * @method fromToken
- */
+PropertyValuePart.prototype.constructor = PropertyValuePart;
PropertyValuePart.fromToken = function(token){
return new PropertyValuePart(token.value, token.startLine, token.startCol);
};
-/**
- * Represents an entire single selector, including all parts but not
- * including multiple selectors (those separated by commas).
- * @namespace parserlib.css
- * @class Selector
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- * @param {Array} parts Array of selectors parts making up this selector.
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- */
+var Pseudos = {
+ ":first-letter": 1,
+ ":first-line": 1,
+ ":before": 1,
+ ":after": 1
+};
+
+Pseudos.ELEMENT = 1;
+Pseudos.CLASS = 2;
+
+Pseudos.isElement = function(pseudo){
+ return pseudo.indexOf("::") === 0 || Pseudos[pseudo.toLowerCase()] == Pseudos.ELEMENT;
+};
function Selector(parts, line, col){
- SyntaxUnit.call(this, parts.join(" "), line, col);
-
- /**
- * The parts that make up the selector.
- * @type Array
- * @property parts
- */
+ SyntaxUnit.call(this, parts.join(" "), line, col, Parser.SELECTOR_TYPE);
this.parts = parts;
+ this.specificity = Specificity.calculate(this);
}
Selector.prototype = new SyntaxUnit();
Selector.prototype.constructor = Selector;
-
-
-/**
- * Represents a single part of a selector string, meaning a single set of
- * element name and modifiers. This does not include combinators such as
- * spaces, +, >, etc.
- * @namespace parserlib.css
- * @class SelectorPart
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- * @param {String} elementName The element name in the selector or null
- * if there is no element name.
- * @param {Array} modifiers Array of individual modifiers for the element.
- * May be empty if there are none.
- * @param {String} text The text representation of the unit.
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- */
function SelectorPart(elementName, modifiers, text, line, col){
- SyntaxUnit.call(this, text, line, col);
-
- /**
- * The tag name of the element to which this part
- * of the selector affects.
- * @type String
- * @property elementName
- */
+ SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_PART_TYPE);
this.elementName = elementName;
-
- /**
- * The parts that come after the element name, such as class names, IDs,
- * pseudo classes/elements, etc.
- * @type Array
- * @property modifiers
- */
this.modifiers = modifiers;
}
SelectorPart.prototype = new SyntaxUnit();
SelectorPart.prototype.constructor = SelectorPart;
-
-
-/**
- * Represents a selector modifier string, meaning a class name, element name,
- * element ID, pseudo rule, etc.
- * @namespace parserlib.css
- * @class SelectorSubPart
- * @extends parserlib.util.SyntaxUnit
- * @constructor
- * @param {String} text The text representation of the unit.
- * @param {String} type The type of selector modifier.
- * @param {int} line The line of text on which the unit resides.
- * @param {int} col The column of text on which the unit resides.
- */
function SelectorSubPart(text, type, line, col){
- SyntaxUnit.call(this, text, line, col);
-
- /**
- * The type of modifier.
- * @type String
- * @property type
- */
+ SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE);
this.type = type;
-
- /**
- * Some subparts have arguments, this represents them.
- * @type Array
- * @property args
- */
this.args = [];
}
SelectorSubPart.prototype = new SyntaxUnit();
SelectorSubPart.prototype.constructor = SelectorSubPart;
+function Specificity(a, b, c, d){
+ this.a = a;
+ this.b = b;
+ this.c = c;
+ this.d = d;
+}
+Specificity.prototype = {
+ constructor: Specificity,
+ compare: function(other){
+ var comps = ["a", "b", "c", "d"],
+ i, len;
+
+ for (i=0, len=comps.length; i < len; i++){
+ if (this[comps[i]] < other[comps[i]]){
+ return -1;
+ } else if (this[comps[i]] > other[comps[i]]){
+ return 1;
+ }
+ }
+
+ return 0;
+ },
+ valueOf: function(){
+ return (this.a * 1000) + (this.b * 100) + (this.c * 10) + this.d;
+ },
+ toString: function(){
+ return this.a + "," + this.b + "," + this.c + "," + this.d;
+ }
+};
+Specificity.calculate = function(selector){
+ var i, len,
+ part,
+ b=0, c=0, d=0;
+
+ function updateValues(part){
+
+ var i, j, len, num,
+ elementName = part.elementName ? part.elementName.text : "",
+ modifier;
+
+ if (elementName && elementName.charAt(elementName.length-1) != "*") {
+ d++;
+ }
+
+ for (i=0, len=part.modifiers.length; i < len; i++){
+ modifier = part.modifiers[i];
+ switch(modifier.type){
+ case "class":
+ case "attribute":
+ c++;
+ break;
+
+ case "id":
+ b++;
+ break;
+
+ case "pseudo":
+ if (Pseudos.isElement(modifier.text)){
+ d++;
+ } else {
+ c++;
+ }
+ break;
+
+ case "not":
+ for (j=0, num=modifier.args.length; j < num; j++){
+ updateValues(modifier.args[j]);
+ }
+ }
+ }
+ }
+
+ for (i=0, len=selector.parts.length; i < len; i++){
+ part = selector.parts[i];
+
+ if (part instanceof SelectorPart){
+ updateValues(part);
+ }
+ }
+
+ return new Specificity(0, b, c, d);
+};
var h = /^[0-9a-fA-F]$/,
nonascii = /^[\u0080-\uFFFF]$/,
nl = /\n|\r\n|\r|\f/;
-//-----------------------------------------------------------------------------
-// Helper functions
-//-----------------------------------------------------------------------------
-
function isHexDigit(c){
- return c != null && h.test(c);
+ return c !== null && h.test(c);
}
function isDigit(c){
- return c != null && /\d/.test(c);
+ return c !== null && /\d/.test(c);
}
function isWhitespace(c){
- return c != null && /\s/.test(c);
+ return c !== null && /\s/.test(c);
}
function isNewLine(c){
- return c != null && nl.test(c);
+ return c !== null && nl.test(c);
}
function isNameStart(c){
- return c != null && (/[a-z_\u0080-\uFFFF\\]/i.test(c));
+ return c !== null && (/[a-z_\u0080-\uFFFF\\]/i.test(c));
}
function isNameChar(c){
- return c != null && (isNameStart(c) || /[0-9\-\\]/.test(c));
+ return c !== null && (isNameStart(c) || /[0-9\-\\]/.test(c));
}
function isIdentStart(c){
- return c != null && (isNameStart(c) || /\-\\/.test(c));
+ return c !== null && (isNameStart(c) || /\-\\/.test(c));
}
function mix(receiver, supplier){
@@ -6505,34 +4902,11 @@ function mix(receiver, supplier){
}
return receiver;
}
-
-//-----------------------------------------------------------------------------
-// CSS Token Stream
-//-----------------------------------------------------------------------------
-
-
-/**
- * A token stream that produces CSS tokens.
- * @param {String|Reader} input The source of text to tokenize.
- * @constructor
- * @class TokenStream
- * @namespace parserlib.css
- */
function TokenStream(input){
TokenStreamBase.call(this, input, Tokens);
}
TokenStream.prototype = mix(new TokenStreamBase(), {
-
- /**
- * Overrides the TokenStreamBase method of the same name
- * to produce CSS tokens.
- * @param {variant} channel The name of the channel to use
- * for the next token.
- * @return {Object} A token object representing the next token.
- * @method _getToken
- * @private
- */
_getToken: function(channel){
var c,
@@ -6546,13 +4920,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
while(c){
switch(c){
-
- /*
- * Potential tokens:
- * - COMMENT
- * - SLASH
- * - CHAR
- */
case "/":
if(reader.peek() == "*"){
@@ -6561,16 +4928,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
token = this.charToken(c, startLine, startCol);
}
break;
-
- /*
- * Potential tokens:
- * - DASHMATCH
- * - INCLUDES
- * - PREFIXMATCH
- * - SUFFIXMATCH
- * - SUBSTRINGMATCH
- * - CHAR
- */
case "|":
case "~":
case "^":
@@ -6582,22 +4939,10 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
token = this.charToken(c, startLine, startCol);
}
break;
-
- /*
- * Potential tokens:
- * - STRING
- * - INVALID
- */
case "\"":
case "'":
token = this.stringToken(c, startLine, startCol);
break;
-
- /*
- * Potential tokens:
- * - HASH
- * - CHAR
- */
case "#":
if (isNameChar(reader.peek())){
token = this.hashToken(c, startLine, startCol);
@@ -6605,14 +4950,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
token = this.charToken(c, startLine, startCol);
}
break;
-
- /*
- * Potential tokens:
- * - DOT
- * - NUMBER
- * - DIMENSION
- * - PERCENTAGE
- */
case ".":
if (isDigit(reader.peek())){
token = this.numberToken(c, startLine, startCol);
@@ -6620,15 +4957,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
token = this.charToken(c, startLine, startCol);
}
break;
-
- /*
- * Potential tokens:
- * - CDC
- * - MINUS
- * - NUMBER
- * - DIMENSION
- * - PERCENTAGE
- */
case "-":
if (reader.peek() == "-"){ //could be closing HTML-style comment
token = this.htmlCommentEndToken(c, startLine, startCol);
@@ -6638,93 +4966,34 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
token = this.charToken(c, startLine, startCol);
}
break;
-
- /*
- * Potential tokens:
- * - IMPORTANT_SYM
- * - CHAR
- */
case "!":
token = this.importantToken(c, startLine, startCol);
break;
-
- /*
- * Any at-keyword or CHAR
- */
case "@":
token = this.atRuleToken(c, startLine, startCol);
break;
-
- /*
- * Potential tokens:
- * - NOT
- * - CHAR
- */
case ":":
token = this.notToken(c, startLine, startCol);
break;
-
- /*
- * Potential tokens:
- * - CDO
- * - CHAR
- */
case "<":
token = this.htmlCommentStartToken(c, startLine, startCol);
break;
-
- /*
- * Potential tokens:
- * - UNICODE_RANGE
- * - URL
- * - CHAR
- */
case "U":
case "u":
if (reader.peek() == "+"){
token = this.unicodeRangeToken(c, startLine, startCol);
break;
}
- /*falls through*/
-
default:
-
- /*
- * Potential tokens:
- * - NUMBER
- * - DIMENSION
- * - LENGTH
- * - FREQ
- * - TIME
- * - EMS
- * - EXS
- * - ANGLE
- */
if (isDigit(c)){
token = this.numberToken(c, startLine, startCol);
} else
-
- /*
- * Potential tokens:
- * - S
- */
if (isWhitespace(c)){
token = this.whitespaceToken(c, startLine, startCol);
} else
-
- /*
- * Potential tokens:
- * - IDENT
- */
if (isIdentStart(c)){
token = this.identOrFunctionToken(c, startLine, startCol);
} else
-
- /*
- * Potential tokens:
- * - CHAR
- * - PLUS
- */
{
token = this.charToken(c, startLine, startCol);
}
@@ -6735,40 +5004,15 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
}
-
- //make sure this token is wanted
- //TODO: check channel
break;
-
- c = reader.read();
}
- if (!token && c == null){
+ if (!token && c === null){
token = this.createToken(Tokens.EOF,null,startLine,startCol);
}
return token;
},
-
- //-------------------------------------------------------------------------
- // Methods to create tokens
- //-------------------------------------------------------------------------
-
- /**
- * Produces a token based on available data and the current
- * reader position information. This method is called by other
- * private methods to create tokens and is never called directly.
- * @param {int} tt The token type.
- * @param {String} value The text value of the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @param {Object} options (Optional) Specifies a channel property
- * to indicate that a different channel should be scanned
- * and/or a hide property indicating that the token should
- * be hidden.
- * @return {Object} A token object.
- * @method createToken
- */
createToken: function(tt, value, startLine, startCol, options){
var reader = this._reader;
options = options || {};
@@ -6784,20 +5028,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
endCol: reader.getCol()
};
},
-
- //-------------------------------------------------------------------------
- // Methods to create specific tokens
- //-------------------------------------------------------------------------
-
- /**
- * Produces a token for any at-rule. If the at-rule is unknown, then
- * the token is for a single "@" character.
- * @param {String} first The first character for the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method atRuleToken
- */
atRuleToken: function(first, startLine, startCol){
var rule = first,
reader = this._reader,
@@ -6805,41 +5035,22 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
valid = false,
ident,
c;
-
- /*
- * First, mark where we are. There are only four @ rules,
- * so anything else is really just an invalid token.
- * Basically, if this doesn't match one of the known @
- * rules, just return '@' as an unknown token and allow
- * parsing to continue after that point.
- */
reader.mark();
-
- //try to find the at-keyword
ident = this.readName();
rule = first + ident;
tt = Tokens.type(rule.toLowerCase());
-
- //if it's not valid, use the first character only and reset the reader
if (tt == Tokens.CHAR || tt == Tokens.UNKNOWN){
- tt = Tokens.CHAR;
- rule = first;
- reader.reset();
+ if (rule.length > 1){
+ tt = Tokens.UNKNOWN_SYM;
+ } else {
+ tt = Tokens.CHAR;
+ rule = first;
+ reader.reset();
+ }
}
return this.createToken(tt, rule, startLine, startCol);
},
-
- /**
- * Produces a character token based on the given character
- * and location in the stream. If there's a special (non-standard)
- * token name, this is used; otherwise CHAR is used.
- * @param {String} c The character for the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method charToken
- */
charToken: function(c, startLine, startCol){
var tt = Tokens.type(c);
@@ -6849,34 +5060,12 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return this.createToken(tt, c, startLine, startCol);
},
-
- /**
- * Produces a character token based on the given character
- * and location in the stream. If there's a special (non-standard)
- * token name, this is used; otherwise CHAR is used.
- * @param {String} first The first character for the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method commentToken
- */
commentToken: function(first, startLine, startCol){
var reader = this._reader,
comment = this.readComment(first);
return this.createToken(Tokens.COMMENT, comment, startLine, startCol);
},
-
- /**
- * Produces a comparison token based on the given character
- * and location in the stream. The next character must be
- * read and is already known to be an equals sign.
- * @param {String} c The character for the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method comparisonToken
- */
comparisonToken: function(c, startLine, startCol){
var reader = this._reader,
comparison = c + reader.read(),
@@ -6884,34 +5073,12 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return this.createToken(tt, comparison, startLine, startCol);
},
-
- /**
- * Produces a hash token based on the specified information. The
- * first character provided is the pound sign (#) and then this
- * method reads a name afterward.
- * @param {String} first The first character (#) in the hash name.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method hashToken
- */
hashToken: function(first, startLine, startCol){
var reader = this._reader,
name = this.readName(first);
return this.createToken(Tokens.HASH, name, startLine, startCol);
},
-
- /**
- * Produces a CDO or CHAR token based on the specified information. The
- * first character is provided and the rest is read by the function to determine
- * the correct token to create.
- * @param {String} first The first character in the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method htmlCommentStartToken
- */
htmlCommentStartToken: function(first, startLine, startCol){
var reader = this._reader,
text = first;
@@ -6926,17 +5093,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return this.charToken(first, startLine, startCol);
}
},
-
- /**
- * Produces a CDC or CHAR token based on the specified information. The
- * first character is provided and the rest is read by the function to determine
- * the correct token to create.
- * @param {String} first The first character in the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method htmlCommentEndToken
- */
htmlCommentEndToken: function(first, startLine, startCol){
var reader = this._reader,
text = first;
@@ -6951,30 +5107,15 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return this.charToken(first, startLine, startCol);
}
},
-
- /**
- * Produces an IDENT or FUNCTION token based on the specified information. The
- * first character is provided and the rest is read by the function to determine
- * the correct token to create.
- * @param {String} first The first character in the identifier.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method identOrFunctionToken
- */
identOrFunctionToken: function(first, startLine, startCol){
var reader = this._reader,
ident = this.readName(first),
tt = Tokens.IDENT;
-
- //if there's a left paren immediately after, it's a URI or function
if (reader.peek() == "("){
ident += reader.read();
if (ident.toLowerCase() == "url("){
tt = Tokens.URI;
ident = this.readURI(ident);
-
- //didn't find a valid URL or there's no closing paren
if (ident.toLowerCase() == "url("){
tt = Tokens.FUNCTION;
}
@@ -6982,8 +5123,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
tt = Tokens.FUNCTION;
}
} else if (reader.peek() == ":"){ //might be an IE function
-
- //IE-specific functions always being with progid:
if (ident.toLowerCase() == "progid"){
ident += reader.readTo("(");
tt = Tokens.IE_FUNCTION;
@@ -6992,17 +5131,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return this.createToken(tt, ident, startLine, startCol);
},
-
- /**
- * Produces an IMPORTANT_SYM or CHAR token based on the specified information. The
- * first character is provided and the rest is read by the function to determine
- * the correct token to create.
- * @param {String} first The first character in the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method importantToken
- */
importantToken: function(first, startLine, startCol){
var reader = this._reader,
important = first,
@@ -7014,16 +5142,12 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
c = reader.read();
while(c){
-
- //there can be a comment in here
if (c == "/"){
-
- //if the next character isn't a star, then this isn't a valid !important token
if (reader.peek() != "*"){
break;
} else {
temp = this.readComment(c);
- if (temp == ""){ //broken!
+ if (temp === ""){ //broken!
break;
}
}
@@ -7053,17 +5177,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
},
-
- /**
- * Produces a NOT or CHAR token based on the specified information. The
- * first character is provided and the rest is read by the function to determine
- * the correct token to create.
- * @param {String} first The first character in the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method notToken
- */
notToken: function(first, startLine, startCol){
var reader = this._reader,
text = first;
@@ -7078,18 +5191,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return this.charToken(first, startLine, startCol);
}
},
-
- /**
- * Produces a number token based on the given character
- * and location in the stream. This may return a token of
- * NUMBER, EMS, EXS, LENGTH, ANGLE, TIME, FREQ, DIMENSION,
- * or PERCENTAGE.
- * @param {String} first The first character for the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method numberToken
- */
numberToken: function(first, startLine, startCol){
var reader = this._reader,
value = this.readNumber(first),
@@ -7122,20 +5223,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return this.createToken(tt, value, startLine, startCol);
},
-
- /**
- * Produces a string token based on the given character
- * and location in the stream. Since strings may be indicated
- * by single or double quotes, a failure to match starting
- * and ending quotes results in an INVALID token being generated.
- * The first character in the string is passed in and then
- * the rest are read up to and including the final quotation mark.
- * @param {String} first The first character in the string.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method stringToken
- */
stringToken: function(first, startLine, startCol){
var delim = first,
string = first,
@@ -7146,25 +5233,17 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
while(c){
string += c;
-
- //if the delimiter is found with an escapement, we're done.
if (c == delim && prev != "\\"){
break;
}
-
- //if there's a newline without an escapement, it's an invalid string
if (isNewLine(reader.peek()) && c != "\\"){
tt = Tokens.INVALID;
break;
}
-
- //save previous and get next
prev = c;
c = reader.read();
}
-
- //if c is null, that means we're out of input and the string was never closed
- if (c == null){
+ if (c === null){
tt = Tokens.INVALID;
}
@@ -7176,29 +5255,21 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
value = first,
temp,
tt = Tokens.CHAR;
-
- //then it should be a unicode range
if (reader.peek() == "+"){
reader.mark();
value += reader.read();
value += this.readUnicodeRangePart(true);
-
- //ensure there's an actual unicode range here
if (value.length == 2){
reader.reset();
} else {
tt = Tokens.UNICODE_RANGE;
-
- //if there's a ? in the first part, there can't be a second part
if (value.indexOf("?") == -1){
if (reader.peek() == "-"){
reader.mark();
temp = reader.read();
temp += this.readUnicodeRangePart(false);
-
- //if there's not another value, back up and just take the first
if (temp.length == 1){
reader.reset();
} else {
@@ -7212,43 +5283,21 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return this.createToken(tt, value, startLine, startCol);
},
-
- /**
- * Produces a S token based on the specified information. Since whitespace
- * may have multiple characters, this consumes all whitespace characters
- * into a single token.
- * @param {String} first The first character in the token.
- * @param {int} startLine The beginning line for the character.
- * @param {int} startCol The beginning column for the character.
- * @return {Object} A token object.
- * @method whitespaceToken
- */
whitespaceToken: function(first, startLine, startCol){
var reader = this._reader,
value = first + this.readWhitespace();
return this.createToken(Tokens.S, value, startLine, startCol);
},
-
-
-
- //-------------------------------------------------------------------------
- // Methods to read values from the string stream
- //-------------------------------------------------------------------------
-
readUnicodeRangePart: function(allowQuestionMark){
var reader = this._reader,
part = "",
c = reader.peek();
-
- //first read hex digits
while(isHexDigit(c) && part.length < 6){
reader.read();
part += c;
c = reader.peek();
}
-
- //then read question marks if allowed
if (allowQuestionMark){
while(c == "?" && part.length < 6){
reader.read();
@@ -7257,8 +5306,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
}
}
- //there can't be any other characters after this point
-
return part;
},
@@ -7311,25 +5358,17 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
while(c){
c = reader.read();
string += c;
-
- //if the delimiter is found with an escapement, we're done.
if (c == delim && prev != "\\"){
break;
}
-
- //if there's a newline without an escapement, it's an invalid string
if (isNewLine(reader.peek()) && c != "\\"){
string = "";
break;
}
-
- //save previous and get next
prev = c;
c = reader.peek();
}
-
- //if c is null, that means we're out of input and the string was never closed
- if (c == null){
+ if (c === null){
string = "";
}
@@ -7342,14 +5381,10 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
c = reader.peek();
reader.mark();
-
- //skip whitespace before
while(c && isWhitespace(c)){
reader.read();
c = reader.peek();
}
-
- //it's a string
if (c == "'" || c == "\""){
inner = this.readString();
} else {
@@ -7357,15 +5392,11 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
}
c = reader.peek();
-
- //skip whitespace after
while(c && isWhitespace(c)){
reader.read();
c = reader.peek();
}
-
- //if there was no inner value or the next character isn't closing paren, it's not a URI
- if (inner == "" || c != ")"){
+ if (inner === "" || c != ")"){
uri = first;
reader.reset();
} else {
@@ -7378,8 +5409,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
var reader = this._reader,
url = "",
c = reader.peek();
-
- //TODO: Check for escape and nonascii
while (/^[!#$%&\\*-~]$/.test(c)){
url += reader.read();
c = reader.peek();
@@ -7439,9 +5468,7 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
if (c == "*"){
while(c){
comment += c;
-
- //look for end of comment
- if (c == "*" && reader.peek() == "/"){
+ if (comment.length > 2 && c == "*" && reader.peek() == "/"){
comment += reader.read();
break;
}
@@ -7459,47 +5486,27 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
var Tokens = [
-
- /*
- * The following token names are defined in CSS3 Grammar: http://www.w3.org/TR/css3-syntax/#lexical
- */
-
- //HTML-style comments
{ name: "CDO"},
{ name: "CDC"},
-
- //ignorables
{ name: "S", whitespace: true/*, channel: "ws"*/},
{ name: "COMMENT", comment: true, hide: true, channel: "comment" },
-
- //attribute equality
{ name: "INCLUDES", text: "~="},
{ name: "DASHMATCH", text: "|="},
{ name: "PREFIXMATCH", text: "^="},
{ name: "SUFFIXMATCH", text: "$="},
{ name: "SUBSTRINGMATCH", text: "*="},
-
- //identifier types
{ name: "STRING"},
{ name: "IDENT"},
{ name: "HASH"},
-
- //at-keywords
{ name: "IMPORT_SYM", text: "@import"},
{ name: "PAGE_SYM", text: "@page"},
{ name: "MEDIA_SYM", text: "@media"},
{ name: "FONT_FACE_SYM", text: "@font-face"},
{ name: "CHARSET_SYM", text: "@charset"},
{ name: "NAMESPACE_SYM", text: "@namespace"},
- //{ name: "ATKEYWORD"},
-
- //CSS3 animations
- { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes" ] },
-
- //important symbol
+ { name: "UNKNOWN_SYM" },
+ { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
{ name: "IMPORTANT_SYM"},
-
- //measurements
{ name: "LENGTH"},
{ name: "ANGLE"},
{ name: "TIME"},
@@ -7507,33 +5514,15 @@ var Tokens = [
{ name: "DIMENSION"},
{ name: "PERCENTAGE"},
{ name: "NUMBER"},
-
- //functions
{ name: "URI"},
{ name: "FUNCTION"},
-
- //Unicode ranges
- { name: "UNICODE_RANGE"},
-
- /*
- * The following token names are defined in CSS3 Selectors: http://www.w3.org/TR/css3-selectors/#selector-syntax
- */
-
- //invalid string
+ { name: "UNICODE_RANGE"},
{ name: "INVALID"},
-
- //combinators
{ name: "PLUS", text: "+" },
{ name: "GREATER", text: ">"},
{ name: "COMMA", text: ","},
{ name: "TILDE", text: "~"},
-
- //modifier
{ name: "NOT"},
-
- /*
- * Defined in CSS3 Paged Media
- */
{ name: "TOPLEFTCORNER_SYM", text: "@top-left-corner"},
{ name: "TOPLEFT_SYM", text: "@top-left"},
{ name: "TOPCENTER_SYM", text: "@top-center"},
@@ -7550,27 +5539,9 @@ var Tokens = [
{ name: "RIGHTTOP_SYM", text: "@right-top"},
{ name: "RIGHTMIDDLE_SYM", text: "@right-middle"},
{ name: "RIGHTBOTTOM_SYM", text: "@right-bottom"},
-
- /*
- * The following token names are defined in CSS3 Media Queries: http://www.w3.org/TR/css3-mediaqueries/#syntax
- */
- /*{ name: "MEDIA_ONLY", state: "media"},
- { name: "MEDIA_NOT", state: "media"},
- { name: "MEDIA_AND", state: "media"},*/
{ name: "RESOLUTION", state: "media"},
-
- /*
- * The following token names are not defined in any CSS specification but are used by the lexer.
- */
-
- //not a real token, but useful for stupid IE filters
{ name: "IE_FUNCTION" },
-
- //part of CSS3 grammar but not the Flex code
{ name: "CHAR" },
-
- //TODO: Needed?
- //Not defined as tokens, but might as well be
{
name: "PIPE",
text: "|"
@@ -7661,9 +5632,472 @@ var Tokens = [
};
})();
+var Validation = {
+
+ validate: function(property, value){
+ var name = property.toString().toLowerCase(),
+ parts = value.parts,
+ expression = new PropertyValueIterator(value),
+ spec = Properties[name],
+ part,
+ valid,
+ j, count,
+ msg,
+ types,
+ last,
+ literals,
+ max, multi, group;
+
+ if (!spec) {
+ if (name.indexOf("-") !== 0){ //vendor prefixed are ok
+ throw new ValidationError("Unknown property '" + property + "'.", property.line, property.col);
+ }
+ } else if (typeof spec != "number"){
+ if (typeof spec == "string"){
+ if (spec.indexOf("||") > -1) {
+ this.groupProperty(spec, expression);
+ } else {
+ this.singleProperty(spec, expression, 1);
+ }
+
+ } else if (spec.multi) {
+ this.multiProperty(spec.multi, expression, spec.comma, spec.max || Infinity);
+ } else if (typeof spec == "function") {
+ spec(expression);
+ }
+
+ }
+
+ },
+
+ singleProperty: function(types, expression, max, partial) {
+
+ var result = false,
+ value = expression.value,
+ count = 0,
+ part;
+
+ while (expression.hasNext() && count < max) {
+ result = ValidationTypes.isAny(expression, types);
+ if (!result) {
+ break;
+ }
+ count++;
+ }
+
+ if (!result) {
+ if (expression.hasNext() && !expression.isFirst()) {
+ part = expression.peek();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (" + types + ") but found '" + value + "'.", value.line, value.col);
+ }
+ } else if (expression.hasNext()) {
+ part = expression.next();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ }
+
+ },
+
+ multiProperty: function (types, expression, comma, max) {
+
+ var result = false,
+ value = expression.value,
+ count = 0,
+ sep = false,
+ part;
+
+ while(expression.hasNext() && !result && count < max) {
+ if (ValidationTypes.isAny(expression, types)) {
+ count++;
+ if (!expression.hasNext()) {
+ result = true;
+
+ } else if (comma) {
+ if (expression.peek() == ",") {
+ part = expression.next();
+ } else {
+ break;
+ }
+ }
+ } else {
+ break;
+
+ }
+ }
+
+ if (!result) {
+ if (expression.hasNext() && !expression.isFirst()) {
+ part = expression.peek();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ part = expression.previous();
+ if (comma && part == ",") {
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (" + types + ") but found '" + value + "'.", value.line, value.col);
+ }
+ }
+
+ } else if (expression.hasNext()) {
+ part = expression.next();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ }
+
+ },
+
+ groupProperty: function (types, expression, comma) {
+
+ var result = false,
+ value = expression.value,
+ typeCount = types.split("||").length,
+ groups = { count: 0 },
+ partial = false,
+ name,
+ part;
+
+ while(expression.hasNext() && !result) {
+ name = ValidationTypes.isAnyOfGroup(expression, types);
+ if (name) {
+ if (groups[name]) {
+ break;
+ } else {
+ groups[name] = 1;
+ groups.count++;
+ partial = true;
+
+ if (groups.count == typeCount || !expression.hasNext()) {
+ result = true;
+ }
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (!result) {
+ if (partial && expression.hasNext()) {
+ part = expression.peek();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (" + types + ") but found '" + value + "'.", value.line, value.col);
+ }
+ } else if (expression.hasNext()) {
+ part = expression.next();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ }
+ }
+
+
+
+};
+function ValidationError(message, line, col){
+ this.col = col;
+ this.line = line;
+ this.message = message;
+
+}
+ValidationError.prototype = new Error();
+var ValidationTypes = {
+
+ isLiteral: function (part, literals) {
+ var text = part.text.toString().toLowerCase(),
+ args = literals.split(" | "),
+ i, len, found = false;
+
+ for (i=0,len=args.length; i < len && !found; i++){
+ if (text == args[i].toLowerCase()){
+ found = true;
+ }
+ }
+
+ return found;
+ },
+
+ isSimple: function(type) {
+ return !!this.simple[type];
+ },
+
+ isComplex: function(type) {
+ return !!this.complex[type];
+ },
+ isAny: function (expression, types) {
+ var args = types.split(" | "),
+ i, len, found = false;
+
+ for (i=0,len=args.length; i < len && !found && expression.hasNext(); i++){
+ found = this.isType(expression, args[i]);
+ }
+
+ return found;
+ },
+ isAnyOfGroup: function(expression, types) {
+ var args = types.split(" || "),
+ i, len, found = false;
+
+ for (i=0,len=args.length; i < len && !found; i++){
+ found = this.isType(expression, args[i]);
+ }
+
+ return found ? args[i-1] : false;
+ },
+ isType: function (expression, type) {
+ var part = expression.peek(),
+ result = false;
+
+ if (type.charAt(0) != "<") {
+ result = this.isLiteral(part, type);
+ if (result) {
+ expression.next();
+ }
+ } else if (this.simple[type]) {
+ result = this.simple[type](part);
+ if (result) {
+ expression.next();
+ }
+ } else {
+ result = this.complex[type](expression);
+ }
+
+ return result;
+ },
+
+
+
+ simple: {
+
+ "<absolute-size>": function(part){
+ return ValidationTypes.isLiteral(part, "xx-small | x-small | small | medium | large | x-large | xx-large");
+ },
+
+ "<attachment>": function(part){
+ return ValidationTypes.isLiteral(part, "scroll | fixed | local");
+ },
+
+ "<attr>": function(part){
+ return part.type == "function" && part.name == "attr";
+ },
+
+ "<bg-image>": function(part){
+ return this["<image>"](part) || this["<gradient>"](part) || part == "none";
+ },
+
+ "<gradient>": function(part) {
+ return part.type == "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(part);
+ },
+
+ "<box>": function(part){
+ return ValidationTypes.isLiteral(part, "padding-box | border-box | content-box");
+ },
+
+ "<content>": function(part){
+ return part.type == "function" && part.name == "content";
+ },
+
+ "<relative-size>": function(part){
+ return ValidationTypes.isLiteral(part, "smaller | larger");
+ },
+ "<ident>": function(part){
+ return part.type == "identifier";
+ },
+
+ "<length>": function(part){
+ return part.type == "length" || part.type == "number" || part.type == "integer" || part == "0";
+ },
+
+ "<color>": function(part){
+ return part.type == "color" || part == "transparent";
+ },
+
+ "<number>": function(part){
+ return part.type == "number" || this["<integer>"](part);
+ },
+
+ "<integer>": function(part){
+ return part.type == "integer";
+ },
+
+ "<line>": function(part){
+ return part.type == "integer";
+ },
+
+ "<angle>": function(part){
+ return part.type == "angle";
+ },
+
+ "<uri>": function(part){
+ return part.type == "uri";
+ },
+
+ "<image>": function(part){
+ return this["<uri>"](part);
+ },
+
+ "<percentage>": function(part){
+ return part.type == "percentage" || part == "0";
+ },
+
+ "<border-width>": function(part){
+ return this["<length>"](part) || ValidationTypes.isLiteral(part, "thin | medium | thick");
+ },
+
+ "<border-style>": function(part){
+ return ValidationTypes.isLiteral(part, "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset");
+ },
+
+ "<margin-width>": function(part){
+ return this["<length>"](part) || this["<percentage>"](part) || ValidationTypes.isLiteral(part, "auto");
+ },
+
+ "<padding-width>": function(part){
+ return this["<length>"](part) || this["<percentage>"](part);
+ },
+
+ "<shape>": function(part){
+ return part.type == "function" && (part.name == "rect" || part.name == "inset-rect");
+ },
+
+ "<time>": function(part) {
+ return part.type == "time";
+ }
+ },
+
+ complex: {
+
+ "<bg-position>": function(expression){
+ var types = this,
+ result = false,
+ numeric = "<percentage> | <length>",
+ xDir = "left | center | right",
+ yDir = "top | center | bottom",
+ part,
+ i, len;
+
+ if (ValidationTypes.isAny(expression, "top | bottom")) {
+ result = true;
+ } else {
+ if (ValidationTypes.isAny(expression, numeric)){
+ if (expression.hasNext()){
+ result = ValidationTypes.isAny(expression, numeric + " | " + yDir);
+ }
+ } else if (ValidationTypes.isAny(expression, xDir)){
+ if (expression.hasNext()){
+ if (ValidationTypes.isAny(expression, yDir)){
+ result = true;
+
+ ValidationTypes.isAny(expression, numeric);
+
+ } else if (ValidationTypes.isAny(expression, numeric)){
+ if (ValidationTypes.isAny(expression, yDir)){
+ ValidationTypes.isAny(expression, numeric);
+ }
+
+ result = true;
+ }
+ }
+ }
+ }
+
+ return result;
+ },
+
+ "<bg-size>": function(expression){
+ var types = this,
+ result = false,
+ numeric = "<percentage> | <length> | auto",
+ part,
+ i, len;
+
+ if (ValidationTypes.isAny(expression, "cover | contain")) {
+ result = true;
+ } else if (ValidationTypes.isAny(expression, numeric)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ }
+
+ return result;
+ },
+
+ "<repeat-style>": function(expression){
+ var result = false,
+ values = "repeat | space | round | no-repeat",
+ part;
+
+ if (expression.hasNext()){
+ part = expression.next();
+
+ if (ValidationTypes.isLiteral(part, "repeat-x | repeat-y")) {
+ result = true;
+ } else if (ValidationTypes.isLiteral(part, values)) {
+ result = true;
+ if (expression.hasNext() && ValidationTypes.isLiteral(expression.peek(), values)) {
+ expression.next();
+ }
+ }
+ }
+
+ return result;
+
+ },
+
+ "<shadow>": function(expression) {
+ var result = false,
+ count = 0,
+ inset = false,
+ color = false,
+ part;
+
+ if (expression.hasNext()) {
+
+ if (ValidationTypes.isAny(expression, "inset")){
+ inset = true;
+ }
+
+ if (ValidationTypes.isAny(expression, "<color>")) {
+ color = true;
+ }
+
+ while (ValidationTypes.isAny(expression, "<length>") && count < 4) {
+ count++;
+ }
+
+
+ if (expression.hasNext()) {
+ if (!color) {
+ ValidationTypes.isAny(expression, "<color>");
+ }
+
+ if (!inset) {
+ ValidationTypes.isAny(expression, "inset");
+ }
+ }
+
+ result = (count >= 2 && count <= 4);
+
+ }
+
+ return result;
+ },
+
+ "<x-one-radius>": function(expression) {
+ var result = false,
+ count = 0,
+ numeric = "<length> | <percentage>",
+ part;
+
+ if (ValidationTypes.isAny(expression, numeric)){
+ result = true;
+
+ ValidationTypes.isAny(expression, numeric);
+ }
+
+ return result;
+ }
+ }
+};
parserlib.css = {
@@ -7678,206 +6112,123 @@ MediaQuery :MediaQuery,
Selector :Selector,
SelectorPart :SelectorPart,
SelectorSubPart :SelectorSubPart,
+Specificity :Specificity,
TokenStream :TokenStream,
-Tokens :Tokens
+Tokens :Tokens,
+ValidationError :ValidationError
};
})();
-
-/**
- * Main CSSLint object.
- * @class CSSLint
- * @static
- * @extends parserlib.util.EventTarget
- */
var CSSLint = (function(){
var rules = [],
formatters = [],
api = new parserlib.util.EventTarget();
- api.version = "@VERSION@";
-
- //-------------------------------------------------------------------------
- // Rule Management
- //-------------------------------------------------------------------------
-
- /**
- * Adds a new rule to the engine.
- * @param {Object} rule The rule to add.
- * @method addRule
- */
+ api.version = "0.9.9";
api.addRule = function(rule){
rules.push(rule);
rules[rule.id] = rule;
};
-
- /**
- * Clears all rule from the engine.
- * @method clearRules
- */
api.clearRules = function(){
rules = [];
};
-
- //-------------------------------------------------------------------------
- // Formatters
- //-------------------------------------------------------------------------
-
- /**
- * Adds a new formatter to the engine.
- * @param {Object} formatter The formatter to add.
- * @method addFormatter
- */
+ api.getRules = function(){
+ return [].concat(rules).sort(function(a,b){
+ return a.id > b.id ? 1 : 0;
+ });
+ };
+ api.getRuleset = function() {
+ var ruleset = {},
+ i = 0,
+ len = rules.length;
+
+ while (i < len){
+ ruleset[rules[i++].id] = 1; //by default, everything is a warning
+ }
+
+ return ruleset;
+ };
api.addFormatter = function(formatter) {
- // formatters.push(formatter);
formatters[formatter.id] = formatter;
};
-
- /**
- * Retrieves a formatter for use.
- * @param {String} formatId The name of the format to retrieve.
- * @return {Object} The formatter or undefined.
- * @method getFormatter
- */
api.getFormatter = function(formatId){
return formatters[formatId];
};
-
- /**
- * Formats the results in a particular format for a single file.
- * @param {Object} result The results returned from CSSLint.verify().
- * @param {String} filename The filename for which the results apply.
- * @param {String} formatId The name of the formatter to use.
- * @return {String} A formatted string for the results.
- * @method format
- */
- api.format = function(results, filename, formatId) {
+ api.format = function(results, filename, formatId, options) {
var formatter = this.getFormatter(formatId),
result = null;
if (formatter){
result = formatter.startFormat();
- result += formatter.formatResults(results, filename);
+ result += formatter.formatResults(results, filename, options || {});
result += formatter.endFormat();
}
return result;
- }
-
- /**
- * Indicates if the given format is supported.
- * @param {String} formatId The ID of the format to check.
- * @return {Boolean} True if the format exists, false if not.
- * @method hasFormat
- */
+ };
api.hasFormat = function(formatId){
return formatters.hasOwnProperty(formatId);
};
-
- //-------------------------------------------------------------------------
- // Verification
- //-------------------------------------------------------------------------
-
- /**
- * Starts the verification process for the given CSS text.
- * @param {String} text The CSS text to verify.
- * @param {Object} ruleset (Optional) List of rules to apply. If null, then
- * all rules are used.
- * @return {Object} Results of the verification.
- * @method verify
- */
api.verify = function(text, ruleset){
var i = 0,
len = rules.length,
reporter,
lines,
+ report,
parser = new parserlib.css.Parser({ starHack: true, ieFilters: true,
underscoreHack: true, strict: false });
-
- lines = text.split(/\n\r?/g);
- reporter = new Reporter(lines);
-
+ lines = text.replace(/\n\r?/g, "$split$").split('$split$');
+
if (!ruleset){
- while (i < len){
- rules[i++].init(parser, reporter);
- }
- } else {
- ruleset.errors = 1; //always report parsing errors
- for (i in ruleset){
- if(ruleset.hasOwnProperty(i)){
- if (rules[i]){
- rules[i].init(parser, reporter);
- }
+ ruleset = this.getRuleset();
+ }
+
+ reporter = new Reporter(lines, ruleset);
+
+ ruleset.errors = 2; //always report parsing errors as errors
+ for (i in ruleset){
+ if(ruleset.hasOwnProperty(i)){
+ if (rules[i]){
+ rules[i].init(parser, reporter);
}
}
}
-
- //capture most horrible error type
try {
parser.parse(text);
} catch (ex) {
- reporter.error("Fatal error, cannot continue: " + ex.message, ex.line, ex.col);
+ reporter.error("Fatal error, cannot continue: " + ex.message, ex.line, ex.col, {});
}
- return {
+ report = {
messages : reporter.messages,
stats : reporter.stats
};
+ report.messages.sort(function (a, b){
+ if (a.rollup && !b.rollup){
+ return 1;
+ } else if (!a.rollup && b.rollup){
+ return -1;
+ } else {
+ return a.line - b.line;
+ }
+ });
+
+ return report;
};
- //-------------------------------------------------------------------------
- // Publish the API
- //-------------------------------------------------------------------------
-
return api;
})();
-/**
- * An instance of Report is used to report results of the
- * verification back to the main API.
- * @class Reporter
- * @constructor
- * @param {String[]} lines The text lines of the source.
- */
-function Reporter(lines){
-
- /**
- * List of messages being reported.
- * @property messages
- * @type String[]
- */
+function Reporter(lines, ruleset){
this.messages = [];
-
- /**
- * List of statistics being reported.
- * @property stats
- * @type String[]
- */
this.stats = [];
-
- /**
- * Lines of code being reported on. Used to provide contextual information
- * for messages.
- * @property lines
- * @type String[]
- */
this.lines = lines;
+ this.ruleset = ruleset;
}
Reporter.prototype = {
-
- //restore constructor
constructor: Reporter,
-
- /**
- * Report an error.
- * @param {String} message The message to store.
- * @param {int} line The line number.
- * @param {int} col The column number.
- * @param {Object} rule The rule this message relates to.
- * @method error
- */
error: function(message, line, col, rule){
this.messages.push({
type : "error",
@@ -7885,21 +6236,15 @@ Reporter.prototype = {
col : col,
message : message,
evidence: this.lines[line-1],
- rule : rule
+ rule : rule || {}
});
},
-
- /**
- * Report an warning.
- * @param {String} message The message to store.
- * @param {int} line The line number.
- * @param {int} col The column number.
- * @param {Object} rule The rule this message relates to.
- * @method warn
- */
warn: function(message, line, col, rule){
+ this.report(message, line, col, rule);
+ },
+ report: function(message, line, col, rule){
this.messages.push({
- type : "warning",
+ type : this.ruleset[rule.id] == 2 ? "error" : "warning",
line : line,
col : col,
message : message,
@@ -7907,15 +6252,6 @@ Reporter.prototype = {
rule : rule
});
},
-
- /**
- * Report some informational text.
- * @param {String} message The message to store.
- * @param {int} line The line number.
- * @param {int} col The column number.
- * @param {Object} rule The rule this message relates to.
- * @method info
- */
info: function(message, line, col, rule){
this.messages.push({
type : "info",
@@ -7926,13 +6262,6 @@ Reporter.prototype = {
rule : rule
});
},
-
- /**
- * Report some rollup error information.
- * @param {String} message The message to store.
- * @param {Object} rule The rule this message relates to.
- * @method rollupError
- */
rollupError: function(message, rule){
this.messages.push({
type : "error",
@@ -7941,13 +6270,6 @@ Reporter.prototype = {
rule : rule
});
},
-
- /**
- * Report some rollup warning information.
- * @param {String} message The message to store.
- * @param {Object} rule The rule this message relates to.
- * @method rollupWarn
- */
rollupWarn: function(message, rule){
this.messages.push({
type : "warning",
@@ -7956,71 +6278,50 @@ Reporter.prototype = {
rule : rule
});
},
-
- /**
- * Report a statistic.
- * @param {String} name The name of the stat to store.
- * @param {Variant} value The value of the stat.
- * @method stat
- */
stat: function(name, value){
this.stats[name] = value;
}
};
-/*
- * Utility functions that make life easier.
- */
-
-/*
- * Adds all properties from supplier onto receiver,
- * overwriting if the same name already exists on
- * reciever.
- * @param {Object} The object to receive the properties.
- * @param {Object} The object to provide the properties.
- * @return {Object} The receiver
- */
-function mix(reciever, supplier){
- var prop;
-
- for (prop in supplier){
- if (supplier.hasOwnProperty(prop)){
- receiver[prop] = supplier[prop];
+CSSLint._Reporter = Reporter;
+CSSLint.Util = {
+ mix: function(receiver, supplier){
+ var prop;
+
+ for (prop in supplier){
+ if (supplier.hasOwnProperty(prop)){
+ receiver[prop] = supplier[prop];
+ }
}
- }
- return prop;
-}
-
-/*
- * Polyfill for array indexOf() method.
- * @param {Array} values The array to search.
- * @param {Variant} value The value to search for.
- * @return {int} The index of the value if found, -1 if not.
- */
-function indexOf(values, value){
- if (values.indexOf){
- return values.indexOf(value);
- } else {
- for (var i=0, len=values.length; i < len; i++){
- if (values[i] === value){
- return i;
+ return prop;
+ },
+ indexOf: function(values, value){
+ if (values.indexOf){
+ return values.indexOf(value);
+ } else {
+ for (var i=0, len=values.length; i < len; i++){
+ if (values[i] === value){
+ return i;
+ }
+ }
+ return -1;
+ }
+ },
+ forEach: function(values, func) {
+ if (values.forEach){
+ return values.forEach(func);
+ } else {
+ for (var i=0, len=values.length; i < len; i++){
+ func(values[i], i, values);
}
}
- return -1;
}
-}
-/*
- * Rule: Don't use adjoining classes (.foo.bar).
- */
+};
CSSLint.addRule({
-
- //rule information
id: "adjoining-classes",
- name: "Adjoining Classes",
+ name: "Disallow adjoining classes",
desc: "Don't use adjoining classes.",
browsers: "IE6",
-
- //initialization
init: function(parser, reporter){
var rule = this;
parser.addListener("startrule", function(event){
@@ -8035,7 +6336,7 @@ CSSLint.addRule({
selector = selectors[i];
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part instanceof parserlib.css.SelectorPart){
+ if (part.type == parser.SELECTOR_PART_TYPE){
classCount = 0;
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
@@ -8043,7 +6344,7 @@ CSSLint.addRule({
classCount++;
}
if (classCount > 1){
- reporter.warn("Don't use adjoining classes.", part.line, part.col, rule);
+ reporter.report("Don't use adjoining classes.", part.line, part.col, rule);
}
}
}
@@ -8053,18 +6354,11 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Don't use width or height when using padding or border.
- */
CSSLint.addRule({
-
- //rule information
id: "box-model",
- name: "Box Model",
+ name: "Beware of broken box size",
desc: "Don't use width or height when using padding or border.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
widthProperties = {
@@ -8083,12 +6377,48 @@ CSSLint.addRule({
"padding-bottom": 1,
"padding-top": 1
},
- properties;
+ properties,
+ boxSizing = false;
- parser.addListener("startrule", function(){
- properties = {
- };
- });
+ function startRule(){
+ properties = {};
+ boxSizing = false;
+ }
+
+ function endRule(){
+ var prop, value;
+
+ if (!boxSizing) {
+ if (properties.height){
+ for (prop in heightProperties){
+ if (heightProperties.hasOwnProperty(prop) && properties[prop]){
+ value = properties[prop].value;
+ if (!(prop == "padding" && value.parts.length === 2 && value.parts[0].value === 0)){
+ reporter.report("Using height with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
+ }
+ }
+ }
+ }
+
+ if (properties.width){
+ for (prop in widthProperties){
+ if (widthProperties.hasOwnProperty(prop) && properties[prop]){
+ value = properties[prop].value;
+
+ if (!(prop == "padding" && value.parts.length === 2 && value.parts[1].value === 0)){
+ reporter.report("Using width with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
parser.addListener("property", function(event){
var name = event.property.text.toLowerCase();
@@ -8098,60 +6428,47 @@ CSSLint.addRule({
properties[name] = { line: event.property.line, col: event.property.col, value: event.value };
}
} else {
- if (name == "width" || name == "height"){
+ if (/^(width|height)/i.test(name) && /^(length|percentage)/.test(event.value.parts[0].type)){
properties[name] = 1;
+ } else if (name == "box-sizing") {
+ boxSizing = true;
}
}
});
- parser.addListener("endrule", function(){
- var prop;
- if (properties["height"]){
- for (prop in heightProperties){
- if (heightProperties.hasOwnProperty(prop) && properties[prop]){
-
- //special case for padding
- if (prop == "padding" && properties[prop].value.parts.length == 2 && properties[prop].value.parts[0].value == 0){
- //noop
- } else {
- reporter.warn("Broken box model: using height with " + prop + ".", properties[prop].line, properties[prop].col, rule);
- }
- }
- }
- }
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
+ }
- if (properties["width"]){
- for (prop in widthProperties){
- if (widthProperties.hasOwnProperty(prop) && properties[prop]){
+});
+CSSLint.addRule({
+ id: "box-sizing",
+ name: "Disallow use of box-sizing",
+ desc: "The box-sizing properties isn't supported in IE6 and IE7.",
+ browsers: "IE6, IE7",
+ tags: ["Compatibility"],
+ init: function(parser, reporter){
+ var rule = this;
- if (prop == "padding" && properties[prop].value.parts.length == 2 && properties[prop].value.parts[1].value == 0){
- //noop
- } else {
- reporter.warn("Broken box model: using width with " + prop + ".", properties[prop].line, properties[prop].col, rule);
- }
- }
- }
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase();
+
+ if (name == "box-sizing"){
+ reporter.report("The box-sizing property isn't supported in IE6 and IE7.", event.line, event.col, rule);
}
-
- });
+ });
}
-});
-/*
- * Rule: Include all compatible vendor prefixes to reach a wider
- * range of users.
- */
-/*global CSSLint*/
+});
CSSLint.addRule({
-
- //rule information
id: "compatible-vendor-prefixes",
- name: "Compatible Vendor Prefixes",
+ name: "Require compatible vendor prefixes",
desc: "Include all compatible vendor prefixes to reach a wider range of users.",
browsers: "All",
-
- //initialization
init: function (parser, reporter) {
var rule = this,
compatiblePrefixes,
@@ -8161,10 +6478,9 @@ CSSLint.addRule({
prefixed,
i,
len,
+ inKeyFrame = false,
arrayPush = Array.prototype.push,
applyTo = [];
-
- // See http://peter.sh/experiments/vendor-prefixed-css-property-overview/ for details
compatiblePrefixes = {
"animation" : "webkit moz",
"animation-delay" : "webkit moz",
@@ -8195,13 +6511,13 @@ CSSLint.addRule({
"box-pack" : "webkit moz ms",
"box-sizing" : "webkit moz",
"box-shadow" : "webkit moz",
- "column-count" : "webkit moz",
- "column-gap" : "webkit moz",
- "column-rule" : "webkit moz",
- "column-rule-color" : "webkit moz",
- "column-rule-style" : "webkit moz",
- "column-rule-width" : "webkit moz",
- "column-width" : "webkit moz",
+ "column-count" : "webkit moz ms",
+ "column-gap" : "webkit moz ms",
+ "column-rule" : "webkit moz ms",
+ "column-rule-color" : "webkit moz ms",
+ "column-rule-style" : "webkit moz ms",
+ "column-rule-width" : "webkit moz ms",
+ "column-width" : "webkit moz ms",
"hyphens" : "epub moz",
"line-break" : "webkit ms",
"margin-end" : "webkit moz",
@@ -8220,11 +6536,12 @@ CSSLint.addRule({
"transition-property" : "webkit moz o",
"transition-timing-function" : "webkit moz o",
"user-modify" : "webkit moz",
- "user-select" : "webkit moz",
+ "user-select" : "webkit moz ms",
"word-break" : "epub ms",
"writing-mode" : "epub ms"
};
+
for (prop in compatiblePrefixes) {
if (compatiblePrefixes.hasOwnProperty(prop)) {
variations = [];
@@ -8236,14 +6553,26 @@ CSSLint.addRule({
arrayPush.apply(applyTo, variations);
}
}
+
parser.addListener("startrule", function () {
properties = [];
});
+ parser.addListener("startkeyframes", function (event) {
+ inKeyFrame = event.prefix || true;
+ });
+
+ parser.addListener("endkeyframes", function (event) {
+ inKeyFrame = false;
+ });
+
parser.addListener("property", function (event) {
- var name = event.property.text;
- if (applyTo.indexOf(name) > -1) {
- properties.push(name);
+ var name = event.property;
+ if (CSSLint.Util.indexOf(applyTo, name.text) > -1) {
+ if (!inKeyFrame || typeof inKeyFrame != "string" ||
+ name.text.indexOf("-" + inKeyFrame + "-") !== 0) {
+ properties.push(name);
+ }
}
});
@@ -8270,15 +6599,17 @@ CSSLint.addRule({
for (prop in compatiblePrefixes) {
if (compatiblePrefixes.hasOwnProperty(prop)) {
variations = compatiblePrefixes[prop];
- if (variations.indexOf(name) > -1) {
- if (propertyGroups[prop] === undefined) {
+ if (CSSLint.Util.indexOf(variations, name.text) > -1) {
+ if (!propertyGroups[prop]) {
propertyGroups[prop] = {
full : variations.slice(0),
- actual : []
+ actual : [],
+ actualNodes: []
};
}
- if (propertyGroups[prop].actual.indexOf(name) === -1) {
- propertyGroups[prop].actual.push(name);
+ if (CSSLint.Util.indexOf(propertyGroups[prop].actual, name.text) === -1) {
+ propertyGroups[prop].actual.push(name.text);
+ propertyGroups[prop].actualNodes.push(name);
}
}
}
@@ -8294,9 +6625,9 @@ CSSLint.addRule({
if (full.length > actual.length) {
for (i = 0, len = full.length; i < len; i++) {
item = full[i];
- if (actual.indexOf(item) === -1) {
+ if (CSSLint.Util.indexOf(actual, item) === -1) {
propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length == 2) ? actual.join(" and ") : actual.join(", ");
- reporter.warn("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", event.selectors[0].line, event.selectors[0].col, rule);
+ reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule);
}
}
@@ -8306,22 +6637,11 @@ CSSLint.addRule({
});
}
});
-/*
- * Rule: Certain properties don't play well with certain display values.
- * - float should not be used with inline-block
- * - height, width, margin-top, margin-bottom, float should not be used with inline
- * - vertical-align should not be used with block
- * - margin, float should not be used with table-*
- */
CSSLint.addRule({
-
- //rule information
id: "display-property-grouping",
- name: "Display Property Grouping",
+ name: "Require properties appropriate for display",
desc: "Certain properties shouldn't be used with certain display property values.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
@@ -8344,26 +6664,25 @@ CSSLint.addRule({
},
properties;
- parser.addListener("startrule", function(){
- properties = {};
- });
-
- parser.addListener("property", function(event){
- var name = event.property.text.toLowerCase();
-
- if (propertiesToCheck[name]){
- properties[name] = { value: event.value.text, line: event.property.line, col: event.property.col };
+ function reportProperty(name, display, msg){
+ if (properties[name]){
+ if (typeof propertiesToCheck[name] != "string" || properties[name].value.toLowerCase() != propertiesToCheck[name]){
+ reporter.report(msg || name + " can't be used with display: " + display + ".", properties[name].line, properties[name].col, rule);
+ }
}
- });
+ }
+
+ function startRule(){
+ properties = {};
+ }
- parser.addListener("endrule", function(){
+ function endRule(){
var display = properties.display ? properties.display.value : null;
if (display){
switch(display){
case "inline":
- //height, width, margin-top, margin-bottom, float should not be used with inline
reportProperty("height", display);
reportProperty("width", display);
reportProperty("margin", display);
@@ -8373,18 +6692,15 @@ CSSLint.addRule({
break;
case "block":
- //vertical-align should not be used with block
reportProperty("vertical-align", display);
break;
case "inline-block":
- //float should not be used with inline-block
reportProperty("float", display);
break;
default:
- //margin, float should not be used with table
- if (display.indexOf("table-") == 0){
+ if (display.indexOf("table-") === 0){
reportProperty("margin", display);
reportProperty("margin-left", display);
reportProperty("margin-right", display);
@@ -8392,37 +6708,68 @@ CSSLint.addRule({
reportProperty("margin-bottom", display);
reportProperty("float", display);
}
-
- //otherwise do nothing
}
}
- });
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startkeyframerule", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase();
- function reportProperty(name, display, msg){
- if (properties[name]){
- if (!(typeof propertiesToCheck[name] == "string") || properties[name].value.toLowerCase() != propertiesToCheck[name]){
- reporter.warn(msg || name + " can't be used with display: " + display + ".", properties[name].line, properties[name].col, rule);
- }
+ if (propertiesToCheck[name]){
+ properties[name] = { value: event.value.text, line: event.property.line, col: event.property.col };
}
- }
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endkeyframerule", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endpage", endRule);
+
}
});
-/*
- * Rule: Duplicate properties must appear one after the other. If an already-defined
- * property appears somewhere else in the rule, then it's likely an error.
- */
CSSLint.addRule({
+ id: "duplicate-background-images",
+ name: "Disallow duplicate background images",
+ desc: "Every background-image should be unique. Use a common class for e.g. sprites.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ stack = {};
- //rule information
+ parser.addListener("property", function(event){
+ var name = event.property.text,
+ value = event.value,
+ i, len;
+
+ if (name.match(/background/i)) {
+ for (i=0, len=value.parts.length; i < len; i++) {
+ if (value.parts[i].type == 'uri') {
+ if (typeof stack[value.parts[i].uri] === 'undefined') {
+ stack[value.parts[i].uri] = event;
+ }
+ else {
+ reporter.report("Background image '" + value.parts[i].uri + "' was used multiple times, first declared at line " + stack[value.parts[i].uri].line + ", col " + stack[value.parts[i].uri].col + ".", event.line, event.col, rule);
+ }
+ }
+ }
+ }
+ });
+ }
+});
+CSSLint.addRule({
id: "duplicate-properties",
- name: "Duplicate Properties",
+ name: "Disallow duplicate properties",
desc: "Duplicate properties must appear one after the other.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
properties,
@@ -8435,13 +6782,15 @@ CSSLint.addRule({
parser.addListener("startrule", startRule);
parser.addListener("startfontface", startRule);
parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
parser.addListener("property", function(event){
var property = event.property,
name = property.text.toLowerCase();
if (properties[name] && (lastProperty != name || properties[name] == event.value.text)){
- reporter.warn("Duplicate property '" + event.property + "' found.", event.line, event.col, rule);
+ reporter.report("Duplicate property '" + event.property + "' found.", event.line, event.col, rule);
}
properties[name] = event.value.text;
@@ -8453,18 +6802,11 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Style rules without any properties defined should be removed.
- */
CSSLint.addRule({
-
- //rule information
id: "empty-rules",
- name: "Empty Rules",
+ name: "Disallow empty rules",
desc: "Rules without any properties specified should be removed.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
count = 0;
@@ -8479,25 +6821,18 @@ CSSLint.addRule({
parser.addListener("endrule", function(event){
var selectors = event.selectors;
- if (count == 0){
- reporter.warn("Rule is empty.", selectors[0].line, selectors[0].col, rule);
+ if (count === 0){
+ reporter.report("Rule is empty.", selectors[0].line, selectors[0].col, rule);
}
});
}
});
-/*
- * Rule: There should be no syntax errors. (Duh.)
- */
CSSLint.addRule({
-
- //rule information
id: "errors",
name: "Parsing Errors",
desc: "This rule looks for recoverable syntax errors.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
@@ -8508,32 +6843,81 @@ CSSLint.addRule({
}
});
-/*
- * Rule: You shouldn't use more than 10 floats. If you do, there's probably
- * room for some abstraction.
- */
CSSLint.addRule({
+ id: "fallback-colors",
+ name: "Require fallback colors",
+ desc: "For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.",
+ browsers: "IE6,IE7,IE8",
+ init: function(parser, reporter){
+ var rule = this,
+ lastProperty,
+ propertiesToCheck = {
+ color: 1,
+ background: 1,
+ "background-color": 1
+ },
+ properties;
+
+ function startRule(event){
+ properties = {};
+ lastProperty = null;
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
+
+ parser.addListener("property", function(event){
+ var property = event.property,
+ name = property.text.toLowerCase(),
+ parts = event.value.parts,
+ i = 0,
+ colorType = "",
+ len = parts.length;
+
+ if(propertiesToCheck[name]){
+ while(i < len){
+ if (parts[i].type == "color"){
+ if ("alpha" in parts[i] || "hue" in parts[i]){
+
+ if (/([^\)]+)\(/.test(parts[i])){
+ colorType = RegExp.$1.toUpperCase();
+ }
+
+ if (!lastProperty || (lastProperty.property.text.toLowerCase() != name || lastProperty.colorType != "compat")){
+ reporter.report("Fallback " + name + " (hex or RGB) should precede " + colorType + " " + name + ".", event.line, event.col, rule);
+ }
+ } else {
+ event.colorType = "compat";
+ }
+ }
+
+ i++;
+ }
+ }
+
+ lastProperty = event;
+ });
+
+ }
- //rule information
+});
+CSSLint.addRule({
id: "floats",
- name: "Floats",
+ name: "Disallow too many floats",
desc: "This rule tests if the float property is used too many times",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
var count = 0;
-
- //count how many times "float" is used
parser.addListener("property", function(event){
if (event.property.text.toLowerCase() == "float" &&
event.value.text.toLowerCase() != "none"){
count++;
}
});
-
- //report the results
parser.addListener("endstylesheet", function(){
reporter.stat("floats", count);
if (count >= 10){
@@ -8543,18 +6927,11 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Avoid too many @font-face declarations in the same stylesheet.
- */
CSSLint.addRule({
-
- //rule information
id: "font-faces",
- name: "Font Faces",
+ name: "Don't use too many web fonts",
desc: "Too many different web fonts in the same stylesheet.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
count = 0;
@@ -8572,31 +6949,19 @@ CSSLint.addRule({
}
});
-/*
- * Rule: You shouldn't need more than 9 font-size declarations.
- */
-
CSSLint.addRule({
-
- //rule information
id: "font-sizes",
- name: "Font Sizes",
+ name: "Disallow too many font sizes",
desc: "Checks the number of font-size declarations.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
count = 0;
-
- //check for use of "font-size"
parser.addListener("property", function(event){
if (event.property == "font-size"){
count++;
}
});
-
- //report the results
parser.addListener("endstylesheet", function(){
reporter.stat("font-sizes", count);
if (count >= 10){
@@ -8606,18 +6971,11 @@ CSSLint.addRule({
}
});
-/*
- * Rule: When using a vendor-prefixed gradient, make sure to use them all.
- */
CSSLint.addRule({
-
- //rule information
id: "gradients",
- name: "Gradients",
+ name: "Require all gradient definitions",
desc: "When using a vendor-prefixed gradient, make sure to use them all.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
gradients;
@@ -8626,6 +6984,7 @@ CSSLint.addRule({
gradients = {
moz: 0,
webkit: 0,
+ oldWebkit: 0,
ms: 0,
o: 0
};
@@ -8633,8 +6992,10 @@ CSSLint.addRule({
parser.addListener("property", function(event){
- if (/\-(moz|ms|o|webkit)(?:\-(?:linear|radial))\-gradient/.test(event.value)){
+ if (/\-(moz|ms|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(event.value)){
gradients[RegExp.$1] = 1;
+ } else if (/\-webkit\-gradient/i.test(event.value)){
+ gradients.oldWebkit = 1;
}
});
@@ -8647,7 +7008,11 @@ CSSLint.addRule({
}
if (!gradients.webkit){
- missing.push("Webkit (Safari, Chrome)");
+ missing.push("Webkit (Safari 5+, Chrome)");
+ }
+
+ if (!gradients.oldWebkit){
+ missing.push("Old Webkit (Safari 4+, Chrome)");
}
if (!gradients.ms){
@@ -8658,8 +7023,8 @@ CSSLint.addRule({
missing.push("Opera 11.1+");
}
- if (missing.length && missing.length < 4){
- reporter.warn("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule);
+ if (missing.length && missing.length < 5){
+ reporter.report("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule);
}
});
@@ -8667,18 +7032,11 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Don't use IDs for selectors.
- */
CSSLint.addRule({
-
- //rule information
id: "ids",
- name: "IDs",
+ name: "Disallow IDs in selectors",
desc: "Selectors should not contain IDs.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
parser.addListener("startrule", function(event){
@@ -8695,7 +7053,7 @@ CSSLint.addRule({
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part instanceof parserlib.css.SelectorPart){
+ if (part.type == parser.SELECTOR_PART_TYPE){
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
if (modifier.type == "id"){
@@ -8706,9 +7064,9 @@ CSSLint.addRule({
}
if (idCount == 1){
- reporter.warn("Don't use IDs in selectors.", selector.line, selector.col, rule);
+ reporter.report("Don't use IDs in selectors.", selector.line, selector.col, rule);
} else if (idCount > 1){
- reporter.warn(idCount + " IDs in the selector, really?", selector.line, selector.col, rule);
+ reporter.report(idCount + " IDs in the selector, really?", selector.line, selector.col, rule);
}
}
@@ -8716,383 +7074,131 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Don't use @import, use <link> instead.
- */
CSSLint.addRule({
-
- //rule information
id: "import",
- name: "@import",
+ name: "Disallow @import",
desc: "Don't use @import, use <link> instead.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
parser.addListener("import", function(event){
- reporter.warn("@import prevents parallel downloads, use <link> instead.", event.line, event.col, rule);
+ reporter.report("@import prevents parallel downloads, use <link> instead.", event.line, event.col, rule);
});
}
});
-/*
- * Rule: Make sure !important is not overused, this could lead to specificity
- * war. Display a warning on !important declarations, an error if it's
- * used more at least 10 times.
- */
CSSLint.addRule({
-
- //rule information
id: "important",
- name: "Important",
+ name: "Disallow !important",
desc: "Be careful when using !important declaration",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
count = 0;
-
- //warn that important is used and increment the declaration counter
parser.addListener("property", function(event){
if (event.important === true){
count++;
- reporter.warn("Use of !important", event.line, event.col, rule);
+ reporter.report("Use of !important", event.line, event.col, rule);
}
});
-
- //if there are more than 10, show an error
parser.addListener("endstylesheet", function(){
reporter.stat("important", count);
if (count >= 10){
- reporter.rollupWarn("Too many !important declarations (" + count + "), try to use less than 10 to avoid specifity issues.", rule);
+ reporter.rollupWarn("Too many !important declarations (" + count + "), try to use less than 10 to avoid specificity issues.", rule);
}
});
}
});
-/*
- * Rule: Properties should be known (listed in CSS3 specification) or
- * be a vendor-prefixed property.
- */
CSSLint.addRule({
-
- //rule information
id: "known-properties",
- name: "Known Properties",
- desc: "Properties should be known (listed in CSS specification) or be a vendor-prefixed property.",
+ name: "Require use of known properties",
+ desc: "Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
- var rule = this,
- properties = {
-
- "alignment-adjust": 1,
- "alignment-baseline": 1,
- "animation": 1,
- "animation-delay": 1,
- "animation-direction": 1,
- "animation-duration": 1,
- "animation-iteration-count": 1,
- "animation-name": 1,
- "animation-play-state": 1,
- "animation-timing-function": 1,
- "appearance": 1,
- "azimuth": 1,
- "backface-visibility": 1,
- "background": 1,
- "background-attachment": 1,
- "background-break": 1,
- "background-clip": 1,
- "background-color": 1,
- "background-image": 1,
- "background-origin": 1,
- "background-position": 1,
- "background-repeat": 1,
- "background-size": 1,
- "baseline-shift": 1,
- "binding": 1,
- "bleed": 1,
- "bookmark-label": 1,
- "bookmark-level": 1,
- "bookmark-state": 1,
- "bookmark-target": 1,
- "border": 1,
- "border-bottom": 1,
- "border-bottom-color": 1,
- "border-bottom-left-radius": 1,
- "border-bottom-right-radius": 1,
- "border-bottom-style": 1,
- "border-bottom-width": 1,
- "border-collapse": 1,
- "border-color": 1,
- "border-image": 1,
- "border-image-outset": 1,
- "border-image-repeat": 1,
- "border-image-slice": 1,
- "border-image-source": 1,
- "border-image-width": 1,
- "border-left": 1,
- "border-left-color": 1,
- "border-left-style": 1,
- "border-left-width": 1,
- "border-radius": 1,
- "border-right": 1,
- "border-right-color": 1,
- "border-right-style": 1,
- "border-right-width": 1,
- "border-spacing": 1,
- "border-style": 1,
- "border-top": 1,
- "border-top-color": 1,
- "border-top-left-radius": 1,
- "border-top-right-radius": 1,
- "border-top-style": 1,
- "border-top-width": 1,
- "border-width": 1,
- "bottom": 1,
- "box-align": 1,
- "box-decoration-break": 1,
- "box-direction": 1,
- "box-flex": 1,
- "box-flex-group": 1,
- "box-lines": 1,
- "box-ordinal-group": 1,
- "box-orient": 1,
- "box-pack": 1,
- "box-shadow": 1,
- "box-sizing": 1,
- "break-after": 1,
- "break-before": 1,
- "break-inside": 1,
- "caption-side": 1,
- "clear": 1,
- "clip": 1,
- "color": 1,
- "color-profile": 1,
- "column-count": 1,
- "column-fill": 1,
- "column-gap": 1,
- "column-rule": 1,
- "column-rule-color": 1,
- "column-rule-style": 1,
- "column-rule-width": 1,
- "column-span": 1,
- "column-width": 1,
- "columns": 1,
- "content": 1,
- "counter-increment": 1,
- "counter-reset": 1,
- "crop": 1,
- "cue": 1,
- "cue-after": 1,
- "cue-before": 1,
- "cursor": 1,
- "direction": 1,
- "display": 1,
- "dominant-baseline": 1,
- "drop-initial-after-adjust": 1,
- "drop-initial-after-align": 1,
- "drop-initial-before-adjust": 1,
- "drop-initial-before-align": 1,
- "drop-initial-size": 1,
- "drop-initial-value": 1,
- "elevation": 1,
- "empty-cells": 1,
- "fit": 1,
- "fit-position": 1,
- "float": 1,
- "float-offset": 1,
- "font": 1,
- "font-family": 1,
- "font-size": 1,
- "font-size-adjust": 1,
- "font-stretch": 1,
- "font-style": 1,
- "font-variant": 1,
- "font-weight": 1,
- "grid-columns": 1,
- "grid-rows": 1,
- "hanging-punctuation": 1,
- "height": 1,
- "hyphenate-after": 1,
- "hyphenate-before": 1,
- "hyphenate-character": 1,
- "hyphenate-lines": 1,
- "hyphenate-resource": 1,
- "hyphens": 1,
- "icon": 1,
- "image-orientation": 1,
- "image-rendering": 1,
- "image-resolution": 1,
- "inline-box-align": 1,
- "left": 1,
- "letter-spacing": 1,
- "line-height": 1,
- "line-stacking": 1,
- "line-stacking-ruby": 1,
- "line-stacking-shift": 1,
- "line-stacking-strategy": 1,
- "list-style": 1,
- "list-style-image": 1,
- "list-style-position": 1,
- "list-style-type": 1,
- "margin": 1,
- "margin-bottom": 1,
- "margin-left": 1,
- "margin-right": 1,
- "margin-top": 1,
- "mark": 1,
- "mark-after": 1,
- "mark-before": 1,
- "marks": 1,
- "marquee-direction": 1,
- "marquee-play-count": 1,
- "marquee-speed": 1,
- "marquee-style": 1,
- "max-height": 1,
- "max-width": 1,
- "min-height": 1,
- "min-width": 1,
- "move-to": 1,
- "nav-down": 1,
- "nav-index": 1,
- "nav-left": 1,
- "nav-right": 1,
- "nav-up": 1,
- "opacity": 1,
- "orphans": 1,
- "outline": 1,
- "outline-color": 1,
- "outline-offset": 1,
- "outline-style": 1,
- "outline-width": 1,
- "overflow": 1,
- "overflow-style": 1,
- "overflow-x": 1,
- "overflow-y": 1,
- "padding": 1,
- "padding-bottom": 1,
- "padding-left": 1,
- "padding-right": 1,
- "padding-top": 1,
- "page": 1,
- "page-break-after": 1,
- "page-break-before": 1,
- "page-break-inside": 1,
- "page-policy": 1,
- "pause": 1,
- "pause-after": 1,
- "pause-before": 1,
- "perspective": 1,
- "perspective-origin": 1,
- "phonemes": 1,
- "pitch": 1,
- "pitch-range": 1,
- "play-during": 1,
- "position": 1,
- "presentation-level": 1,
- "punctuation-trim": 1,
- "quotes": 1,
- "rendering-intent": 1,
- "resize": 1,
- "rest": 1,
- "rest-after": 1,
- "rest-before": 1,
- "richness": 1,
- "right": 1,
- "rotation": 1,
- "rotation-point": 1,
- "ruby-align": 1,
- "ruby-overhang": 1,
- "ruby-position": 1,
- "ruby-span": 1,
- "size": 1,
- "speak": 1,
- "speak-header": 1,
- "speak-numeral": 1,
- "speak-punctuation": 1,
- "speech-rate": 1,
- "stress": 1,
- "string-set": 1,
- "table-layout": 1,
- "target": 1,
- "target-name": 1,
- "target-new": 1,
- "target-position": 1,
- "text-align": 1,
- "text-align-last": 1,
- "text-decoration": 1,
- "text-emphasis": 1,
- "text-height": 1,
- "text-indent": 1,
- "text-justify": 1,
- "text-outline": 1,
- "text-shadow": 1,
- "text-transform": 1,
- "text-wrap": 1,
- "top": 1,
- "transform": 1,
- "transform-origin": 1,
- "transform-style": 1,
- "transition": 1,
- "transition-delay": 1,
- "transition-duration": 1,
- "transition-property": 1,
- "transition-timing-function": 1,
- "unicode-bidi": 1,
- "vertical-align": 1,
- "visibility": 1,
- "voice-balance": 1,
- "voice-duration": 1,
- "voice-family": 1,
- "voice-pitch": 1,
- "voice-pitch-range": 1,
- "voice-rate": 1,
- "voice-stress": 1,
- "voice-volume": 1,
- "volume": 1,
- "white-space": 1,
- "white-space-collapse": 1,
- "widows": 1,
- "width": 1,
- "word-break": 1,
- "word-spacing": 1,
- "word-wrap": 1,
- "z-index": 1,
-
- //IE
- "filter": 1,
- "zoom": 1
- };
+ var rule = this;
parser.addListener("property", function(event){
var name = event.property.text.toLowerCase();
-
- if (!properties[name] && name.charAt(0) != "-"){
- reporter.error("Unknown property '" + event.property + "'.", event.line, event.col, rule);
+ if (event.invalid) {
+ reporter.report(event.invalid.message, event.line, event.col, rule);
}
});
}
});
-/*
- * Rule: Don't use classes or IDs with elements (a.foo or a#foo).
- */
CSSLint.addRule({
+ id: "outline-none",
+ name: "Disallow outline: none",
+ desc: "Use of outline: none or outline: 0 should be limited to :focus rules.",
+ browsers: "All",
+ tags: ["Accessibility"],
+ init: function(parser, reporter){
+ var rule = this,
+ lastRule;
+
+ function startRule(event){
+ if (event.selectors){
+ lastRule = {
+ line: event.line,
+ col: event.col,
+ selectors: event.selectors,
+ propCount: 0,
+ outline: false
+ };
+ } else {
+ lastRule = null;
+ }
+ }
+
+ function endRule(event){
+ if (lastRule){
+ if (lastRule.outline){
+ if (lastRule.selectors.toString().toLowerCase().indexOf(":focus") == -1){
+ reporter.report("Outlines should only be modified using :focus.", lastRule.line, lastRule.col, rule);
+ } else if (lastRule.propCount == 1) {
+ reporter.report("Outlines shouldn't be hidden unless other visual changes are made.", lastRule.line, lastRule.col, rule);
+ }
+ }
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
+
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase(),
+ value = event.value;
+
+ if (lastRule){
+ lastRule.propCount++;
+ if (name == "outline" && (value == "none" || value == "0")){
+ lastRule.outline = true;
+ }
+ }
+
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
+
+ }
- //rule information
+});
+CSSLint.addRule({
id: "overqualified-elements",
- name: "Overqualified Elements",
+ name: "Disallow overqualified elements",
desc: "Don't use classes or IDs with elements (a.foo or a#foo).",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
classes = {};
@@ -9109,11 +7215,11 @@ CSSLint.addRule({
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part instanceof parserlib.css.SelectorPart){
+ if (part.type == parser.SELECTOR_PART_TYPE){
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
if (part.elementName && modifier.type == "id"){
- reporter.warn("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule);
+ reporter.report("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule);
} else if (modifier.type == "class"){
if (!classes[modifier]){
@@ -9132,10 +7238,8 @@ CSSLint.addRule({
var prop;
for (prop in classes){
if (classes.hasOwnProperty(prop)){
-
- //one use means that this is overqualified
if (classes[prop].length == 1 && classes[prop][0].part.elementName){
- reporter.warn("Element (" + classes[prop][0].part + ") is overqualified, just use " + classes[prop][0].modifier + " without element name.", classes[prop][0].part.line, classes[prop][0].part.col, rule);
+ reporter.report("Element (" + classes[prop][0].part + ") is overqualified, just use " + classes[prop][0].modifier + " without element name.", classes[prop][0].part.line, classes[prop][0].part.col, rule);
}
}
}
@@ -9143,18 +7247,11 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Headings (h1-h6) should not be qualified (namespaced).
- */
CSSLint.addRule({
-
- //rule information
id: "qualified-headings",
- name: "Qualified Headings",
+ name: "Disallow qualified headings",
desc: "Headings should not be qualified (namespaced).",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
@@ -9169,9 +7266,9 @@ CSSLint.addRule({
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part instanceof parserlib.css.SelectorPart){
+ if (part.type == parser.SELECTOR_PART_TYPE){
if (part.elementName && /h[1-6]/.test(part.elementName.toString()) && j > 0){
- reporter.warn("Heading (" + part.elementName + ") should not be qualified.", part.line, part.col, rule);
+ reporter.report("Heading (" + part.elementName + ") should not be qualified.", part.line, part.col, rule);
}
}
}
@@ -9180,18 +7277,11 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Selectors that look like regular expressions are slow and should be avoided.
- */
CSSLint.addRule({
-
- //rule information
id: "regex-selectors",
- name: "Regex Selectors",
+ name: "Disallow selectors that look like regexs",
desc: "Selectors that look like regular expressions are slow and should be avoided.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
@@ -9206,12 +7296,12 @@ CSSLint.addRule({
selector = selectors[i];
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part instanceof parserlib.css.SelectorPart){
+ if (part.type == parser.SELECTOR_PART_TYPE){
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
if (modifier.type == "attribute"){
if (/([\~\|\^\$\*]=)/.test(modifier)){
- reporter.warn("Attribute selectors with " + RegExp.$1 + " are slow!", modifier.line, modifier.col, rule);
+ reporter.report("Attribute selectors with " + RegExp.$1 + " are slow!", modifier.line, modifier.col, rule);
}
}
@@ -9223,23 +7313,14 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Total number of rules should not exceed x.
- */
CSSLint.addRule({
-
- //rule information
id: "rules-count",
name: "Rules Count",
desc: "Track how many rules there are.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
count = 0;
-
- //count each rule
parser.addListener("startrule", function(){
count++;
});
@@ -9250,50 +7331,153 @@ CSSLint.addRule({
}
});
-/*
- * Rule: Don't use text-indent for image replacement if you need to support rtl.
- *
- */
-/*
- * Should we be checking for rtl/ltr?
- */
-//Commented out due to lack of tests
CSSLint.addRule({
+ id: "shorthand",
+ name: "Require shorthand properties",
+ desc: "Use shorthand properties where possible.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ prop, i, len,
+ propertiesToCheck = {},
+ properties,
+ mapping = {
+ "margin": [
+ "margin-top",
+ "margin-bottom",
+ "margin-left",
+ "margin-right"
+ ],
+ "padding": [
+ "padding-top",
+ "padding-bottom",
+ "padding-left",
+ "padding-right"
+ ]
+ };
+ for (prop in mapping){
+ if (mapping.hasOwnProperty(prop)){
+ for (i=0, len=mapping[prop].length; i < len; i++){
+ propertiesToCheck[mapping[prop][i]] = prop;
+ }
+ }
+ }
+
+ function startRule(event){
+ properties = {};
+ }
+ function endRule(event){
+
+ var prop, i, len, total;
+ for (prop in mapping){
+ if (mapping.hasOwnProperty(prop)){
+ total=0;
+
+ for (i=0, len=mapping[prop].length; i < len; i++){
+ total += properties[mapping[prop][i]] ? 1 : 0;
+ }
+
+ if (total == mapping[prop].length){
+ reporter.report("The properties " + mapping[prop].join(", ") + " can be replaced by " + prop + ".", event.line, event.col, rule);
+ }
+ }
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("property", function(event){
+ var name = event.property.toString().toLowerCase(),
+ value = event.value.parts[0].value;
+
+ if (propertiesToCheck[name]){
+ properties[name] = 1;
+ }
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+
+ }
+
+});
+CSSLint.addRule({
+ id: "star-property-hack",
+ name: "Disallow properties with a star prefix",
+ desc: "Checks for the star property hack (targets IE6/7)",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+ parser.addListener("property", function(event){
+ var property = event.property;
- //rule information
+ if (property.hack == "*") {
+ reporter.report("Property with star prefix found.", event.property.line, event.property.col, rule);
+ }
+ });
+ }
+});
+CSSLint.addRule({
id: "text-indent",
- name: "Text Indent",
+ name: "Disallow negative text-indent",
desc: "Checks for text indent less than -99px",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
- var rule = this;
-
- //check for use of "font-size"
+ var rule = this,
+ textIndent,
+ direction;
+
+
+ function startRule(event){
+ textIndent = false;
+ direction = "inherit";
+ }
+ function endRule(event){
+ if (textIndent && direction != "ltr"){
+ reporter.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", textIndent.line, textIndent.col, rule);
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
parser.addListener("property", function(event){
- var name = event.property,
- value = event.value.parts[0].value;
+ var name = event.property.toString().toLowerCase(),
+ value = event.value;
- if (name == "text-indent" && value < -99){
- reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
+ if (name == "text-indent" && value.parts[0].value < -99){
+ textIndent = event.property;
+ } else if (name == "direction" && value == "ltr"){
+ direction = "ltr";
}
});
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+
}
});
-/*
- * Rule: Headings (h1-h6) should be defined only once.
- */
CSSLint.addRule({
+ id: "underscore-property-hack",
+ name: "Disallow properties with an underscore prefix",
+ desc: "Checks for the underscore property hack (targets IE6)",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+ parser.addListener("property", function(event){
+ var property = event.property;
- //rule information
+ if (property.hack == "_") {
+ reporter.report("Property with underscore prefix found.", event.property.line, event.property.col, rule);
+ }
+ });
+ }
+});
+CSSLint.addRule({
id: "unique-headings",
- name: "Unique Headings",
+ name: "Headings should only be defined once",
desc: "Headings should be defined only once.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
@@ -9310,35 +7494,56 @@ CSSLint.addRule({
var selectors = event.selectors,
selector,
part,
- i;
+ pseudo,
+ i, j;
for (i=0; i < selectors.length; i++){
selector = selectors[i];
part = selector.parts[selector.parts.length-1];
- if (part.elementName && /(h[1-6])/.test(part.elementName.toString())){
- headings[RegExp.$1]++;
- if (headings[RegExp.$1] > 1) {
- reporter.warn("Heading (" + part.elementName + ") has already been defined.", part.line, part.col, rule);
+ if (part.elementName && /(h[1-6])/i.test(part.elementName.toString())){
+
+ for (j=0; j < part.modifiers.length; j++){
+ if (part.modifiers[j].type == "pseudo"){
+ pseudo = true;
+ break;
+ }
+ }
+
+ if (!pseudo){
+ headings[RegExp.$1]++;
+ if (headings[RegExp.$1] > 1) {
+ reporter.report("Heading (" + part.elementName + ") has already been defined.", part.line, part.col, rule);
+ }
}
}
}
});
+
+ parser.addListener("endstylesheet", function(event){
+ var prop,
+ messages = [];
+
+ for (prop in headings){
+ if (headings.hasOwnProperty(prop)){
+ if (headings[prop] > 1){
+ messages.push(headings[prop] + " " + prop + "s");
+ }
+ }
+ }
+
+ if (messages.length){
+ reporter.rollupWarn("You have " + messages.join(", ") + " defined in this stylesheet.", rule);
+ }
+ });
}
});
-/*
- * Rule: Don't use universal selector because it's slow.
- */
CSSLint.addRule({
-
- //rule information
id: "universal-selector",
- name: "Universal Selector",
+ name: "Disallow universal selector",
desc: "The universal selector (*) is known to be slow.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
@@ -9354,61 +7559,123 @@ CSSLint.addRule({
part = selector.parts[selector.parts.length-1];
if (part.elementName == "*"){
- reporter.warn(rule.desc, part.line, part.col, rule);
+ reporter.report(rule.desc, part.line, part.col, rule);
}
}
});
}
});
-/*
- * Rule: When using a vendor-prefixed property, make sure to
- * include the standard one.
- */
CSSLint.addRule({
+ id: "unqualified-attributes",
+ name: "Disallow unqualified attribute selectors",
+ desc: "Unqualified attribute selectors are known to be slow.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("startrule", function(event){
+
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ i, j, k;
- //rule information
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+
+ part = selector.parts[selector.parts.length-1];
+ if (part.type == parser.SELECTOR_PART_TYPE){
+ for (k=0; k < part.modifiers.length; k++){
+ modifier = part.modifiers[k];
+ if (modifier.type == "attribute" && (!part.elementName || part.elementName == "*")){
+ reporter.report(rule.desc, part.line, part.col, rule);
+ }
+ }
+ }
+
+ }
+ });
+ }
+
+});
+CSSLint.addRule({
id: "vendor-prefix",
- name: "Vendor Prefix",
+ name: "Require standard property with vendor prefix",
desc: "When using a vendor-prefixed property, make sure to include the standard one.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this,
properties,
num,
propertiesToCheck = {
- "-moz-border-radius": "border-radius",
"-webkit-border-radius": "border-radius",
"-webkit-border-top-left-radius": "border-top-left-radius",
"-webkit-border-top-right-radius": "border-top-right-radius",
"-webkit-border-bottom-left-radius": "border-bottom-left-radius",
"-webkit-border-bottom-right-radius": "border-bottom-right-radius",
+
+ "-o-border-radius": "border-radius",
+ "-o-border-top-left-radius": "border-top-left-radius",
+ "-o-border-top-right-radius": "border-top-right-radius",
+ "-o-border-bottom-left-radius": "border-bottom-left-radius",
+ "-o-border-bottom-right-radius": "border-bottom-right-radius",
+
+ "-moz-border-radius": "border-radius",
"-moz-border-radius-topleft": "border-top-left-radius",
"-moz-border-radius-topright": "border-top-right-radius",
"-moz-border-radius-bottomleft": "border-bottom-left-radius",
- "-moz-border-radius-bottomright": "border-bottom-right-radius",
+ "-moz-border-radius-bottomright": "border-bottom-right-radius",
+
+ "-moz-column-count": "column-count",
+ "-webkit-column-count": "column-count",
+
+ "-moz-column-gap": "column-gap",
+ "-webkit-column-gap": "column-gap",
+
+ "-moz-column-rule": "column-rule",
+ "-webkit-column-rule": "column-rule",
+
+ "-moz-column-rule-style": "column-rule-style",
+ "-webkit-column-rule-style": "column-rule-style",
+
+ "-moz-column-rule-color": "column-rule-color",
+ "-webkit-column-rule-color": "column-rule-color",
+
+ "-moz-column-rule-width": "column-rule-width",
+ "-webkit-column-rule-width": "column-rule-width",
+
+ "-moz-column-width": "column-width",
+ "-webkit-column-width": "column-width",
+
+ "-webkit-column-span": "column-span",
+ "-webkit-columns": "columns",
+
"-moz-box-shadow": "box-shadow",
"-webkit-box-shadow": "box-shadow",
+
"-moz-transform" : "transform",
"-webkit-transform" : "transform",
"-o-transform" : "transform",
"-ms-transform" : "transform",
+
+ "-moz-transform-origin" : "transform-origin",
+ "-webkit-transform-origin" : "transform-origin",
+ "-o-transform-origin" : "transform-origin",
+ "-ms-transform-origin" : "transform-origin",
+
"-moz-box-sizing" : "box-sizing",
"-webkit-box-sizing" : "box-sizing",
+
"-moz-user-select" : "user-select",
"-khtml-user-select" : "user-select",
"-webkit-user-select" : "user-select"
};
-
- //event handler for beginning of rules
function startRule(){
properties = {};
num=1;
}
-
- //event handler for end of rules
function endRule(event){
var prop,
i, len,
@@ -9428,11 +7695,10 @@ CSSLint.addRule({
actual = needsStandard[i].actual;
if (!properties[needed]){
- reporter.warn("Missing standard property '" + needed + "' to go along with '" + actual + "'.", event.line, event.col, rule);
+ reporter.report("Missing standard property '" + needed + "' to go along with '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
} else {
- //make sure standard property is last
if (properties[needed][0].pos < properties[actual][0].pos){
- reporter.warn("Standard property '" + needed + "' should come after vendor-prefixed property '" + actual + "'.", event.line, event.col, rule);
+ reporter.report("Standard property '" + needed + "' should come after vendor-prefixed property '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
}
}
}
@@ -9441,6 +7707,9 @@ CSSLint.addRule({
parser.addListener("startrule", startRule);
parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
parser.addListener("property", function(event){
var name = event.property.text.toLowerCase();
@@ -9454,76 +7723,27 @@ CSSLint.addRule({
parser.addListener("endrule", endRule);
parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
}
});
-/*
- * Rule: If an element has a width of 100%, be careful when placing within
- * an element that has padding. It may look strange.
- */
-//Commented out pending further review.
-/*CSSLint.addRule({
-
- //rule information
- id: "width-100",
- name: "Width 100%",
- desc: "Be careful when using width: 100% on elements.",
- browsers: "All",
-
- //initialization
- init: function(parser, reporter){
- var rule = this,
- width100,
- boxsizing;
-
- parser.addListener("startrule", function(){
- width100 = null;
- boxsizing = false;
- });
-
- parser.addListener("property", function(event){
- var name = event.property.text.toLowerCase(),
- value = event.value;
-
- if (name == "width" && value == "100%"){
- width100 = event.property;
- } else if (name == "box-sizing" || /\-(?:webkit|ms|moz)\-box-sizing/.test(name)){ //means you know what you're doing
- boxsizing = true;
- }
- });
-
- parser.addListener("endrule", function(){
- if (width100 && !boxsizing){
- reporter.warn("Elements with a width of 100% may not appear as you expect inside of other elements.", width100.line, width100.col, rule);
- }
- });
- }
-
-});*/
-/*
- * Rule: You don't need to specify units when a value is 0.
- */
CSSLint.addRule({
-
- //rule information
id: "zero-units",
- name: "Zero Units",
+ name: "Disallow units for 0 values",
desc: "You don't need to specify units when a value is 0.",
browsers: "All",
-
- //initialization
init: function(parser, reporter){
var rule = this;
-
- //count how many times "float" is used
parser.addListener("property", function(event){
var parts = event.value.parts,
i = 0,
len = parts.length;
while(i < len){
- if ((parts[i].units || parts[i].type == "percentage") && parts[i].value === 0){
- reporter.warn("Values of 0 shouldn't have units specified.", parts[i].line, parts[i].col, rule);
+ if ((parts[i].units || parts[i].type == "percentage") && parts[i].value === 0 && parts[i].type != "time"){
+ reporter.report("Values of 0 shouldn't have units specified.", parts[i].line, parts[i].col, rule);
}
i++;
}
@@ -9534,5 +7754,8 @@ CSSLint.addRule({
});
+
exports.CSSLint = CSSLint;
+
+
});
diff --git a/contexts/data/lib/ace/worker-javascript.js b/contexts/data/lib/ace/worker-javascript.js
index e48c6e8..8fa92b6 100644
--- a/contexts/data/lib/ace/worker-javascript.js
+++ b/contexts/data/lib/ace/worker-javascript.js
@@ -1,8 +1,16 @@
"no use strict";
+if (typeof window != "undefined" && window.document)
+ throw "atempt to load ace worker into main window instead of webWorker";
+
var console = {
- log: function(msg) {
- postMessage({type: "log", data: msg});
+ log: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ },
+ error: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
}
};
var window = {
@@ -18,11 +26,11 @@ var normalizeModule = function(parentId, moduleName) {
// normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- var moduleName = base + "/" + moduleName;
+ moduleName = base + "/" + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- var moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -30,13 +38,16 @@ var normalizeModule = function(parentId, moduleName) {
};
var require = function(parentId, id) {
- var id = normalizeModule(parentId, id);
-
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = normalizeModule(parentId, id);
+
var module = require.modules[id];
if (module) {
if (!module.initialized) {
- module.exports = module.factory().exports;
module.initialized = true;
+ module.exports = module.factory().exports;
}
return module.exports;
}
@@ -56,6 +67,10 @@ require.tlns = {};
var define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = require.id;
+ }
} else if (arguments.length == 1) {
factory = id;
id = require.id;
@@ -123,7 +138,10 @@ var sender;
onmessage = function(e) {
var msg = e.data;
if (msg.command) {
- main[msg.command].apply(main, msg.args);
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
}
else if (msg.init) {
initBaseUrls(msg.tlns);
@@ -137,40 +155,16 @@ onmessage = function(e) {
}
};
// vim:set ts=4 sts=4 sw=4 st:
-// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Irakli Gozalishvili Copyright (C) 2010 MIT License
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
-"use strict";
+
require("./regexp");
require("./es5-shim");
-});/**
- * Based on code from:
- *
- * XRegExp 1.5.0
- * (c) 2007-2010 Steven Levithan
- * MIT License
- * <http://xregexp.com>
- * Provides an augmented, extensible, cross-browser implementation of regular expressions,
- * including support for additional syntax, flags, and methods
- */
+});
define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
- //---------------------------------
- // Private variables
- //---------------------------------
var real = {
exec: RegExp.prototype.exec,
@@ -186,25 +180,14 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
return !x.lastIndex;
}();
- //---------------------------------
- // Overriden native methods
- //---------------------------------
-
- // Adds named capture support (with backreferences returned as `result.name`), and fixes two
- // cross-browser issues per ES3:
- // - Captured values for nonparticipating capturing groups should be returned as `undefined`,
- // rather than the empty string.
- // - `lastIndex` should not be incremented after zero-length matches.
+ if (compliantLastIndexIncrement && compliantExecNpcg)
+ return;
RegExp.prototype.exec = function (str) {
var match = real.exec.apply(this, arguments),
name, r2;
- if (match) {
- // Fix browsers whose `exec` methods don't consistently return `undefined` for
- // nonparticipating capturing groups
+ if ( typeof(str) == 'string' && match) {
if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
- // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
- // matching due to characters outside the match
real.replace.call(str.slice(match.index), r2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined)
@@ -212,7 +195,6 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
}
});
}
- // Attach named capture properties
if (this._xregexp && this._xregexp.captureNames) {
for (var i = 1; i < match.length; i++) {
name = this._xregexp.captureNames[i - 1];
@@ -220,38 +202,27 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
match[name] = match[i];
}
}
- // Fix browsers that increment `lastIndex` after zero-length matches
if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
}
return match;
};
-
- // Don't override `test` if it won't change anything
if (!compliantLastIndexIncrement) {
- // Fix browser bug in native method
RegExp.prototype.test = function (str) {
- // Use the native `exec` to skip some processing overhead, even though the overriden
- // `exec` would take care of the `lastIndex` fix
var match = real.exec.call(this, str);
- // Fix browsers that increment `lastIndex` after zero-length matches
if (match && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
return !!match;
};
}
- //---------------------------------
- // Private helper functions
- //---------------------------------
-
function getNativeFlags (regex) {
return (regex.global ? "g" : "") +
(regex.ignoreCase ? "i" : "") +
(regex.multiline ? "m" : "") +
(regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
(regex.sticky ? "y" : "");
- };
+ }
function indexOf (array, item, from) {
if (Array.prototype.indexOf) // Use the native array method if available
@@ -261,94 +232,21 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex
return i;
}
return -1;
- };
+ }
-});// vim: ts=4 sts=4 sw=4 expandtab
-// -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
-// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
-// -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
-// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
-// -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
-// -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
-// -- kossnocorp Sasha Koss XXX TODO License or CLA
-// -- bryanforbes Bryan Forbes XXX TODO License or CLA
-// -- killdream Quildreen Motta Copyright (C) 2011 MIT Licence
-// -- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD License
-// -- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
-// -- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
-// -- iwyg XXX TODO License or CLA
-// -- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
-// -- xavierm02 Montillet Xavier XXX TODO License or CLA
-// -- Raynos Raynos XXX TODO License or CLA
-// -- samsonjs Sami Samhuri Copyright (C) 2010 MIT License
-// -- rwldrn Rick Waldron Copyright (C) 2011 MIT License
-// -- lexer Alexey Zakharov XXX TODO License or CLA
-
-/*!
- Copyright (c) 2009, 280 North Inc. http://280north.com/
- MIT License. http://github.com/280north/narwhal/blob/master/README.md
-*/
+});
define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-/**
- * Brings an environment as close to ECMAScript 5 compliance
- * as is possible with the facilities of erstwhile engines.
- *
- * Annotated ES5: http://es5.github.com/ (specific links below)
- * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
- *
- * @module
- */
-
-/*whatsupdoc*/
-
-//
-// Function
-// ========
-//
-
-// ES-5 15.3.4.5
-// http://es5.github.com/#x15.3.4.5
-
if (!Function.prototype.bind) {
Function.prototype.bind = function bind(that) { // .length is 1
- // 1. Let Target be the this value.
var target = this;
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
if (typeof target != "function")
throw new TypeError(); // TODO message
- // 3. Let A be a new (possibly empty) internal list of all of the
- // argument values provided after thisArg (arg1, arg2 etc), in order.
- // XXX slicedArgs will stand in for "A" if used
var args = slice.call(arguments, 1); // for normal call
- // 4. Let F be a new native ECMAScript object.
- // 11. Set the [[Prototype]] internal property of F to the standard
- // built-in Function prototype object as specified in 15.3.3.1.
- // 12. Set the [[Call]] internal property of F as described in
- // 15.3.4.5.1.
- // 13. Set the [[Construct]] internal property of F as described in
- // 15.3.4.5.2.
- // 14. Set the [[HasInstance]] internal property of F as described in
- // 15.3.4.5.3.
var bound = function () {
if (this instanceof bound) {
- // 15.3.4.5.2 [[Construct]]
- // When the [[Construct]] internal method of a function object,
- // F that was created using the bind function is called with a
- // list of arguments ExtraArgs, the following steps are taken:
- // 1. Let target be the value of F's [[TargetFunction]]
- // internal property.
- // 2. If target has no [[Construct]] internal method, a
- // TypeError exception is thrown.
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Construct]] internal
- // method of target providing args as the arguments.
var F = function(){};
F.prototype = target.prototype;
@@ -363,25 +261,6 @@ if (!Function.prototype.bind) {
return self;
} else {
- // 15.3.4.5.1 [[Call]]
- // When the [[Call]] internal method of a function object, F,
- // which was created using the bind function is called with a
- // this value and a list of arguments ExtraArgs, the following
- // steps are taken:
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
- // property.
- // 3. Let target be the value of F's [[TargetFunction]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Call]] internal method
- // of target providing boundThis as the this value and
- // providing args as the arguments.
-
- // equiv: target.call(this, ...boundArgs, ...args)
return target.apply(
that,
args.concat(slice.call(arguments))
@@ -390,53 +269,15 @@ if (!Function.prototype.bind) {
}
};
- // XXX bound.length is never writable, so don't even try
- //
- // 15. If the [[Class]] internal property of Target is "Function", then
- // a. Let L be the length property of Target minus the length of A.
- // b. Set the length own property of F to either 0 or L, whichever is
- // larger.
- // 16. Else set the length own property of F to 0.
- // 17. Set the attributes of the length own property of F to the values
- // specified in 15.3.5.1.
-
- // TODO
- // 18. Set the [[Extensible]] internal property of F to true.
-
- // TODO
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
- // 20. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
- // false.
- // 21. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
- // and false.
-
- // TODO
- // NOTE Function objects created using Function.prototype.bind do not
- // have a prototype property or the [[Code]], [[FormalParameters]], and
- // [[Scope]] internal properties.
- // XXX can't delete prototype in pure-js.
-
- // 22. Return F.
return bound;
};
}
-
-// Shortcut to an often accessed properties, in order to avoid multiple
-// dereference that costs universally.
-// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
-// us it in defining shortcuts.
var call = Function.prototype.call;
var prototypeOfArray = Array.prototype;
var prototypeOfObject = Object.prototype;
var slice = prototypeOfArray.slice;
var toString = call.bind(prototypeOfObject.toString);
var owns = call.bind(prototypeOfObject.hasOwnProperty);
-
-// If JS engine supports accessors creating shortcuts.
var defineGetter;
var defineSetter;
var lookupGetter;
@@ -448,70 +289,35 @@ if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
}
-
-//
-// Array
-// =====
-//
-
-// ES5 15.4.3.2
-// http://es5.github.com/#x15.4.3.2
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
if (!Array.isArray) {
Array.isArray = function isArray(obj) {
return toString(obj) == "[object Array]";
};
}
-
-// The IsCallable() check in the Array functions
-// has been replaced with a strict check on the
-// internal class of the object to trap cases where
-// the provided function was actually a regular
-// expression literal, which in V8 and
-// JavaScriptCore is a typeof "function". Only in
-// V8 are regular expression literals permitted as
-// reduce parameters, so it is desirable in the
-// general case for the shim to match the more
-// strict and common behavior of rejecting regular
-// expressions.
-
-// ES5 15.4.4.18
-// http://es5.github.com/#x15.4.4.18
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
if (!Array.prototype.forEach) {
Array.prototype.forEach = function forEach(fun /*, thisp*/) {
var self = toObject(this),
thisp = arguments[1],
i = 0,
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
while (i < length) {
if (i in self) {
- // Invoke the callback function with call, passing arguments:
- // context, property value, property key, thisArg object context
fun.call(thisp, self[i], i, self);
}
i++;
}
};
}
-
-// ES5 15.4.4.19
-// http://es5.github.com/#x15.4.4.19
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
if (!Array.prototype.map) {
Array.prototype.map = function map(fun /*, thisp*/) {
var self = toObject(this),
length = self.length >>> 0,
result = Array(length),
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -523,18 +329,12 @@ if (!Array.prototype.map) {
return result;
};
}
-
-// ES5 15.4.4.20
-// http://es5.github.com/#x15.4.4.20
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
if (!Array.prototype.filter) {
Array.prototype.filter = function filter(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
result = [],
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -546,17 +346,11 @@ if (!Array.prototype.filter) {
return result;
};
}
-
-// ES5 15.4.4.16
-// http://es5.github.com/#x15.4.4.16
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
if (!Array.prototype.every) {
Array.prototype.every = function every(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -568,17 +362,11 @@ if (!Array.prototype.every) {
return true;
};
}
-
-// ES5 15.4.4.17
-// http://es5.github.com/#x15.4.4.17
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
if (!Array.prototype.some) {
Array.prototype.some = function some(fun /*, thisp */) {
var self = toObject(this),
length = self.length >>> 0,
thisp = arguments[1];
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
@@ -590,21 +378,13 @@ if (!Array.prototype.some) {
return false;
};
}
-
-// ES5 15.4.4.21
-// http://es5.github.com/#x15.4.4.21
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
if (!Array.prototype.reduce) {
Array.prototype.reduce = function reduce(fun /*, initial*/) {
var self = toObject(this),
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
-
- // no value to return if no initial value and an empty array
if (!length && arguments.length == 1)
throw new TypeError(); // TODO message
@@ -618,8 +398,6 @@ if (!Array.prototype.reduce) {
result = self[i++];
break;
}
-
- // if array contains no values, no initial value to return
if (++i >= length)
throw new TypeError(); // TODO message
} while (true);
@@ -633,21 +411,13 @@ if (!Array.prototype.reduce) {
return result;
};
}
-
-// ES5 15.4.4.22
-// http://es5.github.com/#x15.4.4.22
-// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
if (!Array.prototype.reduceRight) {
Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
var self = toObject(this),
length = self.length >>> 0;
-
- // If no callback function or if callback is not a callable function
if (toString(fun) != "[object Function]") {
throw new TypeError(); // TODO message
}
-
- // no value to return if no initial value, empty array
if (!length && arguments.length == 1)
throw new TypeError(); // TODO message
@@ -660,8 +430,6 @@ if (!Array.prototype.reduceRight) {
result = self[i--];
break;
}
-
- // if array contains no values, no initial value to return
if (--i < 0)
throw new TypeError(); // TODO message
} while (true);
@@ -675,10 +443,6 @@ if (!Array.prototype.reduceRight) {
return result;
};
}
-
-// ES5 15.4.4.14
-// http://es5.github.com/#x15.4.4.14
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
var self = toObject(this),
@@ -690,8 +454,6 @@ if (!Array.prototype.indexOf) {
var i = 0;
if (arguments.length > 1)
i = toInteger(arguments[1]);
-
- // handle negative indices
i = i >= 0 ? i : Math.max(0, length + i);
for (; i < length; i++) {
if (i in self && self[i] === sought) {
@@ -701,10 +463,6 @@ if (!Array.prototype.indexOf) {
return -1;
};
}
-
-// ES5 15.4.4.15
-// http://es5.github.com/#x15.4.4.15
-// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
if (!Array.prototype.lastIndexOf) {
Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
var self = toObject(this),
@@ -715,7 +473,6 @@ if (!Array.prototype.lastIndexOf) {
var i = length - 1;
if (arguments.length > 1)
i = Math.min(i, toInteger(arguments[1]));
- // handle negative indices
i = i >= 0 ? i : length - Math.abs(i);
for (; i >= 0; i--) {
if (i in self && sought === self[i])
@@ -724,18 +481,7 @@ if (!Array.prototype.lastIndexOf) {
return -1;
};
}
-
-//
-// Object
-// ======
-//
-
-// ES5 15.2.3.2
-// http://es5.github.com/#x15.2.3.2
if (!Object.getPrototypeOf) {
- // https://github.com/kriskowal/es5-shim/issues#issue/2
- // http://ejohn.org/blog/objectgetprototypeof/
- // recommended by fschaefer on github
Object.getPrototypeOf = function getPrototypeOf(object) {
return object.__proto__ || (
object.constructor ?
@@ -744,84 +490,73 @@ if (!Object.getPrototypeOf) {
);
};
}
-
-// ES5 15.2.3.3
-// http://es5.github.com/#x15.2.3.3
if (!Object.getOwnPropertyDescriptor) {
var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
"non-object: ";
Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
if ((typeof object != "object" && typeof object != "function") || object === null)
throw new TypeError(ERR_NON_OBJECT + object);
- // If object does not owns property return undefined immediately.
if (!owns(object, property))
return;
var descriptor, getter, setter;
-
- // If object has a property then it's for sure both `enumerable` and
- // `configurable`.
descriptor = { enumerable: true, configurable: true };
-
- // If JS engine supports accessor properties then property may be a
- // getter or setter.
if (supportsAccessors) {
- // Unfortunately `__lookupGetter__` will return a getter even
- // if object has own non getter property along with a same named
- // inherited getter. To avoid misbehavior we temporary remove
- // `__proto__` so that `__lookupGetter__` will return getter only
- // if it's owned by an object.
var prototype = object.__proto__;
object.__proto__ = prototypeOfObject;
var getter = lookupGetter(object, property);
var setter = lookupSetter(object, property);
-
- // Once we have getter and setter we can put values back.
object.__proto__ = prototype;
if (getter || setter) {
if (getter) descriptor.get = getter;
if (setter) descriptor.set = setter;
-
- // If it was accessor property we're done and return here
- // in order to avoid adding `value` to the descriptor.
return descriptor;
}
}
-
- // If we got this far we know that object has an own property that is
- // not an accessor so we set it as a value and return descriptor.
descriptor.value = object[property];
return descriptor;
};
}
-
-// ES5 15.2.3.4
-// http://es5.github.com/#x15.2.3.4
if (!Object.getOwnPropertyNames) {
Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
return Object.keys(object);
};
}
-
-// ES5 15.2.3.5
-// http://es5.github.com/#x15.2.3.5
if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
Object.create = function create(prototype, properties) {
var object;
if (prototype === null) {
- object = { "__proto__": null };
+ object = createEmpty();
} else {
if (typeof prototype != "object")
throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
var Type = function () {};
Type.prototype = prototype;
object = new Type();
- // IE has no built-in implementation of `Object.getPrototypeOf`
- // neither `__proto__`, but this manually setting `__proto__` will
- // guarantee that `Object.getPrototypeOf` will work as expected with
- // objects created using `Object.create`
object.__proto__ = prototype;
}
if (properties !== void 0)
@@ -830,29 +565,13 @@ if (!Object.create) {
};
}
-// ES5 15.2.3.6
-// http://es5.github.com/#x15.2.3.6
-
-// Patch for WebKit and IE8 standard mode
-// Designed by hax <hax.github.com>
-// related issue: https://github.com/kriskowal/es5-shim/issues#issue/5
-// IE8 Reference:
-// http://msdn.microsoft.com/en-us/library/dd282900.aspx
-// http://msdn.microsoft.com/en-us/library/dd229916.aspx
-// WebKit Bugs:
-// https://bugs.webkit.org/show_bug.cgi?id=36423
-
function doesDefinePropertyWork(object) {
try {
Object.defineProperty(object, "sentinel", {});
return "sentinel" in object;
} catch (exception) {
- // returns falsy
}
}
-
-// check whether defineProperty works if it's given. Otherwise,
-// shim partially.
if (Object.defineProperty) {
var definePropertyWorksOnObject = doesDefinePropertyWork({});
var definePropertyWorksOnDom = typeof document == "undefined" ||
@@ -873,48 +592,21 @@ if (!Object.defineProperty || definePropertyFallback) {
throw new TypeError(ERR_NON_OBJECT_TARGET + object);
if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
-
- // make a valiant attempt to use the real defineProperty
- // for I8's DOM elements.
if (definePropertyFallback) {
try {
return definePropertyFallback.call(Object, object, property, descriptor);
} catch (exception) {
- // try the shim if the real one doesn't work
}
}
-
- // If it's a data property.
if (owns(descriptor, "value")) {
- // fail silently if "writable", "enumerable", or "configurable"
- // are requested but not supported
- /*
- // alternate approach:
- if ( // can't implement these features; allow false but not true
- !(owns(descriptor, "writable") ? descriptor.writable : true) ||
- !(owns(descriptor, "enumerable") ? descriptor.enumerable : true) ||
- !(owns(descriptor, "configurable") ? descriptor.configurable : true)
- )
- throw new RangeError(
- "This implementation of Object.defineProperty does not " +
- "support configurable, enumerable, or writable."
- );
- */
if (supportsAccessors && (lookupGetter(object, property) ||
lookupSetter(object, property)))
{
- // As accessors are supported only on engines implementing
- // `__proto__` we can safely override `__proto__` while defining
- // a property to make sure that we don't hit an inherited
- // accessor.
var prototype = object.__proto__;
object.__proto__ = prototypeOfObject;
- // Deleting a property anyway since getter / setter may be
- // defined on object itself.
delete object[property];
object[property] = descriptor.value;
- // Setting original `__proto__` back now.
object.__proto__ = prototype;
} else {
object[property] = descriptor.value;
@@ -922,7 +614,6 @@ if (!Object.defineProperty || definePropertyFallback) {
} else {
if (!supportsAccessors)
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- // If we got that far then getters and setters can be defined !!
if (owns(descriptor, "get"))
defineGetter(object, property, descriptor.get);
if (owns(descriptor, "set"))
@@ -932,9 +623,6 @@ if (!Object.defineProperty || definePropertyFallback) {
return object;
};
}
-
-// ES5 15.2.3.7
-// http://es5.github.com/#x15.2.3.7
if (!Object.defineProperties) {
Object.defineProperties = function defineProperties(object, properties) {
for (var property in properties) {
@@ -944,30 +632,16 @@ if (!Object.defineProperties) {
return object;
};
}
-
-// ES5 15.2.3.8
-// http://es5.github.com/#x15.2.3.8
if (!Object.seal) {
Object.seal = function seal(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// ES5 15.2.3.9
-// http://es5.github.com/#x15.2.3.9
if (!Object.freeze) {
Object.freeze = function freeze(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// detect a Rhino bug and patch it
try {
Object.freeze(function () {});
} catch (exception) {
@@ -981,43 +655,26 @@ try {
};
})(Object.freeze);
}
-
-// ES5 15.2.3.10
-// http://es5.github.com/#x15.2.3.10
if (!Object.preventExtensions) {
Object.preventExtensions = function preventExtensions(object) {
- // this is misleading and breaks feature-detection, but
- // allows "securable" code to "gracefully" degrade to working
- // but insecure code.
return object;
};
}
-
-// ES5 15.2.3.11
-// http://es5.github.com/#x15.2.3.11
if (!Object.isSealed) {
Object.isSealed = function isSealed(object) {
return false;
};
}
-
-// ES5 15.2.3.12
-// http://es5.github.com/#x15.2.3.12
if (!Object.isFrozen) {
Object.isFrozen = function isFrozen(object) {
return false;
};
}
-
-// ES5 15.2.3.13
-// http://es5.github.com/#x15.2.3.13
if (!Object.isExtensible) {
Object.isExtensible = function isExtensible(object) {
- // 1. If Type(O) is not Object throw a TypeError exception.
if (Object(object) === object) {
throw new TypeError(); // TODO message
}
- // 2. Return the Boolean value of the [[Extensible]] internal property of O.
var name = '';
while (owns(object, name)) {
name += '?';
@@ -1028,11 +685,7 @@ if (!Object.isExtensible) {
return returnValue;
};
}
-
-// ES5 15.2.3.14
-// http://es5.github.com/#x15.2.3.14
if (!Object.keys) {
- // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
var hasDontEnumBug = true,
dontEnums = [
"toString",
@@ -1073,26 +726,11 @@ if (!Object.keys) {
};
}
-
-//
-// Date
-// ====
-//
-
-// ES5 15.9.5.43
-// http://es5.github.com/#x15.9.5.43
-// This function returns a String value represent the instance in time
-// represented by this Date object. The format of the String is the Date Time
-// string format defined in 15.9.1.15. All fields are present in the String.
-// The time zone is always UTC, denoted by the suffix Z. If the time value of
-// this object is not a finite Number a RangeError exception is thrown.
if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
Date.prototype.toISOString = function toISOString() {
var result, length, value, year;
if (!isFinite(this))
throw new RangeError;
-
- // the date time string format is specified in 15.9.1.15.
result = [this.getUTCMonth() + 1, this.getUTCDate(),
this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
year = this.getUTCFullYear();
@@ -1101,76 +739,32 @@ if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().inde
length = result.length;
while (length--) {
value = result[length];
- // pad months, days, hours, minutes, and seconds to have two digits.
if (value < 10)
result[length] = "0" + value;
}
- // pad milliseconds to have three digits.
return year + "-" + result.slice(0, 2).join("-") + "T" + result.slice(2).join(":") + "." +
("000" + this.getUTCMilliseconds()).slice(-3) + "Z";
}
}
-
-// ES5 15.9.4.4
-// http://es5.github.com/#x15.9.4.4
if (!Date.now) {
Date.now = function now() {
return new Date().getTime();
};
}
-
-// ES5 15.9.5.44
-// http://es5.github.com/#x15.9.5.44
-// This function provides a String representation of a Date object for use by
-// JSON.stringify (15.12.3).
if (!Date.prototype.toJSON) {
Date.prototype.toJSON = function toJSON(key) {
- // When the toJSON method is called with argument key, the following
- // steps are taken:
-
- // 1. Let O be the result of calling ToObject, giving it the this
- // value as its argument.
- // 2. Let tv be ToPrimitive(O, hint Number).
- // 3. If tv is a Number and is not finite, return null.
- // XXX
- // 4. Let toISO be the result of calling the [[Get]] internal method of
- // O with argument "toISOString".
- // 5. If IsCallable(toISO) is false, throw a TypeError exception.
if (typeof this.toISOString != "function")
throw new TypeError(); // TODO message
- // 6. Return the result of calling the [[Call]] internal method of
- // toISO with O as the this value and an empty argument list.
return this.toISOString();
-
- // NOTE 1 The argument is ignored.
-
- // NOTE 2 The toJSON function is intentionally generic; it does not
- // require that its this value be a Date object. Therefore, it can be
- // transferred to other kinds of objects for use as a method. However,
- // it does require that any such object have a toISOString method. An
- // object is free to use the argument key to filter its
- // stringification.
};
}
-
-// ES5 15.9.4.2
-// http://es5.github.com/#x15.9.4.2
-// based on work shared by Daniel Friesen (dantman)
-// http://gist.github.com/303249
if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
- // XXX global assignment won't work in embeddings that use
- // an alternate object for the context.
Date = (function(NativeDate) {
-
- // Date.length === 7
var Date = function Date(Y, M, D, h, m, s, ms) {
var length = arguments.length;
if (this instanceof NativeDate) {
var date = length == 1 && String(Y) === Y ? // isString(Y)
- // We explicitly pass it through parse:
new NativeDate(Date.parse(Y)) :
- // We have to manually make calls depending on argument
- // length here
length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
length >= 5 ? new NativeDate(Y, M, D, h, m) :
@@ -1179,14 +773,11 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
length >= 2 ? new NativeDate(Y, M) :
length >= 1 ? new NativeDate(Y) :
new NativeDate();
- // Prevent mixups with unfixed Date object
date.constructor = Date;
return date;
}
return NativeDate.apply(this, arguments);
};
-
- // 15.9.1.15 Date Time String Format.
var isoDateExpression = new RegExp("^" +
"(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + 6-digit extended year
"(?:-(\\d{2})" + // optional month capture
@@ -1207,59 +798,33 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
")" +
")?)?)?)?" +
"$");
-
- // Copy any custom methods a 3rd party library may have added
for (var key in NativeDate)
Date[key] = NativeDate[key];
-
- // Copy "native" methods explicitly; they may be non-enumerable
Date.now = NativeDate.now;
Date.UTC = NativeDate.UTC;
Date.prototype = NativeDate.prototype;
Date.prototype.constructor = Date;
-
- // Upgrade Date.parse to handle simplified ISO 8601 strings
Date.parse = function parse(string) {
var match = isoDateExpression.exec(string);
if (match) {
match.shift(); // kill match[0], the full match
- // parse months, days, hours, minutes, seconds, and milliseconds
for (var i = 1; i < 7; i++) {
- // provide default values if necessary
match[i] = +(match[i] || (i < 3 ? 1 : 0));
- // match[1] is the month. Months are 0-11 in JavaScript
- // `Date` objects, but 1-12 in ISO notation, so we
- // decrement.
if (i == 1)
match[i]--;
}
-
- // parse the UTC offset component
var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
-
- // compute the explicit time zone offset if specified
var offset = 0;
if (sign) {
- // detect invalid offsets and return early
if (hourOffset > 23 || minuteOffset > 59)
return NaN;
-
- // express the provided time zone offset in minutes. The offset is
- // negative for time zones west of UTC; positive otherwise.
offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == "+" ? -1 : 1);
}
-
- // Date.UTC for years between 0 and 99 converts year to 1900 + year
- // The Gregorian calendar has a 400-year cycle, so
- // to Date.UTC(year + 400, .... ) - 12622780800000 == Date.UTC(year, ...),
- // where 12622780800000 - number of milliseconds in Gregorian calendar 400 years
var year = +match[0];
if (0 <= year && year <= 99) {
match[0] = year + 400;
return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
}
-
- // compute a new UTC date value, accounting for the optional offset
return NativeDate.UTC.apply(this, match) + offset;
}
return NativeDate.parse.apply(this, arguments);
@@ -1268,20 +833,10 @@ if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
return Date;
})(Date);
}
-
-//
-// String
-// ======
-//
-
-// ES5 15.5.4.20
-// http://es5.github.com/#x15.5.4.20
var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
"\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
"\u2029\uFEFF";
if (!String.prototype.trim || ws.trim()) {
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript
- // http://perfectionkills.com/whitespace-deviations/
ws = "[" + ws + "]";
var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
trimEndRegexp = new RegExp(ws + ws + "*$");
@@ -1289,15 +844,6 @@ if (!String.prototype.trim || ws.trim()) {
return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
};
}
-
-//
-// Util
-// ======
-//
-
-// ES5 9.4
-// http://es5.github.com/#x9.4
-// http://jsperf.com/to-integer
var toInteger = function (n) {
n = +n;
if (n !== n) // isNaN
@@ -1308,61 +854,19 @@ var toInteger = function (n) {
};
var prepareString = "a"[0] != "a",
- // ES5 9.9
- // http://es5.github.com/#x9.9
toObject = function (o) {
if (o == null) { // this matches both null and undefined
throw new TypeError(); // TODO message
}
- // If the implementation doesn't support by-index access of
- // string characters (ex. IE < 7), split the string
if (prepareString && typeof o == "string" && o) {
return o.split("");
}
return Object(o);
};
-});/* vim:ts=4:sts=4:sw=4:
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
- * Mike de Boer <mike AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
+
var EventEmitter = {};
@@ -1376,8 +880,11 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!listeners.length && !defaultHandler)
return;
- e = e || {};
- e.type = eventName;
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
if (!e.stopPropagation) {
e.stopPropagation = function() {
@@ -1398,7 +905,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
}
if (defaultHandler && !e.defaultPrevented)
- defaultHandler(e);
+ return defaultHandler(e);
};
EventEmitter.setDefaultHandler = function(eventName, callback) {
@@ -1416,7 +923,7 @@ EventEmitter.addEventListener = function(eventName, callback) {
var listeners = this._eventRegistry[eventName];
if (!listeners)
- var listeners = this._eventRegistry[eventName] = [];
+ listeners = this._eventRegistry[eventName] = [];
if (listeners.indexOf(callback) == -1)
listeners.push(callback);
@@ -1441,45 +948,10 @@ EventEmitter.removeAllListeners = function(eventName) {
exports.EventEmitter = EventEmitter;
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
+
exports.inherits = (function() {
var tempCtor = function() {};
@@ -1502,95 +974,156 @@ exports.implement = function(proto, mixin) {
};
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/worker/jshint', 'ace/narcissus/jsparse'], function(require, exports, module) {
-"use strict";
-
+
+define('ace/mode/javascript_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/javascript/jshint'], function(require, exports, module) {
+
+
var oop = require("../lib/oop");
var Mirror = require("../worker/mirror").Mirror;
-var lint = require("../worker/jshint").JSHINT;
-
+var lint = require("./javascript/jshint").JSHINT;
+
+function startRegex(arr) {
+ return RegExp("^(" + arr.join("|") + ")");
+}
+
+var disabledWarningsRe = startRegex([
+ "Bad for in variable '(.+)'.",
+ 'Missing "use strict"'
+]);
+var errorsRe = startRegex([
+ "Unexpected",
+ "Expected ",
+ "Confusing (plus|minus)",
+ "\\{a\\} unterminated regular expression",
+ "Unclosed ",
+ "Unmatched ",
+ "Unbegun comment",
+ "Bad invocation",
+ "Missing space after",
+ "Missing operator at"
+]);
+var infoRe = startRegex([
+ "Expected an assignment",
+ "Bad escapement of EOL",
+ "Unexpected comma",
+ "Unexpected space",
+ "Missing radix parameter.",
+ "A leading decimal point can",
+ "\\['{a}'\\] is better written in dot notation.",
+ "'{a}' used out of scope"
+]);
+
var JavaScriptWorker = exports.JavaScriptWorker = function(sender) {
Mirror.call(this, sender);
this.setTimeout(500);
+ this.setOptions();
};
oop.inherits(JavaScriptWorker, Mirror);
(function() {
-
+ this.setOptions = function(options) {
+ this.options = options || {
+ es5: true,
+ esnext: true,
+ devel: true,
+ browser: true,
+ node: true,
+ laxcomma: true,
+ laxbreak: true,
+ lastsemic: true,
+ onevar: false,
+ passfail: false,
+ maxerr: 100,
+ expr: true,
+ multistr: true,
+ globalstrict: true
+ };
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.changeOptions = function(newOptions) {
+ oop.mixin(this.options, newOptions);
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.isValidJS = function(str) {
+ try {
+ eval("throw 0;" + str);
+ } catch(e) {
+ if (e === 0)
+ return true;
+ }
+ return false
+ };
+
this.onUpdate = function() {
var value = this.doc.getValue();
value = value.replace(/^#!.*\n/, "\n");
-
-// var start = new Date();
- var parser = require("../narcissus/jsparse");
- try {
- parser.parse(value);
- } catch(e) {
-// console.log("narcissus")
-// console.log(e);
- var chunks = e.message.split(":")
- var message = chunks.pop().trim();
- var lineNumber = parseInt(chunks.pop().trim()) - 1;
- this.sender.emit("narcissus", {
- row: lineNumber,
- column: null, // TODO convert e.cursor
- text: message,
- type: "error"
- });
+ if (!value) {
+ this.sender.emit("jslint", []);
return;
- } finally {
-// console.log("parse time: " + (new Date() - start));
}
-
-// var start = new Date();
-// console.log("jslint")
- lint(value, {undef: false, onevar: false, passfail: false});
- this.sender.emit("jslint", lint.errors);
-// console.log("lint time: " + (new Date() - start));
- }
-
+ var errors = [];
+ var maxErrorLevel = this.isValidJS(value) ? "warning" : "error";
+ lint(value, this.options);
+ var results = lint.errors;
+
+ var errorAdded = false
+ for (var i = 0; i < results.length; i++) {
+ var error = results[i];
+ if (!error)
+ continue;
+ var raw = error.raw;
+ var type = "warning";
+
+ if (raw == "Missing semicolon.") {
+ var str = error.evidence.substr(error.character);
+ str = str.charAt(str.search(/\S/));
+ if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) {
+ error.reason = 'Missing ";" before statement';
+ type = "error";
+ } else {
+ type = "info";
+ }
+ }
+ else if (disabledWarningsRe.test(raw)) {
+ continue;
+ }
+ else if (infoRe.test(raw)) {
+ type = "info"
+ }
+ else if (errorsRe.test(raw)) {
+ errorAdded = true;
+ type = maxErrorLevel;
+ }
+ else if (raw == "'{a}' is not defined.") {
+ type = "warning";
+ }
+ else if (raw == "'{a}' is defined but never used.") {
+ type = "info";
+ }
+
+ errors.push({
+ row: error.line-1,
+ column: error.character-1,
+ text: error.reason,
+ type: type,
+ raw: raw
+ });
+
+ if (errorAdded) {
+ }
+ }
+
+ this.sender.emit("jslint", errors);
+ };
+
}).call(JavaScriptWorker.prototype);
-});define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
-"use strict";
+});
+define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+
var Document = require("../document").Document;
var lang = require("../lib/lang");
@@ -1626,50 +1159,14 @@ var Mirror = exports.Mirror = function(sender) {
};
this.onUpdate = function() {
- // abstract method
};
}).call(Mirror.prototype);
-});/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+});
define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
-"use strict";
+
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1678,14 +1175,10 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
-
- if (Array.isArray(text)) {
- this.insertLines(0, text);
- }
- // There has to be one line at least in the document. If you pass an empty
- // string to the insert function, nothing will happen. Workaround.
- else if (text.length == 0) {
+ if (text.length == 0) {
this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this.insertLines(0, text);
} else {
this.insert({row: 0, column:0}, text);
}
@@ -1694,22 +1187,17 @@ var Document = function(text) {
(function() {
oop.implement(this, EventEmitter);
-
this.setValue = function(text) {
var len = this.getLength();
this.remove(new Range(0, 0, len, this.getLine(len-1).length));
this.insert({row: 0, column:0}, text);
};
-
this.getValue = function() {
return this.getAllLines().join(this.getNewLineCharacter());
};
-
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
-
- // check for IE split bug
if ("aaa".split(/a/).length == 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
@@ -1720,6 +1208,7 @@ var Document = function(text) {
};
+
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
if (match) {
@@ -1728,18 +1217,17 @@ var Document = function(text) {
this.$autoNewLine = "\n";
}
};
-
this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
+ switch (this.$newLineMode) {
case "windows":
- return "\r\n";
+ return "\r\n";
case "unix":
- return "\n";
+ return "\n";
- case "auto":
- return this.$autoNewLine;
- }
+ default:
+ return this.$autoNewLine;
+ }
};
this.$autoNewLine = "\n";
@@ -1750,48 +1238,33 @@ var Document = function(text) {
this.$newLineMode = newLineMode;
};
-
this.getNewLineMode = function() {
return this.$newLineMode;
};
-
this.isNewLine = function(text) {
return (text == "\r\n" || text == "\r" || text == "\n");
};
-
- /**
- * Get a verbatim copy of the given line as it is in the document
- */
this.getLine = function(row) {
return this.$lines[row] || "";
};
-
this.getLines = function(firstRow, lastRow) {
return this.$lines.slice(firstRow, lastRow + 1);
};
-
- /**
- * Returns all lines in the document as string array. Warning: The caller
- * should not modify this array!
- */
this.getAllLines = function() {
return this.getLines(0, this.getLength());
};
-
this.getLength = function() {
return this.$lines.length;
};
-
this.getTextRange = function(range) {
if (range.start.row == range.end.row) {
return this.$lines[range.start.row].substring(range.start.column,
range.end.column);
}
else {
- var lines = [];
- lines.push(this.$lines[range.start.row].substring(range.start.column));
- lines.push.apply(lines, this.getLines(range.start.row+1, range.end.row-1));
- lines.push(this.$lines[range.end.row].substring(0, range.end.column));
+ var lines = this.getLines(range.start.row+1, range.end.row-1);
+ lines.unshift((this.$lines[range.start.row] || "").substring(range.start.column));
+ lines.push((this.$lines[range.end.row] || "").substring(0, range.end.column));
return lines.join(this.getNewLineCharacter());
}
};
@@ -1804,13 +1277,11 @@ var Document = function(text) {
}
return position;
};
-
this.insert = function(position, text) {
- if (text.length == 0)
+ if (!text || text.length === 0)
return position;
position = this.$clipPosition(position);
-
if (this.getLength() <= 1)
this.$detectNewLine(text);
@@ -1826,10 +1297,13 @@ var Document = function(text) {
}
return position;
};
-
this.insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
+ if (lines.length > 0xFFFF) {
+ var end = this.insertLines(row, lines.slice(0xFFFF));
+ lines = lines.slice(0, 0xFFFF);
+ }
var args = [row, 0];
args.push.apply(args, lines);
@@ -1842,9 +1316,8 @@ var Document = function(text) {
lines: lines
};
this._emit("change", { data: delta });
- return range.end;
+ return end || range.end;
};
-
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
var line = this.$lines[position.row] || "";
@@ -1866,7 +1339,6 @@ var Document = function(text) {
return end;
};
-
this.insertInLine = function(position, text) {
if (text.length == 0)
return position;
@@ -1890,9 +1362,7 @@ var Document = function(text) {
return end;
};
-
this.remove = function(range) {
- // clip to document
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1922,7 +1392,6 @@ var Document = function(text) {
}
return range.start;
};
-
this.removeInLine = function(row, startColumn, endColumn) {
if (startColumn == endColumn)
return;
@@ -1941,14 +1410,6 @@ var Document = function(text) {
this._emit("change", { data: delta });
return range.start;
};
-
- /**
- * Removes a range of full lines
- *
- * @param firstRow {Integer} The first row to be removed
- * @param lastRow {Integer} The last row to be removed
- * @return {String[]} The removed lines
- */
this.removeLines = function(firstRow, lastRow) {
var range = new Range(firstRow, 0, lastRow + 1, 0);
var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
@@ -1962,7 +1423,6 @@ var Document = function(text) {
this._emit("change", { data: delta });
return removed;
};
-
this.removeNewLine = function(row) {
var firstLine = this.getLine(row);
var secondLine = this.getLine(row+1);
@@ -1979,13 +1439,9 @@ var Document = function(text) {
};
this._emit("change", { data: delta });
};
-
this.replace = function(range, text) {
if (text.length == 0 && range.isEmpty())
return range.start;
-
- // Shortcut: If the text we want to insert is the same as it is already
- // in the document, we don't have to replace anything.
if (text == this.getTextRange(range))
return range.end;
@@ -1999,7 +1455,6 @@ var Document = function(text) {
return end;
};
-
this.applyDeltas = function(deltas) {
for (var i=0; i<deltas.length; i++) {
var delta = deltas[i];
@@ -2015,7 +1470,6 @@ var Document = function(text) {
this.remove(range);
}
};
-
this.revertDeltas = function(deltas) {
for (var i=deltas.length-1; i>=0; i--) {
var delta = deltas[i];
@@ -2032,51 +1486,33 @@ var Document = function(text) {
this.insert(range.start, delta.text);
}
};
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length;
+
+ return index + newlineLength * i + pos.column;
+ };
}).call(Document.prototype);
exports.Document = Document;
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
-
var Range = function(startRow, startColumn, endRow, endColumn) {
this.start = {
row: startRow,
@@ -2089,36 +1525,21 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
};
};
-(function() {
- this.isEequal = function(range) {
+(function() {
+ this.isEqual = function(range) {
return this.start.row == range.start.row &&
this.end.row == range.end.row &&
this.start.column == range.start.column &&
this.end.column == range.end.column
- };
-
+ };
this.toString = function() {
return ("Range: [" + this.start.row + "/" + this.start.column +
"] -> [" + this.end.row + "/" + this.end.column + "]");
- };
+ };
this.contains = function(row, column) {
return this.compare(row, column) == 0;
- };
-
- /**
- * Compares this range (A) with another range (B), where B is the passed in
- * range.
- *
- * Return values:
- * -2: (B) is infront of (A) and doesn't intersect with (A)
- * -1: (B) begins before (A) but ends inside of (A)
- * 0: (B) is completly inside of (A) OR (A) is complety inside of (B)
- * +1: (B) begins inside of (A) but ends outside of (A)
- * +2: (B) is after (A) and doesn't intersect with (A)
- *
- * 42: FTW state: (B) ends in (A) but starts outside of (A)
- */
+ };
this.compareRange = function(range) {
var cmp,
end = range.end,
@@ -2146,24 +1567,23 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return 0;
}
}
- }
-
+ };
this.comparePoint = function(p) {
return this.compare(p.row, p.column);
- }
-
+ };
this.containsRange = function(range) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- }
-
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
this.isEnd = function(row, column) {
return this.end.row == row && this.end.column == column;
- }
-
+ };
this.isStart = function(row, column) {
return this.start.row == row && this.start.column == column;
- }
-
+ };
this.setStart = function(row, column) {
if (typeof row == "object") {
this.start.column = row.column;
@@ -2172,8 +1592,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.start.row = row;
this.start.column = column;
}
- }
-
+ };
this.setEnd = function(row, column) {
if (typeof row == "object") {
this.end.column = row.column;
@@ -2182,8 +1601,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.end.row = row;
this.end.column = column;
}
- }
-
+ };
this.inside = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isEnd(row, column) || this.isStart(row, column)) {
@@ -2193,8 +1611,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.insideStart = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isEnd(row, column)) {
@@ -2204,8 +1621,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.insideEnd = function(row, column) {
if (this.compare(row, column) == 0) {
if (this.isStart(row, column)) {
@@ -2215,8 +1631,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
return false;
- }
-
+ };
this.compare = function(row, column) {
if (!this.isMultiLine()) {
if (row === this.start.row) {
@@ -2238,29 +1653,20 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return 0;
};
-
- /**
- * Like .compare(), but if isStart is true, return -1;
- */
this.compareStart = function(row, column) {
if (this.start.row == row && this.start.column == column) {
return -1;
} else {
return this.compare(row, column);
}
- }
-
- /**
- * Like .compare(), but if isEnd is true, return 1;
- */
+ };
this.compareEnd = function(row, column) {
if (this.end.row == row && this.end.column == column) {
return 1;
} else {
return this.compare(row, column);
}
- }
-
+ };
this.compareInside = function(row, column) {
if (this.end.row == row && this.end.column == column) {
return 1;
@@ -2269,8 +1675,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
} else {
return this.compare(row, column);
}
- }
-
+ };
this.clipRows = function(firstRow, lastRow) {
if (this.end.row > lastRow) {
var end = {
@@ -2301,7 +1706,6 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
return Range.fromPoints(start || this.start, end || this.end);
};
-
this.extend = function(row, column) {
var cmp = this.compare(row, column);
@@ -2318,22 +1722,18 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
this.isEmpty = function() {
return (this.start.row == this.end.row && this.start.column == this.end.column);
};
-
this.isMultiLine = function() {
return (this.start.row !== this.end.row);
};
-
this.clone = function() {
return Range.fromPoints(this.start, this.end);
};
-
this.collapseRows = function() {
if (this.end.column == 0)
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
else
return new Range(this.start.row, 0, this.end.row, 0)
};
-
this.toScreenRange = function(session) {
var screenPosStart =
session.documentToScreenPosition(this.start);
@@ -2347,61 +1747,19 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
};
}).call(Range.prototype);
-
-
Range.fromPoints = function(start, end) {
return new Range(start.row, start.column, end.row, end.column);
};
exports.Range = Range;
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-"use strict";
+
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
-/**
- * An Anchor is a floating pointer in the document. Whenever text is inserted or
- * deleted before the cursor, the position of the cursor is updated
- */
var Anchor = exports.Anchor = function(doc, row, column) {
this.document = doc;
@@ -2417,15 +1775,15 @@ var Anchor = exports.Anchor = function(doc, row, column) {
(function() {
oop.implement(this, EventEmitter);
-
+
this.getPosition = function() {
return this.$clipPositionToDocument(this.row, this.column);
};
-
+
this.getDocument = function() {
return this.document;
};
-
+
this.onChange = function(e) {
var delta = e.data;
var range = delta.range;
@@ -2518,11 +1876,10 @@ var Anchor = exports.Anchor = function(doc, row, column) {
value: pos
});
};
-
+
this.detach = function() {
this.document.removeEventListener("change", this.$onChange);
};
-
this.$clipPositionToDocument = function(row, column) {
var pos = {};
@@ -2548,45 +1905,9 @@ var Anchor = exports.Anchor = function(doc, row, column) {
}).call(Anchor.prototype);
});
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Ajax.org Code Editor (ACE).
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fabian Jakobs <fabian AT ajax DOT org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-"use strict";
+
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
@@ -2651,9 +1972,13 @@ exports.arrayToMap = function(arr) {
};
-/**
- * splice out of 'array' anything that === 'value'
- */
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
exports.arrayRemove = function(array, value) {
for (var i = 0; i <= array.length; i++) {
if (value === array[i]) {
@@ -2666,6 +1991,22 @@ exports.escapeRegExp = function(str) {
return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
};
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
exports.deferredCall = function(fcn) {
var timer = null;
@@ -2697,7056 +2038,4370 @@ exports.deferredCall = function(fcn) {
return deferred;
};
-});
-define('ace/worker/jshint', ['require', 'exports', 'module' ], function(require, exports, module) {
-/*!
- * JSHint, by JSHint Community.
- *
- * Licensed under the same slightly modified MIT license that JSLint is.
- * It stops evil-doers everywhere.
- *
- * JSHint is a derivative work of JSLint:
- *
- * Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * The Software shall be used for Good, not Evil.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * JSHint was forked from 2010-12-16 edition of JSLint.
- *
- */
-
-/*
- JSHINT is a global function. It takes two parameters.
-
- var myResult = JSHINT(source, option);
-
- The first parameter is either a string or an array of strings. If it is a
- string, it will be split on '\n' or '\r'. If it is an array of strings, it
- is assumed that each string represents one line. The source can be a
- JavaScript text or a JSON text.
-
- The second parameter is an optional object of options which control the
- operation of JSHINT. Most of the options are booleans: They are all
- optional and have a default value of false. One of the options, predef,
- can be an array of names, which will be used to declare global variables,
- or an object whose keys are used as global names, with a boolean value
- that determines if they are assignable.
-
- If it checks out, JSHINT returns true. Otherwise, it returns false.
-
- If false, you can inspect JSHINT.errors to find out the problems.
- JSHINT.errors is an array of objects containing these members:
-
- {
- line : The line (relative to 0) at which the lint was found
- character : The character (relative to 0) at which the lint was found
- reason : The problem
- evidence : The text line in which the problem occurred
- raw : The raw message before the details were inserted
- a : The first detail
- b : The second detail
- c : The third detail
- d : The fourth detail
- }
-
- If a fatal error was found, a null will be the last element of the
- JSHINT.errors array.
-
- You can request a Function Report, which shows all of the functions
- and the parameters and vars that they use. This can be used to find
- implied global variables and other problems. The report is in HTML and
- can be inserted in an HTML <body>.
-
- var myReport = JSHINT.report(limited);
-
- If limited is true, then the report will be limited to only errors.
-
- You can request a data structure which contains JSHint's results.
-
- var myData = JSHINT.data();
-
- It returns a structure with this form:
-
- {
- errors: [
- {
- line: NUMBER,
- character: NUMBER,
- reason: STRING,
- evidence: STRING
- }
- ],
- functions: [
- name: STRING,
- line: NUMBER,
- last: NUMBER,
- param: [
- STRING
- ],
- closure: [
- STRING
- ],
- var: [
- STRING
- ],
- exception: [
- STRING
- ],
- outer: [
- STRING
- ],
- unused: [
- STRING
- ],
- global: [
- STRING
- ],
- label: [
- STRING
- ]
- ],
- globals: [
- STRING
- ],
- member: {
- STRING: NUMBER
- },
- unuseds: [
- {
- name: STRING,
- line: NUMBER
- }
- ],
- implieds: [
- {
- name: STRING,
- line: NUMBER
- }
- ],
- urls: [
- STRING
- ],
- json: BOOLEAN
- }
-
- Empty arrays will not be included.
-
-*/
-
-/*jshint
- evil: true, nomen: false, onevar: false, regexp: false, strict: true, boss: true,
- undef: true, maxlen: 100
-*/
-
-/*members "\b", "\t", "\n", "\f", "\r", "!=", "!==", "\"", "%", "(begin)",
- "(breakage)", "(context)", "(error)", "(global)", "(identifier)", "(last)",
- "(line)", "(loopage)", "(name)", "(onevar)", "(params)", "(scope)",
- "(statement)", "(verb)", "*", "+", "++", "-", "--", "\/", "<", "<=", "==",
- "===", ">", ">=", $, $$, $A, $F, $H, $R, $break, $continue, $w, Abstract, Ajax,
- __filename, __dirname, ActiveXObject, Array, ArrayBuffer, ArrayBufferView,
- Autocompleter, Assets, Boolean, Builder, Buffer, Browser, COM, CScript, Canvas,
- CustomAnimation, Class, Control, Chain, Color, Cookie, Core, DataView, Date,
- Debug, Draggable, Draggables, Droppables, Document, DomReady, DOMReady, Drag,
- E, Enumerator, Enumerable, Element, Elements, Error, Effect, EvalError, Event,
- Events, FadeAnimation, Field, Flash, Float32Array, Float64Array, Form,
- FormField, Frame, Function, Fx, GetObject, Group, Hash, HotKey, HTMLElement,
- HtmlTable, Iframe, IframeShim, Image, Int16Array, Int32Array, Int8Array,
- Insertion, InputValidator, JSON, Keyboard, Locale, LN10, LN2, LOG10E, LOG2E,
- MAX_VALUE, MIN_VALUE, Mask, Math, MenuItem, MoveAnimation, MooTools, Native,
- NEGATIVE_INFINITY, Number, Object, ObjectRange, Option, Options, OverText, PI,
- POSITIVE_INFINITY, PeriodicalExecuter, Point, Position, Prototype, RangeError,
- Rectangle, ReferenceError, RegExp, ResizeAnimation, Request, RotateAnimation,
- SQRT1_2, SQRT2, ScrollBar, ScriptEngine, ScriptEngineBuildVersion,
- ScriptEngineMajorVersion, ScriptEngineMinorVersion, Scriptaculous, Scroller,
- Slick, Slider, Selector, String, Style, SyntaxError, Sortable, Sortables,
- SortableObserver, Sound, Spinner, System, Swiff, Text, TextArea, Template,
- Timer, Tips, Type, TypeError, Toggle, Try, URI, URIError, URL, VBArray, WSH,
- WScript, Web, Window, XMLDOM, XMLHttpRequest, XPathEvaluator, XPathException,
- XPathExpression, XPathNamespace, XPathNSResolver, XPathResult, "\\", a,
- addEventListener, address, alert, apply, applicationCache, arguments, arity,
- asi, b, bitwise, block, blur, boolOptions, boss, browser, c, call, callee,
- caller, cases, charAt, charCodeAt, character, clearInterval, clearTimeout,
- close, closed, closure, comment, condition, confirm, console, constructor,
- content, couch, create, css, curly, d, data, datalist, dd, debug, decodeURI,
- decodeURIComponent, defaultStatus, defineClass, deserialize, devel, document,
- dojo, dijit, dojox, define, edition, else, emit, encodeURI, encodeURIComponent,
- entityify, eqeqeq, eqnull, errors, es5, escape, eval, event, evidence, evil,
- ex, exception, exec, exps, expr, exports, FileReader, first, floor, focus,
- forin, fragment, frames, from, fromCharCode, fud, funct, function, functions,
- g, gc, getComputedStyle, getRow, GLOBAL, global, globals, globalstrict,
- hasOwnProperty, help, history, i, id, identifier, immed, implieds, include,
- indent, indexOf, init, ins, instanceOf, isAlpha, isApplicationRunning, isArray,
- isDigit, isFinite, isNaN, iterator, join, jshint,
- JSHINT, json, jquery, jQuery, keys, label, labelled, last, lastsemic, laxbreak,
- latedef, lbp, led, left, length, line, load, loadClass, localStorage, location,
- log, loopfunc, m, match, maxerr, maxlen, member,message, meta, module, moveBy,
- moveTo, mootools, name, navigator, new, newcap, noarg, node, noempty, nomen,
- nonew, nud, onbeforeunload, onblur, onerror, onevar, onfocus, onload, onresize,
- onunload, open, openDatabase, openURL, opener, opera, outer, param, parent,
- parseFloat, parseInt, passfail, plusplus, predef, print, process, prompt,
- proto, prototype, prototypejs, push, quit, range, raw, reach, reason, regexp,
- readFile, readUrl, regexdash, removeEventListener, replace, report, require,
- reserved, resizeBy, resizeTo, resolvePath, resumeUpdates, respond, rhino, right,
- runCommand, scroll, screen, scripturl, scrollBy, scrollTo, scrollbar, search, seal, send,
- serialize, setInterval, setTimeout, shift, slice, sort,spawn, split, stack,
- status, start, strict, sub, substr, supernew, shadow, supplant, sum, sync,
- test, toLowerCase, toString, toUpperCase, toint32, token, top, trailing, type,
- typeOf, Uint16Array, Uint32Array, Uint8Array, undef, unused, urls, value, valueOf,
- var, version, WebSocket, white, window, Worker, wsh*/
-
-/*global exports: false */
-
-// We build the application inside a function so that we produce only a single
-// global variable. That function will be invoked immediately, and its return
-// value is the JSHINT function itself.
-
-var JSHINT = (function () {
- "use strict";
-
- var anonname, // The guessed name for anonymous functions.
-
-// These are operators that should not be used with the ! operator.
-
- bang = {
- '<' : true,
- '<=' : true,
- '==' : true,
- '===': true,
- '!==': true,
- '!=' : true,
- '>' : true,
- '>=' : true,
- '+' : true,
- '-' : true,
- '*' : true,
- '/' : true,
- '%' : true
- },
-
-// These are the JSHint boolean options.
-
- boolOptions = {
- asi : true, // if automatic semicolon insertion should be tolerated
- bitwise : true, // if bitwise operators should not be allowed
- boss : true, // if advanced usage of assignments should be allowed
- browser : true, // if the standard browser globals should be predefined
- couch : true, // if CouchDB globals should be predefined
- curly : true, // if curly braces around all blocks should be required
- debug : true, // if debugger statements should be allowed
- devel : true, // if logging globals should be predefined (console, alert, etc.)
- dojo : true, // if Dojo Toolkit globals should be predefined
- eqeqeq : true, // if === should be required
- eqnull : true, // if == null comparisons should be tolerated
- es5 : true, // if ES5 syntax should be allowed
- evil : true, // if eval should be allowed
- expr : true, // if ExpressionStatement should be allowed as Programs
- forin : true, // if for in statements must filter
- globalstrict: true, // if global "use strict"; should be allowed (also enables 'strict')
- immed : true, // if immediate invocations must be wrapped in parens
- iterator : true, // if the `__iterator__` property should be disallowed
- jquery : true, // if jQuery globals should be predefined
- latedef : true, // if the use before definition should not be tolerated
- laxbreak : true, // if line breaks should not be checked
- loopfunc : true, // if functions should be allowed to be defined within loops
- mootools : true, // if MooTools globals should be predefined
- newcap : true, // if constructor names must be capitalized
- noarg : true, // if arguments.caller and arguments.callee should be disallowed
- node : true, // if the Node.js environment globals should be predefined
- noempty : true, // if empty blocks should be disallowed
- nonew : true, // if using `new` for side-effects should be disallowed
- nomen : true, // if names should be checked
- onevar : true, // if only one var statement per function should be allowed
- passfail : true, // if the scan should stop on first error
- plusplus : true, // if increment/decrement should not be allowed
- proto : true, // if the `__proto__` property should be disallowed
- prototypejs : true, // if Prototype and Scriptaculous globals should be predefined
- regexdash : true, // if unescaped last dash (-) inside brackets should be tolerated
- regexp : true, // if the . should not be allowed in regexp literals
- rhino : true, // if the Rhino environment globals should be predefined
- undef : true, // if variables should be declared before used
- scripturl : true, // if script-targeted URLs should be tolerated
- shadow : true, // if variable shadowing should be tolerated
- strict : true, // require the "use strict"; pragma
- sub : true, // if all forms of subscript notation are tolerated
- supernew : true, // if `new function () { ... };` and `new Object;`
- // should be tolerated
- trailing : true, // if trailing whitespace rules apply
- white : true, // if strict whitespace rules apply
- wsh : true // if the Windows Scripting Host environment globals should
- // be predefined
- },
-
-// browser contains a set of global names which are commonly provided by a
-// web browser environment.
-
- browser = {
- ArrayBuffer : false,
- ArrayBufferView : false,
- addEventListener: false,
- applicationCache: false,
- blur : false,
- clearInterval : false,
- clearTimeout : false,
- close : false,
- closed : false,
- DataView : false,
- defaultStatus : false,
- document : false,
- event : false,
- FileReader : false,
- Float32Array : false,
- Float64Array : false,
- focus : false,
- frames : false,
- getComputedStyle: false,
- HTMLElement : false,
- history : false,
- Int16Array : false,
- Int32Array : false,
- Int8Array : false,
- Image : false,
- length : false,
- localStorage : false,
- location : false,
- moveBy : false,
- moveTo : false,
- name : false,
- navigator : false,
- onbeforeunload : true,
- onblur : true,
- onerror : true,
- onfocus : true,
- onload : true,
- onresize : true,
- onunload : true,
- open : false,
- openDatabase : false,
- opener : false,
- Option : false,
- parent : false,
- print : false,
- removeEventListener: false,
- resizeBy : false,
- resizeTo : false,
- screen : false,
- scroll : false,
- scrollBy : false,
- scrollTo : false,
- setInterval : false,
- setTimeout : false,
- status : false,
- top : false,
- Uint16Array : false,
- Uint32Array : false,
- Uint8Array : false,
- WebSocket : false,
- window : false,
- Worker : false,
- XMLHttpRequest : false,
- XPathEvaluator : false,
- XPathException : false,
- XPathExpression : false,
- XPathNamespace : false,
- XPathNSResolver : false,
- XPathResult : false
- },
-
- couch = {
- "require" : false,
- respond : false,
- getRow : false,
- emit : false,
- send : false,
- start : false,
- sum : false,
- log : false,
- exports : false,
- module : false
- },
-
- devel = {
- alert : false,
- confirm : false,
- console : false,
- Debug : false,
- opera : false,
- prompt : false
- },
-
- dojo = {
- dojo : false,
- dijit : false,
- dojox : false,
- define : false,
- "require" : false
- },
-
- escapes = {
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '/' : '\\/',
- '\\': '\\\\'
- },
-
- funct, // The current function
-
- functionicity = [
- 'closure', 'exception', 'global', 'label',
- 'outer', 'unused', 'var'
- ],
-
- functions, // All of the functions
-
- global, // The global scope
- implied, // Implied globals
- inblock,
- indent,
- jsonmode,
-
- jquery = {
- '$' : false,
- jQuery : false
- },
-
- lines,
- lookahead,
- member,
- membersOnly,
-
- mootools = {
- '$' : false,
- '$$' : false,
- Assets : false,
- Browser : false,
- Chain : false,
- Class : false,
- Color : false,
- Cookie : false,
- Core : false,
- Document : false,
- DomReady : false,
- DOMReady : false,
- Drag : false,
- Element : false,
- Elements : false,
- Event : false,
- Events : false,
- Fx : false,
- Group : false,
- Hash : false,
- HtmlTable : false,
- Iframe : false,
- IframeShim : false,
- InputValidator : false,
- instanceOf : false,
- Keyboard : false,
- Locale : false,
- Mask : false,
- MooTools : false,
- Native : false,
- Options : false,
- OverText : false,
- Request : false,
- Scroller : false,
- Slick : false,
- Slider : false,
- Sortables : false,
- Spinner : false,
- Swiff : false,
- Tips : false,
- Type : false,
- typeOf : false,
- URI : false,
- Window : false
- },
-
- nexttoken,
-
- node = {
- __filename : false,
- __dirname : false,
- exports : false,
- Buffer : false,
- GLOBAL : false,
- global : false,
- module : false,
- process : false,
- require : false
- },
-
- noreach,
- option,
- predefined, // Global variables defined by option
- prereg,
- prevtoken,
-
- prototypejs = {
- '$' : false,
- '$$' : false,
- '$A' : false,
- '$F' : false,
- '$H' : false,
- '$R' : false,
- '$break' : false,
- '$continue' : false,
- '$w' : false,
- Abstract : false,
- Ajax : false,
- Class : false,
- Enumerable : false,
- Element : false,
- Event : false,
- Field : false,
- Form : false,
- Hash : false,
- Insertion : false,
- ObjectRange : false,
- PeriodicalExecuter: false,
- Position : false,
- Prototype : false,
- Selector : false,
- Template : false,
- Toggle : false,
- Try : false,
- Autocompleter : false,
- Builder : false,
- Control : false,
- Draggable : false,
- Draggables : false,
- Droppables : false,
- Effect : false,
- Sortable : false,
- SortableObserver : false,
- Sound : false,
- Scriptaculous : false
- },
-
- rhino = {
- defineClass : false,
- deserialize : false,
- gc : false,
- help : false,
- load : false,
- loadClass : false,
- print : false,
- quit : false,
- readFile : false,
- readUrl : false,
- runCommand : false,
- seal : false,
- serialize : false,
- spawn : false,
- sync : false,
- toint32 : false,
- version : false
- },
-
- scope, // The current scope
- src,
- stack,
-
-// standard contains the global names that are provided by the
-// ECMAScript standard.
-
- standard = {
- Array : false,
- Boolean : false,
- Date : false,
- decodeURI : false,
- decodeURIComponent : false,
- encodeURI : false,
- encodeURIComponent : false,
- Error : false,
- 'eval' : false,
- EvalError : false,
- Function : false,
- hasOwnProperty : false,
- isFinite : false,
- isNaN : false,
- JSON : false,
- Math : false,
- Number : false,
- Object : false,
- parseInt : false,
- parseFloat : false,
- RangeError : false,
- ReferenceError : false,
- RegExp : false,
- String : false,
- SyntaxError : false,
- TypeError : false,
- URIError : false
- },
-
- standard_member = {
- E : true,
- LN2 : true,
- LN10 : true,
- LOG2E : true,
- LOG10E : true,
- MAX_VALUE : true,
- MIN_VALUE : true,
- NEGATIVE_INFINITY : true,
- PI : true,
- POSITIVE_INFINITY : true,
- SQRT1_2 : true,
- SQRT2 : true
- },
-
- strict_mode,
- syntax = {},
- tab,
- token,
- urls,
- warnings,
-
- wsh = {
- ActiveXObject : true,
- Enumerator : true,
- GetObject : true,
- ScriptEngine : true,
- ScriptEngineBuildVersion : true,
- ScriptEngineMajorVersion : true,
- ScriptEngineMinorVersion : true,
- VBArray : true,
- WSH : true,
- WScript : true
- };
-
- // Regular expressions. Some of these are stupidly long.
- var ax, cx, tx, nx, nxg, lx, ix, jx, ft;
- (function () {
- /*jshint maxlen:300 */
-
- // unsafe comment or string
- ax = /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
-
- // unsafe characters that are silently deleted by one or more browsers
- cx = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
-
- // token
- tx = /^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jshint|jslint|members?|global)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/;
-
- // characters in strings that need escapement
- nx = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
- nxg = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
-
- // star slash
- lx = /\*\/|\/\*/;
-
- // identifier
- ix = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;
-
- // javascript url
- jx = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
-
- // catches /* falls through */ comments
- ft = /^\s*\/\*\s*falls\sthrough\s*\*\/\s*$/;
- }());
-
- function F() {} // Used by Object.create
-
- function is_own(object, name) {
-
-// The object.hasOwnProperty method fails when the property under consideration
-// is named 'hasOwnProperty'. So we have to use this more convoluted form.
-
- return Object.prototype.hasOwnProperty.call(object, name);
- }
-
-// Provide critical ES5 functions to ES3.
-
- if (typeof Array.isArray !== 'function') {
- Array.isArray = function (o) {
- return Object.prototype.toString.apply(o) === '[object Array]';
- };
- }
-
- if (typeof Object.create !== 'function') {
- Object.create = function (o) {
- F.prototype = o;
- return new F();
- };
- }
-
- if (typeof Object.keys !== 'function') {
- Object.keys = function (o) {
- var a = [], k;
- for (k in o) {
- if (is_own(o, k)) {
- a.push(k);
- }
- }
- return a;
- };
- }
-
-// Non standard methods
-
- if (typeof String.prototype.entityify !== 'function') {
- String.prototype.entityify = function () {
- return this
- .replace(/&/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
- };
- }
-
- if (typeof String.prototype.isAlpha !== 'function') {
- String.prototype.isAlpha = function () {
- return (this >= 'a' && this <= 'z\uffff') ||
- (this >= 'A' && this <= 'Z\uffff');
- };
- }
-
- if (typeof String.prototype.isDigit !== 'function') {
- String.prototype.isDigit = function () {
- return (this >= '0' && this <= '9');
- };
- }
-
- if (typeof String.prototype.supplant !== 'function') {
- String.prototype.supplant = function (o) {
- return this.replace(/\{([^{}]*)\}/g, function (a, b) {
- var r = o[b];
- return typeof r === 'string' || typeof r === 'number' ? r : a;
- });
- };
- }
-
- if (typeof String.prototype.name !== 'function') {
- String.prototype.name = function () {
-
-// If the string looks like an identifier, then we can return it as is.
-// If the string contains no control characters, no quote characters, and no
-// backslash characters, then we can simply slap some quotes around it.
-// Otherwise we must also replace the offending characters with safe
-// sequences.
-
- if (ix.test(this)) {
- return this;
- }
- if (nx.test(this)) {
- return '"' + this.replace(nxg, function (a) {
- var c = escapes[a];
- if (c) {
- return c;
- }
- return '\\u' + ('0000' + a.charCodeAt().toString(16)).slice(-4);
- }) + '"';
- }
- return '"' + this + '"';
- };
- }
-
-
- function combine(t, o) {
- var n;
- for (n in o) {
- if (is_own(o, n)) {
- t[n] = o[n];
- }
- }
- }
-
- function assume() {
- if (option.couch)
- combine(predefined, couch);
-
- if (option.rhino)
- combine(predefined, rhino);
-
- if (option.prototypejs)
- combine(predefined, prototypejs);
-
- if (option.node)
- combine(predefined, node);
-
- if (option.devel)
- combine(predefined, devel);
-
- if (option.dojo)
- combine(predefined, dojo);
-
- if (option.browser)
- combine(predefined, browser);
-
- if (option.jquery)
- combine(predefined, jquery);
-
- if (option.mootools)
- combine(predefined, mootools);
-
- if (option.wsh)
- combine(predefined, wsh);
-
- if (option.globalstrict && option.strict !== false)
- option.strict = true;
- }
-
-
-// Produce an error warning.
-
- function quit(message, line, chr) {
- var percentage = Math.floor((line / lines.length) * 100);
-
- throw {
- name: 'JSHintError',
- line: line,
- character: chr,
- message: message + " (" + percentage + "% scanned)."
- };
- }
-
- function warning(m, t, a, b, c, d) {
- var ch, l, w;
- t = t || nexttoken;
- if (t.id === '(end)') { // `~
- t = token;
- }
- l = t.line || 0;
- ch = t.from || 0;
- w = {
- id: '(error)',
- raw: m,
- evidence: lines[l - 1] || '',
- line: l,
- character: ch,
- a: a,
- b: b,
- c: c,
- d: d
- };
- w.reason = m.supplant(w);
- JSHINT.errors.push(w);
- if (option.passfail) {
- quit('Stopping. ', l, ch);
- }
- warnings += 1;
- if (warnings >= option.maxerr) {
- quit("Too many errors.", l, ch);
- }
- return w;
- }
-
- function warningAt(m, l, ch, a, b, c, d) {
- return warning(m, {
- line: l,
- from: ch
- }, a, b, c, d);
- }
-
- function error(m, t, a, b, c, d) {
- var w = warning(m, t, a, b, c, d);
- quit("Stopping, unable to continue.", w.line, w.character);
- }
- function errorAt(m, l, ch, a, b, c, d) {
- return error(m, {
- line: l,
- from: ch
- }, a, b, c, d);
- }
-
-
-
-// lexical analysis and token construction
-
- var lex = (function lex() {
- var character, from, line, s;
-
-// Private lex methods
-
- function nextLine() {
- var at,
- tw; // trailing whitespace check
-
- if (line >= lines.length)
- return false;
-
- character = 1;
- s = lines[line];
- line += 1;
- at = s.search(/ \t/);
-
- if (at >= 0)
- warningAt("Mixed spaces and tabs.", line, at + 1);
-
- s = s.replace(/\t/g, tab);
- at = s.search(cx);
-
- if (at >= 0)
- warningAt("Unsafe character.", line, at);
-
- if (option.maxlen && option.maxlen < s.length)
- warningAt("Line too long.", line, s.length);
-
- // Check for trailing whitespaces
- tw = s.search(/\s+$/);
- if (option.trailing && ~tw && !~s.search(/^\s+$/))
- warningAt("Trailing whitespace.", line, tw);
-
- return true;
- }
-
-// Produce a token object. The token inherits from a syntax symbol.
-
- function it(type, value) {
- var i, t;
- if (type === '(color)' || type === '(range)') {
- t = {type: type};
- } else if (type === '(punctuator)' ||
- (type === '(identifier)' && is_own(syntax, value))) {
- t = syntax[value] || syntax['(error)'];
- } else {
- t = syntax[type];
- }
- t = Object.create(t);
- if (type === '(string)' || type === '(range)') {
- if (!option.scripturl && jx.test(value)) {
- warningAt("Script URL.", line, from);
- }
- }
- if (type === '(identifier)') {
- t.identifier = true;
- if (value === '__proto__' && !option.proto) {
- warningAt("The '{a}' property is deprecated.",
- line, from, value);
- } else if (value === '__iterator__' && !option.iterator) {
- warningAt("'{a}' is only available in JavaScript 1.7.",
- line, from, value);
- } else if (option.nomen && (value.charAt(0) === '_' ||
- value.charAt(value.length - 1) === '_')) {
- warningAt("Unexpected {a} in '{b}'.", line, from,
- "dangling '_'", value);
- }
- }
- t.value = value;
- t.line = line;
- t.character = character;
- t.from = from;
- i = t.id;
- if (i !== '(endline)') {
- prereg = i &&
- (('(,=:[!&|?{};'.indexOf(i.charAt(i.length - 1)) >= 0) ||
- i === 'return');
- }
- return t;
- }
-
-// Public lex methods
-
- return {
- init: function (source) {
- if (typeof source === 'string') {
- lines = source
- .replace(/\r\n/g, '\n')
- .replace(/\r/g, '\n')
- .split('\n');
- } else {
- lines = source;
- }
-
- // If the first line is a shebang (#!), make it a blank and move on.
- // Shebangs are used by Node scripts.
- if (lines[0] && lines[0].substr(0, 2) == '#!')
- lines[0] = '';
-
- line = 0;
- nextLine();
- from = 1;
- },
-
- range: function (begin, end) {
- var c, value = '';
- from = character;
- if (s.charAt(0) !== begin) {
- errorAt("Expected '{a}' and instead saw '{b}'.",
- line, character, begin, s.charAt(0));
- }
- for (;;) {
- s = s.slice(1);
- character += 1;
- c = s.charAt(0);
- switch (c) {
- case '':
- errorAt("Missing '{a}'.", line, character, c);
- break;
- case end:
- s = s.slice(1);
- character += 1;
- return it('(range)', value);
- case '\\':
- warningAt("Unexpected '{a}'.", line, character, c);
- }
- value += c;
- }
-
- },
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
-// token -- this is called by advance to get the next token.
+ var _self = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
- token: function () {
- var b, c, captures, d, depth, high, i, l, low, q, t;
+ _self.delay = _self;
+ _self.schedule = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || 0);
+ };
- function match(x) {
- var r = x.exec(s), r1;
- if (r) {
- l = r[0].length;
- r1 = r[1];
- c = r1.charAt(0);
- s = s.substr(l);
- from = character + l - r1.length;
- character += l;
- return r1;
- }
- }
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
- function string(x) {
- var c, j, r = '';
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
- if (jsonmode && x !== '"') {
- warningAt("Strings must use doublequote.",
- line, character);
- }
+ _self.isPending = function() {
+ return timer;
+ };
- function esc(n) {
- var i = parseInt(s.substr(j + 1, n), 16);
- j += n;
- if (i >= 32 && i <= 126 &&
- i !== 34 && i !== 92 && i !== 39) {
- warningAt("Unnecessary escapement.", line, character);
- }
- character += n;
- c = String.fromCharCode(i);
- }
- j = 0;
- for (;;) {
- while (j >= s.length) {
- j = 0;
- if (!nextLine()) {
- errorAt("Unclosed string.", line, from);
- }
- }
- c = s.charAt(j);
- if (c === x) {
- character += 1;
- s = s.substr(j + 1);
- return it('(string)', r, x);
- }
- if (c < ' ') {
- if (c === '\n' || c === '\r') {
- break;
- }
- warningAt("Control character in string: {a}.",
- line, character + j, s.slice(0, j));
- } else if (c === '\\') {
- j += 1;
- character += 1;
- c = s.charAt(j);
- switch (c) {
- case '\\':
- case '"':
- case '/':
- break;
- case '\'':
- if (jsonmode) {
- warningAt("Avoid \\'.", line, character);
- }
- break;
- case 'b':
- c = '\b';
- break;
- case 'f':
- c = '\f';
- break;
- case 'n':
- c = '\n';
- break;
- case 'r':
- c = '\r';
- break;
- case 't':
- c = '\t';
- break;
- case 'u':
- esc(4);
- break;
- case 'v':
- if (jsonmode) {
- warningAt("Avoid \\v.", line, character);
- }
- c = '\v';
- break;
- case 'x':
- if (jsonmode) {
- warningAt("Avoid \\x-.", line, character);
- }
- esc(2);
- break;
- default:
- warningAt("Bad escapement.", line, character);
- }
- }
- r += c;
- character += 1;
- j += 1;
- }
- }
+ return _self;
+};
+});
+define('ace/mode/javascript/jshint', ['require', 'exports', 'module' ], function(require, exports, module) {
- for (;;) {
- if (!s) {
- return it(nextLine() ? '(endline)' : '(end)', '');
- }
- t = match(tx);
- if (!t) {
- t = '';
- c = '';
- while (s && s < '!') {
- s = s.substr(1);
- }
- if (s) {
- errorAt("Unexpected '{a}'.", line, character, s.substr(0, 1));
- }
- } else {
-
- // identifier
-
- if (c.isAlpha() || c === '_' || c === '$') {
- return it('(identifier)', t);
- }
-
- // number
-
- if (c.isDigit()) {
- if (!isFinite(Number(t))) {
- warningAt("Bad number '{a}'.",
- line, character, t);
- }
- if (s.substr(0, 1).isAlpha()) {
- warningAt("Missing space after '{a}'.",
- line, character, t);
- }
- if (c === '0') {
- d = t.substr(1, 1);
- if (d.isDigit()) {
- if (token.id !== '.') {
- warningAt("Don't use extra leading zeros '{a}'.",
- line, character, t);
- }
- } else if (jsonmode && (d === 'x' || d === 'X')) {
- warningAt("Avoid 0x-. '{a}'.",
- line, character, t);
- }
- }
- if (t.substr(t.length - 1) === '.') {
- warningAt(
+var JSHINT = (function () {
+
+
+ var anonname, // The guessed name for anonymous functions.
+
+ bang = {
+ "<" : true,
+ "<=" : true,
+ "==" : true,
+ "===": true,
+ "!==": true,
+ "!=" : true,
+ ">" : true,
+ ">=" : true,
+ "+" : true,
+ "-" : true,
+ "*" : true,
+ "/" : true,
+ "%" : true
+ },
+ boolOptions = {
+ asi : true, // if automatic semicolon insertion should be tolerated
+ bitwise : true, // if bitwise operators should not be allowed
+ boss : true, // if advanced usage of assignments should be allowed
+ browser : true, // if the standard browser globals should be predefined
+ camelcase : true, // if identifiers should be required in camel case
+ couch : true, // if CouchDB globals should be predefined
+ curly : true, // if curly braces around all blocks should be required
+ debug : true, // if debugger statements should be allowed
+ devel : true, // if logging globals should be predefined (console,
+ dojo : true, // if Dojo Toolkit globals should be predefined
+ eqeqeq : true, // if === should be required
+ eqnull : true, // if == null comparisons should be tolerated
+ es5 : true, // if ES5 syntax should be allowed
+ esnext : true, // if es.next specific syntax should be allowed
+ evil : true, // if eval should be allowed
+ expr : true, // if ExpressionStatement should be allowed as Programs
+ forin : true, // if for in statements must filter
+ funcscope : true, // if only function scope should be used for scope tests
+ globalstrict: true, // if global should be allowed (also
+ immed : true, // if immediate invocations must be wrapped in parens
+ iterator : true, // if the `__iterator__` property should be allowed
+ jquery : true, // if jQuery globals should be predefined
+ lastsemic : true, // if semicolons may be ommitted for the trailing
+ latedef : true, // if the use before definition should not be tolerated
+ laxbreak : true, // if line breaks should not be checked
+ laxcomma : true, // if line breaks should not be checked around commas
+ loopfunc : true, // if functions should be allowed to be defined within
+ mootools : true, // if MooTools globals should be predefined
+ multistr : true, // allow multiline strings
+ newcap : true, // if constructor names must be capitalized
+ noarg : true, // if arguments.caller and arguments.callee should be
+ node : true, // if the Node.js environment globals should be
+ noempty : true, // if empty blocks should be disallowed
+ nonew : true, // if using `new` for side-effects should be disallowed
+ nonstandard : true, // if non-standard (but widely adopted) globals should
+ nomen : true, // if names should be checked
+ onevar : true, // if only one var statement per function should be
+ onecase : true, // if one case switch statements should be allowed
+ passfail : true, // if the scan should stop on first error
+ plusplus : true, // if increment/decrement should not be allowed
+ proto : true, // if the `__proto__` property should be allowed
+ prototypejs : true, // if Prototype and Scriptaculous globals should be
+ regexdash : true, // if unescaped first/last dash (-) inside brackets
+ regexp : true, // if the . should not be allowed in regexp literals
+ rhino : true, // if the Rhino environment globals should be predefined
+ undef : true, // if variables should be declared before used
+ unused : true, // if variables should be always used
+ scripturl : true, // if script-targeted URLs should be tolerated
+ shadow : true, // if variable shadowing should be tolerated
+ smarttabs : true, // if smarttabs should be tolerated
+ strict : true, // require the pragma
+ sub : true, // if all forms of subscript notation are tolerated
+ supernew : true, // if `new function () { ... };` and `new Object;`
+ trailing : true, // if trailing whitespace rules apply
+ validthis : true, // if 'this' inside a non-constructor function is valid.
+ withstmt : true, // if with statements should be allowed
+ white : true, // if strict whitespace rules apply
+ worker : true, // if Web Worker script symbols should be allowed
+ wsh : true, // if the Windows Scripting Host environment globals
+ yui : true // YUI variables should be predefined
+ },
+ valOptions = {
+ maxlen : false,
+ indent : false,
+ maxerr : false,
+ predef : false,
+ quotmark : false, //'single'|'double'|true
+ scope : false,
+ maxstatements: false, // {int} max statements per function
+ maxdepth : false, // {int} max nested block depth per function
+ maxparams : false, // {int} max params per function
+ maxcomplexity: false // {int} max cyclomatic complexity per function
+ },
+ invertedOptions = {
+ bitwise : true,
+ forin : true,
+ newcap : true,
+ nomen : true,
+ plusplus : true,
+ regexp : true,
+ undef : true,
+ white : true,
+ eqeqeq : true,
+ onevar : true
+ },
+ renamedOptions = {
+ eqeq : "eqeqeq",
+ vars : "onevar",
+ windows : "wsh"
+ },
+ browser = {
+ ArrayBuffer : false,
+ ArrayBufferView : false,
+ Audio : false,
+ Blob : false,
+ addEventListener : false,
+ applicationCache : false,
+ atob : false,
+ blur : false,
+ btoa : false,
+ clearInterval : false,
+ clearTimeout : false,
+ close : false,
+ closed : false,
+ DataView : false,
+ DOMParser : false,
+ defaultStatus : false,
+ document : false,
+ event : false,
+ FileReader : false,
+ Float32Array : false,
+ Float64Array : false,
+ FormData : false,
+ focus : false,
+ frames : false,
+ getComputedStyle : false,
+ HTMLElement : false,
+ HTMLAnchorElement : false,
+ HTMLBaseElement : false,
+ HTMLBlockquoteElement : false,
+ HTMLBodyElement : false,
+ HTMLBRElement : false,
+ HTMLButtonElement : false,
+ HTMLCanvasElement : false,
+ HTMLDirectoryElement : false,
+ HTMLDivElement : false,
+ HTMLDListElement : false,
+ HTMLFieldSetElement : false,
+ HTMLFontElement : false,
+ HTMLFormElement : false,
+ HTMLFrameElement : false,
+ HTMLFrameSetElement : false,
+ HTMLHeadElement : false,
+ HTMLHeadingElement : false,
+ HTMLHRElement : false,
+ HTMLHtmlElement : false,
+ HTMLIFrameElement : false,
+ HTMLImageElement : false,
+ HTMLInputElement : false,
+ HTMLIsIndexElement : false,
+ HTMLLabelElement : false,
+ HTMLLayerElement : false,
+ HTMLLegendElement : false,
+ HTMLLIElement : false,
+ HTMLLinkElement : false,
+ HTMLMapElement : false,
+ HTMLMenuElement : false,
+ HTMLMetaElement : false,
+ HTMLModElement : false,
+ HTMLObjectElement : false,
+ HTMLOListElement : false,
+ HTMLOptGroupElement : false,
+ HTMLOptionElement : false,
+ HTMLParagraphElement : false,
+ HTMLParamElement : false,
+ HTMLPreElement : false,
+ HTMLQuoteElement : false,
+ HTMLScriptElement : false,
+ HTMLSelectElement : false,
+ HTMLStyleElement : false,
+ HTMLTableCaptionElement : false,
+ HTMLTableCellElement : false,
+ HTMLTableColElement : false,
+ HTMLTableElement : false,
+ HTMLTableRowElement : false,
+ HTMLTableSectionElement : false,
+ HTMLTextAreaElement : false,
+ HTMLTitleElement : false,
+ HTMLUListElement : false,
+ HTMLVideoElement : false,
+ history : false,
+ Int16Array : false,
+ Int32Array : false,
+ Int8Array : false,
+ Image : false,
+ length : false,
+ localStorage : false,
+ location : false,
+ MessageChannel : false,
+ MessageEvent : false,
+ MessagePort : false,
+ moveBy : false,
+ moveTo : false,
+ MutationObserver : false,
+ name : false,
+ Node : false,
+ NodeFilter : false,
+ navigator : false,
+ onbeforeunload : true,
+ onblur : true,
+ onerror : true,
+ onfocus : true,
+ onload : true,
+ onresize : true,
+ onunload : true,
+ open : false,
+ openDatabase : false,
+ opener : false,
+ Option : false,
+ parent : false,
+ print : false,
+ removeEventListener : false,
+ resizeBy : false,
+ resizeTo : false,
+ screen : false,
+ scroll : false,
+ scrollBy : false,
+ scrollTo : false,
+ sessionStorage : false,
+ setInterval : false,
+ setTimeout : false,
+ SharedWorker : false,
+ status : false,
+ top : false,
+ Uint16Array : false,
+ Uint32Array : false,
+ Uint8Array : false,
+ WebSocket : false,
+ window : false,
+ Worker : false,
+ XMLHttpRequest : false,
+ XMLSerializer : false,
+ XPathEvaluator : false,
+ XPathException : false,
+ XPathExpression : false,
+ XPathNamespace : false,
+ XPathNSResolver : false,
+ XPathResult : false
+ },
+
+ couch = {
+ "require" : false,
+ respond : false,
+ getRow : false,
+ emit : false,
+ send : false,
+ start : false,
+ sum : false,
+ log : false,
+ exports : false,
+ module : false,
+ provides : false
+ },
+
+ declared, // Globals that were declared using /*global ... */ syntax.
+
+ devel = {
+ alert : false,
+ confirm : false,
+ console : false,
+ Debug : false,
+ opera : false,
+ prompt : false
+ },
+
+ dojo = {
+ dojo : false,
+ dijit : false,
+ dojox : false,
+ define : false,
+ "require" : false
+ },
+
+ funct, // The current function
+
+ functionicity = [
+ "closure", "exception", "global", "label",
+ "outer", "unused", "var"
+ ],
+
+ functions, // All of the functions
+
+ global, // The global scope
+ implied, // Implied globals
+ inblock,
+ indent,
+ jsonmode,
+
+ jquery = {
+ "$" : false,
+ jQuery : false
+ },
+
+ lines,
+ lookahead,
+ member,
+ membersOnly,
+
+ mootools = {
+ "$" : false,
+ "$$" : false,
+ Asset : false,
+ Browser : false,
+ Chain : false,
+ Class : false,
+ Color : false,
+ Cookie : false,
+ Core : false,
+ Document : false,
+ DomReady : false,
+ DOMEvent : false,
+ DOMReady : false,
+ Drag : false,
+ Element : false,
+ Elements : false,
+ Event : false,
+ Events : false,
+ Fx : false,
+ Group : false,
+ Hash : false,
+ HtmlTable : false,
+ Iframe : false,
+ IframeShim : false,
+ InputValidator : false,
+ instanceOf : false,
+ Keyboard : false,
+ Locale : false,
+ Mask : false,
+ MooTools : false,
+ Native : false,
+ Options : false,
+ OverText : false,
+ Request : false,
+ Scroller : false,
+ Slick : false,
+ Slider : false,
+ Sortables : false,
+ Spinner : false,
+ Swiff : false,
+ Tips : false,
+ Type : false,
+ typeOf : false,
+ URI : false,
+ Window : false
+ },
+
+ nexttoken,
+
+ node = {
+ __filename : false,
+ __dirname : false,
+ Buffer : false,
+ console : false,
+ exports : true, // In Node it is ok to exports = module.exports = foo();
+ GLOBAL : false,
+ global : false,
+ module : false,
+ process : false,
+ require : false,
+ setTimeout : false,
+ clearTimeout : false,
+ setInterval : false,
+ clearInterval : false
+ },
+
+ noreach,
+ option,
+ predefined, // Global variables defined by option
+ prereg,
+ prevtoken,
+
+ prototypejs = {
+ "$" : false,
+ "$$" : false,
+ "$A" : false,
+ "$F" : false,
+ "$H" : false,
+ "$R" : false,
+ "$break" : false,
+ "$continue" : false,
+ "$w" : false,
+ Abstract : false,
+ Ajax : false,
+ Class : false,
+ Enumerable : false,
+ Element : false,
+ Event : false,
+ Field : false,
+ Form : false,
+ Hash : false,
+ Insertion : false,
+ ObjectRange : false,
+ PeriodicalExecuter: false,
+ Position : false,
+ Prototype : false,
+ Selector : false,
+ Template : false,
+ Toggle : false,
+ Try : false,
+ Autocompleter : false,
+ Builder : false,
+ Control : false,
+ Draggable : false,
+ Draggables : false,
+ Droppables : false,
+ Effect : false,
+ Sortable : false,
+ SortableObserver : false,
+ Sound : false,
+ Scriptaculous : false
+ },
+
+ quotmark,
+
+ rhino = {
+ defineClass : false,
+ deserialize : false,
+ gc : false,
+ help : false,
+ importPackage: false,
+ "java" : false,
+ load : false,
+ loadClass : false,
+ print : false,
+ quit : false,
+ readFile : false,
+ readUrl : false,
+ runCommand : false,
+ seal : false,
+ serialize : false,
+ spawn : false,
+ sync : false,
+ toint32 : false,
+ version : false
+ },
+
+ scope, // The current scope
+ stack,
+ standard = {
+ Array : false,
+ Boolean : false,
+ Date : false,
+ decodeURI : false,
+ decodeURIComponent : false,
+ encodeURI : false,
+ encodeURIComponent : false,
+ Error : false,
+ "eval" : false,
+ EvalError : false,
+ Function : false,
+ hasOwnProperty : false,
+ isFinite : false,
+ isNaN : false,
+ JSON : false,
+ Map : false,
+ Math : false,
+ NaN : false,
+ Number : false,
+ Object : false,
+ parseInt : false,
+ parseFloat : false,
+ RangeError : false,
+ ReferenceError : false,
+ RegExp : false,
+ Set : false,
+ String : false,
+ SyntaxError : false,
+ TypeError : false,
+ URIError : false,
+ WeakMap : false
+ },
+ nonstandard = {
+ escape : false,
+ unescape : false
+ },
+
+ directive,
+ syntax = {},
+ tab,
+ token,
+ unuseds,
+ urls,
+ useESNextSyntax,
+ warnings,
+
+ worker = {
+ importScripts : true,
+ postMessage : true,
+ self : true
+ },
+
+ wsh = {
+ ActiveXObject : true,
+ Enumerator : true,
+ GetObject : true,
+ ScriptEngine : true,
+ ScriptEngineBuildVersion : true,
+ ScriptEngineMajorVersion : true,
+ ScriptEngineMinorVersion : true,
+ VBArray : true,
+ WSH : true,
+ WScript : true,
+ XDomainRequest : true
+ },
+
+ yui = {
+ YUI : false,
+ Y : false,
+ YUI_config : false
+ };
+ var ax, cx, tx, nx, nxg, lx, ix, jx, ft;
+ (function () {
+ ax = /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
+ cx = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+ tx = /^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/=(?!(\S*\/[gim]?))|\/(\*(jshint|jslint|members?|global)?|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/;
+ nx = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+ nxg = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+ lx = /\*\//;
+ ix = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;
+ jx = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
+ ft = /^\s*\/\*\s*falls\sthrough\s*\*\/\s*$/;
+ }());
+
+ function F() {} // Used by Object.create
+
+ function is_own(object, name) {
+ return Object.prototype.hasOwnProperty.call(object, name);
+ }
+
+ function checkOption(name, t) {
+ if (valOptions[name] === undefined && boolOptions[name] === undefined) {
+ warning("Bad option: '" + name + "'.", t);
+ }
+ }
+
+ function isString(obj) {
+ return Object.prototype.toString.call(obj) === "[object String]";
+ }
+
+ if (typeof Array.isArray !== "function") {
+ Array.isArray = function (o) {
+ return Object.prototype.toString.apply(o) === "[object Array]";
+ };
+ }
+
+ if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function (fn, scope) {
+ var len = this.length;
+
+ for (var i = 0; i < len; i++) {
+ fn.call(scope || this, this[i], i, this);
+ }
+ };
+ }
+
+ if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
+ if (this === null || this === undefined) {
+ throw new TypeError();
+ }
+
+ var t = new Object(this);
+ var len = t.length >>> 0;
+
+ if (len === 0) {
+ return -1;
+ }
+
+ var n = 0;
+ if (arguments.length > 0) {
+ n = Number(arguments[1]);
+ if (n != n) { // shortcut for verifying if it's NaN
+ n = 0;
+ } else if (n !== 0 && n != Infinity && n != -Infinity) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ }
+
+ if (n >= len) {
+ return -1;
+ }
+
+ var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
+ for (; k < len; k++) {
+ if (k in t && t[k] === searchElement) {
+ return k;
+ }
+ }
+
+ return -1;
+ };
+ }
+
+ if (typeof Object.create !== "function") {
+ Object.create = function (o) {
+ F.prototype = o;
+ return new F();
+ };
+ }
+
+ if (typeof Object.keys !== "function") {
+ Object.keys = function (o) {
+ var a = [], k;
+ for (k in o) {
+ if (is_own(o, k)) {
+ a.push(k);
+ }
+ }
+ return a;
+ };
+ }
+
+ function isAlpha(str) {
+ return (str >= "a" && str <= "z\uffff") ||
+ (str >= "A" && str <= "Z\uffff");
+ }
+
+ function isDigit(str) {
+ return (str >= "0" && str <= "9");
+ }
+
+ function isIdentifier(token, value) {
+ if (!token)
+ return false;
+
+ if (!token.identifier || token.value !== value)
+ return false;
+
+ return true;
+ }
+
+ function supplant(str, data) {
+ return str.replace(/\{([^{}]*)\}/g, function (a, b) {
+ var r = data[b];
+ return typeof r === "string" || typeof r === "number" ? r : a;
+ });
+ }
+
+ function combine(t, o) {
+ var n;
+ for (n in o) {
+ if (is_own(o, n) && !is_own(JSHINT.blacklist, n)) {
+ t[n] = o[n];
+ }
+ }
+ }
+
+ function updatePredefined() {
+ Object.keys(JSHINT.blacklist).forEach(function (key) {
+ delete predefined[key];
+ });
+ }
+
+ function assume() {
+ if (option.couch) {
+ combine(predefined, couch);
+ }
+
+ if (option.rhino) {
+ combine(predefined, rhino);
+ }
+
+ if (option.prototypejs) {
+ combine(predefined, prototypejs);
+ }
+
+ if (option.node) {
+ combine(predefined, node);
+ option.globalstrict = true;
+ }
+
+ if (option.devel) {
+ combine(predefined, devel);
+ }
+
+ if (option.dojo) {
+ combine(predefined, dojo);
+ }
+
+ if (option.browser) {
+ combine(predefined, browser);
+ }
+
+ if (option.nonstandard) {
+ combine(predefined, nonstandard);
+ }
+
+ if (option.jquery) {
+ combine(predefined, jquery);
+ }
+
+ if (option.mootools) {
+ combine(predefined, mootools);
+ }
+
+ if (option.worker) {
+ combine(predefined, worker);
+ }
+
+ if (option.wsh) {
+ combine(predefined, wsh);
+ }
+
+ if (option.esnext) {
+ useESNextSyntax();
+ }
+
+ if (option.globalstrict && option.strict !== false) {
+ option.strict = true;
+ }
+
+ if (option.yui) {
+ combine(predefined, yui);
+ }
+ }
+ function quit(message, line, chr) {
+ var percentage = Math.floor((line / lines.length) * 100);
+
+ throw {
+ name: "JSHintError",
+ line: line,
+ character: chr,
+ message: message + " (" + percentage + "% scanned).",
+ raw: message
+ };
+ }
+
+ function isundef(scope, m, t, a) {
+ return JSHINT.undefs.push([scope, m, t, a]);
+ }
+
+ function warning(m, t, a, b, c, d) {
+ var ch, l, w;
+ t = t || nexttoken;
+ if (t.id === "(end)") { // `~
+ t = token;
+ }
+ l = t.line || 0;
+ ch = t.from || 0;
+ w = {
+ id: "(error)",
+ raw: m,
+ evidence: lines[l - 1] || "",
+ line: l,
+ character: ch,
+ scope: JSHINT.scope,
+ a: a,
+ b: b,
+ c: c,
+ d: d
+ };
+ w.reason = supplant(m, w);
+ JSHINT.errors.push(w);
+ if (option.passfail) {
+ quit("Stopping. ", l, ch);
+ }
+ warnings += 1;
+ if (warnings >= option.maxerr) {
+ quit("Too many errors.", l, ch);
+ }
+ return w;
+ }
+
+ function warningAt(m, l, ch, a, b, c, d) {
+ return warning(m, {
+ line: l,
+ from: ch
+ }, a, b, c, d);
+ }
+
+ function error(m, t, a, b, c, d) {
+ warning(m, t, a, b, c, d);
+ }
+
+ function errorAt(m, l, ch, a, b, c, d) {
+ return error(m, {
+ line: l,
+ from: ch
+ }, a, b, c, d);
+ }
+ function addInternalSrc(elem, src) {
+ var i;
+ i = {
+ id: "(internal)",
+ elem: elem,
+ value: src
+ };
+ JSHINT.internals.push(i);
+ return i;
+ }
+
+ var lex = (function lex() {
+ var character, from, line, s;
+
+ function nextLine() {
+ var at,
+ match,
+ tw; // trailing whitespace check
+
+ if (line >= lines.length)
+ return false;
+
+ character = 1;
+ s = lines[line];
+ line += 1;
+ if (option.smarttabs) {
+ match = s.match(/(\/\/)? \t/);
+ at = match && !match[1] ? 0 : -1;
+ } else {
+ at = s.search(/ \t|\t [^\*]/);
+ }
+
+ if (at >= 0)
+ warningAt("Mixed spaces and tabs.", line, at + 1);
+
+ s = s.replace(/\t/g, tab);
+ at = s.search(cx);
+
+ if (at >= 0)
+ warningAt("Unsafe character.", line, at);
+
+ if (option.maxlen && option.maxlen < s.length)
+ warningAt("Line too long.", line, s.length);
+ tw = option.trailing && s.match(/^(.*?)\s+$/);
+ if (tw && !/^\s+$/.test(s)) {
+ warningAt("Trailing whitespace.", line, tw[1].length + 1);
+ }
+ return true;
+ }
+
+ function it(type, value) {
+ var i, t;
+
+ function checkName(name) {
+ if (!option.proto && name === "__proto__") {
+ warningAt("The '{a}' property is deprecated.", line, from, name);
+ return;
+ }
+
+ if (!option.iterator && name === "__iterator__") {
+ warningAt("'{a}' is only available in JavaScript 1.7.", line, from, name);
+ return;
+ }
+
+ var hasDangling = /^(_+.*|.*_+)$/.test(name);
+
+ if (option.nomen && hasDangling && name !== "_") {
+ if (option.node && token.id !== "." && /^(__dirname|__filename)$/.test(name))
+ return;
+
+ warningAt("Unexpected {a} in '{b}'.", line, from, "dangling '_'", name);
+ return;
+ }
+
+ if (option.camelcase) {
+ if (name.replace(/^_+/, "").indexOf("_") > -1 && !name.match(/^[A-Z0-9_]*$/)) {
+ warningAt("Identifier '{a}' is not in camel case.", line, from, value);
+ }
+ }
+ }
+
+ if (type === "(color)" || type === "(range)") {
+ t = {type: type};
+ } else if (type === "(punctuator)" ||
+ (type === "(identifier)" && is_own(syntax, value))) {
+ t = syntax[value] || syntax["(error)"];
+ } else {
+ t = syntax[type];
+ }
+
+ t = Object.create(t);
+
+ if (type === "(string)" || type === "(range)") {
+ if (!option.scripturl && jx.test(value)) {
+ warningAt("Script URL.", line, from);
+ }
+ }
+
+ if (type === "(identifier)") {
+ t.identifier = true;
+ checkName(value);
+ }
+
+ t.value = value;
+ t.line = line;
+ t.character = character;
+ t.from = from;
+ i = t.id;
+ if (i !== "(endline)") {
+ prereg = i &&
+ (("(,=:[!&|?{};".indexOf(i.charAt(i.length - 1)) >= 0) ||
+ i === "return" ||
+ i === "case");
+ }
+ return t;
+ }
+ return {
+ init: function (source) {
+ if (typeof source === "string") {
+ lines = source
+ .replace(/\r\n/g, "\n")
+ .replace(/\r/g, "\n")
+ .split("\n");
+ } else {
+ lines = source;
+ }
+ if (lines[0] && lines[0].substr(0, 2) === "#!")
+ lines[0] = "";
+
+ line = 0;
+ nextLine();
+ from = 1;
+ },
+
+ range: function (begin, end) {
+ var c, value = "";
+ from = character;
+ if (s.charAt(0) !== begin) {
+ errorAt("Expected '{a}' and instead saw '{b}'.",
+ line, character, begin, s.charAt(0));
+ }
+ for (;;) {
+ s = s.slice(1);
+ character += 1;
+ c = s.charAt(0);
+ switch (c) {
+ case "":
+ errorAt("Missing '{a}'.", line, character, c);
+ break;
+ case end:
+ s = s.slice(1);
+ character += 1;
+ return it("(range)", value);
+ case "\\":
+ warningAt("Unexpected '{a}'.", line, character, c);
+ }
+ value += c;
+ }
+
+ },
+ token: function () {
+ var b, c, captures, d, depth, high, i, l, low, q, t, isLiteral, isInRange, n;
+
+ function match(x) {
+ var r = x.exec(s), r1;
+
+ if (r) {
+ l = r[0].length;
+ r1 = r[1];
+ c = r1.charAt(0);
+ s = s.substr(l);
+ from = character + l - r1.length;
+ character += l;
+ return r1;
+ }
+ }
+
+ function string(x) {
+ var c, j, r = "", allowNewLine = false;
+
+ if (jsonmode && x !== "\"") {
+ warningAt("Strings must use doublequote.",
+ line, character);
+ }
+
+ if (option.quotmark) {
+ if (option.quotmark === "single" && x !== "'") {
+ warningAt("Strings must use singlequote.",
+ line, character);
+ } else if (option.quotmark === "double" && x !== "\"") {
+ warningAt("Strings must use doublequote.",
+ line, character);
+ } else if (option.quotmark === true) {
+ quotmark = quotmark || x;
+ if (quotmark !== x) {
+ warningAt("Mixed double and single quotes.",
+ line, character);
+ }
+ }
+ }
+
+ function esc(n) {
+ var i = parseInt(s.substr(j + 1, n), 16);
+ j += n;
+ if (i >= 32 && i <= 126 &&
+ i !== 34 && i !== 92 && i !== 39) {
+ warningAt("Unnecessary escapement.", line, character);
+ }
+ character += n;
+ c = String.fromCharCode(i);
+ }
+
+ j = 0;
+
+unclosedString:
+ for (;;) {
+ while (j >= s.length) {
+ j = 0;
+
+ var cl = line, cf = from;
+ if (!nextLine()) {
+ errorAt("Unclosed string.", cl, cf);
+ break unclosedString;
+ }
+
+ if (allowNewLine) {
+ allowNewLine = false;
+ } else {
+ warningAt("Unclosed string.", cl, cf);
+ }
+ }
+
+ c = s.charAt(j);
+ if (c === x) {
+ character += 1;
+ s = s.substr(j + 1);
+ return it("(string)", r, x);
+ }
+
+ if (c < " ") {
+ if (c === "\n" || c === "\r") {
+ break;
+ }
+ warningAt("Control character in string: {a}.",
+ line, character + j, s.slice(0, j));
+ } else if (c === "\\") {
+ j += 1;
+ character += 1;
+ c = s.charAt(j);
+ n = s.charAt(j + 1);
+ switch (c) {
+ case "\\":
+ case "\"":
+ case "/":
+ break;
+ case "\'":
+ if (jsonmode) {
+ warningAt("Avoid \\'.", line, character);
+ }
+ break;
+ case "b":
+ c = "\b";
+ break;
+ case "f":
+ c = "\f";
+ break;
+ case "n":
+ c = "\n";
+ break;
+ case "r":
+ c = "\r";
+ break;
+ case "t":
+ c = "\t";
+ break;
+ case "0":
+ c = "\0";
+ if (n >= 0 && n <= 7 && directive["use strict"]) {
+ warningAt(
+ "Octal literals are not allowed in strict mode.",
+ line, character);
+ }
+ break;
+ case "u":
+ esc(4);
+ break;
+ case "v":
+ if (jsonmode) {
+ warningAt("Avoid \\v.", line, character);
+ }
+ c = "\v";
+ break;
+ case "x":
+ if (jsonmode) {
+ warningAt("Avoid \\x-.", line, character);
+ }
+ esc(2);
+ break;
+ case "":
+ allowNewLine = true;
+ if (option.multistr) {
+ if (jsonmode) {
+ warningAt("Avoid EOL escapement.", line, character);
+ }
+ c = "";
+ character -= 1;
+ break;
+ }
+ warningAt("Bad escapement of EOL. Use option multistr if needed.",
+ line, character);
+ break;
+ case "!":
+ if (s.charAt(j - 2) === "<")
+ break;
+ default:
+ warningAt("Bad escapement.", line, character);
+ }
+ }
+ r += c;
+ character += 1;
+ j += 1;
+ }
+ }
+
+ for (;;) {
+ if (!s) {
+ return it(nextLine() ? "(endline)" : "(end)", "");
+ }
+
+ t = match(tx);
+
+ if (!t) {
+ t = "";
+ c = "";
+ while (s && s < "!") {
+ s = s.substr(1);
+ }
+ if (s) {
+ errorAt("Unexpected '{a}'.", line, character, s.substr(0, 1));
+ s = "";
+ }
+ } else {
+
+ if (isAlpha(c) || c === "_" || c === "$") {
+ return it("(identifier)", t);
+ }
+
+ if (isDigit(c)) {
+ if (!isFinite(Number(t))) {
+ warningAt("Bad number '{a}'.",
+ line, character, t);
+ }
+ if (isAlpha(s.substr(0, 1))) {
+ warningAt("Missing space after '{a}'.",
+ line, character, t);
+ }
+ if (c === "0") {
+ d = t.substr(1, 1);
+ if (isDigit(d)) {
+ if (token.id !== ".") {
+ warningAt("Don't use extra leading zeros '{a}'.",
+ line, character, t);
+ }
+ } else if (jsonmode && (d === "x" || d === "X")) {
+ warningAt("Avoid 0x-. '{a}'.",
+ line, character, t);
+ }
+ }
+ if (t.substr(t.length - 1) === ".") {
+ warningAt(
"A trailing decimal point can be confused with a dot '{a}'.", line, character, t);
- }
- return it('(number)', t);
- }
- switch (t) {
-
- // string
-
- case '"':
- case "'":
- return string(t);
-
- // // comment
-
- case '//':
- if (src) {
- warningAt("Unexpected comment.", line, character);
- }
- s = '';
- token.comment = true;
- break;
-
- // /* comment
-
- case '/*':
- if (src) {
- warningAt("Unexpected comment.", line, character);
- }
- for (;;) {
- i = s.search(lx);
- if (i >= 0) {
- break;
- }
- if (!nextLine()) {
- errorAt("Unclosed comment.", line, character);
- }
- }
- character += i + 2;
- if (s.substr(i, 1) === '/') {
- errorAt("Nested comment.", line, character);
- }
- s = s.substr(i + 2);
- token.comment = true;
- break;
-
- // /*members /*jshint /*global
-
- case '/*members':
- case '/*member':
- case '/*jshint':
- case '/*jslint':
- case '/*global':
- case '*/':
- return {
- value: t,
- type: 'special',
- line: line,
- character: character,
- from: from
- };
-
- case '':
- break;
- // /
- case '/':
- if (token.id === '/=') {
- errorAt(
-"A regular expression literal can be confused with '/='.", line, from);
- }
- if (prereg) {
- depth = 0;
- captures = 0;
- l = 0;
- for (;;) {
- b = true;
- c = s.charAt(l);
- l += 1;
- switch (c) {
- case '':
- errorAt("Unclosed regular expression.",
- line, from);
- return;
- case '/':
- if (depth > 0) {
- warningAt("Unescaped '{a}'.",
- line, from + l, '/');
- }
- c = s.substr(0, l - 1);
- q = {
- g: true,
- i: true,
- m: true
- };
- while (q[s.charAt(l)] === true) {
- q[s.charAt(l)] = false;
- l += 1;
- }
- character += l;
- s = s.substr(l);
- q = s.charAt(0);
- if (q === '/' || q === '*') {
- errorAt("Confusing regular expression.",
- line, from);
- }
- return it('(regexp)', c);
- case '\\':
- c = s.charAt(l);
- if (c < ' ') {
- warningAt(
+ }
+ return it("(number)", t);
+ }
+ switch (t) {
+
+ case "\"":
+ case "'":
+ return string(t);
+
+ case "//":
+ s = "";
+ token.comment = true;
+ break;
+
+ case "/*":
+ for (;;) {
+ i = s.search(lx);
+ if (i >= 0) {
+ break;
+ }
+ if (!nextLine()) {
+ errorAt("Unclosed comment.", line, character);
+ }
+ }
+ s = s.substr(i + 2);
+ token.comment = true;
+ break;
+
+ case "/*members":
+ case "/*member":
+ case "/*jshint":
+ case "/*jslint":
+ case "/*global":
+ case "*/":
+ return {
+ value: t,
+ type: "special",
+ line: line,
+ character: character,
+ from: from
+ };
+
+ case "":
+ break;
+ case "/":
+ if (s.charAt(0) === "=") {
+ errorAt("A regular expression literal can be confused with '/='.",
+ line, from);
+ }
+
+ if (prereg) {
+ depth = 0;
+ captures = 0;
+ l = 0;
+ for (;;) {
+ b = true;
+ c = s.charAt(l);
+ l += 1;
+ switch (c) {
+ case "":
+ errorAt("Unclosed regular expression.", line, from);
+ return quit("Stopping.", line, from);
+ case "/":
+ if (depth > 0) {
+ warningAt("{a} unterminated regular expression " +
+ "group(s).", line, from + l, depth);
+ }
+ c = s.substr(0, l - 1);
+ q = {
+ g: true,
+ i: true,
+ m: true
+ };
+ while (q[s.charAt(l)] === true) {
+ q[s.charAt(l)] = false;
+ l += 1;
+ }
+ character += l;
+ s = s.substr(l);
+ q = s.charAt(0);
+ if (q === "/" || q === "*") {
+ errorAt("Confusing regular expression.",
+ line, from);
+ }
+ return it("(regexp)", c);
+ case "\\":
+ c = s.charAt(l);
+ if (c < " ") {
+ warningAt(
"Unexpected control character in regular expression.", line, from + l);
- } else if (c === '<') {
- warningAt(
+ } else if (c === "<") {
+ warningAt(
"Unexpected escaped character '{a}' in regular expression.", line, from + l, c);
- }
- l += 1;
- break;
- case '(':
- depth += 1;
- b = false;
- if (s.charAt(l) === '?') {
- l += 1;
- switch (s.charAt(l)) {
- case ':':
- case '=':
- case '!':
- l += 1;
- break;
- default:
- warningAt(
-"Expected '{a}' and instead saw '{b}'.", line, from + l, ':', s.charAt(l));
- }
- } else {
- captures += 1;
- }
- break;
- case '|':
- b = false;
- break;
- case ')':
- if (depth === 0) {
- warningAt("Unescaped '{a}'.",
- line, from + l, ')');
- } else {
- depth -= 1;
- }
- break;
- case ' ':
- q = 1;
- while (s.charAt(l) === ' ') {
- l += 1;
- q += 1;
- }
- if (q > 1) {
- warningAt(
+ }
+ l += 1;
+ break;
+ case "(":
+ depth += 1;
+ b = false;
+ if (s.charAt(l) === "?") {
+ l += 1;
+ switch (s.charAt(l)) {
+ case ":":
+ case "=":
+ case "!":
+ l += 1;
+ break;
+ default:
+ warningAt(
+"Expected '{a}' and instead saw '{b}'.", line, from + l, ":", s.charAt(l));
+ }
+ } else {
+ captures += 1;
+ }
+ break;
+ case "|":
+ b = false;
+ break;
+ case ")":
+ if (depth === 0) {
+ warningAt("Unescaped '{a}'.",
+ line, from + l, ")");
+ } else {
+ depth -= 1;
+ }
+ break;
+ case " ":
+ q = 1;
+ while (s.charAt(l) === " ") {
+ l += 1;
+ q += 1;
+ }
+ if (q > 1) {
+ warningAt(
"Spaces are hard to count. Use {{a}}.", line, from + l, q);
- }
- break;
- case '[':
- c = s.charAt(l);
- if (c === '^') {
- l += 1;
- if (option.regexp) {
- warningAt("Insecure '{a}'.",
- line, from + l, c);
- } else if (s.charAt(l) === ']') {
- errorAt("Unescaped '{a}'.",
- line, from + l, '^');
- }
- }
- q = false;
- if (c === ']') {
- warningAt("Empty class.", line,
- from + l - 1);
- q = true;
- }
-klass: do {
- c = s.charAt(l);
- l += 1;
- switch (c) {
- case '[':
- case '^':
- warningAt("Unescaped '{a}'.",
- line, from + l, c);
- q = true;
- break;
- case '-':
- if (q) {
- q = false;
- } else {
- warningAt("Unescaped '{a}'.",
- line, from + l, '-');
- q = true;
- }
- break;
- case ']':
- if (!q && !option.regexdash) {
- warningAt("Unescaped '{a}'.",
- line, from + l - 1, '-');
- }
- break klass;
- case '\\':
- c = s.charAt(l);
- if (c < ' ') {
- warningAt(
+ }
+ break;
+ case "[":
+ c = s.charAt(l);
+ if (c === "^") {
+ l += 1;
+ if (s.charAt(l) === "]") {
+ errorAt("Unescaped '{a}'.",
+ line, from + l, "^");
+ }
+ }
+ if (c === "]") {
+ warningAt("Empty class.", line,
+ from + l - 1);
+ }
+ isLiteral = false;
+ isInRange = false;
+klass:
+ do {
+ c = s.charAt(l);
+ l += 1;
+ switch (c) {
+ case "[":
+ case "^":
+ warningAt("Unescaped '{a}'.",
+ line, from + l, c);
+ if (isInRange) {
+ isInRange = false;
+ } else {
+ isLiteral = true;
+ }
+ break;
+ case "-":
+ if (isLiteral && !isInRange) {
+ isLiteral = false;
+ isInRange = true;
+ } else if (isInRange) {
+ isInRange = false;
+ } else if (s.charAt(l) === "]") {
+ isInRange = true;
+ } else {
+ if (option.regexdash !== (l === 2 || (l === 3 &&
+ s.charAt(1) === "^"))) {
+ warningAt("Unescaped '{a}'.",
+ line, from + l - 1, "-");
+ }
+ isLiteral = true;
+ }
+ break;
+ case "]":
+ if (isInRange && !option.regexdash) {
+ warningAt("Unescaped '{a}'.",
+ line, from + l - 1, "-");
+ }
+ break klass;
+ case "\\":
+ c = s.charAt(l);
+ if (c < " ") {
+ warningAt(
"Unexpected control character in regular expression.", line, from + l);
- } else if (c === '<') {
- warningAt(
+ } else if (c === "<") {
+ warningAt(
"Unexpected escaped character '{a}' in regular expression.", line, from + l, c);
- }
- l += 1;
- q = true;
- break;
- case '/':
- warningAt("Unescaped '{a}'.",
- line, from + l - 1, '/');
- q = true;
- break;
- case '<':
- q = true;
- break;
- default:
- q = true;
- }
- } while (c);
- break;
- case '.':
- if (option.regexp) {
- warningAt("Insecure '{a}'.", line,
- from + l, c);
- }
- break;
- case ']':
- case '?':
- case '{':
- case '}':
- case '+':
- case '*':
- warningAt("Unescaped '{a}'.", line,
- from + l, c);
- }
- if (b) {
- switch (s.charAt(l)) {
- case '?':
- case '+':
- case '*':
- l += 1;
- if (s.charAt(l) === '?') {
- l += 1;
- }
- break;
- case '{':
- l += 1;
- c = s.charAt(l);
- if (c < '0' || c > '9') {
- warningAt(
+ }
+ l += 1;
+ if (/[wsd]/i.test(c)) {
+ if (isInRange) {
+ warningAt("Unescaped '{a}'.",
+ line, from + l, "-");
+ isInRange = false;
+ }
+ isLiteral = false;
+ } else if (isInRange) {
+ isInRange = false;
+ } else {
+ isLiteral = true;
+ }
+ break;
+ case "/":
+ warningAt("Unescaped '{a}'.",
+ line, from + l - 1, "/");
+
+ if (isInRange) {
+ isInRange = false;
+ } else {
+ isLiteral = true;
+ }
+ break;
+ case "<":
+ if (isInRange) {
+ isInRange = false;
+ } else {
+ isLiteral = true;
+ }
+ break;
+ default:
+ if (isInRange) {
+ isInRange = false;
+ } else {
+ isLiteral = true;
+ }
+ }
+ } while (c);
+ break;
+ case ".":
+ if (option.regexp) {
+ warningAt("Insecure '{a}'.", line,
+ from + l, c);
+ }
+ break;
+ case "]":
+ case "?":
+ case "{":
+ case "}":
+ case "+":
+ case "*":
+ warningAt("Unescaped '{a}'.", line,
+ from + l, c);
+ }
+ if (b) {
+ switch (s.charAt(l)) {
+ case "?":
+ case "+":
+ case "*":
+ l += 1;
+ if (s.charAt(l) === "?") {
+ l += 1;
+ }
+ break;
+ case "{":
+ l += 1;
+ c = s.charAt(l);
+ if (c < "0" || c > "9") {
+ warningAt(
"Expected a number and instead saw '{a}'.", line, from + l, c);
- }
- l += 1;
- low = +c;
- for (;;) {
- c = s.charAt(l);
- if (c < '0' || c > '9') {
- break;
- }
- l += 1;
- low = +c + (low * 10);
- }
- high = low;
- if (c === ',') {
- l += 1;
- high = Infinity;
- c = s.charAt(l);
- if (c >= '0' && c <= '9') {
- l += 1;
- high = +c;
- for (;;) {
- c = s.charAt(l);
- if (c < '0' || c > '9') {
- break;
- }
- l += 1;
- high = +c + (high * 10);
- }
- }
- }
- if (s.charAt(l) !== '}') {
- warningAt(
-"Expected '{a}' and instead saw '{b}'.", line, from + l, '}', c);
- } else {
- l += 1;
- }
- if (s.charAt(l) === '?') {
- l += 1;
- }
- if (low > high) {
- warningAt(
+ break; // No reason to continue checking numbers.
+ }
+ l += 1;
+ low = +c;
+ for (;;) {
+ c = s.charAt(l);
+ if (c < "0" || c > "9") {
+ break;
+ }
+ l += 1;
+ low = +c + (low * 10);
+ }
+ high = low;
+ if (c === ",") {
+ l += 1;
+ high = Infinity;
+ c = s.charAt(l);
+ if (c >= "0" && c <= "9") {
+ l += 1;
+ high = +c;
+ for (;;) {
+ c = s.charAt(l);
+ if (c < "0" || c > "9") {
+ break;
+ }
+ l += 1;
+ high = +c + (high * 10);
+ }
+ }
+ }
+ if (s.charAt(l) !== "}") {
+ warningAt(
+"Expected '{a}' and instead saw '{b}'.", line, from + l, "}", c);
+ } else {
+ l += 1;
+ }
+ if (s.charAt(l) === "?") {
+ l += 1;
+ }
+ if (low > high) {
+ warningAt(
"'{a}' should not be greater than '{b}'.", line, from + l, low, high);
- }
- }
- }
- }
- c = s.substr(0, l - 1);
- character += l;
- s = s.substr(l);
- return it('(regexp)', c);
- }
- return it('(punctuator)', t);
-
- // punctuator
-
- case '#':
- return it('(punctuator)', t);
- default:
- return it('(punctuator)', t);
- }
- }
- }
- }
- };
- }());
-
-
- function addlabel(t, type) {
-
- if (t === 'hasOwnProperty') {
- warning("'hasOwnProperty' is a really bad name.");
- }
-
-// Define t in the current function in the current scope.
-
- if (is_own(funct, t) && !funct['(global)']) {
- if (funct[t] === true) {
- if (option.latedef)
- warning("'{a}' was used before it was defined.", nexttoken, t);
- } else {
- if (!option.shadow)
- warning("'{a}' is already defined.", nexttoken, t);
- }
- }
-
- funct[t] = type;
- if (funct['(global)']) {
- global[t] = funct;
- if (is_own(implied, t)) {
- if (option.latedef)
- warning("'{a}' was used before it was defined.", nexttoken, t);
- delete implied[t];
- }
- } else {
- scope[t] = funct;
- }
- }
-
-
- function doOption() {
- var b, obj, filter, o = nexttoken.value, t, v;
- switch (o) {
- case '*/':
- error("Unbegun comment.");
- break;
- case '/*members':
- case '/*member':
- o = '/*members';
- if (!membersOnly) {
- membersOnly = {};
- }
- obj = membersOnly;
- break;
- case '/*jshint':
- case '/*jslint':
- obj = option;
- filter = boolOptions;
- break;
- case '/*global':
- obj = predefined;
- break;
- default:
- error("What?");
- }
- t = lex.token();
-loop: for (;;) {
- for (;;) {
- if (t.type === 'special' && t.value === '*/') {
- break loop;
- }
- if (t.id !== '(endline)' && t.id !== ',') {
- break;
- }
- t = lex.token();
- }
- if (t.type !== '(string)' && t.type !== '(identifier)' &&
- o !== '/*members') {
- error("Bad option.", t);
- }
- v = lex.token();
- if (v.id === ':') {
- v = lex.token();
- if (obj === membersOnly) {
- error("Expected '{a}' and instead saw '{b}'.",
- t, '*/', ':');
- }
- if (t.value === 'indent' && (o === '/*jshint' || o === '/*jslint')) {
- b = +v.value;
- if (typeof b !== 'number' || !isFinite(b) || b <= 0 ||
- Math.floor(b) !== b) {
- error("Expected a small integer and instead saw '{a}'.",
- v, v.value);
- }
- obj.white = true;
- obj.indent = b;
- } else if (t.value === 'maxerr' && (o === '/*jshint' || o === '/*jslint')) {
- b = +v.value;
- if (typeof b !== 'number' || !isFinite(b) || b <= 0 ||
- Math.floor(b) !== b) {
- error("Expected a small integer and instead saw '{a}'.",
- v, v.value);
- }
- obj.maxerr = b;
- } else if (t.value === 'maxlen' && (o === '/*jshint' || o === '/*jslint')) {
- b = +v.value;
- if (typeof b !== 'number' || !isFinite(b) || b <= 0 ||
- Math.floor(b) !== b) {
- error("Expected a small integer and instead saw '{a}'.",
- v, v.value);
- }
- obj.maxlen = b;
- } else if (v.value === 'true') {
- obj[t.value] = true;
- } else if (v.value === 'false') {
- obj[t.value] = false;
- } else {
- error("Bad option value.", v);
- }
- t = lex.token();
- } else {
- if (o === '/*jshint' || o === '/*jslint') {
- error("Missing option value.", t);
- }
- obj[t.value] = false;
- t = v;
- }
- }
- if (filter) {
- assume();
- }
- }
-
-
-// We need a peek function. If it has an argument, it peeks that much farther
-// ahead. It is used to distinguish
-// for ( var i in ...
-// from
-// for ( var i = ...
-
- function peek(p) {
- var i = p || 0, j = 0, t;
-
- while (j <= i) {
- t = lookahead[j];
- if (!t) {
- t = lookahead[j] = lex.token();
- }
- j += 1;
- }
- return t;
- }
-
-
-
-// Produce the next token. It looks for programming errors.
-
- function advance(id, t) {
- switch (token.id) {
- case '(number)':
- if (nexttoken.id === '.') {
- warning("A dot following a number can be confused with a decimal point.", token);
- }
- break;
- case '-':
- if (nexttoken.id === '-' || nexttoken.id === '--') {
- warning("Confusing minusses.");
- }
- break;
- case '+':
- if (nexttoken.id === '+' || nexttoken.id === '++') {
- warning("Confusing plusses.");
- }
- break;
- }
- if (token.type === '(string)' || token.identifier) {
- anonname = token.value;
- }
-
- if (id && nexttoken.id !== id) {
- if (t) {
- if (nexttoken.id === '(end)') {
- warning("Unmatched '{a}'.", t, t.id);
- } else {
- warning("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
- nexttoken, id, t.id, t.line, nexttoken.value);
- }
- } else if (nexttoken.type !== '(identifier)' ||
- nexttoken.value !== id) {
- warning("Expected '{a}' and instead saw '{b}'.",
- nexttoken, id, nexttoken.value);
- }
- }
- prevtoken = token;
- token = nexttoken;
- for (;;) {
- nexttoken = lookahead.shift() || lex.token();
- if (nexttoken.id === '(end)' || nexttoken.id === '(error)') {
- return;
- }
- if (nexttoken.type === 'special') {
- doOption();
- } else {
- if (nexttoken.id !== '(endline)') {
- break;
- }
- }
- }
- }
-
-
-// This is the heart of JSHINT, the Pratt parser. In addition to parsing, it
-// is looking for ad hoc lint patterns. We add .fud to Pratt's model, which is
-// like .nud except that it is only used on the first token of a statement.
-// Having .fud makes it much easier to define statement-oriented languages like
-// JavaScript. I retained Pratt's nomenclature.
-
-// .nud Null denotation
-// .fud First null denotation
-// .led Left denotation
-// lbp Left binding power
-// rbp Right binding power
-
-// They are elements of the parsing method called Top Down Operator Precedence.
-
- function expression(rbp, initial) {
- var left, isArray = false;
-
- if (nexttoken.id === '(end)')
- error("Unexpected early end of program.", token);
-
- advance();
- if (initial) {
- anonname = 'anonymous';
- funct['(verb)'] = token.value;
- }
- if (initial === true && token.fud) {
- left = token.fud();
- } else {
- if (token.nud) {
- left = token.nud();
- } else {
- if (nexttoken.type === '(number)' && token.id === '.') {
- warning("A leading decimal point can be confused with a dot: '.{a}'.",
- token, nexttoken.value);
- advance();
- return token;
- } else {
- error("Expected an identifier and instead saw '{a}'.",
- token, token.id);
- }
- }
- while (rbp < nexttoken.lbp) {
- isArray = token.value == 'Array';
- advance();
- if (isArray && token.id == '(' && nexttoken.id == ')')
- warning("Use the array literal notation [].", token);
- if (token.led) {
- left = token.led(left);
- } else {
- error("Expected an operator and instead saw '{a}'.",
- token, token.id);
- }
- }
- }
- return left;
- }
-
-
-// Functions for conformance of style.
-
- function adjacent(left, right) {
- left = left || token;
- right = right || nexttoken;
- if (option.white) {
- if (left.character !== right.from && left.line === right.line) {
- warning("Unexpected space after '{a}'.", right, left.value);
- }
- }
- }
-
- function nobreak(left, right) {
- left = left || token;
- right = right || nexttoken;
- if (option.white && (left.character !== right.from || left.line !== right.line)) {
- warning("Unexpected space before '{a}'.", right, right.value);
- }
- }
-
- function nospace(left, right) {
- left = left || token;
- right = right || nexttoken;
- if (option.white && !left.comment) {
- if (left.line === right.line) {
- adjacent(left, right);
- }
- }
- }
-
- function nonadjacent(left, right) {
- if (option.white) {
- left = left || token;
- right = right || nexttoken;
- if (left.line === right.line && left.character === right.from) {
- warning("Missing space after '{a}'.",
- nexttoken, left.value);
- }
- }
- }
-
- function nobreaknonadjacent(left, right) {
- left = left || token;
- right = right || nexttoken;
- if (!option.laxbreak && left.line !== right.line) {
- warning("Bad line breaking before '{a}'.", right, right.id);
- } else if (option.white) {
- left = left || token;
- right = right || nexttoken;
- if (left.character === right.from) {
- warning("Missing space after '{a}'.",
- nexttoken, left.value);
- }
- }
- }
-
- function indentation(bias) {
- var i;
- if (option.white && nexttoken.id !== '(end)') {
- i = indent + (bias || 0);
- if (nexttoken.from !== i) {
- warning(
+ }
+ }
+ }
+ }
+ c = s.substr(0, l - 1);
+ character += l;
+ s = s.substr(l);
+ return it("(regexp)", c);
+ }
+ return it("(punctuator)", t);
+
+ case "#":
+ return it("(punctuator)", t);
+ default:
+ return it("(punctuator)", t);
+ }
+ }
+ }
+ }
+ };
+ }());
+
+
+ function addlabel(t, type, token) {
+ if (t === "hasOwnProperty") {
+ warning("'hasOwnProperty' is a really bad name.");
+ }
+ if (type === "exception") {
+ if (is_own(funct["(context)"], t)) {
+ if (funct[t] !== true && !option.node) {
+ warning("Value of '{a}' may be overwritten in IE.", nexttoken, t);
+ }
+ }
+ }
+
+ if (is_own(funct, t) && !funct["(global)"]) {
+ if (funct[t] === true) {
+ if (option.latedef)
+ warning("'{a}' was used before it was defined.", nexttoken, t);
+ } else {
+ if (!option.shadow && type !== "exception") {
+ warning("'{a}' is already defined.", nexttoken, t);
+ }
+ }
+ }
+
+ funct[t] = type;
+
+ if (token) {
+ funct["(tokens)"][t] = token;
+ }
+
+ if (funct["(global)"]) {
+ global[t] = funct;
+ if (is_own(implied, t)) {
+ if (option.latedef)
+ warning("'{a}' was used before it was defined.", nexttoken, t);
+ delete implied[t];
+ }
+ } else {
+ scope[t] = funct;
+ }
+ }
+
+
+ function doOption() {
+ var nt = nexttoken;
+ var o = nt.value;
+ var quotmarkValue = option.quotmark;
+ var predef = {};
+ var b, obj, filter, t, tn, v, minus;
+
+ switch (o) {
+ case "*/":
+ error("Unbegun comment.");
+ break;
+ case "/*members":
+ case "/*member":
+ o = "/*members";
+ if (!membersOnly) {
+ membersOnly = {};
+ }
+ obj = membersOnly;
+ option.quotmark = false;
+ break;
+ case "/*jshint":
+ case "/*jslint":
+ obj = option;
+ filter = boolOptions;
+ break;
+ case "/*global":
+ obj = predef;
+ break;
+ default:
+ error("What?");
+ }
+
+ t = lex.token();
+
+loop:
+ for (;;) {
+ minus = false;
+ for (;;) {
+ if (t.type === "special" && t.value === "*/") {
+ break loop;
+ }
+ if (t.id !== "(endline)" && t.id !== ",") {
+ break;
+ }
+ t = lex.token();
+ }
+
+ if (o === "/*global" && t.value === "-") {
+ minus = true;
+ t = lex.token();
+ }
+
+ if (t.type !== "(string)" && t.type !== "(identifier)" && o !== "/*members") {
+ error("Bad option.", t);
+ }
+
+ v = lex.token();
+ if (v.id === ":") {
+ v = lex.token();
+
+ if (obj === membersOnly) {
+ error("Expected '{a}' and instead saw '{b}'.", t, "*/", ":");
+ }
+
+ if (o === "/*jshint") {
+ checkOption(t.value, t);
+ }
+
+ var numericVals = [
+ "maxstatements",
+ "maxparams",
+ "maxdepth",
+ "maxcomplexity",
+ "maxerr",
+ "maxlen",
+ "indent"
+ ];
+
+ if (numericVals.indexOf(t.value) > -1 && (o === "/*jshint" || o === "/*jslint")) {
+ b = +v.value;
+
+ if (typeof b !== "number" || !isFinite(b) || b <= 0 || Math.floor(b) !== b) {
+ error("Expected a small integer and instead saw '{a}'.", v, v.value);
+ }
+
+ if (t.value === "indent")
+ obj.white = true;
+
+ obj[t.value] = b;
+ } else if (t.value === "validthis") {
+ if (funct["(global)"]) {
+ error("Option 'validthis' can't be used in a global scope.");
+ } else {
+ if (v.value === "true" || v.value === "false")
+ obj[t.value] = v.value === "true";
+ else
+ error("Bad option value.", v);
+ }
+ } else if (t.value === "quotmark" && (o === "/*jshint")) {
+ switch (v.value) {
+ case "true":
+ obj.quotmark = true;
+ break;
+ case "false":
+ obj.quotmark = false;
+ break;
+ case "double":
+ case "single":
+ obj.quotmark = v.value;
+ break;
+ default:
+ error("Bad option value.", v);
+ }
+ } else if (v.value === "true" || v.value === "false") {
+ if (o === "/*jslint") {
+ tn = renamedOptions[t.value] || t.value;
+ obj[tn] = v.value === "true";
+ if (invertedOptions[tn] !== undefined) {
+ obj[tn] = !obj[tn];
+ }
+ } else {
+ obj[t.value] = v.value === "true";
+ }
+
+ if (t.value === "newcap")
+ obj["(explicitNewcap)"] = true;
+ } else {
+ error("Bad option value.", v);
+ }
+ t = lex.token();
+ } else {
+ if (o === "/*jshint" || o === "/*jslint") {
+ error("Missing option value.", t);
+ }
+
+ obj[t.value] = false;
+
+ if (o === "/*global" && minus === true) {
+ JSHINT.blacklist[t.value] = t.value;
+ updatePredefined();
+ }
+
+ t = v;
+ }
+ }
+
+ if (o === "/*members") {
+ option.quotmark = quotmarkValue;
+ }
+
+ combine(predefined, predef);
+
+ for (var key in predef) {
+ if (is_own(predef, key)) {
+ declared[key] = nt;
+ }
+ }
+
+ if (filter) {
+ assume();
+ }
+ }
+
+ function peek(p) {
+ var i = p || 0, j = 0, t;
+
+ while (j <= i) {
+ t = lookahead[j];
+ if (!t) {
+ t = lookahead[j] = lex.token();
+ }
+ j += 1;
+ }
+ return t;
+ }
+
+ function advance(id, t) {
+ switch (token.id) {
+ case "(number)":
+ if (nexttoken.id === ".") {
+ warning("A dot following a number can be confused with a decimal point.", token);
+ }
+ break;
+ case "-":
+ if (nexttoken.id === "-" || nexttoken.id === "--") {
+ warning("Confusing minusses.");
+ }
+ break;
+ case "+":
+ if (nexttoken.id === "+" || nexttoken.id === "++") {
+ warning("Confusing plusses.");
+ }
+ break;
+ }
+
+ if (token.type === "(string)" || token.identifier) {
+ anonname = token.value;
+ }
+
+ if (id && nexttoken.id !== id) {
+ if (t) {
+ if (nexttoken.id === "(end)") {
+ warning("Unmatched '{a}'.", t, t.id);
+ } else {
+ warning("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
+ nexttoken, id, t.id, t.line, nexttoken.value);
+ }
+ } else if (nexttoken.type !== "(identifier)" ||
+ nexttoken.value !== id) {
+ warning("Expected '{a}' and instead saw '{b}'.",
+ nexttoken, id, nexttoken.value);
+ }
+ }
+
+ prevtoken = token;
+ token = nexttoken;
+ for (;;) {
+ nexttoken = lookahead.shift() || lex.token();
+ if (nexttoken.id === "(end)" || nexttoken.id === "(error)") {
+ return;
+ }
+ if (nexttoken.type === "special") {
+ doOption();
+ } else {
+ if (nexttoken.id !== "(endline)") {
+ break;
+ }
+ }
+ }
+ }
+
+ function expression(rbp, initial) {
+ var left, isArray = false, isObject = false;
+
+ if (nexttoken.id === "(end)")
+ error("Unexpected early end of program.", token);
+
+ advance();
+ if (initial) {
+ anonname = "anonymous";
+ funct["(verb)"] = token.value;
+ }
+ if (initial === true && token.fud) {
+ left = token.fud();
+ } else {
+ if (token.nud) {
+ left = token.nud();
+ } else {
+ if (nexttoken.type === "(number)" && token.id === ".") {
+ warning("A leading decimal point can be confused with a dot: '.{a}'.",
+ token, nexttoken.value);
+ advance();
+ return token;
+ } else {
+ error("Expected an identifier and instead saw '{a}'.",
+ token, token.id);
+ }
+ }
+ while (rbp < nexttoken.lbp) {
+ isArray = token.value === "Array";
+ isObject = token.value === "Object";
+ if (left && (left.value || (left.first && left.first.value))) {
+ if (left.value !== "new" ||
+ (left.first && left.first.value && left.first.value === ".")) {
+ isArray = false;
+ if (left.value !== token.value) {
+ isObject = false;
+ }
+ }
+ }
+
+ advance();
+ if (isArray && token.id === "(" && nexttoken.id === ")")
+ warning("Use the array literal notation [].", token);
+ if (isObject && token.id === "(" && nexttoken.id === ")")
+ warning("Use the object literal notation {}.", token);
+ if (token.led) {
+ left = token.led(left);
+ } else {
+ error("Expected an operator and instead saw '{a}'.",
+ token, token.id);
+ }
+ }
+ }
+ return left;
+ }
+
+ function adjacent(left, right) {
+ left = left || token;
+ right = right || nexttoken;
+ if (option.white) {
+ if (left.character !== right.from && left.line === right.line) {
+ left.from += (left.character - left.from);
+ warning("Unexpected space after '{a}'.", left, left.value);
+ }
+ }
+ }
+
+ function nobreak(left, right) {
+ left = left || token;
+ right = right || nexttoken;
+ if (option.white && (left.character !== right.from || left.line !== right.line)) {
+ warning("Unexpected space before '{a}'.", right, right.value);
+ }
+ }
+
+ function nospace(left, right) {
+ left = left || token;
+ right = right || nexttoken;
+ if (option.white && !left.comment) {
+ if (left.line === right.line) {
+ adjacent(left, right);
+ }
+ }
+ }
+
+ function nonadjacent(left, right) {
+ if (option.white) {
+ left = left || token;
+ right = right || nexttoken;
+ if (left.value === ";" && right.value === ";") {
+ return;
+ }
+ if (left.line === right.line && left.character === right.from) {
+ left.from += (left.character - left.from);
+ warning("Missing space after '{a}'.",
+ left, left.value);
+ }
+ }
+ }
+
+ function nobreaknonadjacent(left, right) {
+ left = left || token;
+ right = right || nexttoken;
+ if (!option.laxbreak && left.line !== right.line) {
+ warning("Bad line breaking before '{a}'.", right, right.id);
+ } else if (option.white) {
+ left = left || token;
+ right = right || nexttoken;
+ if (left.character === right.from) {
+ left.from += (left.character - left.from);
+ warning("Missing space after '{a}'.",
+ left, left.value);
+ }
+ }
+ }
+
+ function indentation(bias) {
+ var i;
+ if (option.white && nexttoken.id !== "(end)") {
+ i = indent + (bias || 0);
+ if (nexttoken.from !== i) {
+ warning(
"Expected '{a}' to have an indentation at {b} instead at {c}.",
- nexttoken, nexttoken.value, i, nexttoken.from);
- }
- }
- }
-
- function nolinebreak(t) {
- t = t || token;
- if (t.line !== nexttoken.line) {
- warning("Line breaking error '{a}'.", t, t.value);
- }
- }
-
-
- function comma() {
- if (token.line !== nexttoken.line) {
- if (!option.laxbreak) {
- warning("Bad line breaking before '{a}'.", token, nexttoken.id);
- }
- } else if (token.character !== nexttoken.from && option.white) {
- warning("Unexpected space after '{a}'.", nexttoken, token.value);
- }
- advance(',');
- nonadjacent(token, nexttoken);
- }
-
-
-// Functional constructors for making the symbols that will be inherited by
-// tokens.
-
- function symbol(s, p) {
- var x = syntax[s];
- if (!x || typeof x !== 'object') {
- syntax[s] = x = {
- id: s,
- lbp: p,
- value: s
- };
- }
- return x;
- }
-
-
- function delim(s) {
- return symbol(s, 0);
- }
-
-
- function stmt(s, f) {
- var x = delim(s);
- x.identifier = x.reserved = true;
- x.fud = f;
- return x;
- }
-
-
- function blockstmt(s, f) {
- var x = stmt(s, f);
- x.block = true;
- return x;
- }
-
-
- function reserveName(x) {
- var c = x.id.charAt(0);
- if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
- x.identifier = x.reserved = true;
- }
- return x;
- }
-
-
- function prefix(s, f) {
- var x = symbol(s, 150);
- reserveName(x);
- x.nud = (typeof f === 'function') ? f : function () {
- this.right = expression(150);
- this.arity = 'unary';
- if (this.id === '++' || this.id === '--') {
- if (option.plusplus) {
- warning("Unexpected use of '{a}'.", this, this.id);
- } else if ((!this.right.identifier || this.right.reserved) &&
- this.right.id !== '.' && this.right.id !== '[') {
- warning("Bad operand.", this);
- }
- }
- return this;
- };
- return x;
- }
-
-
- function type(s, f) {
- var x = delim(s);
- x.type = s;
- x.nud = f;
- return x;
- }
-
-
- function reserve(s, f) {
- var x = type(s, f);
- x.identifier = x.reserved = true;
- return x;
- }
-
-
- function reservevar(s, v) {
- return reserve(s, function () {
- if (typeof v === 'function') {
- v(this);
- }
- return this;
- });
- }
-
-
- function infix(s, f, p, w) {
- var x = symbol(s, p);
- reserveName(x);
- x.led = function (left) {
- if (!w) {
- nobreaknonadjacent(prevtoken, token);
- nonadjacent(token, nexttoken);
- }
- if (typeof f === 'function') {
- return f(left, this);
- } else {
- this.left = left;
- this.right = expression(p);
- return this;
- }
- };
- return x;
- }
-
-
- function relation(s, f) {
- var x = symbol(s, 100);
- x.led = function (left) {
- nobreaknonadjacent(prevtoken, token);
- nonadjacent(token, nexttoken);
- var right = expression(100);
- if ((left && left.id === 'NaN') || (right && right.id === 'NaN')) {
- warning("Use the isNaN function to compare with NaN.", this);
- } else if (f) {
- f.apply(this, [left, right]);
- }
- if (left.id === '!') {
- warning("Confusing use of '{a}'.", left, '!');
- }
- if (right.id === '!') {
- warning("Confusing use of '{a}'.", left, '!');
- }
- this.left = left;
- this.right = right;
- return this;
- };
- return x;
- }
-
-
- function isPoorRelation(node) {
- return node &&
- ((node.type === '(number)' && +node.value === 0) ||
- (node.type === '(string)' && node.value === '') ||
- (node.type === 'null' && !option.eqnull) ||
- node.type === 'true' ||
- node.type === 'false' ||
- node.type === 'undefined');
- }
-
-
- function assignop(s, f) {
- symbol(s, 20).exps = true;
- return infix(s, function (left, that) {
- var l;
- that.left = left;
- if (predefined[left.value] === false &&
- scope[left.value]['(global)'] === true) {
- warning("Read only.", left);
- } else if (left['function']) {
- warning("'{a}' is a function.", left, left.value);
- }
- if (left) {
- if (left.id === '.' || left.id === '[') {
- if (!left.left || left.left.value === 'arguments') {
- warning('Bad assignment.', that);
- }
- that.right = expression(19);
- return that;
- } else if (left.identifier && !left.reserved) {
- if (funct[left.value] === 'exception') {
- warning("Do not assign to the exception parameter.", left);
- }
- that.right = expression(19);
- return that;
- }
- if (left === syntax['function']) {
- warning(
+ nexttoken, nexttoken.value, i, nexttoken.from);
+ }
+ }
+ }
+
+ function nolinebreak(t) {
+ t = t || token;
+ if (t.line !== nexttoken.line) {
+ warning("Line breaking error '{a}'.", t, t.value);
+ }
+ }
+
+
+ function comma() {
+ if (token.line !== nexttoken.line) {
+ if (!option.laxcomma) {
+ if (comma.first) {
+ warning("Comma warnings can be turned off with 'laxcomma'");
+ comma.first = false;
+ }
+ warning("Bad line breaking before '{a}'.", token, nexttoken.id);
+ }
+ } else if (!token.comment && token.character !== nexttoken.from && option.white) {
+ token.from += (token.character - token.from);
+ warning("Unexpected space after '{a}'.", token, token.value);
+ }
+ advance(",");
+ nonadjacent(token, nexttoken);
+ }
+
+ function symbol(s, p) {
+ var x = syntax[s];
+ if (!x || typeof x !== "object") {
+ syntax[s] = x = {
+ id: s,
+ lbp: p,
+ value: s
+ };
+ }
+ return x;
+ }
+
+
+ function delim(s) {
+ return symbol(s, 0);
+ }
+
+
+ function stmt(s, f) {
+ var x = delim(s);
+ x.identifier = x.reserved = true;
+ x.fud = f;
+ return x;
+ }
+
+
+ function blockstmt(s, f) {
+ var x = stmt(s, f);
+ x.block = true;
+ return x;
+ }
+
+
+ function reserveName(x) {
+ var c = x.id.charAt(0);
+ if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) {
+ x.identifier = x.reserved = true;
+ }
+ return x;
+ }
+
+
+ function prefix(s, f) {
+ var x = symbol(s, 150);
+ reserveName(x);
+ x.nud = (typeof f === "function") ? f : function () {
+ this.right = expression(150);
+ this.arity = "unary";
+ if (this.id === "++" || this.id === "--") {
+ if (option.plusplus) {
+ warning("Unexpected use of '{a}'.", this, this.id);
+ } else if ((!this.right.identifier || this.right.reserved) &&
+ this.right.id !== "." && this.right.id !== "[") {
+ warning("Bad operand.", this);
+ }
+ }
+ return this;
+ };
+ return x;
+ }
+
+
+ function type(s, f) {
+ var x = delim(s);
+ x.type = s;
+ x.nud = f;
+ return x;
+ }
+
+
+ function reserve(s, f) {
+ var x = type(s, f);
+ x.identifier = x.reserved = true;
+ return x;
+ }
+
+
+ function reservevar(s, v) {
+ return reserve(s, function () {
+ if (typeof v === "function") {
+ v(this);
+ }
+ return this;
+ });
+ }
+
+
+ function infix(s, f, p, w) {
+ var x = symbol(s, p);
+ reserveName(x);
+ x.led = function (left) {
+ if (!w) {
+ nobreaknonadjacent(prevtoken, token);
+ nonadjacent(token, nexttoken);
+ }
+ if (s === "in" && left.id === "!") {
+ warning("Confusing use of '{a}'.", left, "!");
+ }
+ if (typeof f === "function") {
+ return f(left, this);
+ } else {
+ this.left = left;
+ this.right = expression(p);
+ return this;
+ }
+ };
+ return x;
+ }
+
+
+ function relation(s, f) {
+ var x = symbol(s, 100);
+ x.led = function (left) {
+ nobreaknonadjacent(prevtoken, token);
+ nonadjacent(token, nexttoken);
+ var right = expression(100);
+
+ if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) {
+ warning("Use the isNaN function to compare with NaN.", this);
+ } else if (f) {
+ f.apply(this, [left, right]);
+ }
+ if (left.id === "!") {
+ warning("Confusing use of '{a}'.", left, "!");
+ }
+ if (right.id === "!") {
+ warning("Confusing use of '{a}'.", right, "!");
+ }
+ this.left = left;
+ this.right = right;
+ return this;
+ };
+ return x;
+ }
+
+
+ function isPoorRelation(node) {
+ return node &&
+ ((node.type === "(number)" && +node.value === 0) ||
+ (node.type === "(string)" && node.value === "") ||
+ (node.type === "null" && !option.eqnull) ||
+ node.type === "true" ||
+ node.type === "false" ||
+ node.type === "undefined");
+ }
+
+
+ function assignop(s) {
+ symbol(s, 20).exps = true;
+
+ return infix(s, function (left, that) {
+ that.left = left;
+
+ if (predefined[left.value] === false &&
+ scope[left.value]["(global)"] === true) {
+ warning("Read only.", left);
+ } else if (left["function"]) {
+ warning("'{a}' is a function.", left, left.value);
+ }
+
+ if (left) {
+ if (option.esnext && funct[left.value] === "const") {
+ warning("Attempting to override '{a}' which is a constant", left, left.value);
+ }
+
+ if (left.id === "." || left.id === "[") {
+ if (!left.left || left.left.value === "arguments") {
+ warning("Bad assignment.", that);
+ }
+ that.right = expression(19);
+ return that;
+ } else if (left.identifier && !left.reserved) {
+ if (funct[left.value] === "exception") {
+ warning("Do not assign to the exception parameter.", left);
+ }
+ that.right = expression(19);
+ return that;
+ }
+
+ if (left === syntax["function"]) {
+ warning(
"Expected an identifier in an assignment and instead saw a function invocation.",
- token);
- }
- }
- error("Bad assignment.", that);
- }, 20);
- }
-
-
- function bitwise(s, f, p) {
- var x = symbol(s, p);
- reserveName(x);
- x.led = (typeof f === 'function') ? f : function (left) {
- if (option.bitwise) {
- warning("Unexpected use of '{a}'.", this, this.id);
- }
- this.left = left;
- this.right = expression(p);
- return this;
- };
- return x;
- }
-
-
- function bitwiseassignop(s) {
- symbol(s, 20).exps = true;
- return infix(s, function (left, that) {
- if (option.bitwise) {
- warning("Unexpected use of '{a}'.", that, that.id);
- }
- nonadjacent(prevtoken, token);
- nonadjacent(token, nexttoken);
- if (left) {
- if (left.id === '.' || left.id === '[' ||
- (left.identifier && !left.reserved)) {
- expression(19);
- return that;
- }
- if (left === syntax['function']) {
- warning(
+ token);
+ }
+ }
+
+ error("Bad assignment.", that);
+ }, 20);
+ }
+
+
+ function bitwise(s, f, p) {
+ var x = symbol(s, p);
+ reserveName(x);
+ x.led = (typeof f === "function") ? f : function (left) {
+ if (option.bitwise) {
+ warning("Unexpected use of '{a}'.", this, this.id);
+ }
+ this.left = left;
+ this.right = expression(p);
+ return this;
+ };
+ return x;
+ }
+
+
+ function bitwiseassignop(s) {
+ symbol(s, 20).exps = true;
+ return infix(s, function (left, that) {
+ if (option.bitwise) {
+ warning("Unexpected use of '{a}'.", that, that.id);
+ }
+ nonadjacent(prevtoken, token);
+ nonadjacent(token, nexttoken);
+ if (left) {
+ if (left.id === "." || left.id === "[" ||
+ (left.identifier && !left.reserved)) {
+ expression(19);
+ return that;
+ }
+ if (left === syntax["function"]) {
+ warning(
"Expected an identifier in an assignment, and instead saw a function invocation.",
- token);
- }
- return that;
- }
- error("Bad assignment.", that);
- }, 20);
- }
-
-
- function suffix(s, f) {
- var x = symbol(s, 150);
- x.led = function (left) {
- if (option.plusplus) {
- warning("Unexpected use of '{a}'.", this, this.id);
- } else if ((!left.identifier || left.reserved) &&
- left.id !== '.' && left.id !== '[') {
- warning("Bad operand.", this);
- }
- this.left = left;
- return this;
- };
- return x;
- }
-
-
- // fnparam means that this identifier is being defined as a function
- // argument (see identifier())
- function optionalidentifier(fnparam) {
- if (nexttoken.identifier) {
- advance();
- if (token.reserved && !option.es5) {
- // `undefined` as a function param is a common pattern to protect
- // against the case when somebody does `undefined = true` and
- // help with minification. More info: https://gist.github.com/315916
- if (!fnparam || token.value != 'undefined') {
- warning("Expected an identifier and instead saw '{a}' (a reserved word).",
- token, token.id);
- }
- }
- return token.value;
- }
- }
-
- // fnparam means that this identifier is being defined as a function
- // argument
- function identifier(fnparam) {
- var i = optionalidentifier(fnparam);
- if (i) {
- return i;
- }
- if (token.id === 'function' && nexttoken.id === '(') {
- warning("Missing name in function declaration.");
- } else {
- error("Expected an identifier and instead saw '{a}'.",
- nexttoken, nexttoken.value);
- }
- }
-
-
- function reachable(s) {
- var i = 0, t;
- if (nexttoken.id !== ';' || noreach) {
- return;
- }
- for (;;) {
- t = peek(i);
- if (t.reach) {
- return;
- }
- if (t.id !== '(endline)') {
- if (t.id === 'function') {
- warning(
+ token);
+ }
+ return that;
+ }
+ error("Bad assignment.", that);
+ }, 20);
+ }
+
+
+ function suffix(s) {
+ var x = symbol(s, 150);
+ x.led = function (left) {
+ if (option.plusplus) {
+ warning("Unexpected use of '{a}'.", this, this.id);
+ } else if ((!left.identifier || left.reserved) &&
+ left.id !== "." && left.id !== "[") {
+ warning("Bad operand.", this);
+ }
+ this.left = left;
+ return this;
+ };
+ return x;
+ }
+ function optionalidentifier(fnparam) {
+ if (nexttoken.identifier) {
+ advance();
+ if (token.reserved && !option.es5) {
+ if (!fnparam || token.value !== "undefined") {
+ warning("Expected an identifier and instead saw '{a}' (a reserved word).",
+ token, token.id);
+ }
+ }
+ return token.value;
+ }
+ }
+ function identifier(fnparam) {
+ var i = optionalidentifier(fnparam);
+ if (i) {
+ return i;
+ }
+ if (token.id === "function" && nexttoken.id === "(") {
+ warning("Missing name in function declaration.");
+ } else {
+ error("Expected an identifier and instead saw '{a}'.",
+ nexttoken, nexttoken.value);
+ }
+ }
+
+
+ function reachable(s) {
+ var i = 0, t;
+ if (nexttoken.id !== ";" || noreach) {
+ return;
+ }
+ for (;;) {
+ t = peek(i);
+ if (t.reach) {
+ return;
+ }
+ if (t.id !== "(endline)") {
+ if (t.id === "function") {
+ if (!option.latedef) {
+ break;
+ }
+ warning(
"Inner functions should be listed at the top of the outer function.", t);
- break;
- }
- warning("Unreachable '{a}' after '{b}'.", t, t.value, s);
- break;
- }
- i += 1;
- }
- }
-
-
- function statement(noindent) {
- var i = indent, r, s = scope, t = nexttoken;
-
-// We don't like the empty statement.
-
- if (t.id === ';') {
- warning("Unnecessary semicolon.", t);
- advance(';');
- return;
- }
-
-// Is this a labelled statement?
-
- if (t.identifier && !t.reserved && peek().id === ':') {
- advance();
- advance(':');
- scope = Object.create(s);
- addlabel(t.value, 'label');
- if (!nexttoken.labelled) {
- warning("Label '{a}' on {b} statement.",
- nexttoken, t.value, nexttoken.value);
- }
- if (jx.test(t.value + ':')) {
- warning("Label '{a}' looks like a javascript url.",
- t, t.value);
- }
- nexttoken.label = t.value;
- t = nexttoken;
- }
-
-// Parse the statement.
-
- if (!noindent) {
- indentation();
- }
- r = expression(0, true);
-
-// Look for the final semicolon.
-
- if (!t.block) {
- if (!option.expr && (!r || !r.exps)) {
- warning("Expected an assignment or function call and instead saw an expression.",
- token);
- } else if (option.nonew && r.id === '(' && r.left.id === 'new') {
- warning("Do not use 'new' for side effects.");
- }
- if (nexttoken.id !== ';') {
- if (!option.asi && !(option.lastsemic && nexttoken.id == '}' &&
- nexttoken.line == token.line)) {
- warningAt("Missing semicolon.", token.line, token.from + token.value.length);
- }
- } else {
- adjacent(token, nexttoken);
- advance(';');
- nonadjacent(token, nexttoken);
- }
- }
-
-// Restore the indentation.
-
- indent = i;
- scope = s;
- return r;
- }
-
-
- function use_strict() {
- if (nexttoken.value === 'use strict') {
- if (strict_mode) {
- warning("Unnecessary \"use strict\".");
- }
- advance();
- advance(';');
- strict_mode = true;
- option.newcap = true;
- option.undef = true;
- return true;
- } else {
- return false;
- }
- }
-
-
- function statements(begin) {
- var a = [], f, p;
-
- while (!nexttoken.reach && nexttoken.id !== '(end)') {
- if (nexttoken.id === ';') {
- warning("Unnecessary semicolon.");
- advance(';');
- } else {
- a.push(statement());
- }
- }
- return a;
- }
-
-
- /*
- * Parses a single block. A block is a sequence of statements wrapped in
- * braces.
- *
- * ordinary - true for everything but function bodies and try blocks.
- * stmt - true if block can be a single statement (e.g. in if/for/while).
- */
- function block(ordinary, stmt) {
- var a,
- b = inblock,
- old_indent = indent,
- m = strict_mode,
- s = scope,
- t;
-
- inblock = ordinary;
- scope = Object.create(scope);
- nonadjacent(token, nexttoken);
- t = nexttoken;
-
- if (nexttoken.id === '{') {
- advance('{');
- if (nexttoken.id !== '}' || token.line !== nexttoken.line) {
- indent += option.indent;
- while (!ordinary && nexttoken.from > indent) {
- indent += option.indent;
- }
- if (!ordinary && !use_strict() && !m && option.strict &&
- funct['(context)']['(global)']) {
- warning("Missing \"use strict\" statement.");
- }
- a = statements();
- strict_mode = m;
- indent -= option.indent;
- indentation();
- }
- advance('}', t);
- indent = old_indent;
- } else if (!ordinary) {
- error("Expected '{a}' and instead saw '{b}'.",
- nexttoken, '{', nexttoken.value);
- } else {
- if (!stmt || option.curly)
- warning("Expected '{a}' and instead saw '{b}'.",
- nexttoken, '{', nexttoken.value);
-
- noreach = true;
- a = [statement()];
- noreach = false;
- }
- funct['(verb)'] = null;
- scope = s;
- inblock = b;
- if (ordinary && option.noempty && (!a || a.length === 0)) {
- warning("Empty block.");
- }
- return a;
- }
-
-
- function countMember(m) {
- if (membersOnly && typeof membersOnly[m] !== 'boolean') {
- warning("Unexpected /*member '{a}'.", token, m);
- }
- if (typeof member[m] === 'number') {
- member[m] += 1;
- } else {
- member[m] = 1;
- }
- }
-
-
- function note_implied(token) {
- var name = token.value, line = token.line, a = implied[name];
- if (typeof a === 'function') {
- a = false;
- }
- if (!a) {
- a = [line];
- implied[name] = a;
- } else if (a[a.length - 1] !== line) {
- a.push(line);
- }
- }
-
-// Build the syntax table by declaring the syntactic elements of the language.
-
- type('(number)', function () {
- return this;
- });
- type('(string)', function () {
- return this;
- });
-
- syntax['(identifier)'] = {
- type: '(identifier)',
- lbp: 0,
- identifier: true,
- nud: function () {
- var v = this.value,
- s = scope[v],
- f;
- if (typeof s === 'function') {
-
-// Protection against accidental inheritance.
-
- s = undefined;
- } else if (typeof s === 'boolean') {
- f = funct;
- funct = functions[0];
- addlabel(v, 'var');
- s = funct;
- funct = f;
- }
-
-// The name is in scope and defined in the current function.
-
- if (funct === s) {
-
-// Change 'unused' to 'var', and reject labels.
-
- switch (funct[v]) {
- case 'unused':
- funct[v] = 'var';
- break;
- case 'unction':
- funct[v] = 'function';
- this['function'] = true;
- break;
- case 'function':
- this['function'] = true;
- break;
- case 'label':
- warning("'{a}' is a statement label.", token, v);
- break;
- }
-
-// The name is not defined in the function. If we are in the global scope,
-// then we have an undefined variable.
-//
-// Operators typeof and delete do not raise runtime errors even if the base
-// object of a reference is null so no need to display warning if we're
-// inside of typeof or delete.
-
- } else if (funct['(global)']) {
- if (anonname != 'typeof' && anonname != 'delete' &&
- option.undef && typeof predefined[v] !== 'boolean') {
- warning("'{a}' is not defined.", token, v);
- }
- note_implied(token);
-
-// If the name is already defined in the current
-// function, but not as outer, then there is a scope error.
-
- } else {
- switch (funct[v]) {
- case 'closure':
- case 'function':
- case 'var':
- case 'unused':
- warning("'{a}' used out of scope.", token, v);
- break;
- case 'label':
- warning("'{a}' is a statement label.", token, v);
- break;
- case 'outer':
- case 'global':
- break;
- default:
-
-// If the name is defined in an outer function, make an outer entry, and if
-// it was unused, make it var.
-
- if (s === true) {
- funct[v] = true;
- } else if (s === null) {
- warning("'{a}' is not allowed.", token, v);
- note_implied(token);
- } else if (typeof s !== 'object') {
-
-// Operators typeof and delete do not raise runtime errors even if the base object of
-// a reference is null so no need to display warning if we're inside of typeof or delete.
-
- if (anonname != 'typeof' && anonname != 'delete' && option.undef) {
- warning("'{a}' is not defined.", token, v);
- } else {
- funct[v] = true;
- }
- note_implied(token);
- } else {
- switch (s[v]) {
- case 'function':
- case 'unction':
- this['function'] = true;
- s[v] = 'closure';
- funct[v] = s['(global)'] ? 'global' : 'outer';
- break;
- case 'var':
- case 'unused':
- s[v] = 'closure';
- funct[v] = s['(global)'] ? 'global' : 'outer';
- break;
- case 'closure':
- case 'parameter':
- funct[v] = s['(global)'] ? 'global' : 'outer';
- break;
- case 'label':
- warning("'{a}' is a statement label.", token, v);
- }
- }
- }
- }
- return this;
- },
- led: function () {
- error("Expected an operator and instead saw '{a}'.",
- nexttoken, nexttoken.value);
- }
- };
-
- type('(regexp)', function () {
- return this;
- });
-
-
-// ECMAScript parser
-
- delim('(endline)');
- delim('(begin)');
- delim('(end)').reach = true;
- delim('</').reach = true;
- delim('<!');
- delim('<!--');
- delim('-->');
- delim('(error)').reach = true;
- delim('}').reach = true;
- delim(')');
- delim(']');
- delim('"').reach = true;
- delim("'").reach = true;
- delim(';');
- delim(':').reach = true;
- delim(',');
- delim('#');
- delim('@');
- reserve('else');
- reserve('case').reach = true;
- reserve('catch');
- reserve('default').reach = true;
- reserve('finally');
- reservevar('arguments', function (x) {
- if (strict_mode && funct['(global)']) {
- warning("Strict violation.", x);
- }
- });
- reservevar('eval');
- reservevar('false');
- reservevar('Infinity');
- reservevar('NaN');
- reservevar('null');
- reservevar('this', function (x) {
- if (strict_mode && ((funct['(statement)'] &&
- funct['(name)'].charAt(0) > 'Z') || funct['(global)'])) {
- warning("Strict violation.", x);
- }
- });
- reservevar('true');
- reservevar('undefined');
- assignop('=', 'assign', 20);
- assignop('+=', 'assignadd', 20);
- assignop('-=', 'assignsub', 20);
- assignop('*=', 'assignmult', 20);
- assignop('/=', 'assigndiv', 20).nud = function () {
- error("A regular expression literal can be confused with '/='.");
- };
- assignop('%=', 'assignmod', 20);
- bitwiseassignop('&=', 'assignbitand', 20);
- bitwiseassignop('|=', 'assignbitor', 20);
- bitwiseassignop('^=', 'assignbitxor', 20);
- bitwiseassignop('<<=', 'assignshiftleft', 20);
- bitwiseassignop('>>=', 'assignshiftright', 20);
- bitwiseassignop('>>>=', 'assignshiftrightunsigned', 20);
- infix('?', function (left, that) {
- that.left = left;
- that.right = expression(10);
- advance(':');
- that['else'] = expression(10);
- return that;
- }, 30);
-
- infix('||', 'or', 40);
- infix('&&', 'and', 50);
- bitwise('|', 'bitor', 70);
- bitwise('^', 'bitxor', 80);
- bitwise('&', 'bitand', 90);
- relation('==', function (left, right) {
- var eqnull = option.eqnull &&
- (left.value == 'null' || right.value == 'null');
-
- if (!eqnull && option.eqeqeq) {
- warning("Expected '{a}' and instead saw '{b}'.",
- this, '===', '==');
- } else if (isPoorRelation(left)) {
- warning("Use '{a}' to compare with '{b}'.",
- this, '===', left.value);
- } else if (isPoorRelation(right)) {
- warning("Use '{a}' to compare with '{b}'.",
- this, '===', right.value);
- }
- return this;
- });
- relation('===');
- relation('!=', function (left, right) {
- var eqnull = option.eqnull &&
- (left.value == 'null' || right.value == 'null');
-
- if (!eqnull && option.eqeqeq) {
- warning("Expected '{a}' and instead saw '{b}'.",
- this, '!==', '!=');
- } else if (isPoorRelation(left)) {
- warning("Use '{a}' to compare with '{b}'.",
- this, '!==', left.value);
- } else if (isPoorRelation(right)) {
- warning("Use '{a}' to compare with '{b}'.",
- this, '!==', right.value);
- }
- return this;
- });
- relation('!==');
- relation('<');
- relation('>');
- relation('<=');
- relation('>=');
- bitwise('<<', 'shiftleft', 120);
- bitwise('>>', 'shiftright', 120);
- bitwise('>>>', 'shiftrightunsigned', 120);
- infix('in', 'in', 120);
- infix('instanceof', 'instanceof', 120);
- infix('+', function (left, that) {
- var right = expression(130);
- if (left && right && left.id === '(string)' && right.id === '(string)') {
- left.value += right.value;
- left.character = right.character;
- if (!option.scripturl && jx.test(left.value)) {
- warning("JavaScript URL.", left);
- }
- return left;
- }
- that.left = left;
- that.right = right;
- return that;
- }, 130);
- prefix('+', 'num');
- prefix('+++', function () {
- warning("Confusing pluses.");
- this.right = expression(150);
- this.arity = 'unary';
- return this;
- });
- infix('+++', function (left) {
- warning("Confusing pluses.");
- this.left = left;
- this.right = expression(130);
- return this;
- }, 130);
- infix('-', 'sub', 130);
- prefix('-', 'neg');
- prefix('---', function () {
- warning("Confusing minuses.");
- this.right = expression(150);
- this.arity = 'unary';
- return this;
- });
- infix('---', function (left) {
- warning("Confusing minuses.");
- this.left = left;
- this.right = expression(130);
- return this;
- }, 130);
- infix('*', 'mult', 140);
- infix('/', 'div', 140);
- infix('%', 'mod', 140);
-
- suffix('++', 'postinc');
- prefix('++', 'preinc');
- syntax['++'].exps = true;
-
- suffix('--', 'postdec');
- prefix('--', 'predec');
- syntax['--'].exps = true;
- prefix('delete', function () {
- var p = expression(0);
- if (!p || (p.id !== '.' && p.id !== '[')) {
- warning("Variables should not be deleted.");
- }
- this.first = p;
- return this;
- }).exps = true;
-
- prefix('~', function () {
- if (option.bitwise) {
- warning("Unexpected '{a}'.", this, '~');
- }
- expression(150);
- return this;
- });
-
- prefix('!', function () {
- this.right = expression(150);
- this.arity = 'unary';
- if (bang[this.right.id] === true) {
- warning("Confusing use of '{a}'.", this, '!');
- }
- return this;
- });
- prefix('typeof', 'typeof');
- prefix('new', function () {
- var c = expression(155), i;
- if (c && c.id !== 'function') {
- if (c.identifier) {
- c['new'] = true;
- switch (c.value) {
- case 'Object':
- warning("Use the object literal notation {}.", token);
- break;
- case 'Number':
- case 'String':
- case 'Boolean':
- case 'Math':
- case 'JSON':
- warning("Do not use {a} as a constructor.", token, c.value);
- break;
- case 'Function':
- if (!option.evil) {
- warning("The Function constructor is eval.");
- }
- break;
- case 'Date':
- case 'RegExp':
- break;
- default:
- if (c.id !== 'function') {
- i = c.value.substr(0, 1);
- if (option.newcap && (i < 'A' || i > 'Z')) {
- warning("A constructor name should start with "+
- "an uppercase letter.", token);
- }
- }
- }
- } else {
- if (c.id !== '.' && c.id !== '[' && c.id !== '(') {
- warning("Bad constructor.", token);
- }
- }
- } else {
- if (!option.supernew)
- warning("Weird construction. Delete 'new'.", this);
- }
- adjacent(token, nexttoken);
- if (nexttoken.id !== '(' && !option.supernew) {
- warning("Missing '()' invoking a constructor.");
- }
- this.first = c;
- return this;
- });
- syntax['new'].exps = true;
-
- prefix('void').exps = true;
-
- infix('.', function (left, that) {
- adjacent(prevtoken, token);
- nobreak();
- var m = identifier();
- if (typeof m === 'string') {
- countMember(m);
- }
- that.left = left;
- that.right = m;
- if (option.noarg && left && left.value === 'arguments' &&
- (m === 'callee' || m === 'caller')) {
- warning("Avoid arguments.{a}.", left, m);
- } else if (!option.evil && left && left.value === 'document' &&
- (m === 'write' || m === 'writeln')) {
- warning("document.write can be a form of eval.", left);
- }
- if (!option.evil && (m === 'eval' || m === 'execScript')) {
- warning('eval is evil.');
- }
- return that;
- }, 160, true);
-
- infix('(', function (left, that) {
- if (prevtoken.id !== '}' && prevtoken.id !== ')') {
- nobreak(prevtoken, token);
- }
- nospace();
- if (option.immed && !left.immed && left.id === 'function') {
- warning("Wrap an immediate function invocation in parentheses " +
- "to assist the reader in understanding that the expression " +
- "is the result of a function, and not the function itself.");
- }
- var n = 0,
- p = [];
- if (left) {
- if (left.type === '(identifier)') {
- if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
- if (left.value !== 'Number' && left.value !== 'String' &&
- left.value !== 'Boolean' &&
- left.value !== 'Date') {
- if (left.value === 'Math') {
- warning("Math is not a function.", left);
- } else if (option.newcap) {
- warning(
-"Missing 'new' prefix when invoking a constructor.", left);
- }
- }
- }
- }
- }
- if (nexttoken.id !== ')') {
- for (;;) {
- p[p.length] = expression(10);
- n += 1;
- if (nexttoken.id !== ',') {
- break;
- }
- comma();
- }
- }
- advance(')');
- nospace(prevtoken, token);
- if (typeof left === 'object') {
- if (left.value === 'parseInt' && n === 1) {
- warning("Missing radix parameter.", left);
- }
- if (!option.evil) {
- if (left.value === 'eval' || left.value === 'Function' ||
- left.value === 'execScript') {
- warning("eval is evil.", left);
- } else if (p[0] && p[0].id === '(string)' &&
- (left.value === 'setTimeout' ||
- left.value === 'setInterval')) {
- warning(
- "Implied eval is evil. Pass a function instead of a string.", left);
- }
- }
- if (!left.identifier && left.id !== '.' && left.id !== '[' &&
- left.id !== '(' && left.id !== '&&' && left.id !== '||' &&
- left.id !== '?') {
- warning("Bad invocation.", left);
- }
- }
- that.left = left;
- return that;
- }, 155, true).exps = true;
-
- prefix('(', function () {
- nospace();
- if (nexttoken.id === 'function') {
- nexttoken.immed = true;
- }
- var v = expression(0);
- advance(')', this);
- nospace(prevtoken, token);
- if (option.immed && v.id === 'function') {
- if (nexttoken.id === '(') {
- warning(
-"Move the invocation into the parens that contain the function.", nexttoken);
- } else {
- warning(
+ break;
+ }
+ warning("Unreachable '{a}' after '{b}'.", t, t.value, s);
+ break;
+ }
+ i += 1;
+ }
+ }
+
+
+ function statement(noindent) {
+ var i = indent, r, s = scope, t = nexttoken;
+
+ if (t.id === ";") {
+ advance(";");
+ return;
+ }
+
+ if (t.identifier && !t.reserved && peek().id === ":") {
+ advance();
+ advance(":");
+ scope = Object.create(s);
+ addlabel(t.value, "label");
+
+ if (!nexttoken.labelled && nexttoken.value !== "{") {
+ warning("Label '{a}' on {b} statement.", nexttoken, t.value, nexttoken.value);
+ }
+
+ if (jx.test(t.value + ":")) {
+ warning("Label '{a}' looks like a javascript url.", t, t.value);
+ }
+
+ nexttoken.label = t.value;
+ t = nexttoken;
+ }
+
+ if (t.id === "{") {
+ block(true, true);
+ return;
+ }
+
+ if (!noindent) {
+ indentation();
+ }
+ r = expression(0, true);
+
+ if (!t.block) {
+ if (!option.expr && (!r || !r.exps)) {
+ warning("Expected an assignment or function call and instead saw an expression.",
+ token);
+ } else if (option.nonew && r.id === "(" && r.left.id === "new") {
+ warning("Do not use 'new' for side effects.", t);
+ }
+
+ if (nexttoken.id === ",") {
+ return comma();
+ }
+
+ if (nexttoken.id !== ";") {
+ if (!option.asi) {
+ if (!option.lastsemic || nexttoken.id !== "}" ||
+ nexttoken.line !== token.line) {
+ warningAt("Missing semicolon.", token.line, token.character);
+ }
+ }
+ } else {
+ adjacent(token, nexttoken);
+ advance(";");
+ nonadjacent(token, nexttoken);
+ }
+ }
+
+ indent = i;
+ scope = s;
+ return r;
+ }
+
+
+ function statements(startLine) {
+ var a = [], p;
+
+ while (!nexttoken.reach && nexttoken.id !== "(end)") {
+ if (nexttoken.id === ";") {
+ p = peek();
+ if (!p || p.id !== "(") {
+ warning("Unnecessary semicolon.");
+ }
+ advance(";");
+ } else {
+ a.push(statement(startLine === nexttoken.line));
+ }
+ }
+ return a;
+ }
+ function directives() {
+ var i, p, pn;
+
+ for (;;) {
+ if (nexttoken.id === "(string)") {
+ p = peek(0);
+ if (p.id === "(endline)") {
+ i = 1;
+ do {
+ pn = peek(i);
+ i = i + 1;
+ } while (pn.id === "(endline)");
+
+ if (pn.id !== ";") {
+ if (pn.id !== "(string)" && pn.id !== "(number)" &&
+ pn.id !== "(regexp)" && pn.identifier !== true &&
+ pn.id !== "}") {
+ break;
+ }
+ warning("Missing semicolon.", nexttoken);
+ } else {
+ p = pn;
+ }
+ } else if (p.id === "}") {
+ warning("Missing semicolon.", p);
+ } else if (p.id !== ";") {
+ break;
+ }
+
+ indentation();
+ advance();
+ if (directive[token.value]) {
+ warning("Unnecessary directive \"{a}\".", token, token.value);
+ }
+
+ if (token.value === "use strict") {
+ if (!option["(explicitNewcap)"])
+ option.newcap = true;
+ option.undef = true;
+ }
+ directive[token.value] = true;
+
+ if (p.id === ";") {
+ advance(";");
+ }
+ continue;
+ }
+ break;
+ }
+ }
+ function block(ordinary, stmt, isfunc) {
+ var a,
+ b = inblock,
+ old_indent = indent,
+ m,
+ s = scope,
+ t,
+ line,
+ d;
+
+ inblock = ordinary;
+
+ if (!ordinary || !option.funcscope)
+ scope = Object.create(scope);
+
+ nonadjacent(token, nexttoken);
+ t = nexttoken;
+
+ var metrics = funct["(metrics)"];
+ metrics.nestedBlockDepth += 1;
+ metrics.verifyMaxNestedBlockDepthPerFunction();
+
+ if (nexttoken.id === "{") {
+ advance("{");
+ line = token.line;
+ if (nexttoken.id !== "}") {
+ indent += option.indent;
+ while (!ordinary && nexttoken.from > indent) {
+ indent += option.indent;
+ }
+
+ if (isfunc) {
+ m = {};
+ for (d in directive) {
+ if (is_own(directive, d)) {
+ m[d] = directive[d];
+ }
+ }
+ directives();
+
+ if (option.strict && funct["(context)"]["(global)"]) {
+ if (!m["use strict"] && !directive["use strict"]) {
+ warning("Missing \"use strict\" statement.");
+ }
+ }
+ }
+
+ a = statements(line);
+
+ metrics.statementCount += a.length;
+
+ if (isfunc) {
+ directive = m;
+ }
+
+ indent -= option.indent;
+ if (line !== nexttoken.line) {
+ indentation();
+ }
+ } else if (line !== nexttoken.line) {
+ indentation();
+ }
+ advance("}", t);
+ indent = old_indent;
+ } else if (!ordinary) {
+ error("Expected '{a}' and instead saw '{b}'.",
+ nexttoken, "{", nexttoken.value);
+ } else {
+ if (!stmt || option.curly)
+ warning("Expected '{a}' and instead saw '{b}'.",
+ nexttoken, "{", nexttoken.value);
+
+ noreach = true;
+ indent += option.indent;
+ a = [statement(nexttoken.line === token.line)];
+ indent -= option.indent;
+ noreach = false;
+ }
+ funct["(verb)"] = null;
+ if (!ordinary || !option.funcscope) scope = s;
+ inblock = b;
+ if (ordinary && option.noempty && (!a || a.length === 0)) {
+ warning("Empty block.");
+ }
+ metrics.nestedBlockDepth -= 1;
+ return a;
+ }
+
+
+ function countMember(m) {
+ if (membersOnly && typeof membersOnly[m] !== "boolean") {
+ warning("Unexpected /*member '{a}'.", token, m);
+ }
+ if (typeof member[m] === "number") {
+ member[m] += 1;
+ } else {
+ member[m] = 1;
+ }
+ }
+
+
+ function note_implied(token) {
+ var name = token.value, line = token.line, a = implied[name];
+ if (typeof a === "function") {
+ a = false;
+ }
+
+ if (!a) {
+ a = [line];
+ implied[name] = a;
+ } else if (a[a.length - 1] !== line) {
+ a.push(line);
+ }
+ }
+
+ type("(number)", function () {
+ return this;
+ });
+
+ type("(string)", function () {
+ return this;
+ });
+
+ syntax["(identifier)"] = {
+ type: "(identifier)",
+ lbp: 0,
+ identifier: true,
+ nud: function () {
+ var v = this.value,
+ s = scope[v],
+ f;
+
+ if (typeof s === "function") {
+ s = undefined;
+ } else if (typeof s === "boolean") {
+ f = funct;
+ funct = functions[0];
+ addlabel(v, "var");
+ s = funct;
+ funct = f;
+ }
+ if (funct === s) {
+ switch (funct[v]) {
+ case "unused":
+ funct[v] = "var";
+ break;
+ case "unction":
+ funct[v] = "function";
+ this["function"] = true;
+ break;
+ case "function":
+ this["function"] = true;
+ break;
+ case "label":
+ warning("'{a}' is a statement label.", token, v);
+ break;
+ }
+ } else if (funct["(global)"]) {
+
+ if (option.undef && typeof predefined[v] !== "boolean") {
+ if (!(anonname === "typeof" || anonname === "delete") ||
+ (nexttoken && (nexttoken.value === "." || nexttoken.value === "["))) {
+
+ isundef(funct, "'{a}' is not defined.", token, v);
+ }
+ }
+
+ note_implied(token);
+ } else {
+
+ switch (funct[v]) {
+ case "closure":
+ case "function":
+ case "var":
+ case "unused":
+ warning("'{a}' used out of scope.", token, v);
+ break;
+ case "label":
+ warning("'{a}' is a statement label.", token, v);
+ break;
+ case "outer":
+ case "global":
+ break;
+ default:
+ if (s === true) {
+ funct[v] = true;
+ } else if (s === null) {
+ warning("'{a}' is not allowed.", token, v);
+ note_implied(token);
+ } else if (typeof s !== "object") {
+ if (option.undef) {
+ if (!(anonname === "typeof" || anonname === "delete") ||
+ (nexttoken &&
+ (nexttoken.value === "." || nexttoken.value === "["))) {
+
+ isundef(funct, "'{a}' is not defined.", token, v);
+ }
+ }
+ funct[v] = true;
+ note_implied(token);
+ } else {
+ switch (s[v]) {
+ case "function":
+ case "unction":
+ this["function"] = true;
+ s[v] = "closure";
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "var":
+ case "unused":
+ s[v] = "closure";
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "closure":
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "label":
+ warning("'{a}' is a statement label.", token, v);
+ }
+ }
+ }
+ }
+ return this;
+ },
+ led: function () {
+ error("Expected an operator and instead saw '{a}'.",
+ nexttoken, nexttoken.value);
+ }
+ };
+
+ type("(regexp)", function () {
+ return this;
+ });
+
+ delim("(endline)");
+ delim("(begin)");
+ delim("(end)").reach = true;
+ delim("</").reach = true;
+ delim("<!");
+ delim("<!--");
+ delim("-->");
+ delim("(error)").reach = true;
+ delim("}").reach = true;
+ delim(")");
+ delim("]");
+ delim("\"").reach = true;
+ delim("'").reach = true;
+ delim(";");
+ delim(":").reach = true;
+ delim(",");
+ delim("#");
+ delim("@");
+ reserve("else");
+ reserve("case").reach = true;
+ reserve("catch");
+ reserve("default").reach = true;
+ reserve("finally");
+ reservevar("arguments", function (x) {
+ if (directive["use strict"] && funct["(global)"]) {
+ warning("Strict violation.", x);
+ }
+ });
+ reservevar("eval");
+ reservevar("false");
+ reservevar("Infinity");
+ reservevar("null");
+ reservevar("this", function (x) {
+ if (directive["use strict"] && !option.validthis && ((funct["(statement)"] &&
+ funct["(name)"].charAt(0) > "Z") || funct["(global)"])) {
+ warning("Possible strict violation.", x);
+ }
+ });
+ reservevar("true");
+ reservevar("undefined");
+ assignop("=", "assign", 20);
+ assignop("+=", "assignadd", 20);
+ assignop("-=", "assignsub", 20);
+ assignop("*=", "assignmult", 20);
+ assignop("/=", "assigndiv", 20).nud = function () {
+ error("A regular expression literal can be confused with '/='.");
+ };
+ assignop("%=", "assignmod", 20);
+ bitwiseassignop("&=", "assignbitand", 20);
+ bitwiseassignop("|=", "assignbitor", 20);
+ bitwiseassignop("^=", "assignbitxor", 20);
+ bitwiseassignop("<<=", "assignshiftleft", 20);
+ bitwiseassignop(">>=", "assignshiftright", 20);
+ bitwiseassignop(">>>=", "assignshiftrightunsigned", 20);
+ infix("?", function (left, that) {
+ that.left = left;
+ that.right = expression(10);
+ advance(":");
+ that["else"] = expression(10);
+ return that;
+ }, 30);
+
+ infix("||", "or", 40);
+ infix("&&", "and", 50);
+ bitwise("|", "bitor", 70);
+ bitwise("^", "bitxor", 80);
+ bitwise("&", "bitand", 90);
+ relation("==", function (left, right) {
+ var eqnull = option.eqnull && (left.value === "null" || right.value === "null");
+
+ if (!eqnull && option.eqeqeq)
+ warning("Expected '{a}' and instead saw '{b}'.", this, "===", "==");
+ else if (isPoorRelation(left))
+ warning("Use '{a}' to compare with '{b}'.", this, "===", left.value);
+ else if (isPoorRelation(right))
+ warning("Use '{a}' to compare with '{b}'.", this, "===", right.value);
+
+ return this;
+ });
+ relation("===");
+ relation("!=", function (left, right) {
+ var eqnull = option.eqnull &&
+ (left.value === "null" || right.value === "null");
+
+ if (!eqnull && option.eqeqeq) {
+ warning("Expected '{a}' and instead saw '{b}'.",
+ this, "!==", "!=");
+ } else if (isPoorRelation(left)) {
+ warning("Use '{a}' to compare with '{b}'.",
+ this, "!==", left.value);
+ } else if (isPoorRelation(right)) {
+ warning("Use '{a}' to compare with '{b}'.",
+ this, "!==", right.value);
+ }
+ return this;
+ });
+ relation("!==");
+ relation("<");
+ relation(">");
+ relation("<=");
+ relation(">=");
+ bitwise("<<", "shiftleft", 120);
+ bitwise(">>", "shiftright", 120);
+ bitwise(">>>", "shiftrightunsigned", 120);
+ infix("in", "in", 120);
+ infix("instanceof", "instanceof", 120);
+ infix("+", function (left, that) {
+ var right = expression(130);
+ if (left && right && left.id === "(string)" && right.id === "(string)") {
+ left.value += right.value;
+ left.character = right.character;
+ if (!option.scripturl && jx.test(left.value)) {
+ warning("JavaScript URL.", left);
+ }
+ return left;
+ }
+ that.left = left;
+ that.right = right;
+ return that;
+ }, 130);
+ prefix("+", "num");
+ prefix("+++", function () {
+ warning("Confusing pluses.");
+ this.right = expression(150);
+ this.arity = "unary";
+ return this;
+ });
+ infix("+++", function (left) {
+ warning("Confusing pluses.");
+ this.left = left;
+ this.right = expression(130);
+ return this;
+ }, 130);
+ infix("-", "sub", 130);
+ prefix("-", "neg");
+ prefix("---", function () {
+ warning("Confusing minuses.");
+ this.right = expression(150);
+ this.arity = "unary";
+ return this;
+ });
+ infix("---", function (left) {
+ warning("Confusing minuses.");
+ this.left = left;
+ this.right = expression(130);
+ return this;
+ }, 130);
+ infix("*", "mult", 140);
+ infix("/", "div", 140);
+ infix("%", "mod", 140);
+
+ suffix("++", "postinc");
+ prefix("++", "preinc");
+ syntax["++"].exps = true;
+
+ suffix("--", "postdec");
+ prefix("--", "predec");
+ syntax["--"].exps = true;
+ prefix("delete", function () {
+ var p = expression(0);
+ if (!p || (p.id !== "." && p.id !== "[")) {
+ warning("Variables should not be deleted.");
+ }
+ this.first = p;
+ return this;
+ }).exps = true;
+
+ prefix("~", function () {
+ if (option.bitwise) {
+ warning("Unexpected '{a}'.", this, "~");
+ }
+ expression(150);
+ return this;
+ });
+
+ prefix("!", function () {
+ this.right = expression(150);
+ this.arity = "unary";
+ if (bang[this.right.id] === true) {
+ warning("Confusing use of '{a}'.", this, "!");
+ }
+ return this;
+ });
+ prefix("typeof", "typeof");
+ prefix("new", function () {
+ var c = expression(155), i;
+ if (c && c.id !== "function") {
+ if (c.identifier) {
+ c["new"] = true;
+ switch (c.value) {
+ case "Number":
+ case "String":
+ case "Boolean":
+ case "Math":
+ case "JSON":
+ warning("Do not use {a} as a constructor.", prevtoken, c.value);
+ break;
+ case "Function":
+ if (!option.evil) {
+ warning("The Function constructor is eval.");
+ }
+ break;
+ case "Date":
+ case "RegExp":
+ break;
+ default:
+ if (c.id !== "function") {
+ i = c.value.substr(0, 1);
+ if (option.newcap && (i < "A" || i > "Z") && !is_own(global, c.value)) {
+ warning("A constructor name should start with an uppercase letter.",
+ token);
+ }
+ }
+ }
+ } else {
+ if (c.id !== "." && c.id !== "[" && c.id !== "(") {
+ warning("Bad constructor.", token);
+ }
+ }
+ } else {
+ if (!option.supernew)
+ warning("Weird construction. Delete 'new'.", this);
+ }
+ adjacent(token, nexttoken);
+ if (nexttoken.id !== "(" && !option.supernew) {
+ warning("Missing '()' invoking a constructor.",
+ token, token.value);
+ }
+ this.first = c;
+ return this;
+ });
+ syntax["new"].exps = true;
+
+ prefix("void").exps = true;
+
+ infix(".", function (left, that) {
+ adjacent(prevtoken, token);
+ nobreak();
+ var m = identifier();
+ if (typeof m === "string") {
+ countMember(m);
+ }
+ that.left = left;
+ that.right = m;
+ if (left && left.value === "arguments" && (m === "callee" || m === "caller")) {
+ if (option.noarg)
+ warning("Avoid arguments.{a}.", left, m);
+ else if (directive["use strict"])
+ error("Strict violation.");
+ } else if (!option.evil && left && left.value === "document" &&
+ (m === "write" || m === "writeln")) {
+ warning("document.write can be a form of eval.", left);
+ }
+ if (!option.evil && (m === "eval" || m === "execScript")) {
+ warning("eval is evil.");
+ }
+ return that;
+ }, 160, true);
+
+ infix("(", function (left, that) {
+ if (prevtoken.id !== "}" && prevtoken.id !== ")") {
+ nobreak(prevtoken, token);
+ }
+ nospace();
+ if (option.immed && !left.immed && left.id === "function") {
+ warning("Wrap an immediate function invocation in parentheses " +
+ "to assist the reader in understanding that the expression " +
+ "is the result of a function, and not the function itself.");
+ }
+ var n = 0,
+ p = [];
+ if (left) {
+ if (left.type === "(identifier)") {
+ if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
+ if ("Number String Boolean Date Object".indexOf(left.value) === -1) {
+ if (left.value === "Math") {
+ warning("Math is not a function.", left);
+ } else if (option.newcap) {
+ warning("Missing 'new' prefix when invoking a constructor.", left);
+ }
+ }
+ }
+ }
+ }
+ if (nexttoken.id !== ")") {
+ for (;;) {
+ p[p.length] = expression(10);
+ n += 1;
+ if (nexttoken.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ advance(")");
+ nospace(prevtoken, token);
+ if (typeof left === "object") {
+ if (left.value === "parseInt" && n === 1) {
+ warning("Missing radix parameter.", token);
+ }
+ if (!option.evil) {
+ if (left.value === "eval" || left.value === "Function" ||
+ left.value === "execScript") {
+ warning("eval is evil.", left);
+
+ if (p[0] && [0].id === "(string)") {
+ addInternalSrc(left, p[0].value);
+ }
+ } else if (p[0] && p[0].id === "(string)" &&
+ (left.value === "setTimeout" ||
+ left.value === "setInterval")) {
+ warning(
+ "Implied eval is evil. Pass a function instead of a string.", left);
+ addInternalSrc(left, p[0].value);
+ } else if (p[0] && p[0].id === "(string)" &&
+ left.value === "." &&
+ left.left.value === "window" &&
+ (left.right === "setTimeout" ||
+ left.right === "setInterval")) {
+ warning(
+ "Implied eval is evil. Pass a function instead of a string.", left);
+ addInternalSrc(left, p[0].value);
+ }
+ }
+ if (!left.identifier && left.id !== "." && left.id !== "[" &&
+ left.id !== "(" && left.id !== "&&" && left.id !== "||" &&
+ left.id !== "?") {
+ warning("Bad invocation.", left);
+ }
+ }
+ that.left = left;
+ return that;
+ }, 155, true).exps = true;
+
+ prefix("(", function () {
+ nospace();
+ if (nexttoken.id === "function") {
+ nexttoken.immed = true;
+ }
+ var v = expression(0);
+ advance(")", this);
+ nospace(prevtoken, token);
+ if (option.immed && v.id === "function") {
+ if (nexttoken.id !== "(" &&
+ (nexttoken.id !== "." || (peek().value !== "call" && peek().value !== "apply"))) {
+ warning(
"Do not wrap function literals in parens unless they are to be immediately invoked.",
- this);
- }
- }
- return v;
- });
-
- infix('[', function (left, that) {
- nobreak(prevtoken, token);
- nospace();
- var e = expression(0), s;
- if (e && e.type === '(string)') {
- if (!option.evil && (e.value === 'eval' || e.value === 'execScript')) {
- warning("eval is evil.", that);
- }
- countMember(e.value);
- if (!option.sub && ix.test(e.value)) {
- s = syntax[e.value];
- if (!s || !s.reserved) {
- warning("['{a}'] is better written in dot notation.",
- e, e.value);
- }
- }
- }
- advance(']', that);
- nospace(prevtoken, token);
- that.left = left;
- that.right = e;
- return that;
- }, 160, true);
-
- prefix('[', function () {
- var b = token.line !== nexttoken.line;
- this.first = [];
- if (b) {
- indent += option.indent;
- if (nexttoken.from === indent + option.indent) {
- indent += option.indent;
- }
- }
- while (nexttoken.id !== '(end)') {
- while (nexttoken.id === ',') {
- warning("Extra comma.");
- advance(',');
- }
- if (nexttoken.id === ']') {
- break;
- }
- if (b && token.line !== nexttoken.line) {
- indentation();
- }
- this.first.push(expression(10));
- if (nexttoken.id === ',') {
- comma();
- if (nexttoken.id === ']' && !option.es5) {
- warning("Extra comma.", token);
- break;
- }
- } else {
- break;
- }
- }
- if (b) {
- indent -= option.indent;
- indentation();
- }
- advance(']', this);
- return this;
- }, 160);
-
-
- function property_name() {
- var id = optionalidentifier(true);
- if (!id) {
- if (nexttoken.id === '(string)') {
- id = nexttoken.value;
- advance();
- } else if (nexttoken.id === '(number)') {
- id = nexttoken.value.toString();
- advance();
- }
- }
- return id;
- }
-
-
- function functionparams() {
- var i, t = nexttoken, p = [];
- advance('(');
- nospace();
- if (nexttoken.id === ')') {
- advance(')');
- nospace(prevtoken, token);
- return;
- }
- for (;;) {
- i = identifier(true);
- p.push(i);
- addlabel(i, 'parameter');
- if (nexttoken.id === ',') {
- comma();
- } else {
- advance(')', t);
- nospace(prevtoken, token);
- return p;
- }
- }
- }
-
-
- function doFunction(i, statement) {
- var f,
- oldOption = option,
- oldScope = scope;
-
- option = Object.create(option);
- scope = Object.create(scope);
-
- funct = {
- '(name)' : i || '"' + anonname + '"',
- '(line)' : nexttoken.line,
- '(context)' : funct,
- '(breakage)' : 0,
- '(loopage)' : 0,
- '(scope)' : scope,
- '(statement)': statement
- };
- f = funct;
- token.funct = funct;
- functions.push(funct);
- if (i) {
- addlabel(i, 'function');
- }
- funct['(params)'] = functionparams();
-
- block(false);
- scope = oldScope;
- option = oldOption;
- funct['(last)'] = token.line;
- funct = funct['(context)'];
- return f;
- }
-
-
- (function (x) {
- x.nud = function () {
- var b, f, i, j, p, seen = {}, t;
-
- b = token.line !== nexttoken.line;
- if (b) {
- indent += option.indent;
- if (nexttoken.from === indent + option.indent) {
- indent += option.indent;
- }
- }
- for (;;) {
- if (nexttoken.id === '}') {
- break;
- }
- if (b) {
- indentation();
- }
- if (nexttoken.value === 'get' && peek().id !== ':') {
- advance('get');
- if (!option.es5) {
- error("get/set are ES5 features.");
- }
- i = property_name();
- if (!i) {
- error("Missing property name.");
- }
- t = nexttoken;
- adjacent(token, nexttoken);
- f = doFunction();
- if (!option.loopfunc && funct['(loopage)']) {
- warning("Don't make functions within a loop.", t);
- }
- p = f['(params)'];
- if (p) {
- warning("Unexpected parameter '{a}' in get {b} function.", t, p[0], i);
- }
- adjacent(token, nexttoken);
- advance(',');
- indentation();
- advance('set');
- j = property_name();
- if (i !== j) {
- error("Expected {a} and instead saw {b}.", token, i, j);
- }
- t = nexttoken;
- adjacent(token, nexttoken);
- f = doFunction();
- p = f['(params)'];
- if (!p || p.length !== 1 || p[0] !== 'value') {
- warning("Expected (value) in set {a} function.", t, i);
- }
- } else {
- i = property_name();
- if (typeof i !== 'string') {
- break;
- }
- advance(':');
- nonadjacent(token, nexttoken);
- expression(10);
- }
- if (seen[i] === true) {
- warning("Duplicate member '{a}'.", nexttoken, i);
- }
- seen[i] = true;
- countMember(i);
- if (nexttoken.id === ',') {
- comma();
- if (nexttoken.id === ',') {
- warning("Extra comma.", token);
- } else if (nexttoken.id === '}' && !option.es5) {
- warning("Extra comma.", token);
- }
- } else {
- break;
- }
- }
- if (b) {
- indent -= option.indent;
- indentation();
- }
- advance('}', this);
- return this;
- };
- x.fud = function () {
- error("Expected to see a statement and instead saw a block.", token);
- };
- }(delim('{')));
-
- var varstatement = stmt('var', function (prefix) {
- // JavaScript does not have block scope. It only has function scope. So,
- // declaring a variable in a block can have unexpected consequences.
- var id, name, value;
-
- if (funct['(onevar)'] && option.onevar) {
- warning("Too many var statements.");
- } else if (!funct['(global)']) {
- funct['(onevar)'] = true;
- }
- this.first = [];
- for (;;) {
- nonadjacent(token, nexttoken);
- id = identifier();
- if (funct['(global)'] && predefined[id] === false) {
- warning("Redefinition of '{a}'.", token, id);
- }
- addlabel(id, 'unused');
- if (prefix) {
- break;
- }
- name = token;
- this.first.push(token);
- if (nexttoken.id === '=') {
- nonadjacent(token, nexttoken);
- advance('=');
- nonadjacent(token, nexttoken);
- if (nexttoken.id === 'undefined') {
- warning("It is not necessary to initialize '{a}' to 'undefined'.", token, id);
- }
- if (peek(0).id === '=' && nexttoken.identifier) {
- error("Variable {a} was not declared correctly.",
- nexttoken, nexttoken.value);
- }
- value = expression(0);
- name.first = value;
- }
- if (nexttoken.id !== ',') {
- break;
- }
- comma();
- }
- return this;
- });
- varstatement.exps = true;
-
- blockstmt('function', function () {
- if (inblock) {
- warning("Function declarations should not be placed in blocks. " +
- "Use a function expression or move the statement to the top of " +
- "the outer function.", token);
-
- }
- var i = identifier();
- adjacent(token, nexttoken);
- addlabel(i, 'unction');
- doFunction(i, true);
- if (nexttoken.id === '(' && nexttoken.line === token.line) {
- error(
+ this);
+ }
+ }
+
+ return v;
+ });
+
+ infix("[", function (left, that) {
+ nobreak(prevtoken, token);
+ nospace();
+ var e = expression(0), s;
+ if (e && e.type === "(string)") {
+ if (!option.evil && (e.value === "eval" || e.value === "execScript")) {
+ warning("eval is evil.", that);
+ }
+ countMember(e.value);
+ if (!option.sub && ix.test(e.value)) {
+ s = syntax[e.value];
+ if (!s || !s.reserved) {
+ warning("['{a}'] is better written in dot notation.",
+ prevtoken, e.value);
+ }
+ }
+ }
+ advance("]", that);
+ nospace(prevtoken, token);
+ that.left = left;
+ that.right = e;
+ return that;
+ }, 160, true);
+
+ prefix("[", function () {
+ var b = token.line !== nexttoken.line;
+ this.first = [];
+ if (b) {
+ indent += option.indent;
+ if (nexttoken.from === indent + option.indent) {
+ indent += option.indent;
+ }
+ }
+ while (nexttoken.id !== "(end)") {
+ while (nexttoken.id === ",") {
+ if (!option.es5)
+ warning("Extra comma.");
+ advance(",");
+ }
+ if (nexttoken.id === "]") {
+ break;
+ }
+ if (b && token.line !== nexttoken.line) {
+ indentation();
+ }
+ this.first.push(expression(10));
+ if (nexttoken.id === ",") {
+ comma();
+ if (nexttoken.id === "]" && !option.es5) {
+ warning("Extra comma.", token);
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ if (b) {
+ indent -= option.indent;
+ indentation();
+ }
+ advance("]", this);
+ return this;
+ }, 160);
+
+
+ function property_name() {
+ var id = optionalidentifier(true);
+ if (!id) {
+ if (nexttoken.id === "(string)") {
+ id = nexttoken.value;
+ advance();
+ } else if (nexttoken.id === "(number)") {
+ id = nexttoken.value.toString();
+ advance();
+ }
+ }
+ return id;
+ }
+
+
+ function functionparams() {
+ var next = nexttoken;
+ var params = [];
+ var ident;
+
+ advance("(");
+ nospace();
+
+ if (nexttoken.id === ")") {
+ advance(")");
+ return;
+ }
+
+ for (;;) {
+ ident = identifier(true);
+ params.push(ident);
+ addlabel(ident, "unused", token);
+ if (nexttoken.id === ",") {
+ comma();
+ } else {
+ advance(")", next);
+ nospace(prevtoken, token);
+ return params;
+ }
+ }
+ }
+
+
+ function doFunction(name, statement) {
+ var f;
+ var oldOption = option;
+ var oldScope = scope;
+
+ option = Object.create(option);
+ scope = Object.create(scope);
+
+ funct = {
+ "(name)" : name || "\"" + anonname + "\"",
+ "(line)" : nexttoken.line,
+ "(character)": nexttoken.character,
+ "(context)" : funct,
+ "(breakage)" : 0,
+ "(loopage)" : 0,
+ "(metrics)" : createMetrics(nexttoken),
+ "(scope)" : scope,
+ "(statement)": statement,
+ "(tokens)" : {}
+ };
+
+ f = funct;
+ token.funct = funct;
+
+ functions.push(funct);
+
+ if (name) {
+ addlabel(name, "function");
+ }
+
+ funct["(params)"] = functionparams();
+ funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]);
+
+ block(false, false, true);
+
+ funct["(metrics)"].verifyMaxStatementsPerFunction();
+ funct["(metrics)"].verifyMaxComplexityPerFunction();
+
+ scope = oldScope;
+ option = oldOption;
+ funct["(last)"] = token.line;
+ funct["(lastcharacter)"] = token.character;
+ funct = funct["(context)"];
+
+ return f;
+ }
+
+ function createMetrics(functionStartToken) {
+ return {
+ statementCount: 0,
+ nestedBlockDepth: -1,
+ ComplexityCount: 1,
+ verifyMaxStatementsPerFunction: function () {
+ if (option.maxstatements &&
+ this.statementCount > option.maxstatements) {
+ var message = "Too many statements per function (" + this.statementCount + ").";
+ warning(message, functionStartToken);
+ }
+ },
+
+ verifyMaxParametersPerFunction: function (params) {
+ params = params || [];
+
+ if (option.maxparams && params.length > option.maxparams) {
+ var message = "Too many parameters per function (" + params.length + ").";
+ warning(message, functionStartToken);
+ }
+ },
+
+ verifyMaxNestedBlockDepthPerFunction: function () {
+ if (option.maxdepth &&
+ this.nestedBlockDepth > 0 &&
+ this.nestedBlockDepth === option.maxdepth + 1) {
+ var message = "Blocks are nested too deeply (" + this.nestedBlockDepth + ").";
+ warning(message);
+ }
+ },
+
+ verifyMaxComplexityPerFunction: function () {
+ var max = option.maxcomplexity;
+ var cc = this.ComplexityCount;
+ if (max && cc > max) {
+ var message = "Cyclomatic complexity is too high per function (" + cc + ").";
+ warning(message, functionStartToken);
+ }
+ }
+ };
+ }
+
+ function increaseComplexityCount() {
+ funct["(metrics)"].ComplexityCount += 1;
+ }
+
+
+ (function (x) {
+ x.nud = function () {
+ var b, f, i, p, t;
+ var props = {}; // All properties, including accessors
+
+ function saveProperty(name, token) {
+ if (props[name] && is_own(props, name))
+ warning("Duplicate member '{a}'.", nexttoken, i);
+ else
+ props[name] = {};
+
+ props[name].basic = true;
+ props[name].basicToken = token;
+ }
+
+ function saveSetter(name, token) {
+ if (props[name] && is_own(props, name)) {
+ if (props[name].basic || props[name].setter)
+ warning("Duplicate member '{a}'.", nexttoken, i);
+ } else {
+ props[name] = {};
+ }
+
+ props[name].setter = true;
+ props[name].setterToken = token;
+ }
+
+ function saveGetter(name) {
+ if (props[name] && is_own(props, name)) {
+ if (props[name].basic || props[name].getter)
+ warning("Duplicate member '{a}'.", nexttoken, i);
+ } else {
+ props[name] = {};
+ }
+
+ props[name].getter = true;
+ props[name].getterToken = token;
+ }
+
+ b = token.line !== nexttoken.line;
+ if (b) {
+ indent += option.indent;
+ if (nexttoken.from === indent + option.indent) {
+ indent += option.indent;
+ }
+ }
+ for (;;) {
+ if (nexttoken.id === "}") {
+ break;
+ }
+ if (b) {
+ indentation();
+ }
+ if (nexttoken.value === "get" && peek().id !== ":") {
+ advance("get");
+ if (!option.es5) {
+ error("get/set are ES5 features.");
+ }
+ i = property_name();
+ if (!i) {
+ error("Missing property name.");
+ }
+ saveGetter(i);
+ t = nexttoken;
+ adjacent(token, nexttoken);
+ f = doFunction();
+ p = f["(params)"];
+ if (p) {
+ warning("Unexpected parameter '{a}' in get {b} function.", t, p[0], i);
+ }
+ adjacent(token, nexttoken);
+ } else if (nexttoken.value === "set" && peek().id !== ":") {
+ advance("set");
+ if (!option.es5) {
+ error("get/set are ES5 features.");
+ }
+ i = property_name();
+ if (!i) {
+ error("Missing property name.");
+ }
+ saveSetter(i, nexttoken);
+ t = nexttoken;
+ adjacent(token, nexttoken);
+ f = doFunction();
+ p = f["(params)"];
+ if (!p || p.length !== 1) {
+ warning("Expected a single parameter in set {a} function.", t, i);
+ }
+ } else {
+ i = property_name();
+ saveProperty(i, nexttoken);
+ if (typeof i !== "string") {
+ break;
+ }
+ advance(":");
+ nonadjacent(token, nexttoken);
+ expression(10);
+ }
+
+ countMember(i);
+ if (nexttoken.id === ",") {
+ comma();
+ if (nexttoken.id === ",") {
+ warning("Extra comma.", token);
+ } else if (nexttoken.id === "}" && !option.es5) {
+ warning("Extra comma.", token);
+ }
+ } else {
+ break;
+ }
+ }
+ if (b) {
+ indent -= option.indent;
+ indentation();
+ }
+ advance("}", this);
+ if (option.es5) {
+ for (var name in props) {
+ if (is_own(props, name) && props[name].setter && !props[name].getter) {
+ warning("Setter is defined without getter.", props[name].setterToken);
+ }
+ }
+ }
+ return this;
+ };
+ x.fud = function () {
+ error("Expected to see a statement and instead saw a block.", token);
+ };
+ }(delim("{")));
+
+ useESNextSyntax = function () {
+ var conststatement = stmt("const", function (prefix) {
+ var id, name, value;
+
+ this.first = [];
+ for (;;) {
+ nonadjacent(token, nexttoken);
+ id = identifier();
+ if (funct[id] === "const") {
+ warning("const '" + id + "' has already been declared");
+ }
+ if (funct["(global)"] && predefined[id] === false) {
+ warning("Redefinition of '{a}'.", token, id);
+ }
+ addlabel(id, "const");
+ if (prefix) {
+ break;
+ }
+ name = token;
+ this.first.push(token);
+
+ if (nexttoken.id !== "=") {
+ warning("const " +
+ "'{a}' is initialized to 'undefined'.", token, id);
+ }
+
+ if (nexttoken.id === "=") {
+ nonadjacent(token, nexttoken);
+ advance("=");
+ nonadjacent(token, nexttoken);
+ if (nexttoken.id === "undefined") {
+ warning("It is not necessary to initialize " +
+ "'{a}' to 'undefined'.", token, id);
+ }
+ if (peek(0).id === "=" && nexttoken.identifier) {
+ error("Constant {a} was not declared correctly.",
+ nexttoken, nexttoken.value);
+ }
+ value = expression(0);
+ name.first = value;
+ }
+
+ if (nexttoken.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ return this;
+ });
+ conststatement.exps = true;
+ };
+
+ var varstatement = stmt("var", function (prefix) {
+ var id, name, value;
+
+ if (funct["(onevar)"] && option.onevar) {
+ warning("Too many var statements.");
+ } else if (!funct["(global)"]) {
+ funct["(onevar)"] = true;
+ }
+
+ this.first = [];
+
+ for (;;) {
+ nonadjacent(token, nexttoken);
+ id = identifier();
+
+ if (option.esnext && funct[id] === "const") {
+ warning("const '" + id + "' has already been declared");
+ }
+
+ if (funct["(global)"] && predefined[id] === false) {
+ warning("Redefinition of '{a}'.", token, id);
+ }
+
+ addlabel(id, "unused", token);
+
+ if (prefix) {
+ break;
+ }
+
+ name = token;
+ this.first.push(token);
+
+ if (nexttoken.id === "=") {
+ nonadjacent(token, nexttoken);
+ advance("=");
+ nonadjacent(token, nexttoken);
+ if (nexttoken.id === "undefined") {
+ warning("It is not necessary to initialize '{a}' to 'undefined'.", token, id);
+ }
+ if (peek(0).id === "=" && nexttoken.identifier) {
+ error("Variable {a} was not declared correctly.",
+ nexttoken, nexttoken.value);
+ }
+ value = expression(0);
+ name.first = value;
+ }
+ if (nexttoken.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ return this;
+ });
+ varstatement.exps = true;
+
+ blockstmt("function", function () {
+ if (inblock) {
+ warning("Function declarations should not be placed in blocks. " +
+ "Use a function expression or move the statement to the top of " +
+ "the outer function.", token);
+
+ }
+ var i = identifier();
+ if (option.esnext && funct[i] === "const") {
+ warning("const '" + i + "' has already been declared");
+ }
+ adjacent(token, nexttoken);
+ addlabel(i, "unction", token);
+
+ doFunction(i, { statement: true });
+ if (nexttoken.id === "(" && nexttoken.line === token.line) {
+ error(
"Function declarations are not invocable. Wrap the whole function invocation in parens.");
- }
- return this;
- });
-
- prefix('function', function () {
- var i = optionalidentifier();
- if (i) {
- adjacent(token, nexttoken);
- } else {
- nonadjacent(token, nexttoken);
- }
- doFunction(i);
- if (!option.loopfunc && funct['(loopage)']) {
- warning("Don't make functions within a loop.");
- }
- return this;
- });
-
- blockstmt('if', function () {
- var t = nexttoken;
- advance('(');
- nonadjacent(this, t);
- nospace();
- expression(20);
- if (nexttoken.id === '=') {
- if (!option.boss)
- warning("Expected a conditional expression and instead saw an assignment.");
- advance('=');
- expression(20);
- }
- advance(')', t);
- nospace(prevtoken, token);
- block(true, true);
- if (nexttoken.id === 'else') {
- nonadjacent(token, nexttoken);
- advance('else');
- if (nexttoken.id === 'if' || nexttoken.id === 'switch') {
- statement(true);
- } else {
- block(true, true);
- }
- }
- return this;
- });
-
- blockstmt('try', function () {
- var b, e, s;
-
- block(false);
- if (nexttoken.id === 'catch') {
- advance('catch');
- nonadjacent(token, nexttoken);
- advance('(');
- s = scope;
- scope = Object.create(s);
- e = nexttoken.value;
- if (nexttoken.type !== '(identifier)') {
- warning("Expected an identifier and instead saw '{a}'.",
- nexttoken, e);
- } else {
- addlabel(e, 'exception');
- }
- advance();
- advance(')');
- block(false);
- b = true;
- scope = s;
- }
- if (nexttoken.id === 'finally') {
- advance('finally');
- block(false);
- return;
- } else if (!b) {
- error("Expected '{a}' and instead saw '{b}'.",
- nexttoken, 'catch', nexttoken.value);
- }
- return this;
- });
-
- blockstmt('while', function () {
- var t = nexttoken;
- funct['(breakage)'] += 1;
- funct['(loopage)'] += 1;
- advance('(');
- nonadjacent(this, t);
- nospace();
- expression(20);
- if (nexttoken.id === '=') {
- if (!option.boss)
- warning("Expected a conditional expression and instead saw an assignment.");
- advance('=');
- expression(20);
- }
- advance(')', t);
- nospace(prevtoken, token);
- block(true, true);
- funct['(breakage)'] -= 1;
- funct['(loopage)'] -= 1;
- return this;
- }).labelled = true;
-
- reserve('with');
-
- blockstmt('switch', function () {
- var t = nexttoken,
- g = false;
- funct['(breakage)'] += 1;
- advance('(');
- nonadjacent(this, t);
- nospace();
- this.condition = expression(20);
- advance(')', t);
- nospace(prevtoken, token);
- nonadjacent(token, nexttoken);
- t = nexttoken;
- advance('{');
- nonadjacent(token, nexttoken);
- indent += option.indent;
- this.cases = [];
- for (;;) {
- switch (nexttoken.id) {
- case 'case':
- switch (funct['(verb)']) {
- case 'break':
- case 'case':
- case 'continue':
- case 'return':
- case 'switch':
- case 'throw':
- break;
- default:
- // You can tell JSHint that you don't use break intentionally by
- // adding a comment /* falls through */ on a line just before
- // the next `case`.
- if (!ft.test(lines[nexttoken.line - 2])) {
- warning(
- "Expected a 'break' statement before 'case'.",
- token);
- }
- }
- indentation(-option.indent);
- advance('case');
- this.cases.push(expression(20));
- g = true;
- advance(':');
- funct['(verb)'] = 'case';
- break;
- case 'default':
- switch (funct['(verb)']) {
- case 'break':
- case 'continue':
- case 'return':
- case 'throw':
- break;
- default:
- if (!ft.test(lines[nexttoken.line - 2])) {
- warning(
- "Expected a 'break' statement before 'default'.",
- token);
- }
- }
- indentation(-option.indent);
- advance('default');
- g = true;
- advance(':');
- break;
- case '}':
- indent -= option.indent;
- indentation();
- advance('}', t);
- if (this.cases.length === 1 || this.condition.id === 'true' ||
- this.condition.id === 'false') {
- warning("This 'switch' should be an 'if'.", this);
- }
- funct['(breakage)'] -= 1;
- funct['(verb)'] = undefined;
- return;
- case '(end)':
- error("Missing '{a}'.", nexttoken, '}');
- return;
- default:
- if (g) {
- switch (token.id) {
- case ',':
- error("Each value should have its own case label.");
- return;
- case ':':
- statements();
- break;
- default:
- error("Missing ':' on a case clause.", token);
- }
- } else {
- error("Expected '{a}' and instead saw '{b}'.",
- nexttoken, 'case', nexttoken.value);
- }
- }
- }
- }).labelled = true;
-
- stmt('debugger', function () {
- if (!option.debug) {
- warning("All 'debugger' statements should be removed.");
- }
- return this;
- }).exps = true;
-
- (function () {
- var x = stmt('do', function () {
- funct['(breakage)'] += 1;
- funct['(loopage)'] += 1;
- this.first = block(true);
- advance('while');
- var t = nexttoken;
- nonadjacent(token, t);
- advance('(');
- nospace();
- expression(20);
- if (nexttoken.id === '=') {
- if (!option.boss)
- warning("Expected a conditional expression and instead saw an assignment.");
- advance('=');
- expression(20);
- }
- advance(')', t);
- nospace(prevtoken, token);
- funct['(breakage)'] -= 1;
- funct['(loopage)'] -= 1;
- return this;
- });
- x.labelled = true;
- x.exps = true;
- }());
-
- blockstmt('for', function () {
- var s, t = nexttoken;
- funct['(breakage)'] += 1;
- funct['(loopage)'] += 1;
- advance('(');
- nonadjacent(this, t);
- nospace();
- if (peek(nexttoken.id === 'var' ? 1 : 0).id === 'in') {
- if (nexttoken.id === 'var') {
- advance('var');
- varstatement.fud.call(varstatement, true);
- } else {
- switch (funct[nexttoken.value]) {
- case 'unused':
- funct[nexttoken.value] = 'var';
- break;
- case 'var':
- break;
- default:
- warning("Bad for in variable '{a}'.",
- nexttoken, nexttoken.value);
- }
- advance();
- }
- advance('in');
- expression(20);
- advance(')', t);
- s = block(true, true);
- if (option.forin && (s.length > 1 || typeof s[0] !== 'object' ||
- s[0].value !== 'if')) {
- warning("The body of a for in should be wrapped in an if statement to filter " +
- "unwanted properties from the prototype.", this);
- }
- funct['(breakage)'] -= 1;
- funct['(loopage)'] -= 1;
- return this;
- } else {
- if (nexttoken.id !== ';') {
- if (nexttoken.id === 'var') {
- advance('var');
- varstatement.fud.call(varstatement);
- } else {
- for (;;) {
- expression(0, 'for');
- if (nexttoken.id !== ',') {
- break;
- }
- comma();
- }
- }
- }
- nolinebreak(token);
- advance(';');
- if (nexttoken.id !== ';') {
- expression(20);
- if (nexttoken.id === '=') {
- if (!option.boss)
- warning("Expected a conditional expression and instead saw an assignment.");
- advance('=');
- expression(20);
- }
- }
- nolinebreak(token);
- advance(';');
- if (nexttoken.id === ';') {
- error("Expected '{a}' and instead saw '{b}'.",
- nexttoken, ')', ';');
- }
- if (nexttoken.id !== ')') {
- for (;;) {
- expression(0, 'for');
- if (nexttoken.id !== ',') {
- break;
- }
- comma();
- }
- }
- advance(')', t);
- nospace(prevtoken, token);
- block(true, true);
- funct['(breakage)'] -= 1;
- funct['(loopage)'] -= 1;
- return this;
- }
- }).labelled = true;
-
-
- stmt('break', function () {
- var v = nexttoken.value;
- if (funct['(breakage)'] === 0) {
- warning("Unexpected '{a}'.", nexttoken, this.value);
- }
- nolinebreak(this);
- if (nexttoken.id !== ';') {
- if (token.line === nexttoken.line) {
- if (funct[v] !== 'label') {
- warning("'{a}' is not a statement label.", nexttoken, v);
- } else if (scope[v] !== funct) {
- warning("'{a}' is out of scope.", nexttoken, v);
- }
- this.first = nexttoken;
- advance();
- }
- }
- reachable('break');
- return this;
- }).exps = true;
-
-
- stmt('continue', function () {
- var v = nexttoken.value;
- if (funct['(breakage)'] === 0) {
- warning("Unexpected '{a}'.", nexttoken, this.value);
- }
- nolinebreak(this);
- if (nexttoken.id !== ';') {
- if (token.line === nexttoken.line) {
- if (funct[v] !== 'label') {
- warning("'{a}' is not a statement label.", nexttoken, v);
- } else if (scope[v] !== funct) {
- warning("'{a}' is out of scope.", nexttoken, v);
- }
- this.first = nexttoken;
- advance();
- }
- } else if (!funct['(loopage)']) {
- warning("Unexpected '{a}'.", nexttoken, this.value);
- }
- reachable('continue');
- return this;
- }).exps = true;
-
-
- stmt('return', function () {
- nolinebreak(this);
- if (nexttoken.id === '(regexp)') {
- warning("Wrap the /regexp/ literal in parens to disambiguate the slash operator.");
- }
- if (nexttoken.id !== ';' && !nexttoken.reach) {
- nonadjacent(token, nexttoken);
- this.first = expression(20);
- }
- reachable('return');
- return this;
- }).exps = true;
-
-
- stmt('throw', function () {
- nolinebreak(this);
- nonadjacent(token, nexttoken);
- this.first = expression(20);
- reachable('throw');
- return this;
- }).exps = true;
-
-// Superfluous reserved words
-
- reserve('class');
- reserve('const');
- reserve('enum');
- reserve('export');
- reserve('extends');
- reserve('import');
- reserve('super');
-
- reserve('let');
- reserve('yield');
- reserve('implements');
- reserve('interface');
- reserve('package');
- reserve('private');
- reserve('protected');
- reserve('public');
- reserve('static');
-
-
-// Parse JSON
-
- function jsonValue() {
-
- function jsonObject() {
- var o = {}, t = nexttoken;
- advance('{');
- if (nexttoken.id !== '}') {
- for (;;) {
- if (nexttoken.id === '(end)') {
- error("Missing '}' to match '{' from line {a}.",
- nexttoken, t.line);
- } else if (nexttoken.id === '}') {
- warning("Unexpected comma.", token);
- break;
- } else if (nexttoken.id === ',') {
- error("Unexpected comma.", nexttoken);
- } else if (nexttoken.id !== '(string)') {
- warning("Expected a string and instead saw {a}.",
- nexttoken, nexttoken.value);
- }
- if (o[nexttoken.value] === true) {
- warning("Duplicate key '{a}'.",
- nexttoken, nexttoken.value);
- } else if ((nexttoken.value === '__proto__' &&
- !option.proto) || (nexttoken.value === '__iterator__' &&
- !option.iterator)) {
- warning("The '{a}' key may produce unexpected results.",
- nexttoken, nexttoken.value);
- } else {
- o[nexttoken.value] = true;
- }
- advance();
- advance(':');
- jsonValue();
- if (nexttoken.id !== ',') {
- break;
- }
- advance(',');
- }
- }
- advance('}');
- }
-
- function jsonArray() {
- var t = nexttoken;
- advance('[');
- if (nexttoken.id !== ']') {
- for (;;) {
- if (nexttoken.id === '(end)') {
- error("Missing ']' to match '[' from line {a}.",
- nexttoken, t.line);
- } else if (nexttoken.id === ']') {
- warning("Unexpected comma.", token);
- break;
- } else if (nexttoken.id === ',') {
- error("Unexpected comma.", nexttoken);
- }
- jsonValue();
- if (nexttoken.id !== ',') {
- break;
- }
- advance(',');
- }
- }
- advance(']');
- }
-
- switch (nexttoken.id) {
- case '{':
- jsonObject();
- break;
- case '[':
- jsonArray();
- break;
- case 'true':
- case 'false':
- case 'null':
- case '(number)':
- case '(string)':
- advance();
- break;
- case '-':
- advance('-');
- if (token.character !== nexttoken.from) {
- warning("Unexpected space after '-'.", token);
- }
- adjacent(token, nexttoken);
- advance('(number)');
- break;
- default:
- error("Expected a JSON value.", nexttoken);
- }
- }
-
-
-// The actual JSHINT function itself.
-
- var itself = function (s, o, g) {
- var a, i, k;
- JSHINT.errors = [];
- predefined = Object.create(standard);
- combine(predefined, g || {});
- if (o) {
- a = o.predef;
- if (a) {
- if (Array.isArray(a)) {
- for (i = 0; i < a.length; i += 1) {
- predefined[a[i]] = true;
- }
- } else if (typeof a === 'object') {
- k = Object.keys(a);
- for (i = 0; i < k.length; i += 1) {
- predefined[k[i]] = !!a[k[i]];
- }
- }
- }
- option = o;
- } else {
- option = {};
- }
- option.indent = option.indent || 4;
- option.maxerr = option.maxerr || 50;
-
- tab = '';
- for (i = 0; i < option.indent; i += 1) {
- tab += ' ';
- }
- indent = 1;
- global = Object.create(predefined);
- scope = global;
- funct = {
- '(global)': true,
- '(name)': '(global)',
- '(scope)': scope,
- '(breakage)': 0,
- '(loopage)': 0
- };
- functions = [funct];
- urls = [];
- src = false;
- stack = null;
- member = {};
- membersOnly = null;
- implied = {};
- inblock = false;
- lookahead = [];
- jsonmode = false;
- warnings = 0;
- lex.init(s);
- prereg = true;
- strict_mode = false;
-
- prevtoken = token = nexttoken = syntax['(begin)'];
- assume();
-
- try {
- advance();
- switch (nexttoken.id) {
- case '{':
- case '[':
- option.laxbreak = true;
- jsonmode = true;
- jsonValue();
- break;
- default:
- if (nexttoken.value === 'use strict') {
- if (!option.globalstrict)
- warning("Use the function form of \"use strict\".");
- use_strict();
- }
- statements('lib');
- }
- advance('(end)');
- } catch (e) {
- if (e) {
- JSHINT.errors.push({
- reason : e.message,
- line : e.line || nexttoken.line,
- character : e.character || nexttoken.from
- }, null);
- }
- }
- return JSHINT.errors.length === 0;
- };
-
-
-// Data summary.
-
- itself.data = function () {
-
- var data = {functions: []}, fu, globals, implieds = [], f, i, j,
- members = [], n, unused = [], v;
- if (itself.errors.length) {
- data.errors = itself.errors;
- }
-
- if (jsonmode) {
- data.json = true;
- }
-
- for (n in implied) {
- if (is_own(implied, n)) {
- implieds.push({
- name: n,
- line: implied[n]
- });
- }
- }
- if (implieds.length > 0) {
- data.implieds = implieds;
- }
-
- if (urls.length > 0) {
- data.urls = urls;
- }
-
- globals = Object.keys(scope);
- if (globals.length > 0) {
- data.globals = globals;
- }
-
- for (i = 1; i < functions.length; i += 1) {
- f = functions[i];
- fu = {};
- for (j = 0; j < functionicity.length; j += 1) {
- fu[functionicity[j]] = [];
- }
- for (n in f) {
- if (is_own(f, n) && n.charAt(0) !== '(') {
- v = f[n];
- if (v === 'unction') {
- v = 'unused';
- }
- if (Array.isArray(fu[v])) {
- fu[v].push(n);
- if (v === 'unused') {
- unused.push({
- name: n,
- line: f['(line)'],
- 'function': f['(name)']
- });
- }
- }
- }
- }
- for (j = 0; j < functionicity.length; j += 1) {
- if (fu[functionicity[j]].length === 0) {
- delete fu[functionicity[j]];
- }
- }
- fu.name = f['(name)'];
- fu.param = f['(params)'];
- fu.line = f['(line)'];
- fu.last = f['(last)'];
- data.functions.push(fu);
- }
-
- if (unused.length > 0) {
- data.unused = unused;
- }
-
- members = [];
- for (n in member) {
- if (typeof member[n] === 'number') {
- data.member = member;
- break;
- }
- }
-
- return data;
- };
-
- itself.report = function (option) {
- var data = itself.data();
-
- var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
-
- function detail(h, array) {
- var b, i, singularity;
- if (array) {
- o.push('<div><i>' + h + '</i> ');
- array = array.sort();
- for (i = 0; i < array.length; i += 1) {
- if (array[i] !== singularity) {
- singularity = array[i];
- o.push((b ? ', ' : '') + singularity);
- b = true;
- }
- }
- o.push('</div>');
- }
- }
-
-
- if (data.errors || data.implieds || data.unused) {
- err = true;
- o.push('<div id=errors><i>Error:</i>');
- if (data.errors) {
- for (i = 0; i < data.errors.length; i += 1) {
- c = data.errors[i];
- if (c) {
- e = c.evidence || '';
- o.push('<p>Problem' + (isFinite(c.line) ? ' at line ' +
- c.line + ' character ' + c.character : '') +
- ': ' + c.reason.entityify() +
- '</p><p class=evidence>' +
- (e && (e.length > 80 ? e.slice(0, 77) + '...' :
- e).entityify()) + '</p>');
- }
- }
- }
-
- if (data.implieds) {
- s = [];
- for (i = 0; i < data.implieds.length; i += 1) {
- s[i] = '<code>' + data.implieds[i].name + '</code>&nbsp;<i>' +
- data.implieds[i].line + '</i>';
- }
- o.push('<p><i>Implied global:</i> ' + s.join(', ') + '</p>');
- }
-
- if (data.unused) {
- s = [];
- for (i = 0; i < data.unused.length; i += 1) {
- s[i] = '<code><u>' + data.unused[i].name + '</u></code>&nbsp;<i>' +
- data.unused[i].line + '</i> <code>' +
- data.unused[i]['function'] + '</code>';
- }
- o.push('<p><i>Unused variable:</i> ' + s.join(', ') + '</p>');
- }
- if (data.json) {
- o.push('<p>JSON: bad.</p>');
- }
- o.push('</div>');
- }
-
- if (!option) {
-
- o.push('<br><div id=functions>');
-
- if (data.urls) {
- detail("URLs<br>", data.urls, '<br>');
- }
-
- if (data.json && !err) {
- o.push('<p>JSON: good.</p>');
- } else if (data.globals) {
- o.push('<div><i>Global</i> ' +
- data.globals.sort().join(', ') + '</div>');
- } else {
- o.push('<div><i>No new global variables introduced.</i></div>');
- }
-
- for (i = 0; i < data.functions.length; i += 1) {
- f = data.functions[i];
-
- o.push('<br><div class=function><i>' + f.line + '-' +
- f.last + '</i> ' + (f.name || '') + '(' +
- (f.param ? f.param.join(', ') : '') + ')</div>');
- detail('<big><b>Unused</b></big>', f.unused);
- detail('Closure', f.closure);
- detail('Variable', f['var']);
- detail('Exception', f.exception);
- detail('Outer', f.outer);
- detail('Global', f.global);
- detail('Label', f.label);
- }
-
- if (data.member) {
- a = Object.keys(data.member);
- if (a.length) {
- a = a.sort();
- m = '<br><pre id=members>/*members ';
- l = 10;
- for (i = 0; i < a.length; i += 1) {
- k = a[i];
- n = k.name();
- if (l + n.length > 72) {
- o.push(m + '<br>');
- m = ' ';
- l = 1;
- }
- l += n.length + 2;
- if (data.member[k] === 1) {
- n = '<i>' + n + '</i>';
- }
- if (i < a.length - 1) {
- n += ', ';
- }
- m += n;
- }
- o.push(m + '<br>*/</pre>');
- }
- o.push('</div>');
- }
- }
- return o.join('');
- };
- itself.jshint = itself;
-
- itself.edition = '2011-04-16';
-
- return itself;
-
+ }
+ return this;
+ });
+
+ prefix("function", function () {
+ var i = optionalidentifier();
+ if (i) {
+ adjacent(token, nexttoken);
+ } else {
+ nonadjacent(token, nexttoken);
+ }
+ doFunction(i);
+ if (!option.loopfunc && funct["(loopage)"]) {
+ warning("Don't make functions within a loop.");
+ }
+ return this;
+ });
+
+ blockstmt("if", function () {
+ var t = nexttoken;
+ increaseComplexityCount();
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ expression(20);
+ if (nexttoken.id === "=") {
+ if (!option.boss)
+ warning("Assignment in conditional expression");
+ advance("=");
+ expression(20);
+ }
+ advance(")", t);
+ nospace(prevtoken, token);
+ block(true, true);
+ if (nexttoken.id === "else") {
+ nonadjacent(token, nexttoken);
+ advance("else");
+ if (nexttoken.id === "if" || nexttoken.id === "switch") {
+ statement(true);
+ } else {
+ block(true, true);
+ }
+ }
+ return this;
+ });
+
+ blockstmt("try", function () {
+ var b;
+
+ function doCatch() {
+ var oldScope = scope;
+ var e;
+
+ advance("catch");
+ nonadjacent(token, nexttoken);
+ advance("(");
+
+ scope = Object.create(oldScope);
+
+ e = nexttoken.value;
+ if (nexttoken.type !== "(identifier)") {
+ e = null;
+ warning("Expected an identifier and instead saw '{a}'.", nexttoken, e);
+ }
+
+ advance();
+ advance(")");
+
+ funct = {
+ "(name)" : "(catch)",
+ "(line)" : nexttoken.line,
+ "(character)": nexttoken.character,
+ "(context)" : funct,
+ "(breakage)" : funct["(breakage)"],
+ "(loopage)" : funct["(loopage)"],
+ "(scope)" : scope,
+ "(statement)": false,
+ "(metrics)" : createMetrics(nexttoken),
+ "(catch)" : true,
+ "(tokens)" : {}
+ };
+
+ if (e) {
+ addlabel(e, "exception");
+ }
+
+ token.funct = funct;
+ functions.push(funct);
+
+ block(false);
+
+ scope = oldScope;
+
+ funct["(last)"] = token.line;
+ funct["(lastcharacter)"] = token.character;
+ funct = funct["(context)"];
+ }
+
+ block(false);
+
+ if (nexttoken.id === "catch") {
+ increaseComplexityCount();
+ doCatch();
+ b = true;
+ }
+
+ if (nexttoken.id === "finally") {
+ advance("finally");
+ block(false);
+ return;
+ } else if (!b) {
+ error("Expected '{a}' and instead saw '{b}'.",
+ nexttoken, "catch", nexttoken.value);
+ }
+
+ return this;
+ });
+
+ blockstmt("while", function () {
+ var t = nexttoken;
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ expression(20);
+ if (nexttoken.id === "=") {
+ if (!option.boss)
+ warning("Assignment in conditional expression");
+ advance("=");
+ expression(20);
+ }
+ advance(")", t);
+ nospace(prevtoken, token);
+ block(true, true);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ return this;
+ }).labelled = true;
+
+ blockstmt("with", function () {
+ var t = nexttoken;
+ if (directive["use strict"]) {
+ error("'with' is not allowed in strict mode.", token);
+ } else if (!option.withstmt) {
+ warning("Don't use 'with'.", token);
+ }
+
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ expression(0);
+ advance(")", t);
+ nospace(prevtoken, token);
+ block(true, true);
+
+ return this;
+ });
+
+ blockstmt("switch", function () {
+ var t = nexttoken,
+ g = false;
+ funct["(breakage)"] += 1;
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ this.condition = expression(20);
+ advance(")", t);
+ nospace(prevtoken, token);
+ nonadjacent(token, nexttoken);
+ t = nexttoken;
+ advance("{");
+ nonadjacent(token, nexttoken);
+ indent += option.indent;
+ this.cases = [];
+ for (;;) {
+ switch (nexttoken.id) {
+ case "case":
+ switch (funct["(verb)"]) {
+ case "break":
+ case "case":
+ case "continue":
+ case "return":
+ case "switch":
+ case "throw":
+ break;
+ default:
+ if (!ft.test(lines[nexttoken.line - 2])) {
+ warning(
+ "Expected a 'break' statement before 'case'.",
+ token);
+ }
+ }
+ indentation(-option.indent);
+ advance("case");
+ this.cases.push(expression(20));
+ increaseComplexityCount();
+ g = true;
+ advance(":");
+ funct["(verb)"] = "case";
+ break;
+ case "default":
+ switch (funct["(verb)"]) {
+ case "break":
+ case "continue":
+ case "return":
+ case "throw":
+ break;
+ default:
+ if (!ft.test(lines[nexttoken.line - 2])) {
+ warning(
+ "Expected a 'break' statement before 'default'.",
+ token);
+ }
+ }
+ indentation(-option.indent);
+ advance("default");
+ g = true;
+ advance(":");
+ break;
+ case "}":
+ indent -= option.indent;
+ indentation();
+ advance("}", t);
+ if (this.cases.length === 1 || this.condition.id === "true" ||
+ this.condition.id === "false") {
+ if (!option.onecase)
+ warning("This 'switch' should be an 'if'.", this);
+ }
+ funct["(breakage)"] -= 1;
+ funct["(verb)"] = undefined;
+ return;
+ case "(end)":
+ error("Missing '{a}'.", nexttoken, "}");
+ return;
+ default:
+ if (g) {
+ switch (token.id) {
+ case ",":
+ error("Each value should have its own case label.");
+ return;
+ case ":":
+ g = false;
+ statements();
+ break;
+ default:
+ error("Missing ':' on a case clause.", token);
+ return;
+ }
+ } else {
+ if (token.id === ":") {
+ advance(":");
+ error("Unexpected '{a}'.", token, ":");
+ statements();
+ } else {
+ error("Expected '{a}' and instead saw '{b}'.",
+ nexttoken, "case", nexttoken.value);
+ return;
+ }
+ }
+ }
+ }
+ }).labelled = true;
+
+ stmt("debugger", function () {
+ if (!option.debug) {
+ warning("All 'debugger' statements should be removed.");
+ }
+ return this;
+ }).exps = true;
+
+ (function () {
+ var x = stmt("do", function () {
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+
+ this.first = block(true);
+ advance("while");
+ var t = nexttoken;
+ nonadjacent(token, t);
+ advance("(");
+ nospace();
+ expression(20);
+ if (nexttoken.id === "=") {
+ if (!option.boss)
+ warning("Assignment in conditional expression");
+ advance("=");
+ expression(20);
+ }
+ advance(")", t);
+ nospace(prevtoken, token);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ return this;
+ });
+ x.labelled = true;
+ x.exps = true;
+ }());
+
+ blockstmt("for", function () {
+ var s, t = nexttoken;
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ if (peek(nexttoken.id === "var" ? 1 : 0).id === "in") {
+ if (nexttoken.id === "var") {
+ advance("var");
+ varstatement.fud.call(varstatement, true);
+ } else {
+ switch (funct[nexttoken.value]) {
+ case "unused":
+ funct[nexttoken.value] = "var";
+ break;
+ case "var":
+ break;
+ default:
+ warning("Bad for in variable '{a}'.",
+ nexttoken, nexttoken.value);
+ }
+ advance();
+ }
+ advance("in");
+ expression(20);
+ advance(")", t);
+ s = block(true, true);
+ if (option.forin && s && (s.length > 1 || typeof s[0] !== "object" ||
+ s[0].value !== "if")) {
+ warning("The body of a for in should be wrapped in an if statement to filter " +
+ "unwanted properties from the prototype.", this);
+ }
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ return this;
+ } else {
+ if (nexttoken.id !== ";") {
+ if (nexttoken.id === "var") {
+ advance("var");
+ varstatement.fud.call(varstatement);
+ } else {
+ for (;;) {
+ expression(0, "for");
+ if (nexttoken.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ }
+ nolinebreak(token);
+ advance(";");
+ if (nexttoken.id !== ";") {
+ expression(20);
+ if (nexttoken.id === "=") {
+ if (!option.boss)
+ warning("Assignment in conditional expression");
+ advance("=");
+ expression(20);
+ }
+ }
+ nolinebreak(token);
+ advance(";");
+ if (nexttoken.id === ";") {
+ error("Expected '{a}' and instead saw '{b}'.",
+ nexttoken, ")", ";");
+ }
+ if (nexttoken.id !== ")") {
+ for (;;) {
+ expression(0, "for");
+ if (nexttoken.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ advance(")", t);
+ nospace(prevtoken, token);
+ block(true, true);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ return this;
+ }
+ }).labelled = true;
+
+
+ stmt("break", function () {
+ var v = nexttoken.value;
+
+ if (funct["(breakage)"] === 0)
+ warning("Unexpected '{a}'.", nexttoken, this.value);
+
+ if (!option.asi)
+ nolinebreak(this);
+
+ if (nexttoken.id !== ";") {
+ if (token.line === nexttoken.line) {
+ if (funct[v] !== "label") {
+ warning("'{a}' is not a statement label.", nexttoken, v);
+ } else if (scope[v] !== funct) {
+ warning("'{a}' is out of scope.", nexttoken, v);
+ }
+ this.first = nexttoken;
+ advance();
+ }
+ }
+ reachable("break");
+ return this;
+ }).exps = true;
+
+
+ stmt("continue", function () {
+ var v = nexttoken.value;
+
+ if (funct["(breakage)"] === 0)
+ warning("Unexpected '{a}'.", nexttoken, this.value);
+
+ if (!option.asi)
+ nolinebreak(this);
+
+ if (nexttoken.id !== ";") {
+ if (token.line === nexttoken.line) {
+ if (funct[v] !== "label") {
+ warning("'{a}' is not a statement label.", nexttoken, v);
+ } else if (scope[v] !== funct) {
+ warning("'{a}' is out of scope.", nexttoken, v);
+ }
+ this.first = nexttoken;
+ advance();
+ }
+ } else if (!funct["(loopage)"]) {
+ warning("Unexpected '{a}'.", nexttoken, this.value);
+ }
+ reachable("continue");
+ return this;
+ }).exps = true;
+
+
+ stmt("return", function () {
+ if (this.line === nexttoken.line) {
+ if (nexttoken.id === "(regexp)")
+ warning("Wrap the /regexp/ literal in parens to disambiguate the slash operator.");
+
+ if (nexttoken.id !== ";" && !nexttoken.reach) {
+ nonadjacent(token, nexttoken);
+ if (peek().value === "=" && !option.boss) {
+ warningAt("Did you mean to return a conditional instead of an assignment?",
+ token.line, token.character + 1);
+ }
+ this.first = expression(0);
+ }
+ } else if (!option.asi) {
+ nolinebreak(this); // always warn (Line breaking error)
+ }
+ reachable("return");
+ return this;
+ }).exps = true;
+
+
+ stmt("throw", function () {
+ nolinebreak(this);
+ nonadjacent(token, nexttoken);
+ this.first = expression(20);
+ reachable("throw");
+ return this;
+ }).exps = true;
+
+ reserve("class");
+ reserve("const");
+ reserve("enum");
+ reserve("export");
+ reserve("extends");
+ reserve("import");
+ reserve("super");
+
+ reserve("let");
+ reserve("yield");
+ reserve("implements");
+ reserve("interface");
+ reserve("package");
+ reserve("private");
+ reserve("protected");
+ reserve("public");
+ reserve("static");
+
+ function jsonValue() {
+
+ function jsonObject() {
+ var o = {}, t = nexttoken;
+ advance("{");
+ if (nexttoken.id !== "}") {
+ for (;;) {
+ if (nexttoken.id === "(end)") {
+ error("Missing '}' to match '{' from line {a}.",
+ nexttoken, t.line);
+ } else if (nexttoken.id === "}") {
+ warning("Unexpected comma.", token);
+ break;
+ } else if (nexttoken.id === ",") {
+ error("Unexpected comma.", nexttoken);
+ } else if (nexttoken.id !== "(string)") {
+ warning("Expected a string and instead saw {a}.",
+ nexttoken, nexttoken.value);
+ }
+ if (o[nexttoken.value] === true) {
+ warning("Duplicate key '{a}'.",
+ nexttoken, nexttoken.value);
+ } else if ((nexttoken.value === "__proto__" &&
+ !option.proto) || (nexttoken.value === "__iterator__" &&
+ !option.iterator)) {
+ warning("The '{a}' key may produce unexpected results.",
+ nexttoken, nexttoken.value);
+ } else {
+ o[nexttoken.value] = true;
+ }
+ advance();
+ advance(":");
+ jsonValue();
+ if (nexttoken.id !== ",") {
+ break;
+ }
+ advance(",");
+ }
+ }
+ advance("}");
+ }
+
+ function jsonArray() {
+ var t = nexttoken;
+ advance("[");
+ if (nexttoken.id !== "]") {
+ for (;;) {
+ if (nexttoken.id === "(end)") {
+ error("Missing ']' to match '[' from line {a}.",
+ nexttoken, t.line);
+ } else if (nexttoken.id === "]") {
+ warning("Unexpected comma.", token);
+ break;
+ } else if (nexttoken.id === ",") {
+ error("Unexpected comma.", nexttoken);
+ }
+ jsonValue();
+ if (nexttoken.id !== ",") {
+ break;
+ }
+ advance(",");
+ }
+ }
+ advance("]");
+ }
+
+ switch (nexttoken.id) {
+ case "{":
+ jsonObject();
+ break;
+ case "[":
+ jsonArray();
+ break;
+ case "true":
+ case "false":
+ case "null":
+ case "(number)":
+ case "(string)":
+ advance();
+ break;
+ case "-":
+ advance("-");
+ if (token.character !== nexttoken.from) {
+ warning("Unexpected space after '-'.", token);
+ }
+ adjacent(token, nexttoken);
+ advance("(number)");
+ break;
+ default:
+ error("Expected a JSON value.", nexttoken);
+ }
+ }
+ var itself = function (s, o, g) {
+ var a, i, k, x;
+ var optionKeys;
+ var newOptionObj = {};
+
+ if (o && o.scope) {
+ JSHINT.scope = o.scope;
+ } else {
+ JSHINT.errors = [];
+ JSHINT.undefs = [];
+ JSHINT.internals = [];
+ JSHINT.blacklist = {};
+ JSHINT.scope = "(main)";
+ }
+
+ predefined = Object.create(standard);
+ declared = Object.create(null);
+ combine(predefined, g || {});
+
+ if (o) {
+ a = o.predef;
+ if (a) {
+ if (!Array.isArray(a) && typeof a === "object") {
+ a = Object.keys(a);
+ }
+ a.forEach(function (item) {
+ var slice;
+ if (item[0] === "-") {
+ slice = item.slice(1);
+ JSHINT.blacklist[slice] = slice;
+ } else {
+ predefined[item] = true;
+ }
+ });
+ }
+
+ optionKeys = Object.keys(o);
+ for (x = 0; x < optionKeys.length; x++) {
+ newOptionObj[optionKeys[x]] = o[optionKeys[x]];
+
+ if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false)
+ newOptionObj["(explicitNewcap)"] = true;
+
+ if (optionKeys[x] === "indent")
+ newOptionObj.white = true;
+ }
+ }
+
+ option = newOptionObj;
+
+ option.indent = option.indent || 4;
+ option.maxerr = option.maxerr || 50;
+
+ tab = "";
+ for (i = 0; i < option.indent; i += 1) {
+ tab += " ";
+ }
+ indent = 1;
+ global = Object.create(predefined);
+ scope = global;
+ funct = {
+ "(global)": true,
+ "(name)": "(global)",
+ "(scope)": scope,
+ "(breakage)": 0,
+ "(loopage)": 0,
+ "(tokens)": {},
+ "(metrics)": createMetrics(nexttoken)
+ };
+ functions = [funct];
+ urls = [];
+ stack = null;
+ member = {};
+ membersOnly = null;
+ implied = {};
+ inblock = false;
+ lookahead = [];
+ jsonmode = false;
+ warnings = 0;
+ lines = [];
+ unuseds = [];
+
+ if (!isString(s) && !Array.isArray(s)) {
+ errorAt("Input is neither a string nor an array of strings.", 0);
+ return false;
+ }
+
+ if (isString(s) && /^\s*$/g.test(s)) {
+ errorAt("Input is an empty string.", 0);
+ return false;
+ }
+
+ if (s.length === 0) {
+ errorAt("Input is an empty array.", 0);
+ return false;
+ }
+
+ lex.init(s);
+
+ prereg = true;
+ directive = {};
+
+ prevtoken = token = nexttoken = syntax["(begin)"];
+ for (var name in o) {
+ if (is_own(o, name)) {
+ checkOption(name, token);
+ }
+ }
+
+ assume();
+ combine(predefined, g || {});
+ comma.first = true;
+ quotmark = undefined;
+
+ try {
+ advance();
+ switch (nexttoken.id) {
+ case "{":
+ case "[":
+ option.laxbreak = true;
+ jsonmode = true;
+ jsonValue();
+ break;
+ default:
+ directives();
+ if (directive["use strict"] && !option.globalstrict) {
+ warning("Use the function form of \"use strict\".", prevtoken);
+ }
+
+ statements();
+ }
+ advance((nexttoken && nexttoken.value !== ".") ? "(end)" : undefined);
+
+ var markDefined = function (name, context) {
+ do {
+ if (typeof context[name] === "string") {
+
+ if (context[name] === "unused")
+ context[name] = "var";
+ else if (context[name] === "unction")
+ context[name] = "closure";
+
+ return true;
+ }
+
+ context = context["(context)"];
+ } while (context);
+
+ return false;
+ };
+
+ var clearImplied = function (name, line) {
+ if (!implied[name])
+ return;
+
+ var newImplied = [];
+ for (var i = 0; i < implied[name].length; i += 1) {
+ if (implied[name][i] !== line)
+ newImplied.push(implied[name][i]);
+ }
+
+ if (newImplied.length === 0)
+ delete implied[name];
+ else
+ implied[name] = newImplied;
+ };
+
+ var warnUnused = function (name, token) {
+ var line = token.line;
+ var chr = token.character;
+
+ if (option.unused)
+ warningAt("'{a}' is defined but never used.", line, chr, name);
+
+ unuseds.push({
+ name: name,
+ line: line,
+ character: chr
+ });
+ };
+
+ var checkUnused = function (func, key) {
+ var type = func[key];
+ var token = func["(tokens)"][key];
+
+ if (key.charAt(0) === "(")
+ return;
+
+ if (type !== "unused" && type !== "unction")
+ return;
+ if (func["(params)"] && func["(params)"].indexOf(key) !== -1)
+ return;
+
+ warnUnused(key, token);
+ };
+ for (i = 0; i < JSHINT.undefs.length; i += 1) {
+ k = JSHINT.undefs[i].slice(0);
+
+ if (markDefined(k[2].value, k[0])) {
+ clearImplied(k[2].value, k[2].line);
+ } else {
+ warning.apply(warning, k.slice(1));
+ }
+ }
+
+ functions.forEach(function (func) {
+ for (var key in func) {
+ if (is_own(func, key)) {
+ checkUnused(func, key);
+ }
+ }
+
+ if (!func["(params)"])
+ return;
+
+ var params = func["(params)"].slice();
+ var param = params.pop();
+ var type;
+
+ while (param) {
+ type = func[param];
+
+ if (param === "undefined")
+ return;
+
+ if (type !== "unused" && type !== "unction")
+ return;
+
+ warnUnused(param, func["(tokens)"][param]);
+ param = params.pop();
+ }
+ });
+
+ for (var key in declared) {
+ if (is_own(declared, key) && !is_own(global, key)) {
+ warnUnused(key, declared[key]);
+ }
+ }
+ } catch (e) {
+ if (e) {
+ var nt = nexttoken || {};
+ JSHINT.errors.push({
+ raw : e.raw,
+ reason : e.message,
+ line : e.line || nt.line,
+ character : e.character || nt.from
+ }, null);
+ }
+ }
+
+ if (JSHINT.scope === "(main)") {
+ o = o || {};
+
+ for (i = 0; i < JSHINT.internals.length; i += 1) {
+ k = JSHINT.internals[i];
+ o.scope = k.elem;
+ itself(k.value, o, g);
+ }
+ }
+
+ return JSHINT.errors.length === 0;
+ };
+ itself.data = function () {
+ var data = {
+ functions: [],
+ options: option
+ };
+ var implieds = [];
+ var members = [];
+ var fu, f, i, j, n, globals;
+
+ if (itself.errors.length) {
+ data.errors = itself.errors;
+ }
+
+ if (jsonmode) {
+ data.json = true;
+ }
+
+ for (n in implied) {
+ if (is_own(implied, n)) {
+ implieds.push({
+ name: n,
+ line: implied[n]
+ });
+ }
+ }
+
+ if (implieds.length > 0) {
+ data.implieds = implieds;
+ }
+
+ if (urls.length > 0) {
+ data.urls = urls;
+ }
+
+ globals = Object.keys(scope);
+ if (globals.length > 0) {
+ data.globals = globals;
+ }
+
+ for (i = 1; i < functions.length; i += 1) {
+ f = functions[i];
+ fu = {};
+
+ for (j = 0; j < functionicity.length; j += 1) {
+ fu[functionicity[j]] = [];
+ }
+
+ for (j = 0; j < functionicity.length; j += 1) {
+ if (fu[functionicity[j]].length === 0) {
+ delete fu[functionicity[j]];
+ }
+ }
+
+ fu.name = f["(name)"];
+ fu.param = f["(params)"];
+ fu.line = f["(line)"];
+ fu.character = f["(character)"];
+ fu.last = f["(last)"];
+ fu.lastcharacter = f["(lastcharacter)"];
+ data.functions.push(fu);
+ }
+
+ if (unuseds.length > 0) {
+ data.unused = unuseds;
+ }
+
+ members = [];
+ for (n in member) {
+ if (typeof member[n] === "number") {
+ data.member = member;
+ break;
+ }
+ }
+
+ return data;
+ };
+
+ itself.jshint = itself;
+
+ return itself;
}());
+if (typeof exports === "object" && exports) {
+ exports.JSHINT = JSHINT;
+}
-// Make JSHINT a Node module, if possible.
-if (typeof exports == 'object' && exports)
- exports.JSHINT = JSHINT;
-
-});/* -*- Mode: JS; tab-width: 4; indent-tabs-mode: nil; -*-
- * vim: set sw=4 ts=4 et tw=78:
- * ***** BEGIN LICENSE BLOCK *****
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Narcissus JavaScript engine.
- *
- * The Initial Developer of the Original Code is
- * Brendan Eich <brendan@mozilla.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Tom Austin <taustin@ucsc.edu>
- * Brendan Eich <brendan@mozilla.org>
- * Shu-Yu Guo <shu@rfrn.org>
- * Dave Herman <dherman@mozilla.com>
- * Dimitris Vardoulakis <dimvar@ccs.neu.edu>
- * Patrick Walton <pcwalton@mozilla.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * Narcissus - JS implemented in JS.
- *
- * Parser.
- */
-
-define('ace/narcissus/jsparse', ['require', 'exports', 'module' , 'ace/narcissus/jslex', 'ace/narcissus/jsdefs'], function(require, exports, module) {
-
- var lexer = require("./jslex");
- var definitions = require("./jsdefs");
-
- const StringMap = definitions.StringMap;
- const Stack = definitions.Stack;
-
- // Set constants in the local scope.
- eval(definitions.consts);
-
- // Banned statement types by language version.
- const blackLists = { 160: {}, 185: {}, harmony: {} };
- blackLists[160][IMPORT] = true;
- blackLists[160][EXPORT] = true;
- blackLists[160][LET] = true;
- blackLists[160][MODULE] = true;
- blackLists[160][YIELD] = true;
- blackLists[185][IMPORT] = true;
- blackLists[185][EXPORT] = true;
- blackLists[185][MODULE] = true;
- blackLists.harmony[WITH] = true;
-
- /*
- * pushDestructuringVarDecls :: (node, hoisting node) -> void
- *
- * Recursively add all destructured declarations to varDecls.
- */
- function pushDestructuringVarDecls(n, s) {
- for (var i in n) {
- var sub = n[i];
- if (sub.type === IDENTIFIER) {
- s.varDecls.push(sub);
- } else {
- pushDestructuringVarDecls(sub, s);
- }
- }
- }
-
- function StaticContext(parentScript, parentBlock, inModule, inFunction) {
- this.parentScript = parentScript;
- this.parentBlock = parentBlock || parentScript;
- this.inModule = inModule || false;
- this.inFunction = inFunction || false;
- this.inForLoopInit = false;
- this.topLevel = true;
- this.allLabels = new Stack();
- this.currentLabels = new Stack();
- this.labeledTargets = new Stack();
- this.defaultLoopTarget = null;
- this.defaultTarget = null;
- this.blackList = blackLists[Narcissus.options.version];
- Narcissus.options.ecma3OnlyMode && (this.ecma3OnlyMode = true);
- Narcissus.options.parenFreeMode && (this.parenFreeMode = true);
- }
-
- StaticContext.prototype = {
- ecma3OnlyMode: false,
- parenFreeMode: false,
- // non-destructive update via prototype extension
- update: function(ext) {
- var desc = {};
- for (var key in ext) {
- desc[key] = {
- value: ext[key],
- writable: true,
- enumerable: true,
- configurable: true
- }
- }
- return Object.create(this, desc);
- },
- pushLabel: function(label) {
- return this.update({ currentLabels: this.currentLabels.push(label),
- allLabels: this.allLabels.push(label) });
- },
- pushTarget: function(target) {
- var isDefaultLoopTarget = target.isLoop;
- var isDefaultTarget = isDefaultLoopTarget || target.type === SWITCH;
-
- if (this.currentLabels.isEmpty()) {
- if (isDefaultLoopTarget) this.update({ defaultLoopTarget: target });
- if (isDefaultTarget) this.update({ defaultTarget: target });
- return this;
- }
-
- target.labels = new StringMap();
- this.currentLabels.forEach(function(label) {
- target.labels.set(label, true);
- });
- return this.update({ currentLabels: new Stack(),
- labeledTargets: this.labeledTargets.push(target),
- defaultLoopTarget: isDefaultLoopTarget
- ? target
- : this.defaultLoopTarget,
- defaultTarget: isDefaultTarget
- ? target
- : this.defaultTarget });
- },
- nest: function() {
- return this.topLevel ? this.update({ topLevel: false }) : this;
- },
- allow: function(type) {
- switch (type) {
- case EXPORT:
- if (!this.inModule || this.inFunction || !this.topLevel)
- return false;
- // FALL THROUGH
-
- case IMPORT:
- return !this.inFunction && this.topLevel;
-
- case MODULE:
- return !this.inFunction && this.topLevel;
-
- default:
- return true;
- }
- }
- };
-
- /*
- * Script :: (tokenizer, boolean, boolean) -> node
- *
- * Parses the toplevel and module/function bodies.
- */
- function Script(t, inModule, inFunction) {
- var n = new Node(t, scriptInit());
- Statements(t, new StaticContext(n, n, inModule, inFunction), n);
- return n;
- }
-
- // We extend Array slightly with a top-of-stack method.
- definitions.defineProperty(Array.prototype, "top",
- function() {
- return this.length && this[this.length-1];
- }, false, false, true);
-
- /*
- * Node :: (tokenizer, optional init object) -> node
- */
- function Node(t, init) {
- var token = t.token;
- if (token) {
- // If init.type exists it will override token.type.
- this.type = token.type;
- this.value = token.value;
- this.lineno = token.lineno;
-
- // Start and end are file positions for error handling.
- this.start = token.start;
- this.end = token.end;
- } else {
- this.lineno = t.lineno;
- }
-
- // Node uses a tokenizer for debugging (getSource, filename getter).
- this.tokenizer = t;
- this.children = [];
-
- for (var prop in init)
- this[prop] = init[prop];
- }
-
- /*
- * SyntheticNode :: (tokenizer, optional init object) -> node
- */
- function SyntheticNode(t, init) {
- // print("SYNTHETIC NODE");
- // if (init.type === COMMA) {
- // print("SYNTHETIC COMMA");
- // print(init);
- // }
- this.tokenizer = t;
- this.children = [];
- for (var prop in init)
- this[prop] = init[prop];
- this.synthetic = true;
- }
-
- var Np = Node.prototype = SyntheticNode.prototype = {};
- Np.constructor = Node;
-
- const TO_SOURCE_SKIP = {
- type: true,
- value: true,
- lineno: true,
- start: true,
- end: true,
- tokenizer: true,
- assignOp: true
- };
- function unevalableConst(code) {
- var token = definitions.tokens[code];
- var constName = definitions.opTypeNames.hasOwnProperty(token)
- ? definitions.opTypeNames[token]
- : token in definitions.keywords
- ? token.toUpperCase()
- : token;
- return { toSource: function() { return constName } };
- }
- Np.toSource = function toSource() {
- var mock = {};
- var self = this;
- mock.type = unevalableConst(this.type);
- if ("value" in this)
- mock.value = this.value;
- if ("lineno" in this)
- mock.lineno = this.lineno;
- if ("start" in this)
- mock.start = this.start;
- if ("end" in this)
- mock.end = this.end;
- if (this.assignOp)
- mock.assignOp = unevalableConst(this.assignOp);
- for (var key in this) {
- if (this.hasOwnProperty(key) && !(key in TO_SOURCE_SKIP))
- mock[key] = this[key];
- }
- return mock.toSource();
- };
-
- // Always use push to add operands to an expression, to update start and end.
- Np.push = function (kid) {
- // kid can be null e.g. [1, , 2].
- if (kid !== null) {
- if (kid.start < this.start)
- this.start = kid.start;
- if (this.end < kid.end)
- this.end = kid.end;
- }
- return this.children.push(kid);
- }
-
- Node.indentLevel = 0;
-
- function tokenString(tt) {
- var t = definitions.tokens[tt];
- return /^\W/.test(t) ? definitions.opTypeNames[t] : t.toUpperCase();
- }
-
- Np.toString = function () {
- var a = [];
- for (var i in this) {
- if (this.hasOwnProperty(i) && i !== 'type' && i !== 'target')
- a.push({id: i, value: this[i]});
- }
- a.sort(function (a,b) { return (a.id < b.id) ? -1 : 1; });
- const INDENTATION = " ";
- var n = ++Node.indentLevel;
- var s = "{\n" + INDENTATION.repeat(n) + "type: " + tokenString(this.type);
- for (i = 0; i < a.length; i++)
- s += ",\n" + INDENTATION.repeat(n) + a[i].id + ": " + a[i].value;
- n = --Node.indentLevel;
- s += "\n" + INDENTATION.repeat(n) + "}";
- return s;
- }
-
- Np.getSource = function () {
- return this.tokenizer.source.slice(this.start, this.end);
- };
-
- /*
- * Helper init objects for common nodes.
- */
-
- const LOOP_INIT = { isLoop: true };
-
- function blockInit() {
- return { type: BLOCK, varDecls: [] };
- }
-
- function scriptInit() {
- return { type: SCRIPT,
- funDecls: [],
- varDecls: [],
- modDefns: new StringMap(),
- modAssns: new StringMap(),
- modDecls: new StringMap(),
- modLoads: new StringMap(),
- impDecls: [],
- expDecls: [],
- exports: new StringMap(),
- hasEmptyReturn: false,
- hasReturnWithValue: false,
- isGenerator: false };
- }
-
- definitions.defineGetter(Np, "filename",
- function() {
- return this.tokenizer.filename;
- });
-
- definitions.defineGetter(Np, "length",
- function() {
- throw new Error("Node.prototype.length is gone; " +
- "use n.children.length instead");
- });
-
- definitions.defineProperty(String.prototype, "repeat",
- function(n) {
- var s = "", t = this + s;
- while (--n >= 0)
- s += t;
- return s;
- }, false, false, true);
-
- function MaybeLeftParen(t, x) {
- if (x.parenFreeMode)
- return t.match(LEFT_PAREN) ? LEFT_PAREN : END;
- return t.mustMatch(LEFT_PAREN).type;
- }
-
- function MaybeRightParen(t, p) {
- if (p === LEFT_PAREN)
- t.mustMatch(RIGHT_PAREN);
- }
-
- /*
- * Statements :: (tokenizer, compiler context, node) -> void
- *
- * Parses a sequence of Statements.
- */
- function Statements(t, x, n) {
- try {
- while (!t.done && t.peek(true) !== RIGHT_CURLY)
- n.push(Statement(t, x));
- } catch (e) {
- if (t.done)
- t.unexpectedEOF = true;
- throw e;
- }
- }
-
- function Block(t, x) {
- t.mustMatch(LEFT_CURLY);
- var n = new Node(t, blockInit());
- Statements(t, x.update({ parentBlock: n }).pushTarget(n), n);
- t.mustMatch(RIGHT_CURLY);
- return n;
- }
-
- const DECLARED_FORM = 0, EXPRESSED_FORM = 1, STATEMENT_FORM = 2;
-
- /*
- * Export :: (binding node, boolean) -> Export
- *
- * Static semantic representation of a module export.
- */
- function Export(node, isDefinition) {
- this.node = node; // the AST node declaring this individual export
- this.isDefinition = isDefinition; // is the node an 'export'-annotated definition?
- this.resolved = null; // resolved pointer to the target of this export
- }
-
- /*
- * registerExport :: (StringMap, EXPORT node) -> void
- */
- function registerExport(exports, decl) {
- function register(name, exp) {
- if (exports.has(name))
- throw new SyntaxError("multiple exports of " + name);
- exports.set(name, exp);
- }
-
- switch (decl.type) {
- case MODULE:
- case FUNCTION:
- register(decl.name, new Export(decl, true));
- break;
-
- case VAR:
- for (var i = 0; i < decl.children.length; i++)
- register(decl.children[i].name, new Export(decl.children[i], true));
- break;
-
- case LET:
- case CONST:
- throw new Error("NYI: " + definitions.tokens[decl.type]);
-
- case EXPORT:
- for (var i = 0; i < decl.pathList.length; i++) {
- var path = decl.pathList[i];
- switch (path.type) {
- case OBJECT_INIT:
- for (var j = 0; j < path.children.length; j++) {
- // init :: IDENTIFIER | PROPERTY_INIT
- var init = path.children[j];
- if (init.type === IDENTIFIER)
- register(init.value, new Export(init, false));
- else
- register(init.children[0].value, new Export(init.children[1], false));
- }
- break;
-
- case DOT:
- register(path.children[1].value, new Export(path, false));
- break;
-
- case IDENTIFIER:
- register(path.value, new Export(path, false));
- break;
-
- default:
- throw new Error("unexpected export path: " + definitions.tokens[path.type]);
- }
- }
- break;
-
- default:
- throw new Error("unexpected export decl: " + definitions.tokens[exp.type]);
- }
- }
-
- /*
- * Module :: (node) -> Module
- *
- * Static semantic representation of a module.
- */
- function Module(node) {
- var exports = node.body.exports;
- var modDefns = node.body.modDefns;
-
- var exportedModules = new StringMap();
-
- exports.forEach(function(name, exp) {
- var node = exp.node;
- if (node.type === MODULE) {
- exportedModules.set(name, node);
- } else if (!exp.isDefinition && node.type === IDENTIFIER && modDefns.has(node.value)) {
- var mod = modDefns.get(node.value);
- exportedModules.set(name, mod);
- }
- });
-
- this.node = node;
- this.exports = exports;
- this.exportedModules = exportedModules;
- }
-
- /*
- * Statement :: (tokenizer, compiler context) -> node
- *
- * Parses a Statement.
- */
- function Statement(t, x) {
- var i, label, n, n2, p, c, ss, tt = t.get(true), tt2, x2, x3;
-
- var comments = t.blockComments;
-
- if (x.blackList[tt])
- throw t.newSyntaxError(definitions.tokens[tt] + " statements only allowed in Harmony");
- if (!x.allow(tt))
- throw t.newSyntaxError(definitions.tokens[tt] + " statement in illegal context");
-
- // Cases for statements ending in a right curly return early, avoiding the
- // common semicolon insertion magic after this switch.
- switch (tt) {
- case IMPORT:
- n = new Node(t);
- n.pathList = ImportPathList(t, x);
- x.parentScript.impDecls.push(n);
- break;
-
- case EXPORT:
- switch (t.peek()) {
- case MODULE:
- case FUNCTION:
- case LET:
- case VAR:
- case CONST:
- n = Statement(t, x);
- n.blockComments = comments;
- n.exported = true;
- x.parentScript.expDecls.push(n);
- registerExport(x.parentScript.exports, n);
- return n;
-
- default:
- n = new Node(t);
- n.pathList = ExportPathList(t, x);
- break;
- }
- x.parentScript.expDecls.push(n);
- registerExport(x.parentScript.exports, n);
- break;
-
- case MODULE:
- n = new Node(t);
- n.blockComments = comments;
- t.mustMatch(IDENTIFIER);
- label = t.token.value;
-
- if (t.match(LEFT_CURLY)) {
- n.name = label;
- n.body = Script(t, true, false);
- n.module = new Module(n);
- t.mustMatch(RIGHT_CURLY);
- x.parentScript.modDefns.set(n.name, n);
- return n;
- }
-
- t.unget();
- ModuleVariables(t, x, n);
- return n;
-
- case FUNCTION:
- // DECLARED_FORM extends funDecls of x, STATEMENT_FORM doesn't.
- return FunctionDefinition(t, x, true, x.topLevel ? DECLARED_FORM : STATEMENT_FORM, comments);
-
- case LEFT_CURLY:
- n = new Node(t, blockInit());
- Statements(t, x.update({ parentBlock: n }).pushTarget(n).nest(), n);
- t.mustMatch(RIGHT_CURLY);
- return n;
-
- case IF:
- n = new Node(t);
- n.condition = HeadExpression(t, x);
- x2 = x.pushTarget(n).nest();
- n.thenPart = Statement(t, x2);
- n.elsePart = t.match(ELSE, true) ? Statement(t, x2) : null;
- return n;
-
- case SWITCH:
- // This allows CASEs after a DEFAULT, which is in the standard.
- n = new Node(t, { cases: [], defaultIndex: -1 });
- n.discriminant = HeadExpression(t, x);
- x2 = x.pushTarget(n).nest();
- t.mustMatch(LEFT_CURLY);
- while ((tt = t.get()) !== RIGHT_CURLY) {
- switch (tt) {
- case DEFAULT:
- if (n.defaultIndex >= 0)
- throw t.newSyntaxError("More than one switch default");
- // FALL THROUGH
- case CASE:
- n2 = new Node(t);
- if (tt === DEFAULT)
- n.defaultIndex = n.cases.length;
- else
- n2.caseLabel = Expression(t, x2, COLON);
- break;
-
- default:
- throw t.newSyntaxError("Invalid switch case");
- }
- t.mustMatch(COLON);
- n2.statements = new Node(t, blockInit());
- while ((tt=t.peek(true)) !== CASE && tt !== DEFAULT &&
- tt !== RIGHT_CURLY)
- n2.statements.push(Statement(t, x2));
- n.cases.push(n2);
- }
- return n;
-
- case FOR:
- n = new Node(t, LOOP_INIT);
- n.blockComments = comments;
- if (t.match(IDENTIFIER)) {
- if (t.token.value === "each")
- n.isEach = true;
- else
- t.unget();
- }
- if (!x.parenFreeMode)
- t.mustMatch(LEFT_PAREN);
- x2 = x.pushTarget(n).nest();
- x3 = x.update({ inForLoopInit: true });
- n2 = null;
- if ((tt = t.peek(true)) !== SEMICOLON) {
- if (tt === VAR || tt === CONST) {
- t.get();
- n2 = Variables(t, x3);
- } else if (tt === LET) {
- t.get();
- if (t.peek() === LEFT_PAREN) {
- n2 = LetBlock(t, x3, false);
- } else {
- // Let in for head, we need to add an implicit block
- // around the rest of the for.
- x3.parentBlock = n;
- n.varDecls = [];
- n2 = Variables(t, x3);
- }
- } else {
- n2 = Expression(t, x3);
- }
- }
- if (n2 && t.match(IN)) {
- n.type = FOR_IN;
- n.object = Expression(t, x3);
- if (n2.type === VAR || n2.type === LET) {
- c = n2.children;
-
- // Destructuring turns one decl into multiples, so either
- // there must be only one destructuring or only one
- // decl.
- if (c.length !== 1 && n2.destructurings.length !== 1) {
- throw new SyntaxError("Invalid for..in left-hand side",
- t.filename, n2.lineno);
- }
- if (n2.destructurings.length > 0) {
- n.iterator = n2.destructurings[0];
- } else {
- n.iterator = c[0];
- }
- n.varDecl = n2;
- } else {
- if (n2.type === ARRAY_INIT || n2.type === OBJECT_INIT) {
- n2.destructuredNames = checkDestructuring(t, x3, n2);
- }
- n.iterator = n2;
- }
- } else {
- x3.inForLoopInit = false;
- n.setup = n2;
- t.mustMatch(SEMICOLON);
- if (n.isEach)
- throw t.newSyntaxError("Invalid for each..in loop");
- n.condition = (t.peek(true) === SEMICOLON)
- ? null
- : Expression(t, x3);
- t.mustMatch(SEMICOLON);
- tt2 = t.peek(true);
- n.update = (x.parenFreeMode
- ? tt2 === LEFT_CURLY || definitions.isStatementStartCode[tt2]
- : tt2 === RIGHT_PAREN)
- ? null
- : Expression(t, x3);
- }
- if (!x.parenFreeMode)
- t.mustMatch(RIGHT_PAREN);
- n.body = Statement(t, x2);
- return n;
-
- case WHILE:
- n = new Node(t, { isLoop: true });
- n.blockComments = comments;
- n.condition = HeadExpression(t, x);
- n.body = Statement(t, x.pushTarget(n).nest());
- return n;
-
- case DO:
- n = new Node(t, { isLoop: true });
- n.blockComments = comments;
- n.body = Statement(t, x.pushTarget(n).nest());
- t.mustMatch(WHILE);
- n.condition = HeadExpression(t, x);
- if (!x.ecmaStrictMode) {
- // <script language="JavaScript"> (without version hints) may need
- // automatic semicolon insertion without a newline after do-while.
- // See http://bugzilla.mozilla.org/show_bug.cgi?id=238945.
- t.match(SEMICOLON);
- return n;
- }
- break;
-
- case BREAK:
- case CONTINUE:
- n = new Node(t);
- n.blockComments = comments;
-
- // handle the |foo: break foo;| corner case
- x2 = x.pushTarget(n);
-
- if (t.peekOnSameLine() === IDENTIFIER) {
- t.get();
- n.label = t.token.value;
- }
-
- if (n.label) {
- n.target = x2.labeledTargets.find(function(target) { return target.labels.has(n.label) });
- } else if (tt === CONTINUE) {
- n.target = x2.defaultLoopTarget;
- } else {
- n.target = x2.defaultTarget;
- }
-
- if (!n.target)
- throw t.newSyntaxError("Invalid " + ((tt === BREAK) ? "break" : "continue"));
- if (!n.target.isLoop && tt === CONTINUE)
- throw t.newSyntaxError("Invalid continue");
-
- break;
-
- case TRY:
- n = new Node(t, { catchClauses: [] });
- n.blockComments = comments;
- n.tryBlock = Block(t, x);
- while (t.match(CATCH)) {
- n2 = new Node(t);
- p = MaybeLeftParen(t, x);
- switch (t.get()) {
- case LEFT_BRACKET:
- case LEFT_CURLY:
- // Destructured catch identifiers.
- t.unget();
- n2.varName = DestructuringExpression(t, x, true);
- break;
- case IDENTIFIER:
- n2.varName = t.token.value;
- break;
- default:
- throw t.newSyntaxError("missing identifier in catch");
- break;
- }
- if (t.match(IF)) {
- if (x.ecma3OnlyMode)
- throw t.newSyntaxError("Illegal catch guard");
- if (n.catchClauses.length && !n.catchClauses.top().guard)
- throw t.newSyntaxError("Guarded catch after unguarded");
- n2.guard = Expression(t, x);
- }
- MaybeRightParen(t, p);
- n2.block = Block(t, x);
- n.catchClauses.push(n2);
- }
- if (t.match(FINALLY))
- n.finallyBlock = Block(t, x);
- if (!n.catchClauses.length && !n.finallyBlock)
- throw t.newSyntaxError("Invalid try statement");
- return n;
-
- case CATCH:
- case FINALLY:
- throw t.newSyntaxError(definitions.tokens[tt] + " without preceding try");
-
- case THROW:
- n = new Node(t);
- n.exception = Expression(t, x);
- break;
-
- case RETURN:
- n = ReturnOrYield(t, x);
- break;
-
- case WITH:
- n = new Node(t);
- n.blockComments = comments;
- n.object = HeadExpression(t, x);
- n.body = Statement(t, x.pushTarget(n).nest());
- return n;
-
- case VAR:
- case CONST:
- n = Variables(t, x);
- break;
-
- case LET:
- if (t.peek() === LEFT_PAREN)
- n = LetBlock(t, x, true);
- else
- n = Variables(t, x);
- break;
-
- case DEBUGGER:
- n = new Node(t);
- break;
-
- case NEWLINE:
- case SEMICOLON:
- n = new Node(t, { type: SEMICOLON });
- n.blockComments = comments;
- n.expression = null;
- return n;
-
- default:
- if (tt === IDENTIFIER) {
- tt = t.peek();
- // Labeled statement.
- if (tt === COLON) {
- label = t.token.value;
- if (x.allLabels.has(label))
- throw t.newSyntaxError("Duplicate label");
- t.get();
- n = new Node(t, { type: LABEL, label: label });
- n.blockComments = comments;
- n.statement = Statement(t, x.pushLabel(label).nest());
- n.target = (n.statement.type === LABEL) ? n.statement.target : n.statement;
- return n;
- }
- }
-
- // Expression statement.
- // We unget the current token to parse the expression as a whole.
- n = new Node(t, { type: SEMICOLON });
- t.unget();
- n.blockComments = comments;
- n.expression = Expression(t, x);
- n.end = n.expression.end;
- break;
- }
-
- n.blockComments = comments;
- MagicalSemicolon(t);
- return n;
- }
-
- /*
- * MagicalSemicolon :: (tokenizer) -> void
- */
- function MagicalSemicolon(t) {
- var tt;
- if (t.lineno === t.token.lineno) {
- tt = t.peekOnSameLine();
- if (tt !== END && tt !== NEWLINE && tt !== SEMICOLON && tt !== RIGHT_CURLY)
- throw t.newSyntaxError("missing ; before statement");
- }
- t.match(SEMICOLON);
- }
-
- /*
- * ReturnOrYield :: (tokenizer, compiler context) -> (RETURN | YIELD) node
- */
- function ReturnOrYield(t, x) {
- var n, b, tt = t.token.type, tt2;
-
- var parentScript = x.parentScript;
-
- if (tt === RETURN) {
- if (!x.inFunction)
- throw t.newSyntaxError("Return not in function");
- } else /* if (tt === YIELD) */ {
- if (!x.inFunction)
- throw t.newSyntaxError("Yield not in function");
- parentScript.isGenerator = true;
- }
- n = new Node(t, { value: undefined });
-
- tt2 = (tt === RETURN) ? t.peekOnSameLine(true) : t.peek(true);
- if (tt2 !== END && tt2 !== NEWLINE &&
- tt2 !== SEMICOLON && tt2 !== RIGHT_CURLY
- && (tt !== YIELD ||
- (tt2 !== tt && tt2 !== RIGHT_BRACKET && tt2 !== RIGHT_PAREN &&
- tt2 !== COLON && tt2 !== COMMA))) {
- if (tt === RETURN) {
- n.value = Expression(t, x);
- parentScript.hasReturnWithValue = true;
- } else {
- n.value = AssignExpression(t, x);
- }
- } else if (tt === RETURN) {
- parentScript.hasEmptyReturn = true;
- }
-
- // Disallow return v; in generator.
- if (parentScript.hasReturnWithValue && parentScript.isGenerator)
- throw t.newSyntaxError("Generator returns a value");
-
- return n;
- }
-
- /*
- * ModuleExpression :: (tokenizer, compiler context) -> (STRING | IDENTIFIER | DOT) node
- */
- function ModuleExpression(t, x) {
- return t.match(STRING) ? new Node(t) : QualifiedPath(t, x);
- }
-
- /*
- * ImportPathList :: (tokenizer, compiler context) -> Array[DOT node]
- */
- function ImportPathList(t, x) {
- var a = [];
- do {
- a.push(ImportPath(t, x));
- } while (t.match(COMMA));
- return a;
- }
-
- /*
- * ImportPath :: (tokenizer, compiler context) -> DOT node
- */
- function ImportPath(t, x) {
- var n = QualifiedPath(t, x);
- if (!t.match(DOT)) {
- if (n.type === IDENTIFIER)
- throw t.newSyntaxError("cannot import local variable");
- return n;
- }
-
- var n2 = new Node(t);
- n2.push(n);
- n2.push(ImportSpecifierSet(t, x));
- return n2;
- }
-
- /*
- * ExplicitSpecifierSet :: (tokenizer, compiler context, (tokenizer, compiler context) -> node)
- * -> OBJECT_INIT node
- */
- function ExplicitSpecifierSet(t, x, SpecifierRHS) {
- var n, n2, id, tt;
-
- n = new Node(t, { type: OBJECT_INIT });
- t.mustMatch(LEFT_CURLY);
-
- if (!t.match(RIGHT_CURLY)) {
- do {
- id = Identifier(t, x);
- if (t.match(COLON)) {
- n2 = new Node(t, { type: PROPERTY_INIT });
- n2.push(id);
- n2.push(SpecifierRHS(t, x));
- n.push(n2);
- } else {
- n.push(id);
- }
- } while (!t.match(RIGHT_CURLY) && t.mustMatch(COMMA));
- }
-
- return n;
- }
-
- /*
- * ImportSpecifierSet :: (tokenizer, compiler context) -> (IDENTIFIER | OBJECT_INIT) node
- */
- function ImportSpecifierSet(t, x) {
- return t.match(MUL)
- ? new Node(t, { type: IDENTIFIER, name: "*" })
- : ExplicitSpecifierSet(t, x, Identifier);
- }
-
- /*
- * Identifier :: (tokenizer, compiler context) -> IDENTIFIER node
- */
- function Identifier(t, x) {
- t.mustMatch(IDENTIFIER);
- return new Node(t, { type: IDENTIFIER });
- }
-
- /*
- * IdentifierName :: (tokenizer) -> IDENTIFIER node
- */
- function IdentifierName(t) {
- if (t.match(IDENTIFIER))
- return new Node(t, { type: IDENTIFIER });
- t.get();
- if (t.token.value in definitions.keywords)
- return new Node(t, { type: IDENTIFIER });
- throw t.newSyntaxError("missing IdentifierName");
- }
-
- /*
- * QualifiedPath :: (tokenizer, compiler context) -> (IDENTIFIER | DOT) node
- */
- function QualifiedPath(t, x) {
- var n, n2;
-
- n = Identifier(t, x);
-
- while (t.match(DOT)) {
- if (t.peek() !== IDENTIFIER) {
- // Unget the '.' token, which isn't part of the QualifiedPath.
- t.unget();
- break;
- }
- n2 = new Node(t);
- n2.push(n);
- n2.push(Identifier(t, x));
- n = n2;
- }
-
- return n;
- }
-
- /*
- * ExportPath :: (tokenizer, compiler context) -> (IDENTIFIER | DOT | OBJECT_INIT) node
- */
- function ExportPath(t, x) {
- if (t.peek() === LEFT_CURLY)
- return ExplicitSpecifierSet(t, x, QualifiedPath);
- return QualifiedPath(t, x);
- }
-
- /*
- * ExportPathList :: (tokenizer, compiler context)
- * -> Array[(IDENTIFIER | DOT | OBJECT_INIT) node]
- */
- function ExportPathList(t, x) {
- var a = [];
- do {
- a.push(ExportPath(t, x));
- } while (t.match(COMMA));
- return a;
- }
-
- /*
- * FunctionDefinition :: (tokenizer, compiler context, boolean,
- * DECLARED_FORM or EXPRESSED_FORM or STATEMENT_FORM,
- * [string] or null or undefined)
- * -> node
- */
- function FunctionDefinition(t, x, requireName, functionForm, comments) {
- var tt;
- var f = new Node(t, { params: [], paramComments: [] });
- if (typeof comment === "undefined")
- comment = null;
- f.blockComments = comments;
- if (f.type !== FUNCTION)
- f.type = (f.value === "get") ? GETTER : SETTER;
- if (t.match(IDENTIFIER))
- f.name = t.token.value;
- else if (requireName)
- throw t.newSyntaxError("missing function identifier");
-
- var inModule = x ? x.inModule : false;
- var x2 = new StaticContext(null, null, inModule, true);
-
- t.mustMatch(LEFT_PAREN);
- if (!t.match(RIGHT_PAREN)) {
- do {
- tt = t.get();
- f.paramComments.push(t.lastBlockComment());
- switch (tt) {
- case LEFT_BRACKET:
- case LEFT_CURLY:
- // Destructured formal parameters.
- t.unget();
- f.params.push(DestructuringExpression(t, x2));
- break;
- case IDENTIFIER:
- f.params.push(t.token.value);
- break;
- default:
- throw t.newSyntaxError("missing formal parameter");
- break;
- }
- } while (t.match(COMMA));
- t.mustMatch(RIGHT_PAREN);
- }
-
- // Do we have an expression closure or a normal body?
- tt = t.get();
- if (tt !== LEFT_CURLY)
- t.unget();
-
- if (tt !== LEFT_CURLY) {
- f.body = AssignExpression(t, x2);
- if (f.body.isGenerator)
- throw t.newSyntaxError("Generator returns a value");
- } else {
- f.body = Script(t, inModule, true);
- }
-
- if (tt === LEFT_CURLY)
- t.mustMatch(RIGHT_CURLY);
-
- f.end = t.token.end;
- f.functionForm = functionForm;
- if (functionForm === DECLARED_FORM)
- x.parentScript.funDecls.push(f);
- return f;
- }
-
- /*
- * ModuleVariables :: (tokenizer, compiler context, MODULE node) -> void
- *
- * Parses a comma-separated list of module declarations (and maybe
- * initializations).
- */
- function ModuleVariables(t, x, n) {
- var n1, n2;
- do {
- n1 = Identifier(t, x);
- if (t.match(ASSIGN)) {
- n2 = ModuleExpression(t, x);
- n1.initializer = n2;
- if (n2.type === STRING)
- x.parentScript.modLoads.set(n1.value, n2.value);
- else
- x.parentScript.modAssns.set(n1.value, n1);
- }
- n.push(n1);
- } while (t.match(COMMA));
- }
-
- /*
- * Variables :: (tokenizer, compiler context) -> node
- *
- * Parses a comma-separated list of var declarations (and maybe
- * initializations).
- */
- function Variables(t, x, letBlock) {
- var n, n2, ss, i, s, tt;
-
- tt = t.token.type;
- switch (tt) {
- case VAR:
- case CONST:
- s = x.parentScript;
- break;
- case LET:
- s = x.parentBlock;
- break;
- case LEFT_PAREN:
- tt = LET;
- s = letBlock;
- break;
- }
-
- n = new Node(t, { type: tt, destructurings: [] });
-
- do {
- tt = t.get();
- if (tt === LEFT_BRACKET || tt === LEFT_CURLY) {
- // Need to unget to parse the full destructured expression.
- t.unget();
-
- var dexp = DestructuringExpression(t, x, true);
-
- n2 = new Node(t, { type: IDENTIFIER,
- name: dexp,
- readOnly: n.type === CONST });
- n.push(n2);
- pushDestructuringVarDecls(n2.name.destructuredNames, s);
- n.destructurings.push({ exp: dexp, decl: n2 });
-
- if (x.inForLoopInit && t.peek() === IN) {
- continue;
- }
-
- t.mustMatch(ASSIGN);
- if (t.token.assignOp)
- throw t.newSyntaxError("Invalid variable initialization");
-
- n2.blockComment = t.lastBlockComment();
- n2.initializer = AssignExpression(t, x);
-
- continue;
- }
-
- if (tt !== IDENTIFIER)
- throw t.newSyntaxError("missing variable name");
-
- n2 = new Node(t, { type: IDENTIFIER,
- name: t.token.value,
- readOnly: n.type === CONST });
- n.push(n2);
- s.varDecls.push(n2);
-
- if (t.match(ASSIGN)) {
- var comment = t.lastBlockComment();
- if (t.token.assignOp)
- throw t.newSyntaxError("Invalid variable initialization");
-
- n2.initializer = AssignExpression(t, x);
- } else {
- var comment = t.lastBlockComment();
- }
- n2.blockComment = comment;
- } while (t.match(COMMA));
-
- return n;
- }
-
- /*
- * LetBlock :: (tokenizer, compiler context, boolean) -> node
- *
- * Does not handle let inside of for loop init.
- */
- function LetBlock(t, x, isStatement) {
- var n, n2;
-
- // t.token.type must be LET
- n = new Node(t, { type: LET_BLOCK, varDecls: [] });
- t.mustMatch(LEFT_PAREN);
- n.variables = Variables(t, x, n);
- t.mustMatch(RIGHT_PAREN);
-
- if (isStatement && t.peek() !== LEFT_CURLY) {
- /*
- * If this is really an expression in let statement guise, then we
- * need to wrap the LET_BLOCK node in a SEMICOLON node so that we pop
- * the return value of the expression.
- */
- n2 = new Node(t, { type: SEMICOLON,
- expression: n });
- isStatement = false;
- }
-
- if (isStatement)
- n.block = Block(t, x);
- else
- n.expression = AssignExpression(t, x);
-
- return n;
- }
-
- function checkDestructuring(t, x, n, simpleNamesOnly) {
- if (n.type === ARRAY_COMP)
- throw t.newSyntaxError("Invalid array comprehension left-hand side");
- if (n.type !== ARRAY_INIT && n.type !== OBJECT_INIT)
- return;
-
- var lhss = {};
- var nn, n2, idx, sub, cc, c = n.children;
- for (var i = 0, j = c.length; i < j; i++) {
- if (!(nn = c[i]))
- continue;
- if (nn.type === PROPERTY_INIT) {
- cc = nn.children;
- sub = cc[1];
- idx = cc[0].value;
- } else if (n.type === OBJECT_INIT) {
- // Do we have destructuring shorthand {foo, bar}?
- sub = nn;
- idx = nn.value;
- } else {
- sub = nn;
- idx = i;
- }
-
- if (sub.type === ARRAY_INIT || sub.type === OBJECT_INIT) {
- lhss[idx] = checkDestructuring(t, x, sub, simpleNamesOnly);
- } else {
- if (simpleNamesOnly && sub.type !== IDENTIFIER) {
- // In declarations, lhs must be simple names
- throw t.newSyntaxError("missing name in pattern");
- }
-
- lhss[idx] = sub;
- }
- }
-
- return lhss;
- }
-
- function DestructuringExpression(t, x, simpleNamesOnly) {
- var n = PrimaryExpression(t, x);
- // Keep the list of lefthand sides for varDecls
- n.destructuredNames = checkDestructuring(t, x, n, simpleNamesOnly);
- return n;
- }
-
- function GeneratorExpression(t, x, e) {
- return new Node(t, { type: GENERATOR,
- expression: e,
- tail: ComprehensionTail(t, x) });
- }
-
- function ComprehensionTail(t, x) {
- var body, n, n2, n3, p;
-
- // t.token.type must be FOR
- body = new Node(t, { type: COMP_TAIL });
-
- do {
- // Comprehension tails are always for..in loops.
- n = new Node(t, { type: FOR_IN, isLoop: true });
- if (t.match(IDENTIFIER)) {
- // But sometimes they're for each..in.
- if (t.token.value === "each")
- n.isEach = true;
- else
- t.unget();
- }
- p = MaybeLeftParen(t, x);
- switch(t.get()) {
- case LEFT_BRACKET:
- case LEFT_CURLY:
- t.unget();
- // Destructured left side of for in comprehension tails.
- n.iterator = DestructuringExpression(t, x);
- break;
-
- case IDENTIFIER:
- n.iterator = n3 = new Node(t, { type: IDENTIFIER });
- n3.name = n3.value;
- n.varDecl = n2 = new Node(t, { type: VAR });
- n2.push(n3);
- x.parentScript.varDecls.push(n3);
- // Don't add to varDecls since the semantics of comprehensions is
- // such that the variables are in their own function when
- // desugared.
- break;
-
- default:
- throw t.newSyntaxError("missing identifier");
- }
- t.mustMatch(IN);
- n.object = Expression(t, x);
- MaybeRightParen(t, p);
- body.push(n);
- } while (t.match(FOR));
-
- // Optional guard.
- if (t.match(IF))
- body.guard = HeadExpression(t, x);
-
- return body;
- }
-
- function HeadExpression(t, x) {
- var p = MaybeLeftParen(t, x);
- var n = ParenExpression(t, x);
- MaybeRightParen(t, p);
- if (p === END && !n.parenthesized) {
- var tt = t.peek();
- if (tt !== LEFT_CURLY && !definitions.isStatementStartCode[tt])
- throw t.newSyntaxError("Unparenthesized head followed by unbraced body");
- }
- return n;
- }
-
- function ParenExpression(t, x) {
- // Always accept the 'in' operator in a parenthesized expression,
- // where it's unambiguous, even if we might be parsing the init of a
- // for statement.
- var n = Expression(t, x.update({ inForLoopInit: x.inForLoopInit &&
- (t.token.type === LEFT_PAREN) }));
-
- if (t.match(FOR)) {
- if (n.type === YIELD && !n.parenthesized)
- throw t.newSyntaxError("Yield expression must be parenthesized");
- if (n.type === COMMA && !n.parenthesized)
- throw t.newSyntaxError("Generator expression must be parenthesized");
- n = GeneratorExpression(t, x, n);
- }
-
- return n;
- }
-
- /*
- * Expression :: (tokenizer, compiler context) -> node
- *
- * Top-down expression parser matched against SpiderMonkey.
- */
- function Expression(t, x) {
- var n, n2;
-
- n = AssignExpression(t, x);
- if (t.match(COMMA)) {
- n2 = new Node(t, { type: COMMA });
- n2.push(n);
- n = n2;
- do {
- n2 = n.children[n.children.length-1];
- if (n2.type === YIELD && !n2.parenthesized)
- throw t.newSyntaxError("Yield expression must be parenthesized");
- n.push(AssignExpression(t, x));
- } while (t.match(COMMA));
- }
-
- return n;
- }
-
- function AssignExpression(t, x) {
- var n, lhs;
-
- // Have to treat yield like an operand because it could be the leftmost
- // operand of the expression.
- if (t.match(YIELD, true))
- return ReturnOrYield(t, x);
-
- n = new Node(t, { type: ASSIGN });
- lhs = ConditionalExpression(t, x);
-
- if (!t.match(ASSIGN)) {
- return lhs;
- }
-
- n.blockComment = t.lastBlockComment();
-
- switch (lhs.type) {
- case OBJECT_INIT:
- case ARRAY_INIT:
- lhs.destructuredNames = checkDestructuring(t, x, lhs);
- // FALL THROUGH
- case IDENTIFIER: case DOT: case INDEX: case CALL:
- break;
- default:
- throw t.newSyntaxError("Bad left-hand side of assignment");
- break;
- }
-
- n.assignOp = lhs.assignOp = t.token.assignOp;
- n.push(lhs);
- n.push(AssignExpression(t, x));
-
- return n;
- }
-
- function ConditionalExpression(t, x) {
- var n, n2;
-
- n = OrExpression(t, x);
- if (t.match(HOOK)) {
- n2 = n;
- n = new Node(t, { type: HOOK });
- n.push(n2);
- /*
- * Always accept the 'in' operator in the middle clause of a ternary,
- * where it's unambiguous, even if we might be parsing the init of a
- * for statement.
- */
- n.push(AssignExpression(t, x.update({ inForLoopInit: false })));
- if (!t.match(COLON))
- throw t.newSyntaxError("missing : after ?");
- n.push(AssignExpression(t, x));
- }
-
- return n;
- }
-
- function OrExpression(t, x) {
- var n, n2;
-
- n = AndExpression(t, x);
- while (t.match(OR)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(AndExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function AndExpression(t, x) {
- var n, n2;
-
- n = BitwiseOrExpression(t, x);
- while (t.match(AND)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(BitwiseOrExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function BitwiseOrExpression(t, x) {
- var n, n2;
-
- n = BitwiseXorExpression(t, x);
- while (t.match(BITWISE_OR)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(BitwiseXorExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function BitwiseXorExpression(t, x) {
- var n, n2;
-
- n = BitwiseAndExpression(t, x);
- while (t.match(BITWISE_XOR)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(BitwiseAndExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function BitwiseAndExpression(t, x) {
- var n, n2;
-
- n = EqualityExpression(t, x);
- while (t.match(BITWISE_AND)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(EqualityExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function EqualityExpression(t, x) {
- var n, n2;
-
- n = RelationalExpression(t, x);
- while (t.match(EQ) || t.match(NE) ||
- t.match(STRICT_EQ) || t.match(STRICT_NE)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(RelationalExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function RelationalExpression(t, x) {
- var n, n2;
-
- /*
- * Uses of the in operator in shiftExprs are always unambiguous,
- * so unset the flag that prohibits recognizing it.
- */
- var x2 = x.update({ inForLoopInit: false });
- n = ShiftExpression(t, x2);
- while ((t.match(LT) || t.match(LE) || t.match(GE) || t.match(GT) ||
- (!x.inForLoopInit && t.match(IN)) ||
- t.match(INSTANCEOF))) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(ShiftExpression(t, x2));
- n = n2;
- }
-
- return n;
- }
-
- function ShiftExpression(t, x) {
- var n, n2;
-
- n = AddExpression(t, x);
- while (t.match(LSH) || t.match(RSH) || t.match(URSH)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(AddExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function AddExpression(t, x) {
- var n, n2;
-
- n = MultiplyExpression(t, x);
- while (t.match(PLUS) || t.match(MINUS)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(MultiplyExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function MultiplyExpression(t, x) {
- var n, n2;
-
- n = UnaryExpression(t, x);
- while (t.match(MUL) || t.match(DIV) || t.match(MOD)) {
- n2 = new Node(t);
- n2.push(n);
- n2.push(UnaryExpression(t, x));
- n = n2;
- }
-
- return n;
- }
-
- function UnaryExpression(t, x) {
- var n, n2, tt;
-
- switch (tt = t.get(true)) {
- case DELETE: case VOID: case TYPEOF:
- case NOT: case BITWISE_NOT: case PLUS: case MINUS:
- if (tt === PLUS)
- n = new Node(t, { type: UNARY_PLUS });
- else if (tt === MINUS)
- n = new Node(t, { type: UNARY_MINUS });
- else
- n = new Node(t);
- n.push(UnaryExpression(t, x));
- break;
-
- case INCREMENT:
- case DECREMENT:
- // Prefix increment/decrement.
- n = new Node(t);
- n.push(MemberExpression(t, x, true));
- break;
-
- default:
- t.unget();
- n = MemberExpression(t, x, true);
-
- // Don't look across a newline boundary for a postfix {in,de}crement.
- if (t.tokens[(t.tokenIndex + t.lookahead - 1) & 3].lineno ===
- t.lineno) {
- if (t.match(INCREMENT) || t.match(DECREMENT)) {
- n2 = new Node(t, { postfix: true });
- n2.push(n);
- n = n2;
- }
- }
- break;
- }
-
- return n;
- }
-
- function MemberExpression(t, x, allowCallSyntax) {
- var n, n2, name, tt;
-
- if (t.match(NEW)) {
- n = new Node(t);
- n.push(MemberExpression(t, x, false));
- if (t.match(LEFT_PAREN)) {
- n.type = NEW_WITH_ARGS;
- n.push(ArgumentList(t, x));
- }
- } else {
- n = PrimaryExpression(t, x);
- }
-
- while ((tt = t.get()) !== END) {
- switch (tt) {
- case DOT:
- n2 = new Node(t);
- n2.push(n);
- n2.push(IdentifierName(t));
- break;
-
- case LEFT_BRACKET:
- n2 = new Node(t, { type: INDEX });
- n2.push(n);
- n2.push(Expression(t, x));
- t.mustMatch(RIGHT_BRACKET);
- break;
-
- case LEFT_PAREN:
- if (allowCallSyntax) {
- n2 = new Node(t, { type: CALL });
- n2.push(n);
- n2.push(ArgumentList(t, x));
- break;
- }
-
- // FALL THROUGH
- default:
- t.unget();
- return n;
- }
-
- n = n2;
- }
-
- return n;
- }
-
- function ArgumentList(t, x) {
- var n, n2;
-
- n = new Node(t, { type: LIST });
- if (t.match(RIGHT_PAREN, true))
- return n;
- do {
- n2 = AssignExpression(t, x);
- if (n2.type === YIELD && !n2.parenthesized && t.peek() === COMMA)
- throw t.newSyntaxError("Yield expression must be parenthesized");
- if (t.match(FOR)) {
- n2 = GeneratorExpression(t, x, n2);
- if (n.children.length > 1 || t.peek(true) === COMMA)
- throw t.newSyntaxError("Generator expression must be parenthesized");
- }
- n.push(n2);
- } while (t.match(COMMA));
- t.mustMatch(RIGHT_PAREN);
-
- return n;
- }
-
- function PrimaryExpression(t, x) {
- var n, n2, tt = t.get(true);
-
- switch (tt) {
- case FUNCTION:
- n = FunctionDefinition(t, x, false, EXPRESSED_FORM);
- break;
-
- case LEFT_BRACKET:
- n = new Node(t, { type: ARRAY_INIT });
- while ((tt = t.peek(true)) !== RIGHT_BRACKET) {
- if (tt === COMMA) {
- t.get();
- n.push(null);
- continue;
- }
- n.push(AssignExpression(t, x));
- if (tt !== COMMA && !t.match(COMMA))
- break;
- }
-
- // If we matched exactly one element and got a FOR, we have an
- // array comprehension.
- if (n.children.length === 1 && t.match(FOR)) {
- n2 = new Node(t, { type: ARRAY_COMP,
- expression: n.children[0],
- tail: ComprehensionTail(t, x) });
- n = n2;
- }
- t.mustMatch(RIGHT_BRACKET);
- break;
-
- case LEFT_CURLY:
- var id, fd;
- n = new Node(t, { type: OBJECT_INIT });
-
- object_init:
- if (!t.match(RIGHT_CURLY)) {
- do {
- tt = t.get();
- if ((t.token.value === "get" || t.token.value === "set") &&
- t.peek() === IDENTIFIER) {
- if (x.ecma3OnlyMode)
- throw t.newSyntaxError("Illegal property accessor");
- n.push(FunctionDefinition(t, x, true, EXPRESSED_FORM));
- } else {
- var comments = t.blockComments;
- switch (tt) {
- case IDENTIFIER: case NUMBER: case STRING:
- id = new Node(t, { type: IDENTIFIER });
- break;
- case RIGHT_CURLY:
- if (x.ecma3OnlyMode)
- throw t.newSyntaxError("Illegal trailing ,");
- break object_init;
- default:
- if (t.token.value in definitions.keywords) {
- id = new Node(t, { type: IDENTIFIER });
- break;
- }
- throw t.newSyntaxError("Invalid property name");
- }
- if (t.match(COLON)) {
- n2 = new Node(t, { type: PROPERTY_INIT });
- n2.push(id);
- n2.push(AssignExpression(t, x));
- n2.blockComments = comments;
- n.push(n2);
- } else {
- // Support, e.g., |var {x, y} = o| as destructuring shorthand
- // for |var {x: x, y: y} = o|, per proposed JS2/ES4 for JS1.8.
- if (t.peek() !== COMMA && t.peek() !== RIGHT_CURLY)
- throw t.newSyntaxError("missing : after property");
- n.push(id);
- }
- }
- } while (t.match(COMMA));
- t.mustMatch(RIGHT_CURLY);
- }
- break;
-
- case LEFT_PAREN:
- n = ParenExpression(t, x);
- t.mustMatch(RIGHT_PAREN);
- n.parenthesized = true;
- break;
-
- case LET:
- n = LetBlock(t, x, false);
- break;
-
- case NULL: case THIS: case TRUE: case FALSE:
- case IDENTIFIER: case NUMBER: case STRING: case REGEXP:
- n = new Node(t);
- break;
-
- default:
- throw t.newSyntaxError("missing operand");
- break;
- }
-
- return n;
- }
-
- /*
- * parse :: (source, filename, line number) -> node
- */
- function parse(s, f, l) {
- var t = new lexer.Tokenizer(s, f, l);
- var n = Script(t, false, false);
- if (!t.done)
- throw t.newSyntaxError("Syntax error");
-
- return n;
- }
-
- /*
- * parseStdin :: (source, {line number}, string, (string) -> boolean) -> program node
- */
- function parseStdin(s, ln, prefix, isCommand) {
- // the special .begin command is only recognized at the beginning
- if (s.match(/^[\s]*\.begin[\s]*$/)) {
- ++ln.value;
- return parseMultiline(ln, prefix);
- }
-
- // commands at the beginning are treated as the entire input
- if (isCommand(s.trim()))
- s = "";
-
- for (;;) {
- try {
- var t = new lexer.Tokenizer(s, "stdin", ln.value);
- var n = Script(t, false, false);
- ln.value = t.lineno;
- return n;
- } catch (e) {
- if (!t.unexpectedEOF)
- throw e;
-
- // commands in the middle are not treated as part of the input
- var more;
- do {
- if (prefix)
- putstr(prefix);
- more = readline();
- if (!more)
- throw e;
- } while (isCommand(more.trim()));
-
- s += "\n" + more;
- }
- }
- }
-
- /*
- * parseMultiline :: ({line number}, string | null) -> program node
- */
- function parseMultiline(ln, prefix) {
- var s = "";
- for (;;) {
- if (prefix)
- putstr(prefix);
- var more = readline();
- if (more === null)
- return null;
- // the only command recognized in multiline mode is .end
- if (more.match(/^[\s]*\.end[\s]*$/))
- break;
- s += "\n" + more;
- }
- var t = new lexer.Tokenizer(s, "stdin", ln.value);
- var n = Script(t, false, false);
- ln.value = t.lineno;
- return n;
- }
-
- module.exports = {
- parse: parse,
- parseStdin: parseStdin,
- Node: Node,
- SyntheticNode: SyntheticNode,
- DECLARED_FORM: DECLARED_FORM,
- EXPRESSED_FORM: EXPRESSED_FORM,
- STATEMENT_FORM: STATEMENT_FORM,
- Tokenizer: lexer.Tokenizer,
- FunctionDefinition: FunctionDefinition,
- Module: Module,
- Export: Export
- };
-
-});/* vim: set sw=4 ts=4 et tw=78: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Narcissus JavaScript engine.
- *
- * The Initial Developer of the Original Code is
- * Brendan Eich <brendan@mozilla.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Tom Austin <taustin@ucsc.edu>
- * Brendan Eich <brendan@mozilla.org>
- * Shu-Yu Guo <shu@rfrn.org>
- * Dave Herman <dherman@mozilla.com>
- * Dimitris Vardoulakis <dimvar@ccs.neu.edu>
- * Patrick Walton <pcwalton@mozilla.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * Narcissus - JS implemented in JS.
- *
- * Lexical scanner.
- */
-
- define('ace/narcissus/jslex', ['require', 'exports', 'module' , 'ace/narcissus/jsdefs'], function(require, exports, module) {
-
- var definitions = require("./jsdefs");
-
- // Set constants in the local scope.
- eval(definitions.consts);
-
- // Banned keywords by language version
- const blackLists = { 160: {}, 185: {}, harmony: {} };
- blackLists[160][LET] = true;
- blackLists[160][MODULE] = true;
- blackLists[160][YIELD] = true;
- blackLists[185][MODULE] = true;
-
- // Build up a trie of operator tokens.
- var opTokens = {};
- for (var op in definitions.opTypeNames) {
- if (op === '\n' || op === '.')
- continue;
-
- var node = opTokens;
- for (var i = 0; i < op.length; i++) {
- var ch = op[i];
- if (!(ch in node))
- node[ch] = {};
- node = node[ch];
- node.op = op;
- }
- }
-
- /*
- * Tokenizer :: (source, filename, line number) -> Tokenizer
- */
- function Tokenizer(s, f, l) {
- this.cursor = 0;
- this.source = String(s);
- this.tokens = [];
- this.tokenIndex = 0;
- this.lookahead = 0;
- this.scanNewlines = false;
- this.unexpectedEOF = false;
- this.filename = f || "";
- this.lineno = l || 1;
- this.blackList = blackLists[Narcissus.options.version];
- this.blockComments = null;
- }
-
- Tokenizer.prototype = {
- get done() {
- // We need to set scanOperand to true here because the first thing
- // might be a regexp.
- return this.peek(true) === END;
- },
-
- get token() {
- return this.tokens[this.tokenIndex];
- },
-
- match: function (tt, scanOperand) {
- return this.get(scanOperand) === tt || this.unget();
- },
-
- mustMatch: function (tt) {
- if (!this.match(tt)) {
- throw this.newSyntaxError("Missing " +
- definitions.tokens[tt].toLowerCase());
- }
- return this.token;
- },
-
- peek: function (scanOperand) {
- var tt, next;
- if (this.lookahead) {
- next = this.tokens[(this.tokenIndex + this.lookahead) & 3];
- tt = (this.scanNewlines && next.lineno !== this.lineno)
- ? NEWLINE
- : next.type;
- } else {
- tt = this.get(scanOperand);
- this.unget();
- }
- return tt;
- },
-
- peekOnSameLine: function (scanOperand) {
- this.scanNewlines = true;
- var tt = this.peek(scanOperand);
- this.scanNewlines = false;
- return tt;
- },
-
- lastBlockComment: function() {
- var length = this.blockComments.length;
- return length ? this.blockComments[length - 1] : null;
- },
-
- // Eat comments and whitespace.
- skip: function () {
- var input = this.source;
- this.blockComments = [];
- for (;;) {
- var ch = input[this.cursor++];
- var next = input[this.cursor];
- // handle \r, \r\n and (always preferable) \n
- if (ch === '\r') {
- // if the next character is \n, we don't care about this at all
- if (next === '\n') continue;
-
- // otherwise, we want to consider this as a newline
- ch = '\n';
- }
-
- if (ch === '\n' && !this.scanNewlines) {
- this.lineno++;
- } else if (ch === '/' && next === '*') {
- var commentStart = ++this.cursor;
- for (;;) {
- ch = input[this.cursor++];
- if (ch === undefined)
- throw this.newSyntaxError("Unterminated comment");
-
- if (ch === '*') {
- next = input[this.cursor];
- if (next === '/') {
- var commentEnd = this.cursor - 1;
- this.cursor++;
- break;
- }
- } else if (ch === '\n') {
- this.lineno++;
- }
- }
- this.blockComments.push(input.substring(commentStart, commentEnd));
- } else if (ch === '/' && next === '/') {
- this.cursor++;
- for (;;) {
- ch = input[this.cursor++];
- next = input[this.cursor];
- if (ch === undefined)
- return;
-
- if (ch === '\r') {
- // check for \r\n
- if (next !== '\n') ch = '\n';
- }
-
- if (ch === '\n') {
- if (this.scanNewlines) {
- this.cursor--;
- } else {
- this.lineno++;
- }
- break;
- }
- }
- } else if (!(ch in definitions.whitespace)) {
- this.cursor--;
- return;
- }
- }
- },
-
- // Lex the exponential part of a number, if present. Return true iff an
- // exponential part was found.
- lexExponent: function() {
- var input = this.source;
- var next = input[this.cursor];
- if (next === 'e' || next === 'E') {
- this.cursor++;
- ch = input[this.cursor++];
- if (ch === '+' || ch === '-')
- ch = input[this.cursor++];
-
- if (ch < '0' || ch > '9')
- throw this.newSyntaxError("Missing exponent");
-
- do {
- ch = input[this.cursor++];
- } while (ch >= '0' && ch <= '9');
- this.cursor--;
-
- return true;
- }
-
- return false;
- },
-
- lexZeroNumber: function (ch) {
- var token = this.token, input = this.source;
- token.type = NUMBER;
-
- ch = input[this.cursor++];
- if (ch === '.') {
- do {
- ch = input[this.cursor++];
- } while (ch >= '0' && ch <= '9');
- this.cursor--;
-
- this.lexExponent();
- token.value = parseFloat(token.start, this.cursor);
- } else if (ch === 'x' || ch === 'X') {
- do {
- ch = input[this.cursor++];
- } while ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') ||
- (ch >= 'A' && ch <= 'F'));
- this.cursor--;
-
- token.value = parseInt(input.substring(token.start, this.cursor));
- } else if (ch >= '0' && ch <= '7') {
- do {
- ch = input[this.cursor++];
- } while (ch >= '0' && ch <= '7');
- this.cursor--;
-
- token.value = parseInt(input.substring(token.start, this.cursor));
- } else {
- this.cursor--;
- this.lexExponent(); // 0E1, &c.
- token.value = 0;
- }
- },
-
- lexNumber: function (ch) {
- var token = this.token, input = this.source;
- token.type = NUMBER;
-
- var floating = false;
- do {
- ch = input[this.cursor++];
- if (ch === '.' && !floating) {
- floating = true;
- ch = input[this.cursor++];
- }
- } while (ch >= '0' && ch <= '9');
-
- this.cursor--;
-
- var exponent = this.lexExponent();
- floating = floating || exponent;
-
- var str = input.substring(token.start, this.cursor);
- token.value = floating ? parseFloat(str) : parseInt(str);
- },
-
- lexDot: function (ch) {
- var token = this.token, input = this.source;
- var next = input[this.cursor];
- if (next >= '0' && next <= '9') {
- do {
- ch = input[this.cursor++];
- } while (ch >= '0' && ch <= '9');
- this.cursor--;
-
- this.lexExponent();
-
- token.type = NUMBER;
- token.value = parseFloat(token.start, this.cursor);
- } else {
- token.type = DOT;
- token.assignOp = null;
- token.value = '.';
- }
- },
-
- lexString: function (ch) {
- var token = this.token, input = this.source;
- token.type = STRING;
-
- var hasEscapes = false;
- var delim = ch;
- if (input.length <= this.cursor)
- throw this.newSyntaxError("Unterminated string literal");
- while ((ch = input[this.cursor++]) !== delim) {
- if (this.cursor == input.length)
- throw this.newSyntaxError("Unterminated string literal");
- if (ch === '\\') {
- hasEscapes = true;
- if (++this.cursor == input.length)
- throw this.newSyntaxError("Unterminated string literal");
- }
- }
-
- token.value = hasEscapes
- ? eval(input.substring(token.start, this.cursor))
- : input.substring(token.start + 1, this.cursor - 1);
- },
-
- lexRegExp: function (ch) {
- var token = this.token, input = this.source;
- token.type = REGEXP;
-
- do {
- ch = input[this.cursor++];
- if (ch === '\\') {
- this.cursor++;
- } else if (ch === '[') {
- do {
- if (ch === undefined)
- throw this.newSyntaxError("Unterminated character class");
-
- if (ch === '\\')
- this.cursor++;
-
- ch = input[this.cursor++];
- } while (ch !== ']');
- } else if (ch === undefined) {
- throw this.newSyntaxError("Unterminated regex");
- }
- } while (ch !== '/');
-
- do {
- ch = input[this.cursor++];
- } while (ch >= 'a' && ch <= 'z');
-
- this.cursor--;
-
- token.value = eval(input.substring(token.start, this.cursor));
- },
-
- lexOp: function (ch) {
- var token = this.token, input = this.source;
-
- // A bit ugly, but it seems wasteful to write a trie lookup routine
- // for only 3 characters...
- var node = opTokens[ch];
- var next = input[this.cursor];
- if (next in node) {
- node = node[next];
- this.cursor++;
- next = input[this.cursor];
- if (next in node) {
- node = node[next];
- this.cursor++;
- next = input[this.cursor];
- }
- }
-
- var op = node.op;
- if (definitions.assignOps[op] && input[this.cursor] === '=') {
- this.cursor++;
- token.type = ASSIGN;
- token.assignOp = definitions.tokenIds[definitions.opTypeNames[op]];
- op += '=';
- } else {
- token.type = definitions.tokenIds[definitions.opTypeNames[op]];
- token.assignOp = null;
- }
-
- token.value = op;
- },
-
- // FIXME: Unicode escape sequences
- lexIdent: function (ch) {
- var token = this.token;
- var id = ch;
-
- while ((ch = this.getValidIdentifierChar(false)) !== null) {
- id += ch;
- }
-
- token.type = definitions.keywords[id] || IDENTIFIER;
- if (token.type in this.blackList) {
- // banned keyword, this is an identifier
- token.type = IDENTIFIER;
- }
- token.value = id;
- },
-
- /*
- * Tokenizer.get :: void -> token type
- *
- * Consume input *only* if there is no lookahead.
- * Dispatch to the appropriate lexing function depending on the input.
- */
- get: function (scanOperand) {
- var token;
- while (this.lookahead) {
- --this.lookahead;
- this.tokenIndex = (this.tokenIndex + 1) & 3;
- token = this.tokens[this.tokenIndex];
- if (token.type !== NEWLINE || this.scanNewlines)
- return token.type;
- }
-
- this.skip();
-
- this.tokenIndex = (this.tokenIndex + 1) & 3;
- token = this.tokens[this.tokenIndex];
- if (!token)
- this.tokens[this.tokenIndex] = token = {};
-
- var input = this.source;
- if (this.cursor >= input.length)
- return token.type = END;
-
- token.start = this.cursor;
- token.lineno = this.lineno;
-
- var ich = this.getValidIdentifierChar(true);
- var ch = (ich === null) ? input[this.cursor++] : null;
- if (ich !== null) {
- this.lexIdent(ich);
- } else if (scanOperand && ch === '/') {
- this.lexRegExp(ch);
- } else if (ch in opTokens) {
- this.lexOp(ch);
- } else if (ch === '.') {
- this.lexDot(ch);
- } else if (ch >= '1' && ch <= '9') {
- this.lexNumber(ch);
- } else if (ch === '0') {
- this.lexZeroNumber(ch);
- } else if (ch === '"' || ch === "'") {
- this.lexString(ch);
- } else if (this.scanNewlines && (ch === '\n' || ch === '\r')) {
- // if this was a \r, look for \r\n
- if (ch === '\r' && input[this.cursor] === '\n') this.cursor++;
- token.type = NEWLINE;
- token.value = '\n';
- this.lineno++;
- } else {
- throw this.newSyntaxError("Illegal token");
- }
-
- token.end = this.cursor;
- return token.type;
- },
-
- /*
- * Tokenizer.unget :: void -> undefined
- *
- * Match depends on unget returning undefined.
- */
- unget: function () {
- if (++this.lookahead === 4) throw "PANIC: too much lookahead!";
- this.tokenIndex = (this.tokenIndex - 1) & 3;
- },
-
- newSyntaxError: function (m) {
- m = (this.filename ? this.filename + ":" : "") + this.lineno + ": " + m;
- var e = new SyntaxError(m, this.filename, this.lineno);
- e.source = this.source;
- e.cursor = this.lookahead
- ? this.tokens[(this.tokenIndex + this.lookahead) & 3].start
- : this.cursor;
- return e;
- },
-
- /* Gets a single valid identifier char from the input stream, or null
- * if there is none.
- * Since JavaScript provides no convenient way to determine if a
- * character is in a particular Unicode category, we use
- * metacircularity to accomplish this (oh yeaaaah!) */
- getValidIdentifierChar: function(first) {
- var input = this.source;
- if (this.cursor >= input.length) return null;
- var ch = input[this.cursor];
-
- // first check for \u escapes
- if (ch === '\\' && input[this.cursor+1] === 'u') {
- // get the character value
- try {
- ch = String.fromCharCode(parseInt(
- input.substring(this.cursor + 2, this.cursor + 6),
- 16));
- } catch (ex) {
- return null;
- }
- this.cursor += 5;
- }
-
- // check directly for ASCII
- if (ch <= "\u007F") {
- if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch === '$' || ch === '_' ||
- (!first && (ch >= '0' && ch <= '9'))) {
- this.cursor++;
- return ch;
- }
- return null;
- }
-
- // create an object to test this in
- var x = {};
- x["x"+ch] = true;
- x[ch] = true;
-
- // then use eval to determine if it's a valid character
- var valid = false;
- try {
- valid = (Function("x", "return (x." + (first?"":"x") + ch + ");")(x) === true);
- } catch (ex) {}
- if (valid) this.cursor++;
- return (valid ? ch : null);
- },
- };
-
-
- module.exports = { Tokenizer: Tokenizer };
-
-});
-/* vim: set sw=4 ts=4 et tw=78: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Narcissus JavaScript engine.
- *
- * The Initial Developer of the Original Code is
- * Brendan Eich <brendan@mozilla.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Tom Austin <taustin@ucsc.edu>
- * Brendan Eich <brendan@mozilla.org>
- * Shu-Yu Guo <shu@rfrn.org>
- * Dave Herman <dherman@mozilla.com>
- * Dimitris Vardoulakis <dimvar@ccs.neu.edu>
- * Patrick Walton <pcwalton@mozilla.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * Narcissus - JS implemented in JS.
- *
- * Well-known constants and lookup tables. Many consts are generated from the
- * tokens table via eval to minimize redundancy, so consumers must be compiled
- * separately to take advantage of the simple switch-case constant propagation
- * done by SpiderMonkey.
- */
-
-define('ace/narcissus/jsdefs', ['require', 'exports', 'module' ], function(require, exports, module) {
-
- var narcissus = {
- options: {
- version: 185,
- // Global variables to hide from the interpreter
- hiddenHostGlobals: { Narcissus: true },
- // Desugar SpiderMonkey language extensions?
- desugarExtensions: false
- },
- hostSupportsEvalConst: (function() {
- try {
- return eval("(function(s) { eval(s); return x })('const x = true;')");
- } catch (e) {
- return false;
- }
- })(),
- hostGlobal: this
- };
- Narcissus = narcissus;
-
- var tokens = [
- // End of source.
- "END",
-
- // Operators and punctuators. Some pair-wise order matters, e.g. (+, -)
- // and (UNARY_PLUS, UNARY_MINUS).
- "\n", ";",
- ",",
- "=",
- "?", ":", "CONDITIONAL",
- "||",
- "&&",
- "|",
- "^",
- "&",
- "==", "!=", "===", "!==",
- "<", "<=", ">=", ">",
- "<<", ">>", ">>>",
- "+", "-",
- "*", "/", "%",
- "!", "~", "UNARY_PLUS", "UNARY_MINUS",
- "++", "--",
- ".",
- "[", "]",
- "{", "}",
- "(", ")",
-
- // Nonterminal tree node type codes.
- "SCRIPT", "BLOCK", "LABEL", "FOR_IN", "CALL", "NEW_WITH_ARGS", "INDEX",
- "ARRAY_INIT", "OBJECT_INIT", "PROPERTY_INIT", "GETTER", "SETTER",
- "GROUP", "LIST", "LET_BLOCK", "ARRAY_COMP", "GENERATOR", "COMP_TAIL",
-
- // Terminals.
- "IDENTIFIER", "NUMBER", "STRING", "REGEXP",
-
- // Keywords.
- "break",
- "case", "catch", "const", "continue",
- "debugger", "default", "delete", "do",
- "else", "export",
- "false", "finally", "for", "function",
- "if", "import", "in", "instanceof",
- "let", "module",
- "new", "null",
- "return",
- "switch",
- "this", "throw", "true", "try", "typeof",
- "var", "void",
- "yield",
- "while", "with",
- ];
-
- var statementStartTokens = [
- "break",
- "const", "continue",
- "debugger", "do",
- "for",
- "if",
- "return",
- "switch",
- "throw", "try",
- "var",
- "yield",
- "while", "with",
- ];
-
- // Whitespace characters (see ECMA-262 7.2)
- var whitespaceChars = [
- // normal whitespace:
- "\u0009", "\u000B", "\u000C", "\u0020", "\u00A0", "\uFEFF",
-
- // high-Unicode whitespace:
- "\u1680", "\u180E",
- "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", "\u2005", "\u2006",
- "\u2007", "\u2008", "\u2009", "\u200A",
- "\u202F", "\u205F", "\u3000"
- ];
-
- var whitespace = {};
- for (var i = 0; i < whitespaceChars.length; i++) {
- whitespace[whitespaceChars[i]] = true;
- }
-
- // Operator and punctuator mapping from token to tree node type name.
- // NB: because the lexer doesn't backtrack, all token prefixes must themselves
- // be valid tokens (e.g. !== is acceptable because its prefixes are the valid
- // tokens != and !).
- var opTypeNames = {
- '\n': "NEWLINE",
- ';': "SEMICOLON",
- ',': "COMMA",
- '?': "HOOK",
- ':': "COLON",
- '||': "OR",
- '&&': "AND",
- '|': "BITWISE_OR",
- '^': "BITWISE_XOR",
- '&': "BITWISE_AND",
- '===': "STRICT_EQ",
- '==': "EQ",
- '=': "ASSIGN",
- '!==': "STRICT_NE",
- '!=': "NE",
- '<<': "LSH",
- '<=': "LE",
- '<': "LT",
- '>>>': "URSH",
- '>>': "RSH",
- '>=': "GE",
- '>': "GT",
- '++': "INCREMENT",
- '--': "DECREMENT",
- '+': "PLUS",
- '-': "MINUS",
- '*': "MUL",
- '/': "DIV",
- '%': "MOD",
- '!': "NOT",
- '~': "BITWISE_NOT",
- '.': "DOT",
- '[': "LEFT_BRACKET",
- ']': "RIGHT_BRACKET",
- '{': "LEFT_CURLY",
- '}': "RIGHT_CURLY",
- '(': "LEFT_PAREN",
- ')': "RIGHT_PAREN"
- };
-
- // Hash of keyword identifier to tokens index. NB: we must null __proto__ to
- // avoid toString, etc. namespace pollution.
- var keywords = {__proto__: null};
-
- // Define const END, etc., based on the token names. Also map name to index.
- var tokenIds = {};
-
- // Building up a string to be eval'd in different contexts.
- var consts = Narcissus.hostSupportsEvalConst ? "const " : "var ";
- for (var i = 0, j = tokens.length; i < j; i++) {
- if (i > 0)
- consts += ", ";
- var t = tokens[i];
- var name;
- if (/^[a-z]/.test(t)) {
- name = t.toUpperCase();
- keywords[t] = i;
- } else {
- name = (/^\W/.test(t) ? opTypeNames[t] : t);
- }
- consts += name + " = " + i;
- tokenIds[name] = i;
- tokens[t] = i;
- }
- consts += ";";
-
- var isStatementStartCode = {__proto__: null};
- for (i = 0, j = statementStartTokens.length; i < j; i++)
- isStatementStartCode[keywords[statementStartTokens[i]]] = true;
-
- // Map assignment operators to their indexes in the tokens array.
- var assignOps = ['|', '^', '&', '<<', '>>', '>>>', '+', '-', '*', '/', '%'];
-
- for (i = 0, j = assignOps.length; i < j; i++) {
- t = assignOps[i];
- assignOps[t] = tokens[t];
- }
-
- function defineGetter(obj, prop, fn, dontDelete, dontEnum) {
- Object.defineProperty(obj, prop,
- { get: fn, configurable: !dontDelete, enumerable: !dontEnum });
- }
-
- function defineGetterSetter(obj, prop, getter, setter, dontDelete, dontEnum) {
- Object.defineProperty(obj, prop, {
- get: getter,
- set: setter,
- configurable: !dontDelete,
- enumerable: !dontEnum
- });
- }
-
- function defineMemoGetter(obj, prop, fn, dontDelete, dontEnum) {
- Object.defineProperty(obj, prop, {
- get: function() {
- var val = fn();
- defineProperty(obj, prop, val, dontDelete, true, dontEnum);
- return val;
- },
- configurable: true,
- enumerable: !dontEnum
- });
- }
-
- function defineProperty(obj, prop, val, dontDelete, readOnly, dontEnum) {
- Object.defineProperty(obj, prop,
- { value: val, writable: !readOnly, configurable: !dontDelete,
- enumerable: !dontEnum });
- }
-
- // Returns true if fn is a native function. (Note: SpiderMonkey specific.)
- function isNativeCode(fn) {
- // Relies on the toString method to identify native code.
- return ((typeof fn) === "function") && fn.toString().match(/\[native code\]/);
- }
-
- function getPropertyDescriptor(obj, name) {
- while (obj) {
- if (({}).hasOwnProperty.call(obj, name))
- return Object.getOwnPropertyDescriptor(obj, name);
- obj = Object.getPrototypeOf(obj);
- }
- }
-
- function getPropertyNames(obj) {
- var table = Object.create(null, {});
- while (obj) {
- var names = Object.getOwnPropertyNames(obj);
- for (var i = 0, n = names.length; i < n; i++)
- table[names[i]] = true;
- obj = Object.getPrototypeOf(obj);
- }
- return Object.keys(table);
- }
-
- function getOwnProperties(obj) {
- var map = {};
- for (var name in Object.getOwnPropertyNames(obj))
- map[name] = Object.getOwnPropertyDescriptor(obj, name);
- return map;
- }
-
- function blacklistHandler(target, blacklist) {
- var mask = Object.create(null, {});
- var redirect = StringMap.create(blacklist).mapObject(function(name) { return mask; });
- return mixinHandler(redirect, target);
- }
-
- function whitelistHandler(target, whitelist) {
- var catchall = Object.create(null, {});
- var redirect = StringMap.create(whitelist).mapObject(function(name) { return target; });
- return mixinHandler(redirect, catchall);
- }
-
- function mirrorHandler(target, writable) {
- var handler = makePassthruHandler(target);
-
- var defineProperty = handler.defineProperty;
- handler.defineProperty = function(name, desc) {
- if (!desc.enumerable)
- throw new Error("mirror property must be enumerable");
- if (!desc.configurable)
- throw new Error("mirror property must be configurable");
- if (desc.writable !== writable)
- throw new Error("mirror property must " + (writable ? "" : "not ") + "be writable");
- defineProperty(name, desc);
- };
-
- handler.fix = function() { };
- handler.getOwnPropertyDescriptor = handler.getPropertyDescriptor;
- handler.getOwnPropertyNames = getPropertyNames.bind(handler, target);
- handler.keys = handler.enumerate;
- handler["delete"] = function() { return false; };
- handler.hasOwn = handler.has;
- return handler;
- }
-
- /*
- * Mixin proxies break the single-inheritance model of prototypes, so
- * the handler treats all properties as own-properties:
- *
- * X
- * |
- * +------------+------------+
- * | O |
- * | | |
- * | O O O |
- * | | | | |
- * | O O O O |
- * | | | | | |
- * | O O O O O |
- * | | | | | | |
- * +-(*)--(w)--(x)--(y)--(z)-+
- */
-
- function mixinHandler(redirect, catchall) {
- function targetFor(name) {
- return hasOwn(redirect, name) ? redirect[name] : catchall;
- }
-
- function getMuxPropertyDescriptor(name) {
- var desc = getPropertyDescriptor(targetFor(name), name);
- if (desc)
- desc.configurable = true;
- return desc;
- }
-
- function getMuxPropertyNames() {
- var names1 = Object.getOwnPropertyNames(redirect).filter(function(name) {
- return name in redirect[name];
- });
- var names2 = getPropertyNames(catchall).filter(function(name) {
- return !hasOwn(redirect, name);
- });
- return names1.concat(names2);
- }
-
- function enumerateMux() {
- var result = Object.getOwnPropertyNames(redirect).filter(function(name) {
- return name in redirect[name];
- });
- for (name in catchall) {
- if (!hasOwn(redirect, name))
- result.push(name);
- };
- return result;
- }
-
- function hasMux(name) {
- return name in targetFor(name);
- }
-
- return {
- getOwnPropertyDescriptor: getMuxPropertyDescriptor,
- getPropertyDescriptor: getMuxPropertyDescriptor,
- getOwnPropertyNames: getMuxPropertyNames,
- defineProperty: function(name, desc) {
- Object.defineProperty(targetFor(name), name, desc);
- },
- "delete": function(name) {
- var target = targetFor(name);
- return delete target[name];
- },
- // FIXME: ha ha ha
- fix: function() { },
- has: hasMux,
- hasOwn: hasMux,
- get: function(receiver, name) {
- var target = targetFor(name);
- return target[name];
- },
- set: function(receiver, name, val) {
- var target = targetFor(name);
- target[name] = val;
- return true;
- },
- enumerate: enumerateMux,
- keys: enumerateMux
- };
- }
-
- function makePassthruHandler(obj) {
- // Handler copied from
- // http://wiki.ecmascript.org/doku.php?id=harmony:proxies&s=proxy%20object#examplea_no-op_forwarding_proxy
- return {
- getOwnPropertyDescriptor: function(name) {
- var desc = Object.getOwnPropertyDescriptor(obj, name);
-
- // a trapping proxy's properties must always be configurable
- desc.configurable = true;
- return desc;
- },
- getPropertyDescriptor: function(name) {
- var desc = getPropertyDescriptor(obj, name);
-
- // a trapping proxy's properties must always be configurable
- desc.configurable = true;
- return desc;
- },
- getOwnPropertyNames: function() {
- return Object.getOwnPropertyNames(obj);
- },
- defineProperty: function(name, desc) {
- Object.defineProperty(obj, name, desc);
- },
- "delete": function(name) { return delete obj[name]; },
- fix: function() {
- if (Object.isFrozen(obj)) {
- return getOwnProperties(obj);
- }
-
- // As long as obj is not frozen, the proxy won't allow itself to be fixed.
- return undefined; // will cause a TypeError to be thrown
- },
-
- has: function(name) { return name in obj; },
- hasOwn: function(name) { return ({}).hasOwnProperty.call(obj, name); },
- get: function(receiver, name) { return obj[name]; },
-
- // bad behavior when set fails in non-strict mode
- set: function(receiver, name, val) { obj[name] = val; return true; },
- enumerate: function() {
- var result = [];
- for (name in obj) { result.push(name); };
- return result;
- },
- keys: function() { return Object.keys(obj); }
- };
- }
-
- var hasOwnProperty = ({}).hasOwnProperty;
-
- function hasOwn(obj, name) {
- return hasOwnProperty.call(obj, name);
- }
-
- function StringMap(table, size) {
- this.table = table || Object.create(null, {});
- this.size = size || 0;
- }
-
- StringMap.create = function(table) {
- var init = Object.create(null, {});
- var size = 0;
- var names = Object.getOwnPropertyNames(table);
- for (var i = 0, n = names.length; i < n; i++) {
- var name = names[i];
- init[name] = table[name];
- size++;
- }
- return new StringMap(init, size);
- };
-
- StringMap.prototype = {
- has: function(x) { return hasOwnProperty.call(this.table, x); },
- set: function(x, v) {
- if (!hasOwnProperty.call(this.table, x))
- this.size++;
- this.table[x] = v;
- },
- get: function(x) { return this.table[x]; },
- getDef: function(x, thunk) {
- if (!hasOwnProperty.call(this.table, x)) {
- this.size++;
- this.table[x] = thunk();
- }
- return this.table[x];
- },
- forEach: function(f) {
- var table = this.table;
- for (var key in table)
- f.call(this, key, table[key]);
- },
- map: function(f) {
- var table1 = this.table;
- var table2 = Object.create(null, {});
- this.forEach(function(key, val) {
- table2[key] = f.call(this, val, key);
- });
- return new StringMap(table2, this.size);
- },
- mapObject: function(f) {
- var table1 = this.table;
- var table2 = Object.create(null, {});
- this.forEach(function(key, val) {
- table2[key] = f.call(this, val, key);
- });
- return table2;
- },
- toObject: function() {
- return this.mapObject(function(val) { return val; });
- },
- choose: function() {
- return Object.getOwnPropertyNames(this.table)[0];
- },
- remove: function(x) {
- if (hasOwnProperty.call(this.table, x)) {
- this.size--;
- delete this.table[x];
- }
- },
- copy: function() {
- var table = Object.create(null, {});
- for (var key in this.table)
- table[key] = this.table[key];
- return new StringMap(table, this.size);
- },
- toString: function() { return "[object StringMap]" }
- };
-
- // an object-key table with poor asymptotics (replace with WeakMap when possible)
- function ObjectMap(array) {
- this.array = array || [];
- }
-
- function searchMap(map, key, found, notFound) {
- var a = map.array;
- for (var i = 0, n = a.length; i < n; i++) {
- var pair = a[i];
- if (pair.key === key)
- return found(pair, i);
- }
- return notFound();
- }
-
- ObjectMap.prototype = {
- has: function(x) {
- return searchMap(this, x, function() { return true }, function() { return false });
- },
- set: function(x, v) {
- var a = this.array;
- searchMap(this, x,
- function(pair) { pair.value = v },
- function() { a.push({ key: x, value: v }) });
- },
- get: function(x) {
- return searchMap(this, x,
- function(pair) { return pair.value },
- function() { return null });
- },
- getDef: function(x, thunk) {
- var a = this.array;
- return searchMap(this, x,
- function(pair) { return pair.value },
- function() {
- var v = thunk();
- a.push({ key: x, value: v });
- return v;
- });
- },
- forEach: function(f) {
- var a = this.array;
- for (var i = 0, n = a.length; i < n; i++) {
- var pair = a[i];
- f.call(this, pair.key, pair.value);
- }
- },
- choose: function() {
- return this.array[0].key;
- },
- get size() {
- return this.array.length;
- },
- remove: function(x) {
- var a = this.array;
- searchMap(this, x,
- function(pair, i) { a.splice(i, 1) },
- function() { });
- },
- copy: function() {
- return new ObjectMap(this.array.map(function(pair) {
- return { key: pair.key, value: pair.value }
- }));
- },
- clear: function() {
- this.array = [];
- },
- toString: function() { return "[object ObjectMap]" }
- };
-
- // non-destructive stack
- function Stack(elts) {
- this.elts = elts || null;
- }
-
- Stack.prototype = {
- push: function(x) {
- return new Stack({ top: x, rest: this.elts });
- },
- top: function() {
- if (!this.elts)
- throw new Error("empty stack");
- return this.elts.top;
- },
- isEmpty: function() {
- return this.top === null;
- },
- find: function(test) {
- for (var elts = this.elts; elts; elts = elts.rest) {
- if (test(elts.top))
- return elts.top;
- }
- return null;
- },
- has: function(x) {
- return Boolean(this.find(function(elt) { return elt === x }));
- },
- forEach: function(f) {
- for (var elts = this.elts; elts; elts = elts.rest) {
- f(elts.top);
- }
- }
- };
-
- module.exports = {
- tokens: tokens,
- whitespace: whitespace,
- opTypeNames: opTypeNames,
- keywords: keywords,
- isStatementStartCode: isStatementStartCode,
- tokenIds: tokenIds,
- consts: consts,
- assignOps: assignOps,
- defineGetter: defineGetter,
- defineGetterSetter: defineGetterSetter,
- defineMemoGetter: defineMemoGetter,
- defineProperty: defineProperty,
- isNativeCode: isNativeCode,
- mirrorHandler: mirrorHandler,
- mixinHandler: mixinHandler,
- whitelistHandler: whitelistHandler,
- blacklistHandler: blacklistHandler,
- makePassthruHandler: makePassthruHandler,
- StringMap: StringMap,
- ObjectMap: ObjectMap,
- Stack: Stack
- };
}); \ No newline at end of file
diff --git a/contexts/data/lib/ace/worker-json.js b/contexts/data/lib/ace/worker-json.js
new file mode 100644
index 0000000..a184b35
--- /dev/null
+++ b/contexts/data/lib/ace/worker-json.js
@@ -0,0 +1,2219 @@
+"no use strict";
+
+if (typeof window != "undefined" && window.document)
+ throw "atempt to load ace worker into main window instead of webWorker";
+
+var console = {
+ log: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ },
+ error: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ }
+};
+var window = {
+ console: console
+};
+
+var normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = base + "/" + moduleName;
+
+ while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+var require = function(parentId, id) {
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = normalizeModule(parentId, id);
+
+ var module = require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ var chunks = id.split("/");
+ chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ var path = chunks.join("/") + ".js";
+
+ require.id = id;
+ importScripts(path);
+ return require(parentId, id);
+};
+
+require.modules = {};
+require.tlns = {};
+
+var define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ id = require.id;
+ }
+
+ if (id.indexOf("text!") === 0)
+ return;
+
+ var req = function(deps, factory) {
+ return require(id, deps, factory);
+ };
+
+ require.modules[id] = {
+ factory: function() {
+ var module = {
+ exports: {}
+ };
+ var returnExports = factory(req, module.exports, module);
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+
+function initBaseUrls(topLevelNamespaces) {
+ require.tlns = topLevelNamespaces;
+}
+
+function initSender() {
+
+ var EventEmitter = require(null, "ace/lib/event_emitter").EventEmitter;
+ var oop = require(null, "ace/lib/oop");
+
+ var Sender = function() {};
+
+ (function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.callback = function(data, callbackId) {
+ postMessage({
+ type: "call",
+ id: callbackId,
+ data: data
+ });
+ };
+
+ this.emit = function(name, data) {
+ postMessage({
+ type: "event",
+ name: name,
+ data: data
+ });
+ };
+
+ }).call(Sender.prototype);
+
+ return new Sender();
+}
+
+var main;
+var sender;
+
+onmessage = function(e) {
+ var msg = e.data;
+ if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ initBaseUrls(msg.tlns);
+ require(null, "ace/lib/fixoldbrowsers");
+ sender = initSender();
+ var clazz = require(null, msg.module)[msg.classname];
+ main = new clazz(sender);
+ }
+ else if (msg.event && sender) {
+ sender._emit(msg.event, msg.data);
+ }
+};
+// vim:set ts=4 sts=4 sw=4 st:
+
+define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
+
+
+require("./regexp");
+require("./es5-shim");
+
+});
+
+define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+ var real = {
+ exec: RegExp.prototype.exec,
+ test: RegExp.prototype.test,
+ match: String.prototype.match,
+ replace: String.prototype.replace,
+ split: String.prototype.split
+ },
+ compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
+ compliantLastIndexIncrement = function () {
+ var x = /^/g;
+ real.test.call(x, "");
+ return !x.lastIndex;
+ }();
+
+ if (compliantLastIndexIncrement && compliantExecNpcg)
+ return;
+ RegExp.prototype.exec = function (str) {
+ var match = real.exec.apply(this, arguments),
+ name, r2;
+ if ( typeof(str) == 'string' && match) {
+ if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
+ r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
+ real.replace.call(str.slice(match.index), r2, function () {
+ for (var i = 1; i < arguments.length - 2; i++) {
+ if (arguments[i] === undefined)
+ match[i] = undefined;
+ }
+ });
+ }
+ if (this._xregexp && this._xregexp.captureNames) {
+ for (var i = 1; i < match.length; i++) {
+ name = this._xregexp.captureNames[i - 1];
+ if (name)
+ match[name] = match[i];
+ }
+ }
+ if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ }
+ return match;
+ };
+ if (!compliantLastIndexIncrement) {
+ RegExp.prototype.test = function (str) {
+ var match = real.exec.call(this, str);
+ if (match && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ return !!match;
+ };
+ }
+
+ function getNativeFlags (regex) {
+ return (regex.global ? "g" : "") +
+ (regex.ignoreCase ? "i" : "") +
+ (regex.multiline ? "m" : "") +
+ (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
+ (regex.sticky ? "y" : "");
+ }
+
+ function indexOf (array, item, from) {
+ if (Array.prototype.indexOf) // Use the native array method if available
+ return array.indexOf(item, from);
+ for (var i = from || 0; i < array.length; i++) {
+ if (array[i] === item)
+ return i;
+ }
+ return -1;
+ }
+
+});
+
+define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function")
+ throw new TypeError(); // TODO message
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var F = function(){};
+ F.prototype = target.prototype;
+ var self = new F;
+
+ var result = target.apply(
+ self,
+ args.concat(slice.call(arguments))
+ );
+ if (result !== null && Object(result) === result)
+ return result;
+ return self;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return toString(obj) == "[object Array]";
+ };
+}
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var self = toObject(this),
+ thisp = arguments[1],
+ i = 0,
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, self);
+ }
+ i++;
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, self);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ result = [],
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, self))
+ result.push(self[i]);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, self))
+ return false;
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, self))
+ return true;
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+ if (!length && arguments.length == 1)
+ throw new TypeError(); // TODO message
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length)
+ throw new TypeError(); // TODO message
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self)
+ result = fun.call(void 0, result, self[i], i, self);
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+ if (!length && arguments.length == 1)
+ throw new TypeError(); // TODO message
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0)
+ throw new TypeError(); // TODO message
+ } while (true);
+ }
+
+ do {
+ if (i in this)
+ result = fun.call(void 0, result, self[i], i, self);
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+
+ if (!length)
+ return -1;
+
+ var i = 0;
+ if (arguments.length > 1)
+ i = toInteger(arguments[1]);
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+
+ if (!length)
+ return -1;
+ var i = length - 1;
+ if (arguments.length > 1)
+ i = Math.min(i, toInteger(arguments[1]));
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i])
+ return i;
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null})
+ hasDontEnumBug = false;
+
+ Object.keys = function keys(object) {
+
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError("Object.keys called on a non-object");
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+
+ return keys;
+ };
+
+}
+if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
+ Date.prototype.toISOString = function toISOString() {
+ var result, length, value, year;
+ if (!isFinite(this))
+ throw new RangeError;
+ result = [this.getUTCMonth() + 1, this.getUTCDate(),
+ this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
+ year = this.getUTCFullYear();
+ year = (year < 0 ? '-' : (year > 9999 ? '+' : '')) + ('00000' + Math.abs(year)).slice(0 <= year && year <= 9999 ? -4 : -6);
+
+ length = result.length;
+ while (length--) {
+ value = result[length];
+ if (value < 10)
+ result[length] = "0" + value;
+ }
+ return year + "-" + result.slice(0, 2).join("-") + "T" + result.slice(2).join(":") + "." +
+ ("000" + this.getUTCMilliseconds()).slice(-3) + "Z";
+ }
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+if (!Date.prototype.toJSON) {
+ Date.prototype.toJSON = function toJSON(key) {
+ if (typeof this.toISOString != "function")
+ throw new TypeError(); // TODO message
+ return this.toISOString();
+ };
+}
+if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
+ Date = (function(NativeDate) {
+ var Date = function Date(Y, M, D, h, m, s, ms) {
+ var length = arguments.length;
+ if (this instanceof NativeDate) {
+ var date = length == 1 && String(Y) === Y ? // isString(Y)
+ new NativeDate(Date.parse(Y)) :
+ length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
+ length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
+ length >= 5 ? new NativeDate(Y, M, D, h, m) :
+ length >= 4 ? new NativeDate(Y, M, D, h) :
+ length >= 3 ? new NativeDate(Y, M, D) :
+ length >= 2 ? new NativeDate(Y, M) :
+ length >= 1 ? new NativeDate(Y) :
+ new NativeDate();
+ date.constructor = Date;
+ return date;
+ }
+ return NativeDate.apply(this, arguments);
+ };
+ var isoDateExpression = new RegExp("^" +
+ "(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + 6-digit extended year
+ "(?:-(\\d{2})" + // optional month capture
+ "(?:-(\\d{2})" + // optional day capture
+ "(?:" + // capture hours:minutes:seconds.milliseconds
+ "T(\\d{2})" + // hours capture
+ ":(\\d{2})" + // minutes capture
+ "(?:" + // optional :seconds.milliseconds
+ ":(\\d{2})" + // seconds capture
+ "(?:\\.(\\d{3}))?" + // milliseconds capture
+ ")?" +
+ "(?:" + // capture UTC offset component
+ "Z|" + // UTC capture
+ "(?:" + // offset specifier +/-hours:minutes
+ "([-+])" + // sign capture
+ "(\\d{2})" + // hours offset capture
+ ":(\\d{2})" + // minutes offset capture
+ ")" +
+ ")?)?)?)?" +
+ "$");
+ for (var key in NativeDate)
+ Date[key] = NativeDate[key];
+ Date.now = NativeDate.now;
+ Date.UTC = NativeDate.UTC;
+ Date.prototype = NativeDate.prototype;
+ Date.prototype.constructor = Date;
+ Date.parse = function parse(string) {
+ var match = isoDateExpression.exec(string);
+ if (match) {
+ match.shift(); // kill match[0], the full match
+ for (var i = 1; i < 7; i++) {
+ match[i] = +(match[i] || (i < 3 ? 1 : 0));
+ if (i == 1)
+ match[i]--;
+ }
+ var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
+ var offset = 0;
+ if (sign) {
+ if (hourOffset > 23 || minuteOffset > 59)
+ return NaN;
+ offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == "+" ? -1 : 1);
+ }
+ var year = +match[0];
+ if (0 <= year && year <= 99) {
+ match[0] = year + 400;
+ return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
+ }
+ return NativeDate.UTC.apply(this, match) + offset;
+ }
+ return NativeDate.parse.apply(this, arguments);
+ };
+
+ return Date;
+ })(Date);
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+var toInteger = function (n) {
+ n = +n;
+ if (n !== n) // isNaN
+ n = 0;
+ else if (n !== 0 && n !== (1/0) && n !== -(1/0))
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ return n;
+};
+
+var prepareString = "a"[0] != "a",
+ toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError(); // TODO message
+ }
+ if (prepareString && typeof o == "string" && o) {
+ return o.split("");
+ }
+ return Object(o);
+ };
+});
+
+define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+var EventEmitter = {};
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+ this._eventRegistry = this._eventRegistry || {};
+ this._defaultHandlers = this._defaultHandlers || {};
+
+ var listeners = this._eventRegistry[eventName] || [];
+ var defaultHandler = this._defaultHandlers[eventName];
+ if (!listeners.length && !defaultHandler)
+ return;
+
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
+
+ if (!e.stopPropagation) {
+ e.stopPropagation = function() {
+ this.propagationStopped = true;
+ };
+ }
+
+ if (!e.preventDefault) {
+ e.preventDefault = function() {
+ this.defaultPrevented = true;
+ };
+ }
+
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e);
+};
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ this._defaultHandlers = this._defaultHandlers || {};
+
+ if (this._defaultHandlers[eventName])
+ throw new Error("The default handler for '" + eventName + "' is already set");
+
+ this._defaultHandlers[eventName] = callback;
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners.push(callback);
+};
+
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ return;
+
+ var index = listeners.indexOf(callback);
+ if (index !== -1)
+ listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.inherits = (function() {
+ var tempCtor = function() {};
+ return function(ctor, superCtor) {
+ tempCtor.prototype = superCtor.prototype;
+ ctor.super_ = superCtor.prototype;
+ ctor.prototype = new tempCtor();
+ ctor.prototype.constructor = ctor;
+ };
+}());
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+define('ace/mode/json_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/json/json_parse'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var parse = require("./json/json_parse");
+
+var JsonWorker = exports.JsonWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(200);
+};
+
+oop.inherits(JsonWorker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+
+ try {
+ var result = parse(value);
+ } catch (e) {
+ var pos = this.doc.indexToPosition(e.at-1);
+ this.sender.emit("error", {
+ row: pos.row,
+ column: pos.column,
+ text: e.message,
+ type: "error"
+ });
+ return;
+ }
+ this.sender.emit("ok");
+ };
+
+}).call(JsonWorker.prototype);
+
+});
+define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.deferredCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas([e.data]);
+ deferredUpdate.schedule(_self.$timeout);
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(text) {
+ this.$lines = [];
+ if (text.length == 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this.insertLines(0, text);
+ } else {
+ this.insert({row: 0, column:0}, text);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength();
+ this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+ this.insert({row: 0, column:0}, text);
+ };
+ this.getValue = function() {
+ return this.getAllLines().join(this.getNewLineCharacter());
+ };
+ this.createAnchor = function(row, column) {
+ return new Anchor(this, row, column);
+ };
+ if ("aaa".split(/a/).length == 0)
+ this.$split = function(text) {
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
+ }
+ else
+ this.$split = function(text) {
+ return text.split(/\r\n|\r|\n/);
+ };
+
+
+
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
+ if (match) {
+ this.$autoNewLine = match[1];
+ } else {
+ this.$autoNewLine = "\n";
+ }
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+
+ case "unix":
+ return "\n";
+
+ default:
+ return this.$autoNewLine;
+ }
+ };
+
+ this.$autoNewLine = "\n";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ };
+ this.getNewLineMode = function() {
+ return this.$newLineMode;
+ };
+ this.isNewLine = function(text) {
+ return (text == "\r\n" || text == "\r" || text == "\n");
+ };
+ this.getLine = function(row) {
+ return this.$lines[row] || "";
+ };
+ this.getLines = function(firstRow, lastRow) {
+ return this.$lines.slice(firstRow, lastRow + 1);
+ };
+ this.getAllLines = function() {
+ return this.getLines(0, this.getLength());
+ };
+ this.getLength = function() {
+ return this.$lines.length;
+ };
+ this.getTextRange = function(range) {
+ if (range.start.row == range.end.row) {
+ return this.$lines[range.start.row].substring(range.start.column,
+ range.end.column);
+ }
+ else {
+ var lines = this.getLines(range.start.row+1, range.end.row-1);
+ lines.unshift((this.$lines[range.start.row] || "").substring(range.start.column));
+ lines.push((this.$lines[range.end.row] || "").substring(0, range.end.column));
+ return lines.join(this.getNewLineCharacter());
+ }
+ };
+
+ this.$clipPosition = function(position) {
+ var length = this.getLength();
+ if (position.row >= length) {
+ position.row = Math.max(0, length - 1);
+ position.column = this.getLine(length-1).length;
+ }
+ return position;
+ };
+ this.insert = function(position, text) {
+ if (!text || text.length === 0)
+ return position;
+
+ position = this.$clipPosition(position);
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ var lines = this.$split(text);
+ var firstLine = lines.splice(0, 1)[0];
+ var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+ position = this.insertInLine(position, firstLine);
+ if (lastLine !== null) {
+ position = this.insertNewLine(position); // terminate first line
+ position = this.insertLines(position.row, lines);
+ position = this.insertInLine(position, lastLine || "");
+ }
+ return position;
+ };
+ this.insertLines = function(row, lines) {
+ if (lines.length == 0)
+ return {row: row, column: 0};
+ if (lines.length > 0xFFFF) {
+ var end = this.insertLines(row, lines.slice(0xFFFF));
+ lines = lines.slice(0, 0xFFFF);
+ }
+
+ var args = [row, 0];
+ args.push.apply(args, lines);
+ this.$lines.splice.apply(this.$lines, args);
+
+ var range = new Range(row, 0, row + lines.length, 0);
+ var delta = {
+ action: "insertLines",
+ range: range,
+ lines: lines
+ };
+ this._emit("change", { data: delta });
+ return end || range.end;
+ };
+ this.insertNewLine = function(position) {
+ position = this.$clipPosition(position);
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column);
+ this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+ var end = {
+ row : position.row + 1,
+ column : 0
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: this.getNewLineCharacter()
+ };
+ this._emit("change", { data: delta });
+
+ return end;
+ };
+ this.insertInLine = function(position, text) {
+ if (text.length == 0)
+ return position;
+
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column) + text
+ + line.substring(position.column);
+
+ var end = {
+ row : position.row,
+ column : position.column + text.length
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: text
+ };
+ this._emit("change", { data: delta });
+
+ return end;
+ };
+ this.remove = function(range) {
+ range.start = this.$clipPosition(range.start);
+ range.end = this.$clipPosition(range.end);
+
+ if (range.isEmpty())
+ return range.start;
+
+ var firstRow = range.start.row;
+ var lastRow = range.end.row;
+
+ if (range.isMultiLine()) {
+ var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+ var lastFullRow = lastRow - 1;
+
+ if (range.end.column > 0)
+ this.removeInLine(lastRow, 0, range.end.column);
+
+ if (lastFullRow >= firstFullRow)
+ this.removeLines(firstFullRow, lastFullRow);
+
+ if (firstFullRow != firstRow) {
+ this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+ this.removeNewLine(range.start.row);
+ }
+ }
+ else {
+ this.removeInLine(firstRow, range.start.column, range.end.column);
+ }
+ return range.start;
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ if (startColumn == endColumn)
+ return;
+
+ var range = new Range(row, startColumn, row, endColumn);
+ var line = this.getLine(row);
+ var removed = line.substring(startColumn, endColumn);
+ var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+ this.$lines.splice(row, 1, newLine);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: removed
+ };
+ this._emit("change", { data: delta });
+ return range.start;
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ var range = new Range(firstRow, 0, lastRow + 1, 0);
+ var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+ var delta = {
+ action: "removeLines",
+ range: range,
+ nl: this.getNewLineCharacter(),
+ lines: removed
+ };
+ this._emit("change", { data: delta });
+ return removed;
+ };
+ this.removeNewLine = function(row) {
+ var firstLine = this.getLine(row);
+ var secondLine = this.getLine(row+1);
+
+ var range = new Range(row, firstLine.length, row+1, 0);
+ var line = firstLine + secondLine;
+
+ this.$lines.splice(row, 2, line);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: this.getNewLineCharacter()
+ };
+ this._emit("change", { data: delta });
+ };
+ this.replace = function(range, text) {
+ if (text.length == 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ if (text) {
+ var end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ var delta = deltas[i];
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "insertText")
+ this.insert(range.start, delta.text);
+ else if (delta.action == "removeLines")
+ this.removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "removeText")
+ this.remove(range);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ var delta = deltas[i];
+
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "insertText")
+ this.remove(range);
+ else if (delta.action == "removeLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "removeText")
+ this.insert(range.start, delta.text);
+ }
+ };
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length;
+
+ return index + newlineLength * i + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
+
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
+};
+
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row == range.start.row &&
+ this.end.row == range.end.row &&
+ this.start.column == range.start.column &&
+ this.end.column == range.end.column
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
+ };
+
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
+
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
+ } else {
+ return 0;
+ }
+ }
+ };
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
+ };
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
+ }
+ };
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
+ }
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
+ }
+
+ if (row < this.start.row)
+ return -1;
+
+ if (row > this.end.row)
+ return 1;
+
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
+
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
+
+ return 0;
+ };
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow) {
+ var end = {
+ row: lastRow+1,
+ column: 0
+ };
+ }
+
+ if (this.start.row > lastRow) {
+ var start = {
+ row: lastRow+1,
+ column: 0
+ };
+ }
+
+ if (this.start.row < firstRow) {
+ var start = {
+ row: firstRow,
+ column: 0
+ };
+ }
+
+ if (this.end.row < firstRow) {
+ var end = {
+ row: firstRow,
+ column: 0
+ };
+ }
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
+
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+
+ this.isEmpty = function() {
+ return (this.start.row == this.end.row && this.start.column == this.end.column);
+ };
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
+ };
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
+ };
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
+ };
+ this.toScreenRange = function(session) {
+ var screenPosStart =
+ session.documentToScreenPosition(this.start);
+ var screenPosEnd =
+ session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+
+exports.Range = Range;
+});
+
+define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.document = doc;
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+
+ this.$onChange = this.onChange.bind(this);
+ doc.on("change", this.$onChange);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+
+ this.getDocument = function() {
+ return this.document;
+ };
+
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
+
+ if (range.start.row > this.row)
+ return;
+
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
+
+ var row = this.row;
+ var column = this.column;
+
+ if (delta.action === "insertText") {
+ if (range.start.row === row && range.start.column <= column) {
+ if (range.start.row === range.end.row) {
+ column += range.end.column - range.start.column;
+ }
+ else {
+ column -= range.start.column;
+ row += range.end.row - range.start.row;
+ }
+ }
+ else if (range.start.row !== range.end.row && range.start.row < row) {
+ row += range.end.row - range.start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (range.start.row <= row) {
+ row += range.end.row - range.start.row;
+ }
+ }
+ else if (delta.action == "removeText") {
+ if (range.start.row == row && range.start.column < column) {
+ if (range.end.column >= column)
+ column = range.start.column;
+ else
+ column = Math.max(0, column - (range.end.column - range.start.column));
+
+ } else if (range.start.row !== range.end.row && range.start.row < row) {
+ if (range.end.row == row) {
+ column = Math.max(0, column - range.end.column) + range.start.column;
+ }
+ row -= (range.end.row - range.start.row);
+ }
+ else if (range.end.row == row) {
+ row -= range.end.row - range.start.row;
+ column = Math.max(0, column - range.end.column) + range.start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (range.start.row <= row) {
+ if (range.end.row <= row)
+ row -= range.end.row - range.start.row;
+ else {
+ row = range.start.row;
+ column = 0;
+ }
+ }
+ }
+
+ this.setPosition(row, column, true);
+ };
+
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ }
+ else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+
+ if (this.row == pos.row && this.column == pos.column)
+ return;
+
+ var old = {
+ row: this.row,
+ column: this.column
+ };
+
+ this.row = pos.row;
+ this.column = pos.column;
+ this._emit("change", {
+ old: old,
+ value: pos
+ });
+ };
+
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
+ };
+
+}).call(Anchor.prototype);
+
+});
+
+define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ return new Array(count + 1).join(string);
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+ return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+ return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+ var copy = {};
+ for (var key in obj) {
+ copy[key] = obj[key];
+ }
+ return copy;
+};
+
+exports.copyArray = function(array){
+ var copy = [];
+ for (var i=0, l=array.length; i<l; i++) {
+ if (array[i] && typeof array[i] == "object")
+ copy[i] = this.copyObject( array[i] );
+ else
+ copy[i] = array[i];
+ }
+ return copy;
+};
+
+exports.deepCopy = function (obj) {
+ if (typeof obj != "object") {
+ return obj;
+ }
+
+ var copy = obj.constructor();
+ for (var key in obj) {
+ if (typeof obj[key] == "object") {
+ copy[key] = this.deepCopy(obj[key]);
+ } else {
+ copy[key] = obj[key];
+ }
+ }
+ return copy;
+};
+
+exports.arrayToMap = function(arr) {
+ var map = {};
+ for (var i=0; i<arr.length; i++) {
+ map[arr[i]] = 1;
+ }
+ return map;
+
+};
+
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
+exports.arrayRemove = function(array, value) {
+ for (var i = 0; i <= array.length; i++) {
+ if (value === array[i]) {
+ array.splice(i, 1);
+ }
+ }
+};
+
+exports.escapeRegExp = function(str) {
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
+exports.deferredCall = function(fcn) {
+
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var deferred = function(timeout) {
+ deferred.cancel();
+ timer = setTimeout(callback, timeout || 0);
+ return deferred;
+ };
+
+ deferred.schedule = deferred;
+
+ deferred.call = function() {
+ this.cancel();
+ fcn();
+ return deferred;
+ };
+
+ deferred.cancel = function() {
+ clearTimeout(timer);
+ timer = null;
+ return deferred;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = _self;
+ _self.schedule = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || 0);
+ };
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+define('ace/mode/json/json_parse', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+ var at, // The index of the current character
+ ch, // The current character
+ escapee = {
+ '"': '"',
+ '\\': '\\',
+ '/': '/',
+ b: '\b',
+ f: '\f',
+ n: '\n',
+ r: '\r',
+ t: '\t'
+ },
+ text,
+
+ error = function (m) {
+
+ throw {
+ name: 'SyntaxError',
+ message: m,
+ at: at,
+ text: text
+ };
+ },
+
+ next = function (c) {
+
+ if (c && c !== ch) {
+ error("Expected '" + c + "' instead of '" + ch + "'");
+ }
+
+ ch = text.charAt(at);
+ at += 1;
+ return ch;
+ },
+
+ number = function () {
+
+ var number,
+ string = '';
+
+ if (ch === '-') {
+ string = '-';
+ next('-');
+ }
+ while (ch >= '0' && ch <= '9') {
+ string += ch;
+ next();
+ }
+ if (ch === '.') {
+ string += '.';
+ while (next() && ch >= '0' && ch <= '9') {
+ string += ch;
+ }
+ }
+ if (ch === 'e' || ch === 'E') {
+ string += ch;
+ next();
+ if (ch === '-' || ch === '+') {
+ string += ch;
+ next();
+ }
+ while (ch >= '0' && ch <= '9') {
+ string += ch;
+ next();
+ }
+ }
+ number = +string;
+ if (isNaN(number)) {
+ error("Bad number");
+ } else {
+ return number;
+ }
+ },
+
+ string = function () {
+
+ var hex,
+ i,
+ string = '',
+ uffff;
+
+ if (ch === '"') {
+ while (next()) {
+ if (ch === '"') {
+ next();
+ return string;
+ } else if (ch === '\\') {
+ next();
+ if (ch === 'u') {
+ uffff = 0;
+ for (i = 0; i < 4; i += 1) {
+ hex = parseInt(next(), 16);
+ if (!isFinite(hex)) {
+ break;
+ }
+ uffff = uffff * 16 + hex;
+ }
+ string += String.fromCharCode(uffff);
+ } else if (typeof escapee[ch] === 'string') {
+ string += escapee[ch];
+ } else {
+ break;
+ }
+ } else {
+ string += ch;
+ }
+ }
+ }
+ error("Bad string");
+ },
+
+ white = function () {
+
+ while (ch && ch <= ' ') {
+ next();
+ }
+ },
+
+ word = function () {
+
+ switch (ch) {
+ case 't':
+ next('t');
+ next('r');
+ next('u');
+ next('e');
+ return true;
+ case 'f':
+ next('f');
+ next('a');
+ next('l');
+ next('s');
+ next('e');
+ return false;
+ case 'n':
+ next('n');
+ next('u');
+ next('l');
+ next('l');
+ return null;
+ }
+ error("Unexpected '" + ch + "'");
+ },
+
+ value, // Place holder for the value function.
+
+ array = function () {
+
+ var array = [];
+
+ if (ch === '[') {
+ next('[');
+ white();
+ if (ch === ']') {
+ next(']');
+ return array; // empty array
+ }
+ while (ch) {
+ array.push(value());
+ white();
+ if (ch === ']') {
+ next(']');
+ return array;
+ }
+ next(',');
+ white();
+ }
+ }
+ error("Bad array");
+ },
+
+ object = function () {
+
+ var key,
+ object = {};
+
+ if (ch === '{') {
+ next('{');
+ white();
+ if (ch === '}') {
+ next('}');
+ return object; // empty object
+ }
+ while (ch) {
+ key = string();
+ white();
+ next(':');
+ if (Object.hasOwnProperty.call(object, key)) {
+ error('Duplicate key "' + key + '"');
+ }
+ object[key] = value();
+ white();
+ if (ch === '}') {
+ next('}');
+ return object;
+ }
+ next(',');
+ white();
+ }
+ }
+ error("Bad object");
+ };
+
+ value = function () {
+
+ white();
+ switch (ch) {
+ case '{':
+ return object();
+ case '[':
+ return array();
+ case '"':
+ return string();
+ case '-':
+ return number();
+ default:
+ return ch >= '0' && ch <= '9' ? number() : word();
+ }
+ };
+
+ return function (source, reviver) {
+ var result;
+
+ text = source;
+ at = 0;
+ ch = ' ';
+ result = value();
+ white();
+ if (ch) {
+ error("Syntax error");
+ }
+
+ return typeof reviver === 'function' ? function walk(holder, key) {
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }({'': result}, '') : result;
+ };
+});
diff --git a/contexts/data/lib/ace/worker-xquery.js b/contexts/data/lib/ace/worker-xquery.js
new file mode 100644
index 0000000..05f28b4
--- /dev/null
+++ b/contexts/data/lib/ace/worker-xquery.js
@@ -0,0 +1,21739 @@
+"no use strict";
+
+if (typeof window != "undefined" && window.document)
+ throw "atempt to load ace worker into main window instead of webWorker";
+
+var console = {
+ log: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ },
+ error: function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ }
+};
+var window = {
+ console: console
+};
+
+var normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = base + "/" + moduleName;
+
+ while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+var require = function(parentId, id) {
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = normalizeModule(parentId, id);
+
+ var module = require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ var chunks = id.split("/");
+ chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ var path = chunks.join("/") + ".js";
+
+ require.id = id;
+ importScripts(path);
+ return require(parentId, id);
+};
+
+require.modules = {};
+require.tlns = {};
+
+var define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ id = require.id;
+ }
+
+ if (id.indexOf("text!") === 0)
+ return;
+
+ var req = function(deps, factory) {
+ return require(id, deps, factory);
+ };
+
+ require.modules[id] = {
+ factory: function() {
+ var module = {
+ exports: {}
+ };
+ var returnExports = factory(req, module.exports, module);
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+
+function initBaseUrls(topLevelNamespaces) {
+ require.tlns = topLevelNamespaces;
+}
+
+function initSender() {
+
+ var EventEmitter = require(null, "ace/lib/event_emitter").EventEmitter;
+ var oop = require(null, "ace/lib/oop");
+
+ var Sender = function() {};
+
+ (function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.callback = function(data, callbackId) {
+ postMessage({
+ type: "call",
+ id: callbackId,
+ data: data
+ });
+ };
+
+ this.emit = function(name, data) {
+ postMessage({
+ type: "event",
+ name: name,
+ data: data
+ });
+ };
+
+ }).call(Sender.prototype);
+
+ return new Sender();
+}
+
+var main;
+var sender;
+
+onmessage = function(e) {
+ var msg = e.data;
+ if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ initBaseUrls(msg.tlns);
+ require(null, "ace/lib/fixoldbrowsers");
+ sender = initSender();
+ var clazz = require(null, msg.module)[msg.classname];
+ main = new clazz(sender);
+ }
+ else if (msg.event && sender) {
+ sender._emit(msg.event, msg.data);
+ }
+};
+// vim:set ts=4 sts=4 sw=4 st:
+
+define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
+
+
+require("./regexp");
+require("./es5-shim");
+
+});
+
+define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+ var real = {
+ exec: RegExp.prototype.exec,
+ test: RegExp.prototype.test,
+ match: String.prototype.match,
+ replace: String.prototype.replace,
+ split: String.prototype.split
+ },
+ compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
+ compliantLastIndexIncrement = function () {
+ var x = /^/g;
+ real.test.call(x, "");
+ return !x.lastIndex;
+ }();
+
+ if (compliantLastIndexIncrement && compliantExecNpcg)
+ return;
+ RegExp.prototype.exec = function (str) {
+ var match = real.exec.apply(this, arguments),
+ name, r2;
+ if ( typeof(str) == 'string' && match) {
+ if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
+ r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
+ real.replace.call(str.slice(match.index), r2, function () {
+ for (var i = 1; i < arguments.length - 2; i++) {
+ if (arguments[i] === undefined)
+ match[i] = undefined;
+ }
+ });
+ }
+ if (this._xregexp && this._xregexp.captureNames) {
+ for (var i = 1; i < match.length; i++) {
+ name = this._xregexp.captureNames[i - 1];
+ if (name)
+ match[name] = match[i];
+ }
+ }
+ if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ }
+ return match;
+ };
+ if (!compliantLastIndexIncrement) {
+ RegExp.prototype.test = function (str) {
+ var match = real.exec.call(this, str);
+ if (match && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ return !!match;
+ };
+ }
+
+ function getNativeFlags (regex) {
+ return (regex.global ? "g" : "") +
+ (regex.ignoreCase ? "i" : "") +
+ (regex.multiline ? "m" : "") +
+ (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
+ (regex.sticky ? "y" : "");
+ }
+
+ function indexOf (array, item, from) {
+ if (Array.prototype.indexOf) // Use the native array method if available
+ return array.indexOf(item, from);
+ for (var i = from || 0; i < array.length; i++) {
+ if (array[i] === item)
+ return i;
+ }
+ return -1;
+ }
+
+});
+
+define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function")
+ throw new TypeError(); // TODO message
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var F = function(){};
+ F.prototype = target.prototype;
+ var self = new F;
+
+ var result = target.apply(
+ self,
+ args.concat(slice.call(arguments))
+ );
+ if (result !== null && Object(result) === result)
+ return result;
+ return self;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return toString(obj) == "[object Array]";
+ };
+}
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var self = toObject(this),
+ thisp = arguments[1],
+ i = 0,
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, self);
+ }
+ i++;
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, self);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ result = [],
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, self))
+ result.push(self[i]);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, self))
+ return false;
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var self = toObject(this),
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, self))
+ return true;
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+ if (!length && arguments.length == 1)
+ throw new TypeError(); // TODO message
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length)
+ throw new TypeError(); // TODO message
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self)
+ result = fun.call(void 0, result, self[i], i, self);
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+ if (toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+ if (!length && arguments.length == 1)
+ throw new TypeError(); // TODO message
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0)
+ throw new TypeError(); // TODO message
+ } while (true);
+ }
+
+ do {
+ if (i in this)
+ result = fun.call(void 0, result, self[i], i, self);
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+
+ if (!length)
+ return -1;
+
+ var i = 0;
+ if (arguments.length > 1)
+ i = toInteger(arguments[1]);
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = toObject(this),
+ length = self.length >>> 0;
+
+ if (!length)
+ return -1;
+ var i = length - 1;
+ if (arguments.length > 1)
+ i = Math.min(i, toInteger(arguments[1]));
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i])
+ return i;
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null})
+ hasDontEnumBug = false;
+
+ Object.keys = function keys(object) {
+
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError("Object.keys called on a non-object");
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+
+ return keys;
+ };
+
+}
+if (!Date.prototype.toISOString || (new Date(-62198755200000).toISOString().indexOf('-000001') === -1)) {
+ Date.prototype.toISOString = function toISOString() {
+ var result, length, value, year;
+ if (!isFinite(this))
+ throw new RangeError;
+ result = [this.getUTCMonth() + 1, this.getUTCDate(),
+ this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
+ year = this.getUTCFullYear();
+ year = (year < 0 ? '-' : (year > 9999 ? '+' : '')) + ('00000' + Math.abs(year)).slice(0 <= year && year <= 9999 ? -4 : -6);
+
+ length = result.length;
+ while (length--) {
+ value = result[length];
+ if (value < 10)
+ result[length] = "0" + value;
+ }
+ return year + "-" + result.slice(0, 2).join("-") + "T" + result.slice(2).join(":") + "." +
+ ("000" + this.getUTCMilliseconds()).slice(-3) + "Z";
+ }
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+if (!Date.prototype.toJSON) {
+ Date.prototype.toJSON = function toJSON(key) {
+ if (typeof this.toISOString != "function")
+ throw new TypeError(); // TODO message
+ return this.toISOString();
+ };
+}
+if (Date.parse("+275760-09-13T00:00:00.000Z") !== 8.64e15) {
+ Date = (function(NativeDate) {
+ var Date = function Date(Y, M, D, h, m, s, ms) {
+ var length = arguments.length;
+ if (this instanceof NativeDate) {
+ var date = length == 1 && String(Y) === Y ? // isString(Y)
+ new NativeDate(Date.parse(Y)) :
+ length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
+ length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
+ length >= 5 ? new NativeDate(Y, M, D, h, m) :
+ length >= 4 ? new NativeDate(Y, M, D, h) :
+ length >= 3 ? new NativeDate(Y, M, D) :
+ length >= 2 ? new NativeDate(Y, M) :
+ length >= 1 ? new NativeDate(Y) :
+ new NativeDate();
+ date.constructor = Date;
+ return date;
+ }
+ return NativeDate.apply(this, arguments);
+ };
+ var isoDateExpression = new RegExp("^" +
+ "(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + 6-digit extended year
+ "(?:-(\\d{2})" + // optional month capture
+ "(?:-(\\d{2})" + // optional day capture
+ "(?:" + // capture hours:minutes:seconds.milliseconds
+ "T(\\d{2})" + // hours capture
+ ":(\\d{2})" + // minutes capture
+ "(?:" + // optional :seconds.milliseconds
+ ":(\\d{2})" + // seconds capture
+ "(?:\\.(\\d{3}))?" + // milliseconds capture
+ ")?" +
+ "(?:" + // capture UTC offset component
+ "Z|" + // UTC capture
+ "(?:" + // offset specifier +/-hours:minutes
+ "([-+])" + // sign capture
+ "(\\d{2})" + // hours offset capture
+ ":(\\d{2})" + // minutes offset capture
+ ")" +
+ ")?)?)?)?" +
+ "$");
+ for (var key in NativeDate)
+ Date[key] = NativeDate[key];
+ Date.now = NativeDate.now;
+ Date.UTC = NativeDate.UTC;
+ Date.prototype = NativeDate.prototype;
+ Date.prototype.constructor = Date;
+ Date.parse = function parse(string) {
+ var match = isoDateExpression.exec(string);
+ if (match) {
+ match.shift(); // kill match[0], the full match
+ for (var i = 1; i < 7; i++) {
+ match[i] = +(match[i] || (i < 3 ? 1 : 0));
+ if (i == 1)
+ match[i]--;
+ }
+ var minuteOffset = +match.pop(), hourOffset = +match.pop(), sign = match.pop();
+ var offset = 0;
+ if (sign) {
+ if (hourOffset > 23 || minuteOffset > 59)
+ return NaN;
+ offset = (hourOffset * 60 + minuteOffset) * 6e4 * (sign == "+" ? -1 : 1);
+ }
+ var year = +match[0];
+ if (0 <= year && year <= 99) {
+ match[0] = year + 400;
+ return NativeDate.UTC.apply(this, match) + offset - 12622780800000;
+ }
+ return NativeDate.UTC.apply(this, match) + offset;
+ }
+ return NativeDate.parse.apply(this, arguments);
+ };
+
+ return Date;
+ })(Date);
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+var toInteger = function (n) {
+ n = +n;
+ if (n !== n) // isNaN
+ n = 0;
+ else if (n !== 0 && n !== (1/0) && n !== -(1/0))
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ return n;
+};
+
+var prepareString = "a"[0] != "a",
+ toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError(); // TODO message
+ }
+ if (prepareString && typeof o == "string" && o) {
+ return o.split("");
+ }
+ return Object(o);
+ };
+});
+
+define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+var EventEmitter = {};
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+ this._eventRegistry = this._eventRegistry || {};
+ this._defaultHandlers = this._defaultHandlers || {};
+
+ var listeners = this._eventRegistry[eventName] || [];
+ var defaultHandler = this._defaultHandlers[eventName];
+ if (!listeners.length && !defaultHandler)
+ return;
+
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
+
+ if (!e.stopPropagation) {
+ e.stopPropagation = function() {
+ this.propagationStopped = true;
+ };
+ }
+
+ if (!e.preventDefault) {
+ e.preventDefault = function() {
+ this.defaultPrevented = true;
+ };
+ }
+
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e);
+};
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ this._defaultHandlers = this._defaultHandlers || {};
+
+ if (this._defaultHandlers[eventName])
+ throw new Error("The default handler for '" + eventName + "' is already set");
+
+ this._defaultHandlers[eventName] = callback;
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners.push(callback);
+};
+
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ return;
+
+ var index = listeners.indexOf(callback);
+ if (index !== -1)
+ listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.inherits = (function() {
+ var tempCtor = function() {};
+ return function(ctor, superCtor) {
+ tempCtor.prototype = superCtor.prototype;
+ ctor.super_ = superCtor.prototype;
+ ctor.prototype = new tempCtor();
+ ctor.prototype.constructor = ctor;
+ };
+}());
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+define('ace/mode/xquery_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/xquery/JSONParseTreeHandler', 'ace/mode/xquery/XQueryParser', 'ace/mode/xquery/visitors/SyntaxHighlighter'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var JSONParseTreeHandler = require("./xquery/JSONParseTreeHandler").JSONParseTreeHandler;
+var XQueryParser = require("./xquery/XQueryParser").XQueryParser;
+var SyntaxHighlighter = require("../mode/xquery/visitors/SyntaxHighlighter").SyntaxHighlighter;
+
+var XQueryWorker = exports.XQueryWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(200);
+};
+
+oop.inherits(XQueryWorker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ this.sender.emit("start");
+ var value = this.doc.getValue();
+ var h = new JSONParseTreeHandler();
+ var parser = new XQueryParser(value, h);
+ try {
+ parser.parse_XQuery();
+ var ast = h.getParseTree();
+ this.sender.emit("ok");
+ var highlighter = new SyntaxHighlighter(value, ast);
+ var tokens = highlighter.getTokens();
+ this.sender.emit("highlight", tokens);
+ } catch(e) {
+ var prefix = value.substring(0, e.getBegin());
+ var line = prefix.split("\n").length;
+ var column = e.getBegin() - prefix.lastIndexOf("\n");
+ var message = parser.getErrorMessage(e);
+ this.sender.emit("error", {
+ row: line - 1,
+ column: column,
+ text: message,
+ type: "error"
+ });
+ }
+ };
+
+}).call(XQueryWorker.prototype);
+
+});
+define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.deferredCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas([e.data]);
+ deferredUpdate.schedule(_self.$timeout);
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(text) {
+ this.$lines = [];
+ if (text.length == 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this.insertLines(0, text);
+ } else {
+ this.insert({row: 0, column:0}, text);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength();
+ this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+ this.insert({row: 0, column:0}, text);
+ };
+ this.getValue = function() {
+ return this.getAllLines().join(this.getNewLineCharacter());
+ };
+ this.createAnchor = function(row, column) {
+ return new Anchor(this, row, column);
+ };
+ if ("aaa".split(/a/).length == 0)
+ this.$split = function(text) {
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
+ }
+ else
+ this.$split = function(text) {
+ return text.split(/\r\n|\r|\n/);
+ };
+
+
+
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
+ if (match) {
+ this.$autoNewLine = match[1];
+ } else {
+ this.$autoNewLine = "\n";
+ }
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+
+ case "unix":
+ return "\n";
+
+ default:
+ return this.$autoNewLine;
+ }
+ };
+
+ this.$autoNewLine = "\n";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ };
+ this.getNewLineMode = function() {
+ return this.$newLineMode;
+ };
+ this.isNewLine = function(text) {
+ return (text == "\r\n" || text == "\r" || text == "\n");
+ };
+ this.getLine = function(row) {
+ return this.$lines[row] || "";
+ };
+ this.getLines = function(firstRow, lastRow) {
+ return this.$lines.slice(firstRow, lastRow + 1);
+ };
+ this.getAllLines = function() {
+ return this.getLines(0, this.getLength());
+ };
+ this.getLength = function() {
+ return this.$lines.length;
+ };
+ this.getTextRange = function(range) {
+ if (range.start.row == range.end.row) {
+ return this.$lines[range.start.row].substring(range.start.column,
+ range.end.column);
+ }
+ else {
+ var lines = this.getLines(range.start.row+1, range.end.row-1);
+ lines.unshift((this.$lines[range.start.row] || "").substring(range.start.column));
+ lines.push((this.$lines[range.end.row] || "").substring(0, range.end.column));
+ return lines.join(this.getNewLineCharacter());
+ }
+ };
+
+ this.$clipPosition = function(position) {
+ var length = this.getLength();
+ if (position.row >= length) {
+ position.row = Math.max(0, length - 1);
+ position.column = this.getLine(length-1).length;
+ }
+ return position;
+ };
+ this.insert = function(position, text) {
+ if (!text || text.length === 0)
+ return position;
+
+ position = this.$clipPosition(position);
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ var lines = this.$split(text);
+ var firstLine = lines.splice(0, 1)[0];
+ var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+ position = this.insertInLine(position, firstLine);
+ if (lastLine !== null) {
+ position = this.insertNewLine(position); // terminate first line
+ position = this.insertLines(position.row, lines);
+ position = this.insertInLine(position, lastLine || "");
+ }
+ return position;
+ };
+ this.insertLines = function(row, lines) {
+ if (lines.length == 0)
+ return {row: row, column: 0};
+ if (lines.length > 0xFFFF) {
+ var end = this.insertLines(row, lines.slice(0xFFFF));
+ lines = lines.slice(0, 0xFFFF);
+ }
+
+ var args = [row, 0];
+ args.push.apply(args, lines);
+ this.$lines.splice.apply(this.$lines, args);
+
+ var range = new Range(row, 0, row + lines.length, 0);
+ var delta = {
+ action: "insertLines",
+ range: range,
+ lines: lines
+ };
+ this._emit("change", { data: delta });
+ return end || range.end;
+ };
+ this.insertNewLine = function(position) {
+ position = this.$clipPosition(position);
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column);
+ this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+ var end = {
+ row : position.row + 1,
+ column : 0
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: this.getNewLineCharacter()
+ };
+ this._emit("change", { data: delta });
+
+ return end;
+ };
+ this.insertInLine = function(position, text) {
+ if (text.length == 0)
+ return position;
+
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column) + text
+ + line.substring(position.column);
+
+ var end = {
+ row : position.row,
+ column : position.column + text.length
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: text
+ };
+ this._emit("change", { data: delta });
+
+ return end;
+ };
+ this.remove = function(range) {
+ range.start = this.$clipPosition(range.start);
+ range.end = this.$clipPosition(range.end);
+
+ if (range.isEmpty())
+ return range.start;
+
+ var firstRow = range.start.row;
+ var lastRow = range.end.row;
+
+ if (range.isMultiLine()) {
+ var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+ var lastFullRow = lastRow - 1;
+
+ if (range.end.column > 0)
+ this.removeInLine(lastRow, 0, range.end.column);
+
+ if (lastFullRow >= firstFullRow)
+ this.removeLines(firstFullRow, lastFullRow);
+
+ if (firstFullRow != firstRow) {
+ this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+ this.removeNewLine(range.start.row);
+ }
+ }
+ else {
+ this.removeInLine(firstRow, range.start.column, range.end.column);
+ }
+ return range.start;
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ if (startColumn == endColumn)
+ return;
+
+ var range = new Range(row, startColumn, row, endColumn);
+ var line = this.getLine(row);
+ var removed = line.substring(startColumn, endColumn);
+ var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+ this.$lines.splice(row, 1, newLine);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: removed
+ };
+ this._emit("change", { data: delta });
+ return range.start;
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ var range = new Range(firstRow, 0, lastRow + 1, 0);
+ var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+ var delta = {
+ action: "removeLines",
+ range: range,
+ nl: this.getNewLineCharacter(),
+ lines: removed
+ };
+ this._emit("change", { data: delta });
+ return removed;
+ };
+ this.removeNewLine = function(row) {
+ var firstLine = this.getLine(row);
+ var secondLine = this.getLine(row+1);
+
+ var range = new Range(row, firstLine.length, row+1, 0);
+ var line = firstLine + secondLine;
+
+ this.$lines.splice(row, 2, line);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: this.getNewLineCharacter()
+ };
+ this._emit("change", { data: delta });
+ };
+ this.replace = function(range, text) {
+ if (text.length == 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ if (text) {
+ var end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ var delta = deltas[i];
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "insertText")
+ this.insert(range.start, delta.text);
+ else if (delta.action == "removeLines")
+ this.removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "removeText")
+ this.remove(range);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ var delta = deltas[i];
+
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "insertText")
+ this.remove(range);
+ else if (delta.action == "removeLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "removeText")
+ this.insert(range.start, delta.text);
+ }
+ };
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length;
+
+ return index + newlineLength * i + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
+
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
+};
+
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row == range.start.row &&
+ this.end.row == range.end.row &&
+ this.start.column == range.start.column &&
+ this.end.column == range.end.column
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
+ };
+
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
+
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
+ } else {
+ return 0;
+ }
+ }
+ };
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
+ };
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
+ }
+ };
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
+ }
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
+ }
+
+ if (row < this.start.row)
+ return -1;
+
+ if (row > this.end.row)
+ return 1;
+
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
+
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
+
+ return 0;
+ };
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow) {
+ var end = {
+ row: lastRow+1,
+ column: 0
+ };
+ }
+
+ if (this.start.row > lastRow) {
+ var start = {
+ row: lastRow+1,
+ column: 0
+ };
+ }
+
+ if (this.start.row < firstRow) {
+ var start = {
+ row: firstRow,
+ column: 0
+ };
+ }
+
+ if (this.end.row < firstRow) {
+ var end = {
+ row: firstRow,
+ column: 0
+ };
+ }
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
+
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+
+ this.isEmpty = function() {
+ return (this.start.row == this.end.row && this.start.column == this.end.column);
+ };
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
+ };
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
+ };
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
+ };
+ this.toScreenRange = function(session) {
+ var screenPosStart =
+ session.documentToScreenPosition(this.start);
+ var screenPosEnd =
+ session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+
+exports.Range = Range;
+});
+
+define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.document = doc;
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+
+ this.$onChange = this.onChange.bind(this);
+ doc.on("change", this.$onChange);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+
+ this.getDocument = function() {
+ return this.document;
+ };
+
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
+
+ if (range.start.row > this.row)
+ return;
+
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
+
+ var row = this.row;
+ var column = this.column;
+
+ if (delta.action === "insertText") {
+ if (range.start.row === row && range.start.column <= column) {
+ if (range.start.row === range.end.row) {
+ column += range.end.column - range.start.column;
+ }
+ else {
+ column -= range.start.column;
+ row += range.end.row - range.start.row;
+ }
+ }
+ else if (range.start.row !== range.end.row && range.start.row < row) {
+ row += range.end.row - range.start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (range.start.row <= row) {
+ row += range.end.row - range.start.row;
+ }
+ }
+ else if (delta.action == "removeText") {
+ if (range.start.row == row && range.start.column < column) {
+ if (range.end.column >= column)
+ column = range.start.column;
+ else
+ column = Math.max(0, column - (range.end.column - range.start.column));
+
+ } else if (range.start.row !== range.end.row && range.start.row < row) {
+ if (range.end.row == row) {
+ column = Math.max(0, column - range.end.column) + range.start.column;
+ }
+ row -= (range.end.row - range.start.row);
+ }
+ else if (range.end.row == row) {
+ row -= range.end.row - range.start.row;
+ column = Math.max(0, column - range.end.column) + range.start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (range.start.row <= row) {
+ if (range.end.row <= row)
+ row -= range.end.row - range.start.row;
+ else {
+ row = range.start.row;
+ column = 0;
+ }
+ }
+ }
+
+ this.setPosition(row, column, true);
+ };
+
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ }
+ else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+
+ if (this.row == pos.row && this.column == pos.column)
+ return;
+
+ var old = {
+ row: this.row,
+ column: this.column
+ };
+
+ this.row = pos.row;
+ this.column = pos.column;
+ this._emit("change", {
+ old: old,
+ value: pos
+ });
+ };
+
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
+ };
+
+}).call(Anchor.prototype);
+
+});
+
+define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ return new Array(count + 1).join(string);
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+ return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+ return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+ var copy = {};
+ for (var key in obj) {
+ copy[key] = obj[key];
+ }
+ return copy;
+};
+
+exports.copyArray = function(array){
+ var copy = [];
+ for (var i=0, l=array.length; i<l; i++) {
+ if (array[i] && typeof array[i] == "object")
+ copy[i] = this.copyObject( array[i] );
+ else
+ copy[i] = array[i];
+ }
+ return copy;
+};
+
+exports.deepCopy = function (obj) {
+ if (typeof obj != "object") {
+ return obj;
+ }
+
+ var copy = obj.constructor();
+ for (var key in obj) {
+ if (typeof obj[key] == "object") {
+ copy[key] = this.deepCopy(obj[key]);
+ } else {
+ copy[key] = obj[key];
+ }
+ }
+ return copy;
+};
+
+exports.arrayToMap = function(arr) {
+ var map = {};
+ for (var i=0; i<arr.length; i++) {
+ map[arr[i]] = 1;
+ }
+ return map;
+
+};
+
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
+exports.arrayRemove = function(array, value) {
+ for (var i = 0; i <= array.length; i++) {
+ if (value === array[i]) {
+ array.splice(i, 1);
+ }
+ }
+};
+
+exports.escapeRegExp = function(str) {
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
+exports.deferredCall = function(fcn) {
+
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var deferred = function(timeout) {
+ deferred.cancel();
+ timer = setTimeout(callback, timeout || 0);
+ return deferred;
+ };
+
+ deferred.schedule = deferred;
+
+ deferred.call = function() {
+ this.cancel();
+ fcn();
+ return deferred;
+ };
+
+ deferred.cancel = function() {
+ clearTimeout(timer);
+ timer = null;
+ return deferred;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = _self;
+ _self.schedule = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || 0);
+ };
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'module' ], function(require, exports, module) {
+ var JSONParseTreeHandler = exports.JSONParseTreeHandler = function() {
+
+ var ast = null;
+ var ptr = null;
+
+ function createNode(name){
+ return { name: name, children: [], getParent: null };
+ }
+
+ function pushNode(name, begin){
+ var node = createNode(name);
+ node.begin = begin;
+ if(ast === null) {
+ ast = node;
+ ptr = node;
+ } else {
+ node.getParent = ptr;
+ ptr.children.push(node);
+ ptr = ptr.children[ptr.children.length - 1];
+ }
+ }
+
+ function popNode(name, end){
+ ptr.end = end;
+ if(ptr.getParent !== null) {
+ ptr = ptr.getParent;
+ for(var i in ptr.children) {
+ delete ptr.children[i].getParent;
+ }
+ } else {
+ delete ptr.getParent;
+ }
+ }
+
+ this.getParseTree = function() {
+ return ast;
+ };
+
+ this.reset = function(input) {};
+
+ this.startNonterminal = function(name, begin) {
+ pushNode(name, begin);
+ };
+
+ this.endNonterminal = function(name, end) {
+ popNode(name, end);
+ };
+
+ this.terminal = function(name, begin, end) {
+ var name = (name.substring(0, 1) === "'" && name.substring(name.length - 1) === "'") ? "TOKEN" : name;
+ pushNode(name, begin);
+ popNode(name, end);
+ };
+
+ this.whitespace = function(begin, end) {
+ var name = "WS";
+ pushNode(name, begin);
+ popNode(name, end);
+ };
+ };
+});
+
+define('ace/mode/xquery/XQueryParser', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+var XQueryParser = exports.XQueryParser = function XQueryParser(string, parsingEventHandler)
+{
+ init(string, parsingEventHandler);
+
+ function ParseException(b, e, s, o, x)
+ {
+ var
+ begin = b,
+ end = e,
+ state = s,
+ offending = o,
+ expected = x;
+
+ this.getBegin = function() {return begin;};
+ this.getEnd = function() {return end;};
+ this.getState = function() {return state;};
+ this.getExpected = function() {return expected;};
+ this.getOffending = function() {return offending;};
+
+ this.getMessage = function()
+ {
+ return offending < 0 ? "lexical analysis failed" : "syntax error";
+ };
+ }
+
+ function init(string, parsingEventHandler)
+ {
+ eventHandler = parsingEventHandler;
+ input = string;
+ size = string.length;
+ reset(0, 0, 0);
+ }
+
+ this.getInput = function()
+ {
+ return input;
+ };
+
+ function reset(l, b, e)
+ {
+ b0 = b; e0 = b;
+ l1 = l; b1 = b; e1 = e;
+ l2 = 0;
+ end = e;
+ ex = -1;
+ memo = new Object;
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? XQueryParser.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = getExpectedTokenSet(e.getState());
+ }
+ else
+ {
+ expected = [XQueryParser.TOKEN[e.getExpected()]];
+ }
+ return expected;
+ };
+
+ this.getErrorMessage = function(e)
+ {
+ var tokenSet = this.getExpectedTokenSet(e);
+ var found = this.getOffendingToken(e);
+ var prefix = input.substring(0, e.getBegin());
+ var lines = prefix.split("\n");
+ var line = lines.length;
+ var column = e.getBegin() - lines[line - 1].length + 1;
+ var size = e.getEnd() - e.getBegin();
+ return e.getMessage()
+ + (found == null ? "" : ", found " + found)
+ + "\nwhile expecting "
+ + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]"))
+ + "\n"
+ + (size == 0 ? "" : "after successfully scanning " + size + " characters beginning ")
+ + "at line " + line + ", column " + column + ":\n..."
+ + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64))
+ + "...";
+ };
+
+ this.parse_XQuery = function()
+ {
+ eventHandler.startNonterminal("XQuery", e0);
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Module();
+ shift(25); // EOF
+ eventHandler.endNonterminal("XQuery", e0);
+ };
+
+ function parse_Module()
+ {
+ eventHandler.startNonterminal("Module", e0);
+ switch (l1)
+ {
+ case 274: // 'xquery'
+ lookahead2W(199); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 64274 // 'xquery' 'encoding'
+ || lk == 134930) // 'xquery' 'version'
+ {
+ parse_VersionDecl();
+ }
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 182: // 'module'
+ lookahead2W(194); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 94390: // 'module' 'namespace'
+ whitespace();
+ parse_LibraryModule();
+ break;
+ default:
+ whitespace();
+ parse_MainModule();
+ }
+ eventHandler.endNonterminal("Module", e0);
+ }
+
+ function parse_VersionDecl()
+ {
+ eventHandler.startNonterminal("VersionDecl", e0);
+ shift(274); // 'xquery'
+ lookahead1W(116); // S^WS | '(:' | 'encoding' | 'version'
+ switch (l1)
+ {
+ case 125: // 'encoding'
+ shift(125); // 'encoding'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ break;
+ default:
+ shift(263); // 'version'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ lookahead1W(109); // S^WS | '(:' | ';' | 'encoding'
+ if (l1 == 125) // 'encoding'
+ {
+ shift(125); // 'encoding'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ }
+ lookahead1W(28); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ eventHandler.endNonterminal("VersionDecl", e0);
+ }
+
+ function parse_LibraryModule()
+ {
+ eventHandler.startNonterminal("LibraryModule", e0);
+ parse_ModuleDecl();
+ lookahead1W(138); // S^WS | EOF | '(:' | 'declare' | 'import'
+ whitespace();
+ parse_Prolog();
+ eventHandler.endNonterminal("LibraryModule", e0);
+ }
+
+ function parse_ModuleDecl()
+ {
+ eventHandler.startNonterminal("ModuleDecl", e0);
+ shift(182); // 'module'
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shift(184); // 'namespace'
+ lookahead1W(250); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(28); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ eventHandler.endNonterminal("ModuleDecl", e0);
+ }
+
+ function parse_Prolog()
+ {
+ eventHandler.startNonterminal("Prolog", e0);
+ for (;;)
+ {
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(213); // S^WS | EOF | '!' | '!=' | '#' | '%' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 153: // 'import'
+ lookahead2W(201); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 42604 // 'declare' 'base-uri'
+ && lk != 43628 // 'declare' 'boundary-space'
+ && lk != 50284 // 'declare' 'construction'
+ && lk != 53356 // 'declare' 'copy-namespaces'
+ && lk != 54380 // 'declare' 'decimal-format'
+ && lk != 55916 // 'declare' 'default'
+ && lk != 72300 // 'declare' 'ft-option'
+ && lk != 93337 // 'import' 'module'
+ && lk != 94316 // 'declare' 'namespace'
+ && lk != 104044 // 'declare' 'ordering'
+ && lk != 113772 // 'declare' 'revalidation'
+ && lk != 115353) // 'import' 'schema'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(179); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 55916) // 'declare' 'default'
+ {
+ lk = memoized(0, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_DefaultNamespaceDecl();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(0, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ whitespace();
+ parse_DefaultNamespaceDecl();
+ break;
+ case 94316: // 'declare' 'namespace'
+ whitespace();
+ parse_NamespaceDecl();
+ break;
+ case 153: // 'import'
+ whitespace();
+ parse_Import();
+ break;
+ case 72300: // 'declare' 'ft-option'
+ whitespace();
+ parse_FTOptionDecl();
+ break;
+ default:
+ whitespace();
+ parse_Setter();
+ }
+ lookahead1W(28); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ }
+ for (;;)
+ {
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(210); // S^WS | EOF | '!' | '!=' | '#' | '%' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 16492 // 'declare' '%'
+ && lk != 48748 // 'declare' 'collection'
+ && lk != 51820 // 'declare' 'context'
+ && lk != 74348 // 'declare' 'function'
+ && lk != 79468 // 'declare' 'index'
+ && lk != 82540 // 'declare' 'integrity'
+ && lk != 101996 // 'declare' 'option'
+ && lk != 131692 // 'declare' 'updating'
+ && lk != 134252) // 'declare' 'variable'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(175); // S^WS | '%' | '(:' | 'collection' | 'context' | 'function' | 'index' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 51820: // 'declare' 'context'
+ whitespace();
+ parse_ContextItemDecl();
+ break;
+ case 101996: // 'declare' 'option'
+ whitespace();
+ parse_OptionDecl();
+ break;
+ default:
+ whitespace();
+ parse_AnnotatedDecl();
+ }
+ lookahead1W(28); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ }
+ eventHandler.endNonterminal("Prolog", e0);
+ }
+
+ function parse_Separator()
+ {
+ eventHandler.startNonterminal("Separator", e0);
+ shift(53); // ';'
+ eventHandler.endNonterminal("Separator", e0);
+ }
+
+ function parse_Setter()
+ {
+ eventHandler.startNonterminal("Setter", e0);
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(172); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 55916) // 'declare' 'default'
+ {
+ lk = memoized(1, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_DefaultCollationDecl();
+ lk = -2;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_EmptyOrderDecl();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ lk = -9;
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(1, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 43628: // 'declare' 'boundary-space'
+ parse_BoundarySpaceDecl();
+ break;
+ case -2:
+ parse_DefaultCollationDecl();
+ break;
+ case 42604: // 'declare' 'base-uri'
+ parse_BaseURIDecl();
+ break;
+ case 50284: // 'declare' 'construction'
+ parse_ConstructionDecl();
+ break;
+ case 104044: // 'declare' 'ordering'
+ parse_OrderingModeDecl();
+ break;
+ case -6:
+ parse_EmptyOrderDecl();
+ break;
+ case 113772: // 'declare' 'revalidation'
+ parse_RevalidationDecl();
+ break;
+ case 53356: // 'declare' 'copy-namespaces'
+ parse_CopyNamespacesDecl();
+ break;
+ default:
+ parse_DecimalFormatDecl();
+ }
+ eventHandler.endNonterminal("Setter", e0);
+ }
+
+ function parse_BoundarySpaceDecl()
+ {
+ eventHandler.startNonterminal("BoundarySpaceDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(33); // S^WS | '(:' | 'boundary-space'
+ shift(85); // 'boundary-space'
+ lookahead1W(133); // S^WS | '(:' | 'preserve' | 'strip'
+ switch (l1)
+ {
+ case 214: // 'preserve'
+ shift(214); // 'preserve'
+ break;
+ default:
+ shift(241); // 'strip'
+ }
+ eventHandler.endNonterminal("BoundarySpaceDecl", e0);
+ }
+
+ function parse_DefaultCollationDecl()
+ {
+ eventHandler.startNonterminal("DefaultCollationDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shift(109); // 'default'
+ lookahead1W(38); // S^WS | '(:' | 'collation'
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("DefaultCollationDecl", e0);
+ }
+
+ function try_DefaultCollationDecl()
+ {
+ shiftT(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shiftT(109); // 'default'
+ lookahead1W(38); // S^WS | '(:' | 'collation'
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+
+ function parse_BaseURIDecl()
+ {
+ eventHandler.startNonterminal("BaseURIDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(32); // S^WS | '(:' | 'base-uri'
+ shift(83); // 'base-uri'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("BaseURIDecl", e0);
+ }
+
+ function parse_ConstructionDecl()
+ {
+ eventHandler.startNonterminal("ConstructionDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(41); // S^WS | '(:' | 'construction'
+ shift(98); // 'construction'
+ lookahead1W(133); // S^WS | '(:' | 'preserve' | 'strip'
+ switch (l1)
+ {
+ case 241: // 'strip'
+ shift(241); // 'strip'
+ break;
+ default:
+ shift(214); // 'preserve'
+ }
+ eventHandler.endNonterminal("ConstructionDecl", e0);
+ }
+
+ function parse_OrderingModeDecl()
+ {
+ eventHandler.startNonterminal("OrderingModeDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(68); // S^WS | '(:' | 'ordering'
+ shift(203); // 'ordering'
+ lookahead1W(131); // S^WS | '(:' | 'ordered' | 'unordered'
+ switch (l1)
+ {
+ case 202: // 'ordered'
+ shift(202); // 'ordered'
+ break;
+ default:
+ shift(256); // 'unordered'
+ }
+ eventHandler.endNonterminal("OrderingModeDecl", e0);
+ }
+
+ function parse_EmptyOrderDecl()
+ {
+ eventHandler.startNonterminal("EmptyOrderDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shift(109); // 'default'
+ lookahead1W(67); // S^WS | '(:' | 'order'
+ shift(201); // 'order'
+ lookahead1W(49); // S^WS | '(:' | 'empty'
+ shift(123); // 'empty'
+ lookahead1W(121); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 147: // 'greatest'
+ shift(147); // 'greatest'
+ break;
+ default:
+ shift(173); // 'least'
+ }
+ eventHandler.endNonterminal("EmptyOrderDecl", e0);
+ }
+
+ function try_EmptyOrderDecl()
+ {
+ shiftT(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shiftT(109); // 'default'
+ lookahead1W(67); // S^WS | '(:' | 'order'
+ shiftT(201); // 'order'
+ lookahead1W(49); // S^WS | '(:' | 'empty'
+ shiftT(123); // 'empty'
+ lookahead1W(121); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 147: // 'greatest'
+ shiftT(147); // 'greatest'
+ break;
+ default:
+ shiftT(173); // 'least'
+ }
+ }
+
+ function parse_CopyNamespacesDecl()
+ {
+ eventHandler.startNonterminal("CopyNamespacesDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(44); // S^WS | '(:' | 'copy-namespaces'
+ shift(104); // 'copy-namespaces'
+ lookahead1W(128); // S^WS | '(:' | 'no-preserve' | 'preserve'
+ whitespace();
+ parse_PreserveMode();
+ lookahead1W(25); // S^WS | '(:' | ','
+ shift(41); // ','
+ lookahead1W(123); // S^WS | '(:' | 'inherit' | 'no-inherit'
+ whitespace();
+ parse_InheritMode();
+ eventHandler.endNonterminal("CopyNamespacesDecl", e0);
+ }
+
+ function parse_PreserveMode()
+ {
+ eventHandler.startNonterminal("PreserveMode", e0);
+ switch (l1)
+ {
+ case 214: // 'preserve'
+ shift(214); // 'preserve'
+ break;
+ default:
+ shift(190); // 'no-preserve'
+ }
+ eventHandler.endNonterminal("PreserveMode", e0);
+ }
+
+ function parse_InheritMode()
+ {
+ eventHandler.startNonterminal("InheritMode", e0);
+ switch (l1)
+ {
+ case 157: // 'inherit'
+ shift(157); // 'inherit'
+ break;
+ default:
+ shift(189); // 'no-inherit'
+ }
+ eventHandler.endNonterminal("InheritMode", e0);
+ }
+
+ function parse_DecimalFormatDecl()
+ {
+ eventHandler.startNonterminal("DecimalFormatDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(114); // S^WS | '(:' | 'decimal-format' | 'default'
+ switch (l1)
+ {
+ case 106: // 'decimal-format'
+ shift(106); // 'decimal-format'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ break;
+ default:
+ shift(109); // 'default'
+ lookahead1W(45); // S^WS | '(:' | 'decimal-format'
+ shift(106); // 'decimal-format'
+ }
+ for (;;)
+ {
+ lookahead1W(181); // S^WS | '(:' | ';' | 'NaN' | 'decimal-separator' | 'digit' |
+ if (l1 == 53) // ';'
+ {
+ break;
+ }
+ whitespace();
+ parse_DFPropertyName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ eventHandler.endNonterminal("DecimalFormatDecl", e0);
+ }
+
+ function parse_DFPropertyName()
+ {
+ eventHandler.startNonterminal("DFPropertyName", e0);
+ switch (l1)
+ {
+ case 107: // 'decimal-separator'
+ shift(107); // 'decimal-separator'
+ break;
+ case 149: // 'grouping-separator'
+ shift(149); // 'grouping-separator'
+ break;
+ case 156: // 'infinity'
+ shift(156); // 'infinity'
+ break;
+ case 179: // 'minus-sign'
+ shift(179); // 'minus-sign'
+ break;
+ case 67: // 'NaN'
+ shift(67); // 'NaN'
+ break;
+ case 209: // 'percent'
+ shift(209); // 'percent'
+ break;
+ case 208: // 'per-mille'
+ shift(208); // 'per-mille'
+ break;
+ case 275: // 'zero-digit'
+ shift(275); // 'zero-digit'
+ break;
+ case 116: // 'digit'
+ shift(116); // 'digit'
+ break;
+ default:
+ shift(207); // 'pattern-separator'
+ }
+ eventHandler.endNonterminal("DFPropertyName", e0);
+ }
+
+ function parse_Import()
+ {
+ eventHandler.startNonterminal("Import", e0);
+ switch (l1)
+ {
+ case 153: // 'import'
+ lookahead2W(126); // S^WS | '(:' | 'module' | 'schema'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 115353: // 'import' 'schema'
+ parse_SchemaImport();
+ break;
+ default:
+ parse_ModuleImport();
+ }
+ eventHandler.endNonterminal("Import", e0);
+ }
+
+ function parse_SchemaImport()
+ {
+ eventHandler.startNonterminal("SchemaImport", e0);
+ shift(153); // 'import'
+ lookahead1W(73); // S^WS | '(:' | 'schema'
+ shift(225); // 'schema'
+ lookahead1W(137); // URILiteral | S^WS | '(:' | 'default' | 'namespace'
+ if (l1 != 7) // URILiteral
+ {
+ whitespace();
+ parse_SchemaPrefix();
+ }
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(108); // S^WS | '(:' | ';' | 'at'
+ if (l1 == 81) // 'at'
+ {
+ shift(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ for (;;)
+ {
+ lookahead1W(103); // S^WS | '(:' | ',' | ';'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ }
+ eventHandler.endNonterminal("SchemaImport", e0);
+ }
+
+ function parse_SchemaPrefix()
+ {
+ eventHandler.startNonterminal("SchemaPrefix", e0);
+ switch (l1)
+ {
+ case 184: // 'namespace'
+ shift(184); // 'namespace'
+ lookahead1W(250); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ break;
+ default:
+ shift(109); // 'default'
+ lookahead1W(47); // S^WS | '(:' | 'element'
+ shift(121); // 'element'
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shift(184); // 'namespace'
+ }
+ eventHandler.endNonterminal("SchemaPrefix", e0);
+ }
+
+ function parse_ModuleImport()
+ {
+ eventHandler.startNonterminal("ModuleImport", e0);
+ shift(153); // 'import'
+ lookahead1W(60); // S^WS | '(:' | 'module'
+ shift(182); // 'module'
+ lookahead1W(90); // URILiteral | S^WS | '(:' | 'namespace'
+ if (l1 == 184) // 'namespace'
+ {
+ shift(184); // 'namespace'
+ lookahead1W(250); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ }
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(108); // S^WS | '(:' | ';' | 'at'
+ if (l1 == 81) // 'at'
+ {
+ shift(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ for (;;)
+ {
+ lookahead1W(103); // S^WS | '(:' | ',' | ';'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ }
+ eventHandler.endNonterminal("ModuleImport", e0);
+ }
+
+ function parse_NamespaceDecl()
+ {
+ eventHandler.startNonterminal("NamespaceDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shift(184); // 'namespace'
+ lookahead1W(250); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("NamespaceDecl", e0);
+ }
+
+ function parse_DefaultNamespaceDecl()
+ {
+ eventHandler.startNonterminal("DefaultNamespaceDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shift(109); // 'default'
+ lookahead1W(115); // S^WS | '(:' | 'element' | 'function'
+ switch (l1)
+ {
+ case 121: // 'element'
+ shift(121); // 'element'
+ break;
+ default:
+ shift(145); // 'function'
+ }
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shift(184); // 'namespace'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("DefaultNamespaceDecl", e0);
+ }
+
+ function try_DefaultNamespaceDecl()
+ {
+ shiftT(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shiftT(109); // 'default'
+ lookahead1W(115); // S^WS | '(:' | 'element' | 'function'
+ switch (l1)
+ {
+ case 121: // 'element'
+ shiftT(121); // 'element'
+ break;
+ default:
+ shiftT(145); // 'function'
+ }
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shiftT(184); // 'namespace'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+
+ function parse_FTOptionDecl()
+ {
+ eventHandler.startNonterminal("FTOptionDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(52); // S^WS | '(:' | 'ft-option'
+ shift(141); // 'ft-option'
+ lookahead1W(81); // S^WS | '(:' | 'using'
+ whitespace();
+ parse_FTMatchOptions();
+ eventHandler.endNonterminal("FTOptionDecl", e0);
+ }
+
+ function parse_AnnotatedDecl()
+ {
+ eventHandler.startNonterminal("AnnotatedDecl", e0);
+ shift(108); // 'declare'
+ for (;;)
+ {
+ lookahead1W(170); // S^WS | '%' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 != 32 // '%'
+ && l1 != 257) // 'updating'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 257: // 'updating'
+ whitespace();
+ parse_CompatibilityAnnotation();
+ break;
+ default:
+ whitespace();
+ parse_Annotation();
+ }
+ }
+ switch (l1)
+ {
+ case 262: // 'variable'
+ whitespace();
+ parse_VarDecl();
+ break;
+ case 145: // 'function'
+ whitespace();
+ parse_FunctionDecl();
+ break;
+ case 95: // 'collection'
+ whitespace();
+ parse_CollectionDecl();
+ break;
+ case 155: // 'index'
+ whitespace();
+ parse_IndexDecl();
+ break;
+ default:
+ whitespace();
+ parse_ICDecl();
+ }
+ eventHandler.endNonterminal("AnnotatedDecl", e0);
+ }
+
+ function parse_CompatibilityAnnotation()
+ {
+ eventHandler.startNonterminal("CompatibilityAnnotation", e0);
+ shift(257); // 'updating'
+ eventHandler.endNonterminal("CompatibilityAnnotation", e0);
+ }
+
+ function parse_Annotation()
+ {
+ eventHandler.startNonterminal("Annotation", e0);
+ shift(32); // '%'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(171); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 == 34) // '('
+ {
+ shift(34); // '('
+ lookahead1W(154); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:'
+ whitespace();
+ parse_Literal();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(154); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:'
+ whitespace();
+ parse_Literal();
+ }
+ shift(37); // ')'
+ }
+ eventHandler.endNonterminal("Annotation", e0);
+ }
+
+ function try_Annotation()
+ {
+ shiftT(32); // '%'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_EQName();
+ lookahead1W(171); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 == 34) // '('
+ {
+ shiftT(34); // '('
+ lookahead1W(154); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:'
+ try_Literal();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(154); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:'
+ try_Literal();
+ }
+ shiftT(37); // ')'
+ }
+ }
+
+ function parse_VarDecl()
+ {
+ eventHandler.startNonterminal("VarDecl", e0);
+ shift(262); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(147); // S^WS | '(:' | ':=' | 'as' | 'external'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(106); // S^WS | '(:' | ':=' | 'external'
+ switch (l1)
+ {
+ case 52: // ':='
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_VarValue();
+ break;
+ default:
+ shift(133); // 'external'
+ lookahead1W(104); // S^WS | '(:' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_VarDefaultValue();
+ }
+ }
+ eventHandler.endNonterminal("VarDecl", e0);
+ }
+
+ function parse_VarValue()
+ {
+ eventHandler.startNonterminal("VarValue", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("VarValue", e0);
+ }
+
+ function parse_VarDefaultValue()
+ {
+ eventHandler.startNonterminal("VarDefaultValue", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("VarDefaultValue", e0);
+ }
+
+ function parse_ContextItemDecl()
+ {
+ eventHandler.startNonterminal("ContextItemDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(43); // S^WS | '(:' | 'context'
+ shift(101); // 'context'
+ lookahead1W(55); // S^WS | '(:' | 'item'
+ shift(165); // 'item'
+ lookahead1W(147); // S^WS | '(:' | ':=' | 'as' | 'external'
+ if (l1 == 79) // 'as'
+ {
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ItemType();
+ }
+ lookahead1W(106); // S^WS | '(:' | ':=' | 'external'
+ switch (l1)
+ {
+ case 52: // ':='
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_VarValue();
+ break;
+ default:
+ shift(133); // 'external'
+ lookahead1W(104); // S^WS | '(:' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_VarDefaultValue();
+ }
+ }
+ eventHandler.endNonterminal("ContextItemDecl", e0);
+ }
+
+ function parse_ParamList()
+ {
+ eventHandler.startNonterminal("ParamList", e0);
+ parse_Param();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_Param();
+ }
+ eventHandler.endNonterminal("ParamList", e0);
+ }
+
+ function try_ParamList()
+ {
+ try_Param();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_Param();
+ }
+ }
+
+ function parse_Param()
+ {
+ eventHandler.startNonterminal("Param", e0);
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(143); // S^WS | '(:' | ')' | ',' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ eventHandler.endNonterminal("Param", e0);
+ }
+
+ function try_Param()
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_EQName();
+ lookahead1W(143); // S^WS | '(:' | ')' | ',' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ }
+
+ function parse_FunctionBody()
+ {
+ eventHandler.startNonterminal("FunctionBody", e0);
+ parse_EnclosedExpr();
+ eventHandler.endNonterminal("FunctionBody", e0);
+ }
+
+ function try_FunctionBody()
+ {
+ try_EnclosedExpr();
+ }
+
+ function parse_EnclosedExpr()
+ {
+ eventHandler.startNonterminal("EnclosedExpr", e0);
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("EnclosedExpr", e0);
+ }
+
+ function try_EnclosedExpr()
+ {
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_OptionDecl()
+ {
+ eventHandler.startNonterminal("OptionDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(66); // S^WS | '(:' | 'option'
+ shift(199); // 'option'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("OptionDecl", e0);
+ }
+
+ function parse_Expr()
+ {
+ eventHandler.startNonterminal("Expr", e0);
+ parse_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("Expr", e0);
+ }
+
+ function try_Expr()
+ {
+ try_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ }
+
+ function parse_FLWORExpr()
+ {
+ eventHandler.startNonterminal("FLWORExpr", e0);
+ parse_InitialClause();
+ for (;;)
+ {
+ lookahead1W(173); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 220) // 'return'
+ {
+ break;
+ }
+ whitespace();
+ parse_IntermediateClause();
+ }
+ whitespace();
+ parse_ReturnClause();
+ eventHandler.endNonterminal("FLWORExpr", e0);
+ }
+
+ function try_FLWORExpr()
+ {
+ try_InitialClause();
+ for (;;)
+ {
+ lookahead1W(173); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 220) // 'return'
+ {
+ break;
+ }
+ try_IntermediateClause();
+ }
+ try_ReturnClause();
+ }
+
+ function parse_InitialClause()
+ {
+ eventHandler.startNonterminal("InitialClause", e0);
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(141); // S^WS | '$' | '(:' | 'sliding' | 'tumbling'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16009: // 'for' '$'
+ parse_ForClause();
+ break;
+ case 174: // 'let'
+ parse_LetClause();
+ break;
+ default:
+ parse_WindowClause();
+ }
+ eventHandler.endNonterminal("InitialClause", e0);
+ }
+
+ function try_InitialClause()
+ {
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(141); // S^WS | '$' | '(:' | 'sliding' | 'tumbling'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16009: // 'for' '$'
+ try_ForClause();
+ break;
+ case 174: // 'let'
+ try_LetClause();
+ break;
+ default:
+ try_WindowClause();
+ }
+ }
+
+ function parse_IntermediateClause()
+ {
+ eventHandler.startNonterminal("IntermediateClause", e0);
+ switch (l1)
+ {
+ case 137: // 'for'
+ case 174: // 'let'
+ parse_InitialClause();
+ break;
+ case 266: // 'where'
+ parse_WhereClause();
+ break;
+ case 148: // 'group'
+ parse_GroupByClause();
+ break;
+ case 105: // 'count'
+ parse_CountClause();
+ break;
+ default:
+ parse_OrderByClause();
+ }
+ eventHandler.endNonterminal("IntermediateClause", e0);
+ }
+
+ function try_IntermediateClause()
+ {
+ switch (l1)
+ {
+ case 137: // 'for'
+ case 174: // 'let'
+ try_InitialClause();
+ break;
+ case 266: // 'where'
+ try_WhereClause();
+ break;
+ case 148: // 'group'
+ try_GroupByClause();
+ break;
+ case 105: // 'count'
+ try_CountClause();
+ break;
+ default:
+ try_OrderByClause();
+ }
+ }
+
+ function parse_ForClause()
+ {
+ eventHandler.startNonterminal("ForClause", e0);
+ shift(137); // 'for'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_ForBinding();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_ForBinding();
+ }
+ eventHandler.endNonterminal("ForClause", e0);
+ }
+
+ function try_ForClause()
+ {
+ shiftT(137); // 'for'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_ForBinding();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_ForBinding();
+ }
+ }
+
+ function parse_ForBinding()
+ {
+ eventHandler.startNonterminal("ForBinding", e0);
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(164); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(158); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score'
+ if (l1 == 72) // 'allowing'
+ {
+ whitespace();
+ parse_AllowingEmpty();
+ }
+ lookahead1W(150); // S^WS | '(:' | 'at' | 'in' | 'score'
+ if (l1 == 81) // 'at'
+ {
+ whitespace();
+ parse_PositionalVar();
+ }
+ lookahead1W(122); // S^WS | '(:' | 'in' | 'score'
+ if (l1 == 228) // 'score'
+ {
+ whitespace();
+ parse_FTScoreVar();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ForBinding", e0);
+ }
+
+ function try_ForBinding()
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(164); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(158); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score'
+ if (l1 == 72) // 'allowing'
+ {
+ try_AllowingEmpty();
+ }
+ lookahead1W(150); // S^WS | '(:' | 'at' | 'in' | 'score'
+ if (l1 == 81) // 'at'
+ {
+ try_PositionalVar();
+ }
+ lookahead1W(122); // S^WS | '(:' | 'in' | 'score'
+ if (l1 == 228) // 'score'
+ {
+ try_FTScoreVar();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_AllowingEmpty()
+ {
+ eventHandler.startNonterminal("AllowingEmpty", e0);
+ shift(72); // 'allowing'
+ lookahead1W(49); // S^WS | '(:' | 'empty'
+ shift(123); // 'empty'
+ eventHandler.endNonterminal("AllowingEmpty", e0);
+ }
+
+ function try_AllowingEmpty()
+ {
+ shiftT(72); // 'allowing'
+ lookahead1W(49); // S^WS | '(:' | 'empty'
+ shiftT(123); // 'empty'
+ }
+
+ function parse_PositionalVar()
+ {
+ eventHandler.startNonterminal("PositionalVar", e0);
+ shift(81); // 'at'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("PositionalVar", e0);
+ }
+
+ function try_PositionalVar()
+ {
+ shiftT(81); // 'at'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_FTScoreVar()
+ {
+ eventHandler.startNonterminal("FTScoreVar", e0);
+ shift(228); // 'score'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("FTScoreVar", e0);
+ }
+
+ function try_FTScoreVar()
+ {
+ shiftT(228); // 'score'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_LetClause()
+ {
+ eventHandler.startNonterminal("LetClause", e0);
+ shift(174); // 'let'
+ lookahead1W(96); // S^WS | '$' | '(:' | 'score'
+ whitespace();
+ parse_LetBinding();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(96); // S^WS | '$' | '(:' | 'score'
+ whitespace();
+ parse_LetBinding();
+ }
+ eventHandler.endNonterminal("LetClause", e0);
+ }
+
+ function try_LetClause()
+ {
+ shiftT(174); // 'let'
+ lookahead1W(96); // S^WS | '$' | '(:' | 'score'
+ try_LetBinding();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(96); // S^WS | '$' | '(:' | 'score'
+ try_LetBinding();
+ }
+ }
+
+ function parse_LetBinding()
+ {
+ eventHandler.startNonterminal("LetBinding", e0);
+ switch (l1)
+ {
+ case 31: // '$'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(105); // S^WS | '(:' | ':=' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ break;
+ default:
+ parse_FTScoreVar();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("LetBinding", e0);
+ }
+
+ function try_LetBinding()
+ {
+ switch (l1)
+ {
+ case 31: // '$'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(105); // S^WS | '(:' | ':=' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ break;
+ default:
+ try_FTScoreVar();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowClause()
+ {
+ eventHandler.startNonterminal("WindowClause", e0);
+ shift(137); // 'for'
+ lookahead1W(135); // S^WS | '(:' | 'sliding' | 'tumbling'
+ switch (l1)
+ {
+ case 251: // 'tumbling'
+ whitespace();
+ parse_TumblingWindowClause();
+ break;
+ default:
+ whitespace();
+ parse_SlidingWindowClause();
+ }
+ eventHandler.endNonterminal("WindowClause", e0);
+ }
+
+ function try_WindowClause()
+ {
+ shiftT(137); // 'for'
+ lookahead1W(135); // S^WS | '(:' | 'sliding' | 'tumbling'
+ switch (l1)
+ {
+ case 251: // 'tumbling'
+ try_TumblingWindowClause();
+ break;
+ default:
+ try_SlidingWindowClause();
+ }
+ }
+
+ function parse_TumblingWindowClause()
+ {
+ eventHandler.startNonterminal("TumblingWindowClause", e0);
+ shift(251); // 'tumbling'
+ lookahead1W(85); // S^WS | '(:' | 'window'
+ shift(269); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ whitespace();
+ parse_WindowStartCondition();
+ if (l1 == 126 // 'end'
+ || l1 == 198) // 'only'
+ {
+ whitespace();
+ parse_WindowEndCondition();
+ }
+ eventHandler.endNonterminal("TumblingWindowClause", e0);
+ }
+
+ function try_TumblingWindowClause()
+ {
+ shiftT(251); // 'tumbling'
+ lookahead1W(85); // S^WS | '(:' | 'window'
+ shiftT(269); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ try_WindowStartCondition();
+ if (l1 == 126 // 'end'
+ || l1 == 198) // 'only'
+ {
+ try_WindowEndCondition();
+ }
+ }
+
+ function parse_SlidingWindowClause()
+ {
+ eventHandler.startNonterminal("SlidingWindowClause", e0);
+ shift(234); // 'sliding'
+ lookahead1W(85); // S^WS | '(:' | 'window'
+ shift(269); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ whitespace();
+ parse_WindowStartCondition();
+ whitespace();
+ parse_WindowEndCondition();
+ eventHandler.endNonterminal("SlidingWindowClause", e0);
+ }
+
+ function try_SlidingWindowClause()
+ {
+ shiftT(234); // 'sliding'
+ lookahead1W(85); // S^WS | '(:' | 'window'
+ shiftT(269); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ try_WindowStartCondition();
+ try_WindowEndCondition();
+ }
+
+ function parse_WindowStartCondition()
+ {
+ eventHandler.startNonterminal("WindowStartCondition", e0);
+ shift(237); // 'start'
+ lookahead1W(163); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ whitespace();
+ parse_WindowVars();
+ lookahead1W(83); // S^WS | '(:' | 'when'
+ shift(265); // 'when'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WindowStartCondition", e0);
+ }
+
+ function try_WindowStartCondition()
+ {
+ shiftT(237); // 'start'
+ lookahead1W(163); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ try_WindowVars();
+ lookahead1W(83); // S^WS | '(:' | 'when'
+ shiftT(265); // 'when'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowEndCondition()
+ {
+ eventHandler.startNonterminal("WindowEndCondition", e0);
+ if (l1 == 198) // 'only'
+ {
+ shift(198); // 'only'
+ }
+ lookahead1W(50); // S^WS | '(:' | 'end'
+ shift(126); // 'end'
+ lookahead1W(163); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ whitespace();
+ parse_WindowVars();
+ lookahead1W(83); // S^WS | '(:' | 'when'
+ shift(265); // 'when'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WindowEndCondition", e0);
+ }
+
+ function try_WindowEndCondition()
+ {
+ if (l1 == 198) // 'only'
+ {
+ shiftT(198); // 'only'
+ }
+ lookahead1W(50); // S^WS | '(:' | 'end'
+ shiftT(126); // 'end'
+ lookahead1W(163); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ try_WindowVars();
+ lookahead1W(83); // S^WS | '(:' | 'when'
+ shiftT(265); // 'when'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowVars()
+ {
+ eventHandler.startNonterminal("WindowVars", e0);
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CurrentItem();
+ }
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
+ if (l1 == 81) // 'at'
+ {
+ whitespace();
+ parse_PositionalVar();
+ }
+ lookahead1W(153); // S^WS | '(:' | 'next' | 'previous' | 'when'
+ if (l1 == 215) // 'previous'
+ {
+ shift(215); // 'previous'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_PreviousItem();
+ }
+ lookahead1W(127); // S^WS | '(:' | 'next' | 'when'
+ if (l1 == 187) // 'next'
+ {
+ shift(187); // 'next'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NextItem();
+ }
+ eventHandler.endNonterminal("WindowVars", e0);
+ }
+
+ function try_WindowVars()
+ {
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CurrentItem();
+ }
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
+ if (l1 == 81) // 'at'
+ {
+ try_PositionalVar();
+ }
+ lookahead1W(153); // S^WS | '(:' | 'next' | 'previous' | 'when'
+ if (l1 == 215) // 'previous'
+ {
+ shiftT(215); // 'previous'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_PreviousItem();
+ }
+ lookahead1W(127); // S^WS | '(:' | 'next' | 'when'
+ if (l1 == 187) // 'next'
+ {
+ shiftT(187); // 'next'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NextItem();
+ }
+ }
+
+ function parse_CurrentItem()
+ {
+ eventHandler.startNonterminal("CurrentItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("CurrentItem", e0);
+ }
+
+ function try_CurrentItem()
+ {
+ try_EQName();
+ }
+
+ function parse_PreviousItem()
+ {
+ eventHandler.startNonterminal("PreviousItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("PreviousItem", e0);
+ }
+
+ function try_PreviousItem()
+ {
+ try_EQName();
+ }
+
+ function parse_NextItem()
+ {
+ eventHandler.startNonterminal("NextItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("NextItem", e0);
+ }
+
+ function try_NextItem()
+ {
+ try_EQName();
+ }
+
+ function parse_CountClause()
+ {
+ eventHandler.startNonterminal("CountClause", e0);
+ shift(105); // 'count'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("CountClause", e0);
+ }
+
+ function try_CountClause()
+ {
+ shiftT(105); // 'count'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_WhereClause()
+ {
+ eventHandler.startNonterminal("WhereClause", e0);
+ shift(266); // 'where'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WhereClause", e0);
+ }
+
+ function try_WhereClause()
+ {
+ shiftT(266); // 'where'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_GroupByClause()
+ {
+ eventHandler.startNonterminal("GroupByClause", e0);
+ shift(148); // 'group'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shift(87); // 'by'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_GroupingSpecList();
+ eventHandler.endNonterminal("GroupByClause", e0);
+ }
+
+ function try_GroupByClause()
+ {
+ shiftT(148); // 'group'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shiftT(87); // 'by'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_GroupingSpecList();
+ }
+
+ function parse_GroupingSpecList()
+ {
+ eventHandler.startNonterminal("GroupingSpecList", e0);
+ parse_GroupingSpec();
+ for (;;)
+ {
+ lookahead1W(176); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_GroupingSpec();
+ }
+ eventHandler.endNonterminal("GroupingSpecList", e0);
+ }
+
+ function try_GroupingSpecList()
+ {
+ try_GroupingSpec();
+ for (;;)
+ {
+ lookahead1W(176); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_GroupingSpec();
+ }
+ }
+
+ function parse_GroupingSpec()
+ {
+ eventHandler.startNonterminal("GroupingSpec", e0);
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(183); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 52 // ':='
+ || l1 == 79) // 'as'
+ {
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ if (l1 == 94) // 'collation'
+ {
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ eventHandler.endNonterminal("GroupingSpec", e0);
+ }
+
+ function try_GroupingSpec()
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(183); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 52 // ':='
+ || l1 == 79) // 'as'
+ {
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 94) // 'collation'
+ {
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ }
+
+ function parse_OrderByClause()
+ {
+ eventHandler.startNonterminal("OrderByClause", e0);
+ switch (l1)
+ {
+ case 201: // 'order'
+ shift(201); // 'order'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shift(87); // 'by'
+ break;
+ default:
+ shift(236); // 'stable'
+ lookahead1W(67); // S^WS | '(:' | 'order'
+ shift(201); // 'order'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shift(87); // 'by'
+ }
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_OrderSpecList();
+ eventHandler.endNonterminal("OrderByClause", e0);
+ }
+
+ function try_OrderByClause()
+ {
+ switch (l1)
+ {
+ case 201: // 'order'
+ shiftT(201); // 'order'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shiftT(87); // 'by'
+ break;
+ default:
+ shiftT(236); // 'stable'
+ lookahead1W(67); // S^WS | '(:' | 'order'
+ shiftT(201); // 'order'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shiftT(87); // 'by'
+ }
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_OrderSpecList();
+ }
+
+ function parse_OrderSpecList()
+ {
+ eventHandler.startNonterminal("OrderSpecList", e0);
+ parse_OrderSpec();
+ for (;;)
+ {
+ lookahead1W(176); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_OrderSpec();
+ }
+ eventHandler.endNonterminal("OrderSpecList", e0);
+ }
+
+ function try_OrderSpecList()
+ {
+ try_OrderSpec();
+ for (;;)
+ {
+ lookahead1W(176); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_OrderSpec();
+ }
+ }
+
+ function parse_OrderSpec()
+ {
+ eventHandler.startNonterminal("OrderSpec", e0);
+ parse_ExprSingle();
+ whitespace();
+ parse_OrderModifier();
+ eventHandler.endNonterminal("OrderSpec", e0);
+ }
+
+ function try_OrderSpec()
+ {
+ try_ExprSingle();
+ try_OrderModifier();
+ }
+
+ function parse_OrderModifier()
+ {
+ eventHandler.startNonterminal("OrderModifier", e0);
+ if (l1 == 80 // 'ascending'
+ || l1 == 113) // 'descending'
+ {
+ switch (l1)
+ {
+ case 80: // 'ascending'
+ shift(80); // 'ascending'
+ break;
+ default:
+ shift(113); // 'descending'
+ }
+ }
+ lookahead1W(180); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ if (l1 == 123) // 'empty'
+ {
+ shift(123); // 'empty'
+ lookahead1W(121); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 147: // 'greatest'
+ shift(147); // 'greatest'
+ break;
+ default:
+ shift(173); // 'least'
+ }
+ }
+ lookahead1W(177); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' |
+ if (l1 == 94) // 'collation'
+ {
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ eventHandler.endNonterminal("OrderModifier", e0);
+ }
+
+ function try_OrderModifier()
+ {
+ if (l1 == 80 // 'ascending'
+ || l1 == 113) // 'descending'
+ {
+ switch (l1)
+ {
+ case 80: // 'ascending'
+ shiftT(80); // 'ascending'
+ break;
+ default:
+ shiftT(113); // 'descending'
+ }
+ }
+ lookahead1W(180); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ if (l1 == 123) // 'empty'
+ {
+ shiftT(123); // 'empty'
+ lookahead1W(121); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 147: // 'greatest'
+ shiftT(147); // 'greatest'
+ break;
+ default:
+ shiftT(173); // 'least'
+ }
+ }
+ lookahead1W(177); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' |
+ if (l1 == 94) // 'collation'
+ {
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ }
+
+ function parse_ReturnClause()
+ {
+ eventHandler.startNonterminal("ReturnClause", e0);
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ReturnClause", e0);
+ }
+
+ function try_ReturnClause()
+ {
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_QuantifiedExpr()
+ {
+ eventHandler.startNonterminal("QuantifiedExpr", e0);
+ switch (l1)
+ {
+ case 235: // 'some'
+ shift(235); // 'some'
+ break;
+ default:
+ shift(129); // 'every'
+ }
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ shift(224); // 'satisfies'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("QuantifiedExpr", e0);
+ }
+
+ function try_QuantifiedExpr()
+ {
+ switch (l1)
+ {
+ case 235: // 'some'
+ shiftT(235); // 'some'
+ break;
+ default:
+ shiftT(129); // 'every'
+ }
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ shiftT(224); // 'satisfies'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SwitchExpr()
+ {
+ eventHandler.startNonterminal("SwitchExpr", e0);
+ shift(243); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_SwitchCaseClause();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(109); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchExpr", e0);
+ }
+
+ function try_SwitchExpr()
+ {
+ shiftT(243); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ try_SwitchCaseClause();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(109); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SwitchCaseClause()
+ {
+ eventHandler.startNonterminal("SwitchCaseClause", e0);
+ for (;;)
+ {
+ shift(88); // 'case'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_SwitchCaseOperand();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchCaseClause", e0);
+ }
+
+ function try_SwitchCaseClause()
+ {
+ for (;;)
+ {
+ shiftT(88); // 'case'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_SwitchCaseOperand();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SwitchCaseOperand()
+ {
+ eventHandler.startNonterminal("SwitchCaseOperand", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchCaseOperand", e0);
+ }
+
+ function try_SwitchCaseOperand()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TypeswitchExpr()
+ {
+ eventHandler.startNonterminal("TypeswitchExpr", e0);
+ shift(253); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_CaseClause();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(109); // 'default'
+ lookahead1W(95); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TypeswitchExpr", e0);
+ }
+
+ function try_TypeswitchExpr()
+ {
+ shiftT(253); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ try_CaseClause();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(109); // 'default'
+ lookahead1W(95); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_CaseClause()
+ {
+ eventHandler.startNonterminal("CaseClause", e0);
+ shift(88); // 'case'
+ lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ }
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceTypeUnion();
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("CaseClause", e0);
+ }
+
+ function try_CaseClause()
+ {
+ shiftT(88); // 'case'
+ lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ }
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceTypeUnion();
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SequenceTypeUnion()
+ {
+ eventHandler.startNonterminal("SequenceTypeUnion", e0);
+ parse_SequenceType();
+ for (;;)
+ {
+ lookahead1W(134); // S^WS | '(:' | 'return' | '|'
+ if (l1 != 279) // '|'
+ {
+ break;
+ }
+ shift(279); // '|'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("SequenceTypeUnion", e0);
+ }
+
+ function try_SequenceTypeUnion()
+ {
+ try_SequenceType();
+ for (;;)
+ {
+ lookahead1W(134); // S^WS | '(:' | 'return' | '|'
+ if (l1 != 279) // '|'
+ {
+ break;
+ }
+ shiftT(279); // '|'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_IfExpr()
+ {
+ eventHandler.startNonterminal("IfExpr", e0);
+ shift(152); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ lookahead1W(77); // S^WS | '(:' | 'then'
+ shift(245); // 'then'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(122); // 'else'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("IfExpr", e0);
+ }
+
+ function try_IfExpr()
+ {
+ shiftT(152); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(37); // ')'
+ lookahead1W(77); // S^WS | '(:' | 'then'
+ shiftT(245); // 'then'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(122); // 'else'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_TryCatchExpr()
+ {
+ eventHandler.startNonterminal("TryCatchExpr", e0);
+ parse_TryClause();
+ for (;;)
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ whitespace();
+ parse_CatchClause();
+ lookahead1W(184); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' |
+ if (l1 != 91) // 'catch'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("TryCatchExpr", e0);
+ }
+
+ function try_TryCatchExpr()
+ {
+ try_TryClause();
+ for (;;)
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ try_CatchClause();
+ lookahead1W(184); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' |
+ if (l1 != 91) // 'catch'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_TryClause()
+ {
+ eventHandler.startNonterminal("TryClause", e0);
+ shift(250); // 'try'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_TryTargetExpr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("TryClause", e0);
+ }
+
+ function try_TryClause()
+ {
+ shiftT(250); // 'try'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_TryTargetExpr();
+ shiftT(282); // '}'
+ }
+
+ function parse_TryTargetExpr()
+ {
+ eventHandler.startNonterminal("TryTargetExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("TryTargetExpr", e0);
+ }
+
+ function try_TryTargetExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_CatchClause()
+ {
+ eventHandler.startNonterminal("CatchClause", e0);
+ shift(91); // 'catch'
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CatchErrorList();
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("CatchClause", e0);
+ }
+
+ function try_CatchClause()
+ {
+ shiftT(91); // 'catch'
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_CatchErrorList()
+ {
+ eventHandler.startNonterminal("CatchErrorList", e0);
+ parse_NameTest();
+ for (;;)
+ {
+ lookahead1W(136); // S^WS | '(:' | '{' | '|'
+ if (l1 != 279) // '|'
+ {
+ break;
+ }
+ shift(279); // '|'
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NameTest();
+ }
+ eventHandler.endNonterminal("CatchErrorList", e0);
+ }
+
+ function try_CatchErrorList()
+ {
+ try_NameTest();
+ for (;;)
+ {
+ lookahead1W(136); // S^WS | '(:' | '{' | '|'
+ if (l1 != 279) // '|'
+ {
+ break;
+ }
+ shiftT(279); // '|'
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NameTest();
+ }
+ }
+
+ function parse_OrExpr()
+ {
+ eventHandler.startNonterminal("OrExpr", e0);
+ parse_AndExpr();
+ for (;;)
+ {
+ if (l1 != 200) // 'or'
+ {
+ break;
+ }
+ shift(200); // 'or'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AndExpr();
+ }
+ eventHandler.endNonterminal("OrExpr", e0);
+ }
+
+ function try_OrExpr()
+ {
+ try_AndExpr();
+ for (;;)
+ {
+ if (l1 != 200) // 'or'
+ {
+ break;
+ }
+ shiftT(200); // 'or'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AndExpr();
+ }
+ }
+
+ function parse_AndExpr()
+ {
+ eventHandler.startNonterminal("AndExpr", e0);
+ parse_ComparisonExpr();
+ for (;;)
+ {
+ if (l1 != 75) // 'and'
+ {
+ break;
+ }
+ shift(75); // 'and'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ComparisonExpr();
+ }
+ eventHandler.endNonterminal("AndExpr", e0);
+ }
+
+ function try_AndExpr()
+ {
+ try_ComparisonExpr();
+ for (;;)
+ {
+ if (l1 != 75) // 'and'
+ {
+ break;
+ }
+ shiftT(75); // 'and'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ComparisonExpr();
+ }
+ }
+
+ function parse_ComparisonExpr()
+ {
+ eventHandler.startNonterminal("ComparisonExpr", e0);
+ parse_FTContainsExpr();
+ if (l1 == 27 // '!='
+ || l1 == 54 // '<'
+ || l1 == 57 // '<<'
+ || l1 == 58 // '<='
+ || l1 == 60 // '='
+ || l1 == 61 // '>'
+ || l1 == 62 // '>='
+ || l1 == 63 // '>>'
+ || l1 == 128 // 'eq'
+ || l1 == 146 // 'ge'
+ || l1 == 150 // 'gt'
+ || l1 == 164 // 'is'
+ || l1 == 172 // 'le'
+ || l1 == 178 // 'lt'
+ || l1 == 186) // 'ne'
+ {
+ switch (l1)
+ {
+ case 128: // 'eq'
+ case 146: // 'ge'
+ case 150: // 'gt'
+ case 172: // 'le'
+ case 178: // 'lt'
+ case 186: // 'ne'
+ whitespace();
+ parse_ValueComp();
+ break;
+ case 57: // '<<'
+ case 63: // '>>'
+ case 164: // 'is'
+ whitespace();
+ parse_NodeComp();
+ break;
+ default:
+ whitespace();
+ parse_GeneralComp();
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_FTContainsExpr();
+ }
+ eventHandler.endNonterminal("ComparisonExpr", e0);
+ }
+
+ function try_ComparisonExpr()
+ {
+ try_FTContainsExpr();
+ if (l1 == 27 // '!='
+ || l1 == 54 // '<'
+ || l1 == 57 // '<<'
+ || l1 == 58 // '<='
+ || l1 == 60 // '='
+ || l1 == 61 // '>'
+ || l1 == 62 // '>='
+ || l1 == 63 // '>>'
+ || l1 == 128 // 'eq'
+ || l1 == 146 // 'ge'
+ || l1 == 150 // 'gt'
+ || l1 == 164 // 'is'
+ || l1 == 172 // 'le'
+ || l1 == 178 // 'lt'
+ || l1 == 186) // 'ne'
+ {
+ switch (l1)
+ {
+ case 128: // 'eq'
+ case 146: // 'ge'
+ case 150: // 'gt'
+ case 172: // 'le'
+ case 178: // 'lt'
+ case 186: // 'ne'
+ try_ValueComp();
+ break;
+ case 57: // '<<'
+ case 63: // '>>'
+ case 164: // 'is'
+ try_NodeComp();
+ break;
+ default:
+ try_GeneralComp();
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_FTContainsExpr();
+ }
+ }
+
+ function parse_FTContainsExpr()
+ {
+ eventHandler.startNonterminal("FTContainsExpr", e0);
+ parse_StringConcatExpr();
+ if (l1 == 99) // 'contains'
+ {
+ shift(99); // 'contains'
+ lookahead1W(76); // S^WS | '(:' | 'text'
+ shift(244); // 'text'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTSelection();
+ if (l1 == 271) // 'without'
+ {
+ whitespace();
+ parse_FTIgnoreOption();
+ }
+ }
+ eventHandler.endNonterminal("FTContainsExpr", e0);
+ }
+
+ function try_FTContainsExpr()
+ {
+ try_StringConcatExpr();
+ if (l1 == 99) // 'contains'
+ {
+ shiftT(99); // 'contains'
+ lookahead1W(76); // S^WS | '(:' | 'text'
+ shiftT(244); // 'text'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTSelection();
+ if (l1 == 271) // 'without'
+ {
+ try_FTIgnoreOption();
+ }
+ }
+ }
+
+ function parse_StringConcatExpr()
+ {
+ eventHandler.startNonterminal("StringConcatExpr", e0);
+ parse_RangeExpr();
+ for (;;)
+ {
+ if (l1 != 280) // '||'
+ {
+ break;
+ }
+ shift(280); // '||'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_RangeExpr();
+ }
+ eventHandler.endNonterminal("StringConcatExpr", e0);
+ }
+
+ function try_StringConcatExpr()
+ {
+ try_RangeExpr();
+ for (;;)
+ {
+ if (l1 != 280) // '||'
+ {
+ break;
+ }
+ shiftT(280); // '||'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_RangeExpr();
+ }
+ }
+
+ function parse_RangeExpr()
+ {
+ eventHandler.startNonterminal("RangeExpr", e0);
+ parse_AdditiveExpr();
+ if (l1 == 248) // 'to'
+ {
+ shift(248); // 'to'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ eventHandler.endNonterminal("RangeExpr", e0);
+ }
+
+ function try_RangeExpr()
+ {
+ try_AdditiveExpr();
+ if (l1 == 248) // 'to'
+ {
+ shiftT(248); // 'to'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ }
+ }
+
+ function parse_AdditiveExpr()
+ {
+ eventHandler.startNonterminal("AdditiveExpr", e0);
+ parse_MultiplicativeExpr();
+ for (;;)
+ {
+ if (l1 != 40 // '+'
+ && l1 != 42) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 40: // '+'
+ shift(40); // '+'
+ break;
+ default:
+ shift(42); // '-'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_MultiplicativeExpr();
+ }
+ eventHandler.endNonterminal("AdditiveExpr", e0);
+ }
+
+ function try_AdditiveExpr()
+ {
+ try_MultiplicativeExpr();
+ for (;;)
+ {
+ if (l1 != 40 // '+'
+ && l1 != 42) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 40: // '+'
+ shiftT(40); // '+'
+ break;
+ default:
+ shiftT(42); // '-'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_MultiplicativeExpr();
+ }
+ }
+
+ function parse_MultiplicativeExpr()
+ {
+ eventHandler.startNonterminal("MultiplicativeExpr", e0);
+ parse_UnionExpr();
+ for (;;)
+ {
+ if (l1 != 38 // '*'
+ && l1 != 118 // 'div'
+ && l1 != 151 // 'idiv'
+ && l1 != 180) // 'mod'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 38: // '*'
+ shift(38); // '*'
+ break;
+ case 118: // 'div'
+ shift(118); // 'div'
+ break;
+ case 151: // 'idiv'
+ shift(151); // 'idiv'
+ break;
+ default:
+ shift(180); // 'mod'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_UnionExpr();
+ }
+ eventHandler.endNonterminal("MultiplicativeExpr", e0);
+ }
+
+ function try_MultiplicativeExpr()
+ {
+ try_UnionExpr();
+ for (;;)
+ {
+ if (l1 != 38 // '*'
+ && l1 != 118 // 'div'
+ && l1 != 151 // 'idiv'
+ && l1 != 180) // 'mod'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 38: // '*'
+ shiftT(38); // '*'
+ break;
+ case 118: // 'div'
+ shiftT(118); // 'div'
+ break;
+ case 151: // 'idiv'
+ shiftT(151); // 'idiv'
+ break;
+ default:
+ shiftT(180); // 'mod'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_UnionExpr();
+ }
+ }
+
+ function parse_UnionExpr()
+ {
+ eventHandler.startNonterminal("UnionExpr", e0);
+ parse_IntersectExceptExpr();
+ for (;;)
+ {
+ if (l1 != 254 // 'union'
+ && l1 != 279) // '|'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 254: // 'union'
+ shift(254); // 'union'
+ break;
+ default:
+ shift(279); // '|'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_IntersectExceptExpr();
+ }
+ eventHandler.endNonterminal("UnionExpr", e0);
+ }
+
+ function try_UnionExpr()
+ {
+ try_IntersectExceptExpr();
+ for (;;)
+ {
+ if (l1 != 254 // 'union'
+ && l1 != 279) // '|'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 254: // 'union'
+ shiftT(254); // 'union'
+ break;
+ default:
+ shiftT(279); // '|'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_IntersectExceptExpr();
+ }
+ }
+
+ function parse_IntersectExceptExpr()
+ {
+ eventHandler.startNonterminal("IntersectExceptExpr", e0);
+ parse_InstanceofExpr();
+ for (;;)
+ {
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 != 131 // 'except'
+ && l1 != 162) // 'intersect'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 162: // 'intersect'
+ shift(162); // 'intersect'
+ break;
+ default:
+ shift(131); // 'except'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_InstanceofExpr();
+ }
+ eventHandler.endNonterminal("IntersectExceptExpr", e0);
+ }
+
+ function try_IntersectExceptExpr()
+ {
+ try_InstanceofExpr();
+ for (;;)
+ {
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 != 131 // 'except'
+ && l1 != 162) // 'intersect'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 162: // 'intersect'
+ shiftT(162); // 'intersect'
+ break;
+ default:
+ shiftT(131); // 'except'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_InstanceofExpr();
+ }
+ }
+
+ function parse_InstanceofExpr()
+ {
+ eventHandler.startNonterminal("InstanceofExpr", e0);
+ parse_TreatExpr();
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 160) // 'instance'
+ {
+ shift(160); // 'instance'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shift(196); // 'of'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("InstanceofExpr", e0);
+ }
+
+ function try_InstanceofExpr()
+ {
+ try_TreatExpr();
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 160) // 'instance'
+ {
+ shiftT(160); // 'instance'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shiftT(196); // 'of'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_TreatExpr()
+ {
+ eventHandler.startNonterminal("TreatExpr", e0);
+ parse_CastableExpr();
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 249) // 'treat'
+ {
+ shift(249); // 'treat'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("TreatExpr", e0);
+ }
+
+ function try_TreatExpr()
+ {
+ try_CastableExpr();
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 249) // 'treat'
+ {
+ shiftT(249); // 'treat'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_CastableExpr()
+ {
+ eventHandler.startNonterminal("CastableExpr", e0);
+ parse_CastExpr();
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 90) // 'castable'
+ {
+ shift(90); // 'castable'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SingleType();
+ }
+ eventHandler.endNonterminal("CastableExpr", e0);
+ }
+
+ function try_CastableExpr()
+ {
+ try_CastExpr();
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 90) // 'castable'
+ {
+ shiftT(90); // 'castable'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SingleType();
+ }
+ }
+
+ function parse_CastExpr()
+ {
+ eventHandler.startNonterminal("CastExpr", e0);
+ parse_UnaryExpr();
+ lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 89) // 'cast'
+ {
+ shift(89); // 'cast'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SingleType();
+ }
+ eventHandler.endNonterminal("CastExpr", e0);
+ }
+
+ function try_CastExpr()
+ {
+ try_UnaryExpr();
+ lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 89) // 'cast'
+ {
+ shiftT(89); // 'cast'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SingleType();
+ }
+ }
+
+ function parse_UnaryExpr()
+ {
+ eventHandler.startNonterminal("UnaryExpr", e0);
+ for (;;)
+ {
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 40 // '+'
+ && l1 != 42) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 42: // '-'
+ shift(42); // '-'
+ break;
+ default:
+ shift(40); // '+'
+ }
+ }
+ whitespace();
+ parse_ValueExpr();
+ eventHandler.endNonterminal("UnaryExpr", e0);
+ }
+
+ function try_UnaryExpr()
+ {
+ for (;;)
+ {
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 40 // '+'
+ && l1 != 42) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 42: // '-'
+ shiftT(42); // '-'
+ break;
+ default:
+ shiftT(40); // '+'
+ }
+ }
+ try_ValueExpr();
+ }
+
+ function parse_ValueExpr()
+ {
+ eventHandler.startNonterminal("ValueExpr", e0);
+ switch (l1)
+ {
+ case 260: // 'validate'
+ lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 87812: // 'validate' 'lax'
+ case 123140: // 'validate' 'strict'
+ case 129284: // 'validate' 'type'
+ case 141572: // 'validate' '{'
+ parse_ValidateExpr();
+ break;
+ case 35: // '(#'
+ parse_ExtensionExpr();
+ break;
+ default:
+ parse_SimpleMapExpr();
+ }
+ eventHandler.endNonterminal("ValueExpr", e0);
+ }
+
+ function try_ValueExpr()
+ {
+ switch (l1)
+ {
+ case 260: // 'validate'
+ lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 87812: // 'validate' 'lax'
+ case 123140: // 'validate' 'strict'
+ case 129284: // 'validate' 'type'
+ case 141572: // 'validate' '{'
+ try_ValidateExpr();
+ break;
+ case 35: // '(#'
+ try_ExtensionExpr();
+ break;
+ default:
+ try_SimpleMapExpr();
+ }
+ }
+
+ function parse_SimpleMapExpr()
+ {
+ eventHandler.startNonterminal("SimpleMapExpr", e0);
+ parse_PathExpr();
+ for (;;)
+ {
+ if (l1 != 26) // '!'
+ {
+ break;
+ }
+ shift(26); // '!'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PathExpr();
+ }
+ eventHandler.endNonterminal("SimpleMapExpr", e0);
+ }
+
+ function try_SimpleMapExpr()
+ {
+ try_PathExpr();
+ for (;;)
+ {
+ if (l1 != 26) // '!'
+ {
+ break;
+ }
+ shiftT(26); // '!'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_PathExpr();
+ }
+ }
+
+ function parse_GeneralComp()
+ {
+ eventHandler.startNonterminal("GeneralComp", e0);
+ switch (l1)
+ {
+ case 60: // '='
+ shift(60); // '='
+ break;
+ case 27: // '!='
+ shift(27); // '!='
+ break;
+ case 54: // '<'
+ shift(54); // '<'
+ break;
+ case 58: // '<='
+ shift(58); // '<='
+ break;
+ case 61: // '>'
+ shift(61); // '>'
+ break;
+ default:
+ shift(62); // '>='
+ }
+ eventHandler.endNonterminal("GeneralComp", e0);
+ }
+
+ function try_GeneralComp()
+ {
+ switch (l1)
+ {
+ case 60: // '='
+ shiftT(60); // '='
+ break;
+ case 27: // '!='
+ shiftT(27); // '!='
+ break;
+ case 54: // '<'
+ shiftT(54); // '<'
+ break;
+ case 58: // '<='
+ shiftT(58); // '<='
+ break;
+ case 61: // '>'
+ shiftT(61); // '>'
+ break;
+ default:
+ shiftT(62); // '>='
+ }
+ }
+
+ function parse_ValueComp()
+ {
+ eventHandler.startNonterminal("ValueComp", e0);
+ switch (l1)
+ {
+ case 128: // 'eq'
+ shift(128); // 'eq'
+ break;
+ case 186: // 'ne'
+ shift(186); // 'ne'
+ break;
+ case 178: // 'lt'
+ shift(178); // 'lt'
+ break;
+ case 172: // 'le'
+ shift(172); // 'le'
+ break;
+ case 150: // 'gt'
+ shift(150); // 'gt'
+ break;
+ default:
+ shift(146); // 'ge'
+ }
+ eventHandler.endNonterminal("ValueComp", e0);
+ }
+
+ function try_ValueComp()
+ {
+ switch (l1)
+ {
+ case 128: // 'eq'
+ shiftT(128); // 'eq'
+ break;
+ case 186: // 'ne'
+ shiftT(186); // 'ne'
+ break;
+ case 178: // 'lt'
+ shiftT(178); // 'lt'
+ break;
+ case 172: // 'le'
+ shiftT(172); // 'le'
+ break;
+ case 150: // 'gt'
+ shiftT(150); // 'gt'
+ break;
+ default:
+ shiftT(146); // 'ge'
+ }
+ }
+
+ function parse_NodeComp()
+ {
+ eventHandler.startNonterminal("NodeComp", e0);
+ switch (l1)
+ {
+ case 164: // 'is'
+ shift(164); // 'is'
+ break;
+ case 57: // '<<'
+ shift(57); // '<<'
+ break;
+ default:
+ shift(63); // '>>'
+ }
+ eventHandler.endNonterminal("NodeComp", e0);
+ }
+
+ function try_NodeComp()
+ {
+ switch (l1)
+ {
+ case 164: // 'is'
+ shiftT(164); // 'is'
+ break;
+ case 57: // '<<'
+ shiftT(57); // '<<'
+ break;
+ default:
+ shiftT(63); // '>>'
+ }
+ }
+
+ function parse_ValidateExpr()
+ {
+ eventHandler.startNonterminal("ValidateExpr", e0);
+ shift(260); // 'validate'
+ lookahead1W(160); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{'
+ if (l1 != 276) // '{'
+ {
+ switch (l1)
+ {
+ case 252: // 'type'
+ shift(252); // 'type'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ break;
+ default:
+ whitespace();
+ parse_ValidationMode();
+ }
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("ValidateExpr", e0);
+ }
+
+ function try_ValidateExpr()
+ {
+ shiftT(260); // 'validate'
+ lookahead1W(160); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{'
+ if (l1 != 276) // '{'
+ {
+ switch (l1)
+ {
+ case 252: // 'type'
+ shiftT(252); // 'type'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ break;
+ default:
+ try_ValidationMode();
+ }
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_ValidationMode()
+ {
+ eventHandler.startNonterminal("ValidationMode", e0);
+ switch (l1)
+ {
+ case 171: // 'lax'
+ shift(171); // 'lax'
+ break;
+ default:
+ shift(240); // 'strict'
+ }
+ eventHandler.endNonterminal("ValidationMode", e0);
+ }
+
+ function try_ValidationMode()
+ {
+ switch (l1)
+ {
+ case 171: // 'lax'
+ shiftT(171); // 'lax'
+ break;
+ default:
+ shiftT(240); // 'strict'
+ }
+ }
+
+ function parse_ExtensionExpr()
+ {
+ eventHandler.startNonterminal("ExtensionExpr", e0);
+ for (;;)
+ {
+ whitespace();
+ parse_Pragma();
+ lookahead1W(100); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 35) // '(#'
+ {
+ break;
+ }
+ }
+ shift(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("ExtensionExpr", e0);
+ }
+
+ function try_ExtensionExpr()
+ {
+ for (;;)
+ {
+ try_Pragma();
+ lookahead1W(100); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 35) // '(#'
+ {
+ break;
+ }
+ }
+ shiftT(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ try_Expr();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_Pragma()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ shift(35); // '(#'
+ lookahead1(248); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ parse_EQName();
+ lookahead1(10); // S | '#)'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ lookahead1(0); // PragmaContents
+ shift(1); // PragmaContents
+ }
+ lookahead1(5); // '#)'
+ shift(30); // '#)'
+ eventHandler.endNonterminal("Pragma", e0);
+ }
+
+ function try_Pragma()
+ {
+ shiftT(35); // '(#'
+ lookahead1(248); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ try_EQName();
+ lookahead1(10); // S | '#)'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ lookahead1(0); // PragmaContents
+ shiftT(1); // PragmaContents
+ }
+ lookahead1(5); // '#)'
+ shiftT(30); // '#)'
+ }
+
+ function parse_PathExpr()
+ {
+ eventHandler.startNonterminal("PathExpr", e0);
+ switch (l1)
+ {
+ case 46: // '/'
+ shift(46); // '/'
+ lookahead1W(283); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 25: // EOF
+ case 26: // '!'
+ case 27: // '!='
+ case 37: // ')'
+ case 38: // '*'
+ case 40: // '+'
+ case 41: // ','
+ case 42: // '-'
+ case 49: // ':'
+ case 53: // ';'
+ case 57: // '<<'
+ case 58: // '<='
+ case 60: // '='
+ case 61: // '>'
+ case 62: // '>='
+ case 63: // '>>'
+ case 69: // ']'
+ case 87: // 'by'
+ case 99: // 'contains'
+ case 205: // 'paragraphs'
+ case 232: // 'sentences'
+ case 247: // 'times'
+ case 273: // 'words'
+ case 279: // '|'
+ case 280: // '||'
+ case 281: // '|}'
+ case 282: // '}'
+ break;
+ default:
+ whitespace();
+ parse_RelativePathExpr();
+ }
+ break;
+ case 47: // '//'
+ shift(47); // '//'
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_RelativePathExpr();
+ break;
+ default:
+ parse_RelativePathExpr();
+ }
+ eventHandler.endNonterminal("PathExpr", e0);
+ }
+
+ function try_PathExpr()
+ {
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ lookahead1W(283); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 25: // EOF
+ case 26: // '!'
+ case 27: // '!='
+ case 37: // ')'
+ case 38: // '*'
+ case 40: // '+'
+ case 41: // ','
+ case 42: // '-'
+ case 49: // ':'
+ case 53: // ';'
+ case 57: // '<<'
+ case 58: // '<='
+ case 60: // '='
+ case 61: // '>'
+ case 62: // '>='
+ case 63: // '>>'
+ case 69: // ']'
+ case 87: // 'by'
+ case 99: // 'contains'
+ case 205: // 'paragraphs'
+ case 232: // 'sentences'
+ case 247: // 'times'
+ case 273: // 'words'
+ case 279: // '|'
+ case 280: // '||'
+ case 281: // '|}'
+ case 282: // '}'
+ break;
+ default:
+ try_RelativePathExpr();
+ }
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_RelativePathExpr();
+ break;
+ default:
+ try_RelativePathExpr();
+ }
+ }
+
+ function parse_RelativePathExpr()
+ {
+ eventHandler.startNonterminal("RelativePathExpr", e0);
+ parse_StepExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 27 // '!='
+ && lk != 37 // ')'
+ && lk != 38 // '*'
+ && lk != 40 // '+'
+ && lk != 41 // ','
+ && lk != 42 // '-'
+ && lk != 46 // '/'
+ && lk != 47 // '//'
+ && lk != 49 // ':'
+ && lk != 53 // ';'
+ && lk != 54 // '<'
+ && lk != 57 // '<<'
+ && lk != 58 // '<='
+ && lk != 60 // '='
+ && lk != 61 // '>'
+ && lk != 62 // '>='
+ && lk != 63 // '>>'
+ && lk != 69 // ']'
+ && lk != 70 // 'after'
+ && lk != 75 // 'and'
+ && lk != 79 // 'as'
+ && lk != 80 // 'ascending'
+ && lk != 81 // 'at'
+ && lk != 84 // 'before'
+ && lk != 87 // 'by'
+ && lk != 88 // 'case'
+ && lk != 89 // 'cast'
+ && lk != 90 // 'castable'
+ && lk != 94 // 'collation'
+ && lk != 99 // 'contains'
+ && lk != 105 // 'count'
+ && lk != 109 // 'default'
+ && lk != 113 // 'descending'
+ && lk != 118 // 'div'
+ && lk != 122 // 'else'
+ && lk != 123 // 'empty'
+ && lk != 126 // 'end'
+ && lk != 128 // 'eq'
+ && lk != 131 // 'except'
+ && lk != 137 // 'for'
+ && lk != 146 // 'ge'
+ && lk != 148 // 'group'
+ && lk != 150 // 'gt'
+ && lk != 151 // 'idiv'
+ && lk != 160 // 'instance'
+ && lk != 162 // 'intersect'
+ && lk != 163 // 'into'
+ && lk != 164 // 'is'
+ && lk != 172 // 'le'
+ && lk != 174 // 'let'
+ && lk != 178 // 'lt'
+ && lk != 180 // 'mod'
+ && lk != 181 // 'modify'
+ && lk != 186 // 'ne'
+ && lk != 198 // 'only'
+ && lk != 200 // 'or'
+ && lk != 201 // 'order'
+ && lk != 205 // 'paragraphs'
+ && lk != 220 // 'return'
+ && lk != 224 // 'satisfies'
+ && lk != 232 // 'sentences'
+ && lk != 236 // 'stable'
+ && lk != 237 // 'start'
+ && lk != 247 // 'times'
+ && lk != 248 // 'to'
+ && lk != 249 // 'treat'
+ && lk != 254 // 'union'
+ && lk != 266 // 'where'
+ && lk != 270 // 'with'
+ && lk != 273 // 'words'
+ && lk != 279 // '|'
+ && lk != 280 // '||'
+ && lk != 281 // '|}'
+ && lk != 282 // '}'
+ && lk != 23578 // '!' '/'
+ && lk != 24090) // '!' '//'
+ {
+ lk = memoized(2, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(2, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 46 // '/'
+ && lk != 47) // '//'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 46: // '/'
+ shift(46); // '/'
+ break;
+ case 47: // '//'
+ shift(47); // '//'
+ break;
+ default:
+ shift(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_StepExpr();
+ }
+ eventHandler.endNonterminal("RelativePathExpr", e0);
+ }
+
+ function try_RelativePathExpr()
+ {
+ try_StepExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 27 // '!='
+ && lk != 37 // ')'
+ && lk != 38 // '*'
+ && lk != 40 // '+'
+ && lk != 41 // ','
+ && lk != 42 // '-'
+ && lk != 46 // '/'
+ && lk != 47 // '//'
+ && lk != 49 // ':'
+ && lk != 53 // ';'
+ && lk != 54 // '<'
+ && lk != 57 // '<<'
+ && lk != 58 // '<='
+ && lk != 60 // '='
+ && lk != 61 // '>'
+ && lk != 62 // '>='
+ && lk != 63 // '>>'
+ && lk != 69 // ']'
+ && lk != 70 // 'after'
+ && lk != 75 // 'and'
+ && lk != 79 // 'as'
+ && lk != 80 // 'ascending'
+ && lk != 81 // 'at'
+ && lk != 84 // 'before'
+ && lk != 87 // 'by'
+ && lk != 88 // 'case'
+ && lk != 89 // 'cast'
+ && lk != 90 // 'castable'
+ && lk != 94 // 'collation'
+ && lk != 99 // 'contains'
+ && lk != 105 // 'count'
+ && lk != 109 // 'default'
+ && lk != 113 // 'descending'
+ && lk != 118 // 'div'
+ && lk != 122 // 'else'
+ && lk != 123 // 'empty'
+ && lk != 126 // 'end'
+ && lk != 128 // 'eq'
+ && lk != 131 // 'except'
+ && lk != 137 // 'for'
+ && lk != 146 // 'ge'
+ && lk != 148 // 'group'
+ && lk != 150 // 'gt'
+ && lk != 151 // 'idiv'
+ && lk != 160 // 'instance'
+ && lk != 162 // 'intersect'
+ && lk != 163 // 'into'
+ && lk != 164 // 'is'
+ && lk != 172 // 'le'
+ && lk != 174 // 'let'
+ && lk != 178 // 'lt'
+ && lk != 180 // 'mod'
+ && lk != 181 // 'modify'
+ && lk != 186 // 'ne'
+ && lk != 198 // 'only'
+ && lk != 200 // 'or'
+ && lk != 201 // 'order'
+ && lk != 205 // 'paragraphs'
+ && lk != 220 // 'return'
+ && lk != 224 // 'satisfies'
+ && lk != 232 // 'sentences'
+ && lk != 236 // 'stable'
+ && lk != 237 // 'start'
+ && lk != 247 // 'times'
+ && lk != 248 // 'to'
+ && lk != 249 // 'treat'
+ && lk != 254 // 'union'
+ && lk != 266 // 'where'
+ && lk != 270 // 'with'
+ && lk != 273 // 'words'
+ && lk != 279 // '|'
+ && lk != 280 // '||'
+ && lk != 281 // '|}'
+ && lk != 282 // '}'
+ && lk != 23578 // '!' '/'
+ && lk != 24090) // '!' '//'
+ {
+ lk = memoized(2, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(2, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 46 // '/'
+ && lk != 47) // '//'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ }
+ }
+
+ function parse_StepExpr()
+ {
+ eventHandler.startNonterminal("StepExpr", e0);
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(282); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 121: // 'element'
+ lookahead2W(279); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(280); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 256: // 'unordered'
+ lookahead2W(245); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 124: // 'empty-sequence'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 229: // 'self'
+ lookahead2W(244); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 86: // 'break'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 102: // 'continue'
+ case 103: // 'copy'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 110: // 'delete'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 120: // 'document-node'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 129: // 'every'
+ case 131: // 'except'
+ case 132: // 'exit'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 137: // 'for'
+ case 141: // 'ft-option'
+ case 145: // 'function'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 159: // 'insert'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 174: // 'let'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 185: // 'namespace-node'
+ case 186: // 'ne'
+ case 191: // 'node'
+ case 192: // 'nodes'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 218: // 'rename'
+ case 219: // 'replace'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 228: // 'score'
+ case 234: // 'sliding'
+ case 235: // 'some'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 250: // 'try'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 260: // 'validate'
+ case 261: // 'value'
+ case 262: // 'variable'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(242); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 35922 // 'attribute' 'after'
+ || lk == 35961 // 'element' 'after'
+ || lk == 36024 // 'namespace' 'after'
+ || lk == 36056 // 'processing-instruction' 'after'
+ || lk == 38482 // 'attribute' 'and'
+ || lk == 38521 // 'element' 'and'
+ || lk == 38584 // 'namespace' 'and'
+ || lk == 38616 // 'processing-instruction' 'and'
+ || lk == 40530 // 'attribute' 'as'
+ || lk == 40569 // 'element' 'as'
+ || lk == 40632 // 'namespace' 'as'
+ || lk == 40664 // 'processing-instruction' 'as'
+ || lk == 41042 // 'attribute' 'ascending'
+ || lk == 41081 // 'element' 'ascending'
+ || lk == 41144 // 'namespace' 'ascending'
+ || lk == 41176 // 'processing-instruction' 'ascending'
+ || lk == 41554 // 'attribute' 'at'
+ || lk == 41593 // 'element' 'at'
+ || lk == 41656 // 'namespace' 'at'
+ || lk == 41688 // 'processing-instruction' 'at'
+ || lk == 43090 // 'attribute' 'before'
+ || lk == 43129 // 'element' 'before'
+ || lk == 43192 // 'namespace' 'before'
+ || lk == 43224 // 'processing-instruction' 'before'
+ || lk == 45138 // 'attribute' 'case'
+ || lk == 45177 // 'element' 'case'
+ || lk == 45240 // 'namespace' 'case'
+ || lk == 45272 // 'processing-instruction' 'case'
+ || lk == 45650 // 'attribute' 'cast'
+ || lk == 45689 // 'element' 'cast'
+ || lk == 45752 // 'namespace' 'cast'
+ || lk == 45784 // 'processing-instruction' 'cast'
+ || lk == 46162 // 'attribute' 'castable'
+ || lk == 46201 // 'element' 'castable'
+ || lk == 46264 // 'namespace' 'castable'
+ || lk == 46296 // 'processing-instruction' 'castable'
+ || lk == 48210 // 'attribute' 'collation'
+ || lk == 48249 // 'element' 'collation'
+ || lk == 48312 // 'namespace' 'collation'
+ || lk == 48344 // 'processing-instruction' 'collation'
+ || lk == 53842 // 'attribute' 'count'
+ || lk == 53881 // 'element' 'count'
+ || lk == 53944 // 'namespace' 'count'
+ || lk == 53976 // 'processing-instruction' 'count'
+ || lk == 55890 // 'attribute' 'default'
+ || lk == 55929 // 'element' 'default'
+ || lk == 55992 // 'namespace' 'default'
+ || lk == 56024 // 'processing-instruction' 'default'
+ || lk == 57938 // 'attribute' 'descending'
+ || lk == 57977 // 'element' 'descending'
+ || lk == 58040 // 'namespace' 'descending'
+ || lk == 58072 // 'processing-instruction' 'descending'
+ || lk == 60498 // 'attribute' 'div'
+ || lk == 60537 // 'element' 'div'
+ || lk == 60600 // 'namespace' 'div'
+ || lk == 60632 // 'processing-instruction' 'div'
+ || lk == 62546 // 'attribute' 'else'
+ || lk == 62585 // 'element' 'else'
+ || lk == 62648 // 'namespace' 'else'
+ || lk == 62680 // 'processing-instruction' 'else'
+ || lk == 63058 // 'attribute' 'empty'
+ || lk == 63097 // 'element' 'empty'
+ || lk == 63160 // 'namespace' 'empty'
+ || lk == 63192 // 'processing-instruction' 'empty'
+ || lk == 64594 // 'attribute' 'end'
+ || lk == 64633 // 'element' 'end'
+ || lk == 64696 // 'namespace' 'end'
+ || lk == 64728 // 'processing-instruction' 'end'
+ || lk == 65618 // 'attribute' 'eq'
+ || lk == 65657 // 'element' 'eq'
+ || lk == 65720 // 'namespace' 'eq'
+ || lk == 65752 // 'processing-instruction' 'eq'
+ || lk == 67154 // 'attribute' 'except'
+ || lk == 67193 // 'element' 'except'
+ || lk == 67256 // 'namespace' 'except'
+ || lk == 67288 // 'processing-instruction' 'except'
+ || lk == 70226 // 'attribute' 'for'
+ || lk == 70265 // 'element' 'for'
+ || lk == 70328 // 'namespace' 'for'
+ || lk == 70360 // 'processing-instruction' 'for'
+ || lk == 74834 // 'attribute' 'ge'
+ || lk == 74873 // 'element' 'ge'
+ || lk == 74936 // 'namespace' 'ge'
+ || lk == 74968 // 'processing-instruction' 'ge'
+ || lk == 75858 // 'attribute' 'group'
+ || lk == 75897 // 'element' 'group'
+ || lk == 75960 // 'namespace' 'group'
+ || lk == 75992 // 'processing-instruction' 'group'
+ || lk == 76882 // 'attribute' 'gt'
+ || lk == 76921 // 'element' 'gt'
+ || lk == 76984 // 'namespace' 'gt'
+ || lk == 77016 // 'processing-instruction' 'gt'
+ || lk == 77394 // 'attribute' 'idiv'
+ || lk == 77433 // 'element' 'idiv'
+ || lk == 77496 // 'namespace' 'idiv'
+ || lk == 77528 // 'processing-instruction' 'idiv'
+ || lk == 82002 // 'attribute' 'instance'
+ || lk == 82041 // 'element' 'instance'
+ || lk == 82104 // 'namespace' 'instance'
+ || lk == 82136 // 'processing-instruction' 'instance'
+ || lk == 83026 // 'attribute' 'intersect'
+ || lk == 83065 // 'element' 'intersect'
+ || lk == 83128 // 'namespace' 'intersect'
+ || lk == 83160 // 'processing-instruction' 'intersect'
+ || lk == 83538 // 'attribute' 'into'
+ || lk == 83577 // 'element' 'into'
+ || lk == 83640 // 'namespace' 'into'
+ || lk == 83672 // 'processing-instruction' 'into'
+ || lk == 84050 // 'attribute' 'is'
+ || lk == 84089 // 'element' 'is'
+ || lk == 84152 // 'namespace' 'is'
+ || lk == 84184 // 'processing-instruction' 'is'
+ || lk == 88146 // 'attribute' 'le'
+ || lk == 88185 // 'element' 'le'
+ || lk == 88248 // 'namespace' 'le'
+ || lk == 88280 // 'processing-instruction' 'le'
+ || lk == 89170 // 'attribute' 'let'
+ || lk == 89209 // 'element' 'let'
+ || lk == 89272 // 'namespace' 'let'
+ || lk == 89304 // 'processing-instruction' 'let'
+ || lk == 91218 // 'attribute' 'lt'
+ || lk == 91257 // 'element' 'lt'
+ || lk == 91320 // 'namespace' 'lt'
+ || lk == 91352 // 'processing-instruction' 'lt'
+ || lk == 92242 // 'attribute' 'mod'
+ || lk == 92281 // 'element' 'mod'
+ || lk == 92344 // 'namespace' 'mod'
+ || lk == 92376 // 'processing-instruction' 'mod'
+ || lk == 92754 // 'attribute' 'modify'
+ || lk == 92793 // 'element' 'modify'
+ || lk == 92856 // 'namespace' 'modify'
+ || lk == 92888 // 'processing-instruction' 'modify'
+ || lk == 95314 // 'attribute' 'ne'
+ || lk == 95353 // 'element' 'ne'
+ || lk == 95416 // 'namespace' 'ne'
+ || lk == 95448 // 'processing-instruction' 'ne'
+ || lk == 101458 // 'attribute' 'only'
+ || lk == 101497 // 'element' 'only'
+ || lk == 101560 // 'namespace' 'only'
+ || lk == 101592 // 'processing-instruction' 'only'
+ || lk == 102482 // 'attribute' 'or'
+ || lk == 102521 // 'element' 'or'
+ || lk == 102584 // 'namespace' 'or'
+ || lk == 102616 // 'processing-instruction' 'or'
+ || lk == 102994 // 'attribute' 'order'
+ || lk == 103033 // 'element' 'order'
+ || lk == 103096 // 'namespace' 'order'
+ || lk == 103128 // 'processing-instruction' 'order'
+ || lk == 112722 // 'attribute' 'return'
+ || lk == 112761 // 'element' 'return'
+ || lk == 112824 // 'namespace' 'return'
+ || lk == 112856 // 'processing-instruction' 'return'
+ || lk == 114770 // 'attribute' 'satisfies'
+ || lk == 114809 // 'element' 'satisfies'
+ || lk == 114872 // 'namespace' 'satisfies'
+ || lk == 114904 // 'processing-instruction' 'satisfies'
+ || lk == 120914 // 'attribute' 'stable'
+ || lk == 120953 // 'element' 'stable'
+ || lk == 121016 // 'namespace' 'stable'
+ || lk == 121048 // 'processing-instruction' 'stable'
+ || lk == 121426 // 'attribute' 'start'
+ || lk == 121465 // 'element' 'start'
+ || lk == 121528 // 'namespace' 'start'
+ || lk == 121560 // 'processing-instruction' 'start'
+ || lk == 127058 // 'attribute' 'to'
+ || lk == 127097 // 'element' 'to'
+ || lk == 127160 // 'namespace' 'to'
+ || lk == 127192 // 'processing-instruction' 'to'
+ || lk == 127570 // 'attribute' 'treat'
+ || lk == 127609 // 'element' 'treat'
+ || lk == 127672 // 'namespace' 'treat'
+ || lk == 127704 // 'processing-instruction' 'treat'
+ || lk == 130130 // 'attribute' 'union'
+ || lk == 130169 // 'element' 'union'
+ || lk == 130232 // 'namespace' 'union'
+ || lk == 130264 // 'processing-instruction' 'union'
+ || lk == 136274 // 'attribute' 'where'
+ || lk == 136313 // 'element' 'where'
+ || lk == 136376 // 'namespace' 'where'
+ || lk == 136408 // 'processing-instruction' 'where'
+ || lk == 138322 // 'attribute' 'with'
+ || lk == 138361 // 'element' 'with'
+ || lk == 138424 // 'namespace' 'with'
+ || lk == 138456) // 'processing-instruction' 'with'
+ {
+ lk = memoized(3, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_PostfixExpr();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(3, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 31: // '$'
+ case 32: // '%'
+ case 34: // '('
+ case 44: // '.'
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ case 68: // '['
+ case 276: // '{'
+ case 278: // '{|'
+ case 3154: // 'attribute' EQName^Token
+ case 3193: // 'element' EQName^Token
+ case 9912: // 'namespace' NCName^Token
+ case 9944: // 'processing-instruction' NCName^Token
+ case 14854: // EQName^Token '#'
+ case 14918: // 'after' '#'
+ case 14920: // 'allowing' '#'
+ case 14921: // 'ancestor' '#'
+ case 14922: // 'ancestor-or-self' '#'
+ case 14923: // 'and' '#'
+ case 14927: // 'as' '#'
+ case 14928: // 'ascending' '#'
+ case 14929: // 'at' '#'
+ case 14930: // 'attribute' '#'
+ case 14931: // 'base-uri' '#'
+ case 14932: // 'before' '#'
+ case 14933: // 'boundary-space' '#'
+ case 14934: // 'break' '#'
+ case 14936: // 'case' '#'
+ case 14937: // 'cast' '#'
+ case 14938: // 'castable' '#'
+ case 14939: // 'catch' '#'
+ case 14941: // 'child' '#'
+ case 14942: // 'collation' '#'
+ case 14944: // 'comment' '#'
+ case 14945: // 'constraint' '#'
+ case 14946: // 'construction' '#'
+ case 14949: // 'context' '#'
+ case 14950: // 'continue' '#'
+ case 14951: // 'copy' '#'
+ case 14952: // 'copy-namespaces' '#'
+ case 14953: // 'count' '#'
+ case 14954: // 'decimal-format' '#'
+ case 14956: // 'declare' '#'
+ case 14957: // 'default' '#'
+ case 14958: // 'delete' '#'
+ case 14959: // 'descendant' '#'
+ case 14960: // 'descendant-or-self' '#'
+ case 14961: // 'descending' '#'
+ case 14966: // 'div' '#'
+ case 14967: // 'document' '#'
+ case 14968: // 'document-node' '#'
+ case 14969: // 'element' '#'
+ case 14970: // 'else' '#'
+ case 14971: // 'empty' '#'
+ case 14972: // 'empty-sequence' '#'
+ case 14973: // 'encoding' '#'
+ case 14974: // 'end' '#'
+ case 14976: // 'eq' '#'
+ case 14977: // 'every' '#'
+ case 14979: // 'except' '#'
+ case 14980: // 'exit' '#'
+ case 14981: // 'external' '#'
+ case 14982: // 'first' '#'
+ case 14983: // 'following' '#'
+ case 14984: // 'following-sibling' '#'
+ case 14985: // 'for' '#'
+ case 14989: // 'ft-option' '#'
+ case 14993: // 'function' '#'
+ case 14994: // 'ge' '#'
+ case 14996: // 'group' '#'
+ case 14998: // 'gt' '#'
+ case 14999: // 'idiv' '#'
+ case 15000: // 'if' '#'
+ case 15001: // 'import' '#'
+ case 15002: // 'in' '#'
+ case 15003: // 'index' '#'
+ case 15007: // 'insert' '#'
+ case 15008: // 'instance' '#'
+ case 15009: // 'integrity' '#'
+ case 15010: // 'intersect' '#'
+ case 15011: // 'into' '#'
+ case 15012: // 'is' '#'
+ case 15013: // 'item' '#'
+ case 15018: // 'last' '#'
+ case 15019: // 'lax' '#'
+ case 15020: // 'le' '#'
+ case 15022: // 'let' '#'
+ case 15024: // 'loop' '#'
+ case 15026: // 'lt' '#'
+ case 15028: // 'mod' '#'
+ case 15029: // 'modify' '#'
+ case 15030: // 'module' '#'
+ case 15032: // 'namespace' '#'
+ case 15033: // 'namespace-node' '#'
+ case 15034: // 'ne' '#'
+ case 15039: // 'node' '#'
+ case 15040: // 'nodes' '#'
+ case 15046: // 'only' '#'
+ case 15047: // 'option' '#'
+ case 15048: // 'or' '#'
+ case 15049: // 'order' '#'
+ case 15050: // 'ordered' '#'
+ case 15051: // 'ordering' '#'
+ case 15054: // 'parent' '#'
+ case 15060: // 'preceding' '#'
+ case 15061: // 'preceding-sibling' '#'
+ case 15064: // 'processing-instruction' '#'
+ case 15066: // 'rename' '#'
+ case 15067: // 'replace' '#'
+ case 15068: // 'return' '#'
+ case 15069: // 'returning' '#'
+ case 15070: // 'revalidation' '#'
+ case 15072: // 'satisfies' '#'
+ case 15073: // 'schema' '#'
+ case 15074: // 'schema-attribute' '#'
+ case 15075: // 'schema-element' '#'
+ case 15076: // 'score' '#'
+ case 15077: // 'self' '#'
+ case 15082: // 'sliding' '#'
+ case 15083: // 'some' '#'
+ case 15084: // 'stable' '#'
+ case 15085: // 'start' '#'
+ case 15088: // 'strict' '#'
+ case 15091: // 'switch' '#'
+ case 15092: // 'text' '#'
+ case 15096: // 'to' '#'
+ case 15097: // 'treat' '#'
+ case 15098: // 'try' '#'
+ case 15099: // 'tumbling' '#'
+ case 15100: // 'type' '#'
+ case 15101: // 'typeswitch' '#'
+ case 15102: // 'union' '#'
+ case 15104: // 'unordered' '#'
+ case 15105: // 'updating' '#'
+ case 15108: // 'validate' '#'
+ case 15109: // 'value' '#'
+ case 15110: // 'variable' '#'
+ case 15111: // 'version' '#'
+ case 15114: // 'where' '#'
+ case 15115: // 'while' '#'
+ case 15118: // 'with' '#'
+ case 15122: // 'xquery' '#'
+ case 17414: // EQName^Token '('
+ case 17478: // 'after' '('
+ case 17480: // 'allowing' '('
+ case 17481: // 'ancestor' '('
+ case 17482: // 'ancestor-or-self' '('
+ case 17483: // 'and' '('
+ case 17487: // 'as' '('
+ case 17488: // 'ascending' '('
+ case 17489: // 'at' '('
+ case 17491: // 'base-uri' '('
+ case 17492: // 'before' '('
+ case 17493: // 'boundary-space' '('
+ case 17494: // 'break' '('
+ case 17496: // 'case' '('
+ case 17497: // 'cast' '('
+ case 17498: // 'castable' '('
+ case 17499: // 'catch' '('
+ case 17501: // 'child' '('
+ case 17502: // 'collation' '('
+ case 17505: // 'constraint' '('
+ case 17506: // 'construction' '('
+ case 17509: // 'context' '('
+ case 17510: // 'continue' '('
+ case 17511: // 'copy' '('
+ case 17512: // 'copy-namespaces' '('
+ case 17513: // 'count' '('
+ case 17514: // 'decimal-format' '('
+ case 17516: // 'declare' '('
+ case 17517: // 'default' '('
+ case 17518: // 'delete' '('
+ case 17519: // 'descendant' '('
+ case 17520: // 'descendant-or-self' '('
+ case 17521: // 'descending' '('
+ case 17526: // 'div' '('
+ case 17527: // 'document' '('
+ case 17530: // 'else' '('
+ case 17531: // 'empty' '('
+ case 17533: // 'encoding' '('
+ case 17534: // 'end' '('
+ case 17536: // 'eq' '('
+ case 17537: // 'every' '('
+ case 17539: // 'except' '('
+ case 17540: // 'exit' '('
+ case 17541: // 'external' '('
+ case 17542: // 'first' '('
+ case 17543: // 'following' '('
+ case 17544: // 'following-sibling' '('
+ case 17545: // 'for' '('
+ case 17549: // 'ft-option' '('
+ case 17553: // 'function' '('
+ case 17554: // 'ge' '('
+ case 17556: // 'group' '('
+ case 17558: // 'gt' '('
+ case 17559: // 'idiv' '('
+ case 17561: // 'import' '('
+ case 17562: // 'in' '('
+ case 17563: // 'index' '('
+ case 17567: // 'insert' '('
+ case 17568: // 'instance' '('
+ case 17569: // 'integrity' '('
+ case 17570: // 'intersect' '('
+ case 17571: // 'into' '('
+ case 17572: // 'is' '('
+ case 17578: // 'last' '('
+ case 17579: // 'lax' '('
+ case 17580: // 'le' '('
+ case 17582: // 'let' '('
+ case 17584: // 'loop' '('
+ case 17586: // 'lt' '('
+ case 17588: // 'mod' '('
+ case 17589: // 'modify' '('
+ case 17590: // 'module' '('
+ case 17592: // 'namespace' '('
+ case 17594: // 'ne' '('
+ case 17600: // 'nodes' '('
+ case 17606: // 'only' '('
+ case 17607: // 'option' '('
+ case 17608: // 'or' '('
+ case 17609: // 'order' '('
+ case 17610: // 'ordered' '('
+ case 17611: // 'ordering' '('
+ case 17614: // 'parent' '('
+ case 17620: // 'preceding' '('
+ case 17621: // 'preceding-sibling' '('
+ case 17626: // 'rename' '('
+ case 17627: // 'replace' '('
+ case 17628: // 'return' '('
+ case 17629: // 'returning' '('
+ case 17630: // 'revalidation' '('
+ case 17632: // 'satisfies' '('
+ case 17633: // 'schema' '('
+ case 17636: // 'score' '('
+ case 17637: // 'self' '('
+ case 17642: // 'sliding' '('
+ case 17643: // 'some' '('
+ case 17644: // 'stable' '('
+ case 17645: // 'start' '('
+ case 17648: // 'strict' '('
+ case 17656: // 'to' '('
+ case 17657: // 'treat' '('
+ case 17658: // 'try' '('
+ case 17659: // 'tumbling' '('
+ case 17660: // 'type' '('
+ case 17662: // 'union' '('
+ case 17664: // 'unordered' '('
+ case 17665: // 'updating' '('
+ case 17668: // 'validate' '('
+ case 17669: // 'value' '('
+ case 17670: // 'variable' '('
+ case 17671: // 'version' '('
+ case 17674: // 'where' '('
+ case 17675: // 'while' '('
+ case 17678: // 'with' '('
+ case 17682: // 'xquery' '('
+ case 36946: // 'attribute' 'allowing'
+ case 36985: // 'element' 'allowing'
+ case 37048: // 'namespace' 'allowing'
+ case 37080: // 'processing-instruction' 'allowing'
+ case 37458: // 'attribute' 'ancestor'
+ case 37497: // 'element' 'ancestor'
+ case 37560: // 'namespace' 'ancestor'
+ case 37592: // 'processing-instruction' 'ancestor'
+ case 37970: // 'attribute' 'ancestor-or-self'
+ case 38009: // 'element' 'ancestor-or-self'
+ case 38072: // 'namespace' 'ancestor-or-self'
+ case 38104: // 'processing-instruction' 'ancestor-or-self'
+ case 42066: // 'attribute' 'attribute'
+ case 42105: // 'element' 'attribute'
+ case 42168: // 'namespace' 'attribute'
+ case 42200: // 'processing-instruction' 'attribute'
+ case 42578: // 'attribute' 'base-uri'
+ case 42617: // 'element' 'base-uri'
+ case 42680: // 'namespace' 'base-uri'
+ case 42712: // 'processing-instruction' 'base-uri'
+ case 43602: // 'attribute' 'boundary-space'
+ case 43641: // 'element' 'boundary-space'
+ case 43704: // 'namespace' 'boundary-space'
+ case 43736: // 'processing-instruction' 'boundary-space'
+ case 44114: // 'attribute' 'break'
+ case 44153: // 'element' 'break'
+ case 44216: // 'namespace' 'break'
+ case 44248: // 'processing-instruction' 'break'
+ case 46674: // 'attribute' 'catch'
+ case 46713: // 'element' 'catch'
+ case 46776: // 'namespace' 'catch'
+ case 46808: // 'processing-instruction' 'catch'
+ case 47698: // 'attribute' 'child'
+ case 47737: // 'element' 'child'
+ case 47800: // 'namespace' 'child'
+ case 47832: // 'processing-instruction' 'child'
+ case 49234: // 'attribute' 'comment'
+ case 49273: // 'element' 'comment'
+ case 49336: // 'namespace' 'comment'
+ case 49368: // 'processing-instruction' 'comment'
+ case 49746: // 'attribute' 'constraint'
+ case 49785: // 'element' 'constraint'
+ case 49848: // 'namespace' 'constraint'
+ case 49880: // 'processing-instruction' 'constraint'
+ case 50258: // 'attribute' 'construction'
+ case 50297: // 'element' 'construction'
+ case 50360: // 'namespace' 'construction'
+ case 50392: // 'processing-instruction' 'construction'
+ case 51794: // 'attribute' 'context'
+ case 51833: // 'element' 'context'
+ case 51896: // 'namespace' 'context'
+ case 51928: // 'processing-instruction' 'context'
+ case 52306: // 'attribute' 'continue'
+ case 52345: // 'element' 'continue'
+ case 52408: // 'namespace' 'continue'
+ case 52440: // 'processing-instruction' 'continue'
+ case 52818: // 'attribute' 'copy'
+ case 52857: // 'element' 'copy'
+ case 52920: // 'namespace' 'copy'
+ case 52952: // 'processing-instruction' 'copy'
+ case 53330: // 'attribute' 'copy-namespaces'
+ case 53369: // 'element' 'copy-namespaces'
+ case 53432: // 'namespace' 'copy-namespaces'
+ case 53464: // 'processing-instruction' 'copy-namespaces'
+ case 54354: // 'attribute' 'decimal-format'
+ case 54393: // 'element' 'decimal-format'
+ case 54456: // 'namespace' 'decimal-format'
+ case 54488: // 'processing-instruction' 'decimal-format'
+ case 55378: // 'attribute' 'declare'
+ case 55417: // 'element' 'declare'
+ case 55480: // 'namespace' 'declare'
+ case 55512: // 'processing-instruction' 'declare'
+ case 56402: // 'attribute' 'delete'
+ case 56441: // 'element' 'delete'
+ case 56504: // 'namespace' 'delete'
+ case 56536: // 'processing-instruction' 'delete'
+ case 56914: // 'attribute' 'descendant'
+ case 56953: // 'element' 'descendant'
+ case 57016: // 'namespace' 'descendant'
+ case 57048: // 'processing-instruction' 'descendant'
+ case 57426: // 'attribute' 'descendant-or-self'
+ case 57465: // 'element' 'descendant-or-self'
+ case 57528: // 'namespace' 'descendant-or-self'
+ case 57560: // 'processing-instruction' 'descendant-or-self'
+ case 61010: // 'attribute' 'document'
+ case 61049: // 'element' 'document'
+ case 61112: // 'namespace' 'document'
+ case 61144: // 'processing-instruction' 'document'
+ case 61522: // 'attribute' 'document-node'
+ case 61561: // 'element' 'document-node'
+ case 61624: // 'namespace' 'document-node'
+ case 61656: // 'processing-instruction' 'document-node'
+ case 62034: // 'attribute' 'element'
+ case 62073: // 'element' 'element'
+ case 62136: // 'namespace' 'element'
+ case 62168: // 'processing-instruction' 'element'
+ case 63570: // 'attribute' 'empty-sequence'
+ case 63609: // 'element' 'empty-sequence'
+ case 63672: // 'namespace' 'empty-sequence'
+ case 63704: // 'processing-instruction' 'empty-sequence'
+ case 64082: // 'attribute' 'encoding'
+ case 64121: // 'element' 'encoding'
+ case 64184: // 'namespace' 'encoding'
+ case 64216: // 'processing-instruction' 'encoding'
+ case 66130: // 'attribute' 'every'
+ case 66169: // 'element' 'every'
+ case 66232: // 'namespace' 'every'
+ case 66264: // 'processing-instruction' 'every'
+ case 67666: // 'attribute' 'exit'
+ case 67705: // 'element' 'exit'
+ case 67768: // 'namespace' 'exit'
+ case 67800: // 'processing-instruction' 'exit'
+ case 68178: // 'attribute' 'external'
+ case 68217: // 'element' 'external'
+ case 68280: // 'namespace' 'external'
+ case 68312: // 'processing-instruction' 'external'
+ case 68690: // 'attribute' 'first'
+ case 68729: // 'element' 'first'
+ case 68792: // 'namespace' 'first'
+ case 68824: // 'processing-instruction' 'first'
+ case 69202: // 'attribute' 'following'
+ case 69241: // 'element' 'following'
+ case 69304: // 'namespace' 'following'
+ case 69336: // 'processing-instruction' 'following'
+ case 69714: // 'attribute' 'following-sibling'
+ case 69753: // 'element' 'following-sibling'
+ case 69816: // 'namespace' 'following-sibling'
+ case 69848: // 'processing-instruction' 'following-sibling'
+ case 72274: // 'attribute' 'ft-option'
+ case 72313: // 'element' 'ft-option'
+ case 72376: // 'namespace' 'ft-option'
+ case 72408: // 'processing-instruction' 'ft-option'
+ case 74322: // 'attribute' 'function'
+ case 74361: // 'element' 'function'
+ case 74424: // 'namespace' 'function'
+ case 74456: // 'processing-instruction' 'function'
+ case 77906: // 'attribute' 'if'
+ case 77945: // 'element' 'if'
+ case 78008: // 'namespace' 'if'
+ case 78040: // 'processing-instruction' 'if'
+ case 78418: // 'attribute' 'import'
+ case 78457: // 'element' 'import'
+ case 78520: // 'namespace' 'import'
+ case 78552: // 'processing-instruction' 'import'
+ case 78930: // 'attribute' 'in'
+ case 78969: // 'element' 'in'
+ case 79032: // 'namespace' 'in'
+ case 79064: // 'processing-instruction' 'in'
+ case 79442: // 'attribute' 'index'
+ case 79481: // 'element' 'index'
+ case 79544: // 'namespace' 'index'
+ case 79576: // 'processing-instruction' 'index'
+ case 81490: // 'attribute' 'insert'
+ case 81529: // 'element' 'insert'
+ case 81592: // 'namespace' 'insert'
+ case 81624: // 'processing-instruction' 'insert'
+ case 82514: // 'attribute' 'integrity'
+ case 82553: // 'element' 'integrity'
+ case 82616: // 'namespace' 'integrity'
+ case 82648: // 'processing-instruction' 'integrity'
+ case 84562: // 'attribute' 'item'
+ case 84601: // 'element' 'item'
+ case 84664: // 'namespace' 'item'
+ case 84696: // 'processing-instruction' 'item'
+ case 87122: // 'attribute' 'last'
+ case 87161: // 'element' 'last'
+ case 87224: // 'namespace' 'last'
+ case 87256: // 'processing-instruction' 'last'
+ case 87634: // 'attribute' 'lax'
+ case 87673: // 'element' 'lax'
+ case 87736: // 'namespace' 'lax'
+ case 87768: // 'processing-instruction' 'lax'
+ case 90194: // 'attribute' 'loop'
+ case 90233: // 'element' 'loop'
+ case 90296: // 'namespace' 'loop'
+ case 90328: // 'processing-instruction' 'loop'
+ case 93266: // 'attribute' 'module'
+ case 93305: // 'element' 'module'
+ case 93368: // 'namespace' 'module'
+ case 93400: // 'processing-instruction' 'module'
+ case 94290: // 'attribute' 'namespace'
+ case 94329: // 'element' 'namespace'
+ case 94392: // 'namespace' 'namespace'
+ case 94424: // 'processing-instruction' 'namespace'
+ case 94802: // 'attribute' 'namespace-node'
+ case 94841: // 'element' 'namespace-node'
+ case 94904: // 'namespace' 'namespace-node'
+ case 94936: // 'processing-instruction' 'namespace-node'
+ case 97874: // 'attribute' 'node'
+ case 97913: // 'element' 'node'
+ case 97976: // 'namespace' 'node'
+ case 98008: // 'processing-instruction' 'node'
+ case 98386: // 'attribute' 'nodes'
+ case 98425: // 'element' 'nodes'
+ case 98488: // 'namespace' 'nodes'
+ case 98520: // 'processing-instruction' 'nodes'
+ case 101970: // 'attribute' 'option'
+ case 102009: // 'element' 'option'
+ case 102072: // 'namespace' 'option'
+ case 102104: // 'processing-instruction' 'option'
+ case 103506: // 'attribute' 'ordered'
+ case 103545: // 'element' 'ordered'
+ case 103608: // 'namespace' 'ordered'
+ case 103640: // 'processing-instruction' 'ordered'
+ case 104018: // 'attribute' 'ordering'
+ case 104057: // 'element' 'ordering'
+ case 104120: // 'namespace' 'ordering'
+ case 104152: // 'processing-instruction' 'ordering'
+ case 105554: // 'attribute' 'parent'
+ case 105593: // 'element' 'parent'
+ case 105656: // 'namespace' 'parent'
+ case 105688: // 'processing-instruction' 'parent'
+ case 108626: // 'attribute' 'preceding'
+ case 108665: // 'element' 'preceding'
+ case 108728: // 'namespace' 'preceding'
+ case 108760: // 'processing-instruction' 'preceding'
+ case 109138: // 'attribute' 'preceding-sibling'
+ case 109177: // 'element' 'preceding-sibling'
+ case 109240: // 'namespace' 'preceding-sibling'
+ case 109272: // 'processing-instruction' 'preceding-sibling'
+ case 110674: // 'attribute' 'processing-instruction'
+ case 110713: // 'element' 'processing-instruction'
+ case 110776: // 'namespace' 'processing-instruction'
+ case 110808: // 'processing-instruction' 'processing-instruction'
+ case 111698: // 'attribute' 'rename'
+ case 111737: // 'element' 'rename'
+ case 111800: // 'namespace' 'rename'
+ case 111832: // 'processing-instruction' 'rename'
+ case 112210: // 'attribute' 'replace'
+ case 112249: // 'element' 'replace'
+ case 112312: // 'namespace' 'replace'
+ case 112344: // 'processing-instruction' 'replace'
+ case 113234: // 'attribute' 'returning'
+ case 113273: // 'element' 'returning'
+ case 113336: // 'namespace' 'returning'
+ case 113368: // 'processing-instruction' 'returning'
+ case 113746: // 'attribute' 'revalidation'
+ case 113785: // 'element' 'revalidation'
+ case 113848: // 'namespace' 'revalidation'
+ case 113880: // 'processing-instruction' 'revalidation'
+ case 115282: // 'attribute' 'schema'
+ case 115321: // 'element' 'schema'
+ case 115384: // 'namespace' 'schema'
+ case 115416: // 'processing-instruction' 'schema'
+ case 115794: // 'attribute' 'schema-attribute'
+ case 115833: // 'element' 'schema-attribute'
+ case 115896: // 'namespace' 'schema-attribute'
+ case 115928: // 'processing-instruction' 'schema-attribute'
+ case 116306: // 'attribute' 'schema-element'
+ case 116345: // 'element' 'schema-element'
+ case 116408: // 'namespace' 'schema-element'
+ case 116440: // 'processing-instruction' 'schema-element'
+ case 116818: // 'attribute' 'score'
+ case 116857: // 'element' 'score'
+ case 116920: // 'namespace' 'score'
+ case 116952: // 'processing-instruction' 'score'
+ case 117330: // 'attribute' 'self'
+ case 117369: // 'element' 'self'
+ case 117432: // 'namespace' 'self'
+ case 117464: // 'processing-instruction' 'self'
+ case 119890: // 'attribute' 'sliding'
+ case 119929: // 'element' 'sliding'
+ case 119992: // 'namespace' 'sliding'
+ case 120024: // 'processing-instruction' 'sliding'
+ case 120402: // 'attribute' 'some'
+ case 120441: // 'element' 'some'
+ case 120504: // 'namespace' 'some'
+ case 120536: // 'processing-instruction' 'some'
+ case 122962: // 'attribute' 'strict'
+ case 123001: // 'element' 'strict'
+ case 123064: // 'namespace' 'strict'
+ case 123096: // 'processing-instruction' 'strict'
+ case 124498: // 'attribute' 'switch'
+ case 124537: // 'element' 'switch'
+ case 124600: // 'namespace' 'switch'
+ case 124632: // 'processing-instruction' 'switch'
+ case 125010: // 'attribute' 'text'
+ case 125049: // 'element' 'text'
+ case 125112: // 'namespace' 'text'
+ case 125144: // 'processing-instruction' 'text'
+ case 128082: // 'attribute' 'try'
+ case 128121: // 'element' 'try'
+ case 128184: // 'namespace' 'try'
+ case 128216: // 'processing-instruction' 'try'
+ case 128594: // 'attribute' 'tumbling'
+ case 128633: // 'element' 'tumbling'
+ case 128696: // 'namespace' 'tumbling'
+ case 128728: // 'processing-instruction' 'tumbling'
+ case 129106: // 'attribute' 'type'
+ case 129145: // 'element' 'type'
+ case 129208: // 'namespace' 'type'
+ case 129240: // 'processing-instruction' 'type'
+ case 129618: // 'attribute' 'typeswitch'
+ case 129657: // 'element' 'typeswitch'
+ case 129720: // 'namespace' 'typeswitch'
+ case 129752: // 'processing-instruction' 'typeswitch'
+ case 131154: // 'attribute' 'unordered'
+ case 131193: // 'element' 'unordered'
+ case 131256: // 'namespace' 'unordered'
+ case 131288: // 'processing-instruction' 'unordered'
+ case 131666: // 'attribute' 'updating'
+ case 131705: // 'element' 'updating'
+ case 131768: // 'namespace' 'updating'
+ case 131800: // 'processing-instruction' 'updating'
+ case 133202: // 'attribute' 'validate'
+ case 133241: // 'element' 'validate'
+ case 133304: // 'namespace' 'validate'
+ case 133336: // 'processing-instruction' 'validate'
+ case 133714: // 'attribute' 'value'
+ case 133753: // 'element' 'value'
+ case 133816: // 'namespace' 'value'
+ case 133848: // 'processing-instruction' 'value'
+ case 134226: // 'attribute' 'variable'
+ case 134265: // 'element' 'variable'
+ case 134328: // 'namespace' 'variable'
+ case 134360: // 'processing-instruction' 'variable'
+ case 134738: // 'attribute' 'version'
+ case 134777: // 'element' 'version'
+ case 134840: // 'namespace' 'version'
+ case 134872: // 'processing-instruction' 'version'
+ case 136786: // 'attribute' 'while'
+ case 136825: // 'element' 'while'
+ case 136888: // 'namespace' 'while'
+ case 136920: // 'processing-instruction' 'while'
+ case 140370: // 'attribute' 'xquery'
+ case 140409: // 'element' 'xquery'
+ case 140472: // 'namespace' 'xquery'
+ case 140504: // 'processing-instruction' 'xquery'
+ case 141394: // 'attribute' '{'
+ case 141408: // 'comment' '{'
+ case 141431: // 'document' '{'
+ case 141433: // 'element' '{'
+ case 141496: // 'namespace' '{'
+ case 141514: // 'ordered' '{'
+ case 141528: // 'processing-instruction' '{'
+ case 141556: // 'text' '{'
+ case 141568: // 'unordered' '{'
+ parse_PostfixExpr();
+ break;
+ default:
+ parse_AxisStep();
+ }
+ eventHandler.endNonterminal("StepExpr", e0);
+ }
+
+ function try_StepExpr()
+ {
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(282); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 121: // 'element'
+ lookahead2W(279); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(280); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 256: // 'unordered'
+ lookahead2W(245); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 124: // 'empty-sequence'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 229: // 'self'
+ lookahead2W(244); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 86: // 'break'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 102: // 'continue'
+ case 103: // 'copy'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 110: // 'delete'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 120: // 'document-node'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 129: // 'every'
+ case 131: // 'except'
+ case 132: // 'exit'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 137: // 'for'
+ case 141: // 'ft-option'
+ case 145: // 'function'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 159: // 'insert'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 174: // 'let'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 185: // 'namespace-node'
+ case 186: // 'ne'
+ case 191: // 'node'
+ case 192: // 'nodes'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 218: // 'rename'
+ case 219: // 'replace'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 228: // 'score'
+ case 234: // 'sliding'
+ case 235: // 'some'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 250: // 'try'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 260: // 'validate'
+ case 261: // 'value'
+ case 262: // 'variable'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(242); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 35922 // 'attribute' 'after'
+ || lk == 35961 // 'element' 'after'
+ || lk == 36024 // 'namespace' 'after'
+ || lk == 36056 // 'processing-instruction' 'after'
+ || lk == 38482 // 'attribute' 'and'
+ || lk == 38521 // 'element' 'and'
+ || lk == 38584 // 'namespace' 'and'
+ || lk == 38616 // 'processing-instruction' 'and'
+ || lk == 40530 // 'attribute' 'as'
+ || lk == 40569 // 'element' 'as'
+ || lk == 40632 // 'namespace' 'as'
+ || lk == 40664 // 'processing-instruction' 'as'
+ || lk == 41042 // 'attribute' 'ascending'
+ || lk == 41081 // 'element' 'ascending'
+ || lk == 41144 // 'namespace' 'ascending'
+ || lk == 41176 // 'processing-instruction' 'ascending'
+ || lk == 41554 // 'attribute' 'at'
+ || lk == 41593 // 'element' 'at'
+ || lk == 41656 // 'namespace' 'at'
+ || lk == 41688 // 'processing-instruction' 'at'
+ || lk == 43090 // 'attribute' 'before'
+ || lk == 43129 // 'element' 'before'
+ || lk == 43192 // 'namespace' 'before'
+ || lk == 43224 // 'processing-instruction' 'before'
+ || lk == 45138 // 'attribute' 'case'
+ || lk == 45177 // 'element' 'case'
+ || lk == 45240 // 'namespace' 'case'
+ || lk == 45272 // 'processing-instruction' 'case'
+ || lk == 45650 // 'attribute' 'cast'
+ || lk == 45689 // 'element' 'cast'
+ || lk == 45752 // 'namespace' 'cast'
+ || lk == 45784 // 'processing-instruction' 'cast'
+ || lk == 46162 // 'attribute' 'castable'
+ || lk == 46201 // 'element' 'castable'
+ || lk == 46264 // 'namespace' 'castable'
+ || lk == 46296 // 'processing-instruction' 'castable'
+ || lk == 48210 // 'attribute' 'collation'
+ || lk == 48249 // 'element' 'collation'
+ || lk == 48312 // 'namespace' 'collation'
+ || lk == 48344 // 'processing-instruction' 'collation'
+ || lk == 53842 // 'attribute' 'count'
+ || lk == 53881 // 'element' 'count'
+ || lk == 53944 // 'namespace' 'count'
+ || lk == 53976 // 'processing-instruction' 'count'
+ || lk == 55890 // 'attribute' 'default'
+ || lk == 55929 // 'element' 'default'
+ || lk == 55992 // 'namespace' 'default'
+ || lk == 56024 // 'processing-instruction' 'default'
+ || lk == 57938 // 'attribute' 'descending'
+ || lk == 57977 // 'element' 'descending'
+ || lk == 58040 // 'namespace' 'descending'
+ || lk == 58072 // 'processing-instruction' 'descending'
+ || lk == 60498 // 'attribute' 'div'
+ || lk == 60537 // 'element' 'div'
+ || lk == 60600 // 'namespace' 'div'
+ || lk == 60632 // 'processing-instruction' 'div'
+ || lk == 62546 // 'attribute' 'else'
+ || lk == 62585 // 'element' 'else'
+ || lk == 62648 // 'namespace' 'else'
+ || lk == 62680 // 'processing-instruction' 'else'
+ || lk == 63058 // 'attribute' 'empty'
+ || lk == 63097 // 'element' 'empty'
+ || lk == 63160 // 'namespace' 'empty'
+ || lk == 63192 // 'processing-instruction' 'empty'
+ || lk == 64594 // 'attribute' 'end'
+ || lk == 64633 // 'element' 'end'
+ || lk == 64696 // 'namespace' 'end'
+ || lk == 64728 // 'processing-instruction' 'end'
+ || lk == 65618 // 'attribute' 'eq'
+ || lk == 65657 // 'element' 'eq'
+ || lk == 65720 // 'namespace' 'eq'
+ || lk == 65752 // 'processing-instruction' 'eq'
+ || lk == 67154 // 'attribute' 'except'
+ || lk == 67193 // 'element' 'except'
+ || lk == 67256 // 'namespace' 'except'
+ || lk == 67288 // 'processing-instruction' 'except'
+ || lk == 70226 // 'attribute' 'for'
+ || lk == 70265 // 'element' 'for'
+ || lk == 70328 // 'namespace' 'for'
+ || lk == 70360 // 'processing-instruction' 'for'
+ || lk == 74834 // 'attribute' 'ge'
+ || lk == 74873 // 'element' 'ge'
+ || lk == 74936 // 'namespace' 'ge'
+ || lk == 74968 // 'processing-instruction' 'ge'
+ || lk == 75858 // 'attribute' 'group'
+ || lk == 75897 // 'element' 'group'
+ || lk == 75960 // 'namespace' 'group'
+ || lk == 75992 // 'processing-instruction' 'group'
+ || lk == 76882 // 'attribute' 'gt'
+ || lk == 76921 // 'element' 'gt'
+ || lk == 76984 // 'namespace' 'gt'
+ || lk == 77016 // 'processing-instruction' 'gt'
+ || lk == 77394 // 'attribute' 'idiv'
+ || lk == 77433 // 'element' 'idiv'
+ || lk == 77496 // 'namespace' 'idiv'
+ || lk == 77528 // 'processing-instruction' 'idiv'
+ || lk == 82002 // 'attribute' 'instance'
+ || lk == 82041 // 'element' 'instance'
+ || lk == 82104 // 'namespace' 'instance'
+ || lk == 82136 // 'processing-instruction' 'instance'
+ || lk == 83026 // 'attribute' 'intersect'
+ || lk == 83065 // 'element' 'intersect'
+ || lk == 83128 // 'namespace' 'intersect'
+ || lk == 83160 // 'processing-instruction' 'intersect'
+ || lk == 83538 // 'attribute' 'into'
+ || lk == 83577 // 'element' 'into'
+ || lk == 83640 // 'namespace' 'into'
+ || lk == 83672 // 'processing-instruction' 'into'
+ || lk == 84050 // 'attribute' 'is'
+ || lk == 84089 // 'element' 'is'
+ || lk == 84152 // 'namespace' 'is'
+ || lk == 84184 // 'processing-instruction' 'is'
+ || lk == 88146 // 'attribute' 'le'
+ || lk == 88185 // 'element' 'le'
+ || lk == 88248 // 'namespace' 'le'
+ || lk == 88280 // 'processing-instruction' 'le'
+ || lk == 89170 // 'attribute' 'let'
+ || lk == 89209 // 'element' 'let'
+ || lk == 89272 // 'namespace' 'let'
+ || lk == 89304 // 'processing-instruction' 'let'
+ || lk == 91218 // 'attribute' 'lt'
+ || lk == 91257 // 'element' 'lt'
+ || lk == 91320 // 'namespace' 'lt'
+ || lk == 91352 // 'processing-instruction' 'lt'
+ || lk == 92242 // 'attribute' 'mod'
+ || lk == 92281 // 'element' 'mod'
+ || lk == 92344 // 'namespace' 'mod'
+ || lk == 92376 // 'processing-instruction' 'mod'
+ || lk == 92754 // 'attribute' 'modify'
+ || lk == 92793 // 'element' 'modify'
+ || lk == 92856 // 'namespace' 'modify'
+ || lk == 92888 // 'processing-instruction' 'modify'
+ || lk == 95314 // 'attribute' 'ne'
+ || lk == 95353 // 'element' 'ne'
+ || lk == 95416 // 'namespace' 'ne'
+ || lk == 95448 // 'processing-instruction' 'ne'
+ || lk == 101458 // 'attribute' 'only'
+ || lk == 101497 // 'element' 'only'
+ || lk == 101560 // 'namespace' 'only'
+ || lk == 101592 // 'processing-instruction' 'only'
+ || lk == 102482 // 'attribute' 'or'
+ || lk == 102521 // 'element' 'or'
+ || lk == 102584 // 'namespace' 'or'
+ || lk == 102616 // 'processing-instruction' 'or'
+ || lk == 102994 // 'attribute' 'order'
+ || lk == 103033 // 'element' 'order'
+ || lk == 103096 // 'namespace' 'order'
+ || lk == 103128 // 'processing-instruction' 'order'
+ || lk == 112722 // 'attribute' 'return'
+ || lk == 112761 // 'element' 'return'
+ || lk == 112824 // 'namespace' 'return'
+ || lk == 112856 // 'processing-instruction' 'return'
+ || lk == 114770 // 'attribute' 'satisfies'
+ || lk == 114809 // 'element' 'satisfies'
+ || lk == 114872 // 'namespace' 'satisfies'
+ || lk == 114904 // 'processing-instruction' 'satisfies'
+ || lk == 120914 // 'attribute' 'stable'
+ || lk == 120953 // 'element' 'stable'
+ || lk == 121016 // 'namespace' 'stable'
+ || lk == 121048 // 'processing-instruction' 'stable'
+ || lk == 121426 // 'attribute' 'start'
+ || lk == 121465 // 'element' 'start'
+ || lk == 121528 // 'namespace' 'start'
+ || lk == 121560 // 'processing-instruction' 'start'
+ || lk == 127058 // 'attribute' 'to'
+ || lk == 127097 // 'element' 'to'
+ || lk == 127160 // 'namespace' 'to'
+ || lk == 127192 // 'processing-instruction' 'to'
+ || lk == 127570 // 'attribute' 'treat'
+ || lk == 127609 // 'element' 'treat'
+ || lk == 127672 // 'namespace' 'treat'
+ || lk == 127704 // 'processing-instruction' 'treat'
+ || lk == 130130 // 'attribute' 'union'
+ || lk == 130169 // 'element' 'union'
+ || lk == 130232 // 'namespace' 'union'
+ || lk == 130264 // 'processing-instruction' 'union'
+ || lk == 136274 // 'attribute' 'where'
+ || lk == 136313 // 'element' 'where'
+ || lk == 136376 // 'namespace' 'where'
+ || lk == 136408 // 'processing-instruction' 'where'
+ || lk == 138322 // 'attribute' 'with'
+ || lk == 138361 // 'element' 'with'
+ || lk == 138424 // 'namespace' 'with'
+ || lk == 138456) // 'processing-instruction' 'with'
+ {
+ lk = memoized(3, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_PostfixExpr();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(3, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 31: // '$'
+ case 32: // '%'
+ case 34: // '('
+ case 44: // '.'
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ case 68: // '['
+ case 276: // '{'
+ case 278: // '{|'
+ case 3154: // 'attribute' EQName^Token
+ case 3193: // 'element' EQName^Token
+ case 9912: // 'namespace' NCName^Token
+ case 9944: // 'processing-instruction' NCName^Token
+ case 14854: // EQName^Token '#'
+ case 14918: // 'after' '#'
+ case 14920: // 'allowing' '#'
+ case 14921: // 'ancestor' '#'
+ case 14922: // 'ancestor-or-self' '#'
+ case 14923: // 'and' '#'
+ case 14927: // 'as' '#'
+ case 14928: // 'ascending' '#'
+ case 14929: // 'at' '#'
+ case 14930: // 'attribute' '#'
+ case 14931: // 'base-uri' '#'
+ case 14932: // 'before' '#'
+ case 14933: // 'boundary-space' '#'
+ case 14934: // 'break' '#'
+ case 14936: // 'case' '#'
+ case 14937: // 'cast' '#'
+ case 14938: // 'castable' '#'
+ case 14939: // 'catch' '#'
+ case 14941: // 'child' '#'
+ case 14942: // 'collation' '#'
+ case 14944: // 'comment' '#'
+ case 14945: // 'constraint' '#'
+ case 14946: // 'construction' '#'
+ case 14949: // 'context' '#'
+ case 14950: // 'continue' '#'
+ case 14951: // 'copy' '#'
+ case 14952: // 'copy-namespaces' '#'
+ case 14953: // 'count' '#'
+ case 14954: // 'decimal-format' '#'
+ case 14956: // 'declare' '#'
+ case 14957: // 'default' '#'
+ case 14958: // 'delete' '#'
+ case 14959: // 'descendant' '#'
+ case 14960: // 'descendant-or-self' '#'
+ case 14961: // 'descending' '#'
+ case 14966: // 'div' '#'
+ case 14967: // 'document' '#'
+ case 14968: // 'document-node' '#'
+ case 14969: // 'element' '#'
+ case 14970: // 'else' '#'
+ case 14971: // 'empty' '#'
+ case 14972: // 'empty-sequence' '#'
+ case 14973: // 'encoding' '#'
+ case 14974: // 'end' '#'
+ case 14976: // 'eq' '#'
+ case 14977: // 'every' '#'
+ case 14979: // 'except' '#'
+ case 14980: // 'exit' '#'
+ case 14981: // 'external' '#'
+ case 14982: // 'first' '#'
+ case 14983: // 'following' '#'
+ case 14984: // 'following-sibling' '#'
+ case 14985: // 'for' '#'
+ case 14989: // 'ft-option' '#'
+ case 14993: // 'function' '#'
+ case 14994: // 'ge' '#'
+ case 14996: // 'group' '#'
+ case 14998: // 'gt' '#'
+ case 14999: // 'idiv' '#'
+ case 15000: // 'if' '#'
+ case 15001: // 'import' '#'
+ case 15002: // 'in' '#'
+ case 15003: // 'index' '#'
+ case 15007: // 'insert' '#'
+ case 15008: // 'instance' '#'
+ case 15009: // 'integrity' '#'
+ case 15010: // 'intersect' '#'
+ case 15011: // 'into' '#'
+ case 15012: // 'is' '#'
+ case 15013: // 'item' '#'
+ case 15018: // 'last' '#'
+ case 15019: // 'lax' '#'
+ case 15020: // 'le' '#'
+ case 15022: // 'let' '#'
+ case 15024: // 'loop' '#'
+ case 15026: // 'lt' '#'
+ case 15028: // 'mod' '#'
+ case 15029: // 'modify' '#'
+ case 15030: // 'module' '#'
+ case 15032: // 'namespace' '#'
+ case 15033: // 'namespace-node' '#'
+ case 15034: // 'ne' '#'
+ case 15039: // 'node' '#'
+ case 15040: // 'nodes' '#'
+ case 15046: // 'only' '#'
+ case 15047: // 'option' '#'
+ case 15048: // 'or' '#'
+ case 15049: // 'order' '#'
+ case 15050: // 'ordered' '#'
+ case 15051: // 'ordering' '#'
+ case 15054: // 'parent' '#'
+ case 15060: // 'preceding' '#'
+ case 15061: // 'preceding-sibling' '#'
+ case 15064: // 'processing-instruction' '#'
+ case 15066: // 'rename' '#'
+ case 15067: // 'replace' '#'
+ case 15068: // 'return' '#'
+ case 15069: // 'returning' '#'
+ case 15070: // 'revalidation' '#'
+ case 15072: // 'satisfies' '#'
+ case 15073: // 'schema' '#'
+ case 15074: // 'schema-attribute' '#'
+ case 15075: // 'schema-element' '#'
+ case 15076: // 'score' '#'
+ case 15077: // 'self' '#'
+ case 15082: // 'sliding' '#'
+ case 15083: // 'some' '#'
+ case 15084: // 'stable' '#'
+ case 15085: // 'start' '#'
+ case 15088: // 'strict' '#'
+ case 15091: // 'switch' '#'
+ case 15092: // 'text' '#'
+ case 15096: // 'to' '#'
+ case 15097: // 'treat' '#'
+ case 15098: // 'try' '#'
+ case 15099: // 'tumbling' '#'
+ case 15100: // 'type' '#'
+ case 15101: // 'typeswitch' '#'
+ case 15102: // 'union' '#'
+ case 15104: // 'unordered' '#'
+ case 15105: // 'updating' '#'
+ case 15108: // 'validate' '#'
+ case 15109: // 'value' '#'
+ case 15110: // 'variable' '#'
+ case 15111: // 'version' '#'
+ case 15114: // 'where' '#'
+ case 15115: // 'while' '#'
+ case 15118: // 'with' '#'
+ case 15122: // 'xquery' '#'
+ case 17414: // EQName^Token '('
+ case 17478: // 'after' '('
+ case 17480: // 'allowing' '('
+ case 17481: // 'ancestor' '('
+ case 17482: // 'ancestor-or-self' '('
+ case 17483: // 'and' '('
+ case 17487: // 'as' '('
+ case 17488: // 'ascending' '('
+ case 17489: // 'at' '('
+ case 17491: // 'base-uri' '('
+ case 17492: // 'before' '('
+ case 17493: // 'boundary-space' '('
+ case 17494: // 'break' '('
+ case 17496: // 'case' '('
+ case 17497: // 'cast' '('
+ case 17498: // 'castable' '('
+ case 17499: // 'catch' '('
+ case 17501: // 'child' '('
+ case 17502: // 'collation' '('
+ case 17505: // 'constraint' '('
+ case 17506: // 'construction' '('
+ case 17509: // 'context' '('
+ case 17510: // 'continue' '('
+ case 17511: // 'copy' '('
+ case 17512: // 'copy-namespaces' '('
+ case 17513: // 'count' '('
+ case 17514: // 'decimal-format' '('
+ case 17516: // 'declare' '('
+ case 17517: // 'default' '('
+ case 17518: // 'delete' '('
+ case 17519: // 'descendant' '('
+ case 17520: // 'descendant-or-self' '('
+ case 17521: // 'descending' '('
+ case 17526: // 'div' '('
+ case 17527: // 'document' '('
+ case 17530: // 'else' '('
+ case 17531: // 'empty' '('
+ case 17533: // 'encoding' '('
+ case 17534: // 'end' '('
+ case 17536: // 'eq' '('
+ case 17537: // 'every' '('
+ case 17539: // 'except' '('
+ case 17540: // 'exit' '('
+ case 17541: // 'external' '('
+ case 17542: // 'first' '('
+ case 17543: // 'following' '('
+ case 17544: // 'following-sibling' '('
+ case 17545: // 'for' '('
+ case 17549: // 'ft-option' '('
+ case 17553: // 'function' '('
+ case 17554: // 'ge' '('
+ case 17556: // 'group' '('
+ case 17558: // 'gt' '('
+ case 17559: // 'idiv' '('
+ case 17561: // 'import' '('
+ case 17562: // 'in' '('
+ case 17563: // 'index' '('
+ case 17567: // 'insert' '('
+ case 17568: // 'instance' '('
+ case 17569: // 'integrity' '('
+ case 17570: // 'intersect' '('
+ case 17571: // 'into' '('
+ case 17572: // 'is' '('
+ case 17578: // 'last' '('
+ case 17579: // 'lax' '('
+ case 17580: // 'le' '('
+ case 17582: // 'let' '('
+ case 17584: // 'loop' '('
+ case 17586: // 'lt' '('
+ case 17588: // 'mod' '('
+ case 17589: // 'modify' '('
+ case 17590: // 'module' '('
+ case 17592: // 'namespace' '('
+ case 17594: // 'ne' '('
+ case 17600: // 'nodes' '('
+ case 17606: // 'only' '('
+ case 17607: // 'option' '('
+ case 17608: // 'or' '('
+ case 17609: // 'order' '('
+ case 17610: // 'ordered' '('
+ case 17611: // 'ordering' '('
+ case 17614: // 'parent' '('
+ case 17620: // 'preceding' '('
+ case 17621: // 'preceding-sibling' '('
+ case 17626: // 'rename' '('
+ case 17627: // 'replace' '('
+ case 17628: // 'return' '('
+ case 17629: // 'returning' '('
+ case 17630: // 'revalidation' '('
+ case 17632: // 'satisfies' '('
+ case 17633: // 'schema' '('
+ case 17636: // 'score' '('
+ case 17637: // 'self' '('
+ case 17642: // 'sliding' '('
+ case 17643: // 'some' '('
+ case 17644: // 'stable' '('
+ case 17645: // 'start' '('
+ case 17648: // 'strict' '('
+ case 17656: // 'to' '('
+ case 17657: // 'treat' '('
+ case 17658: // 'try' '('
+ case 17659: // 'tumbling' '('
+ case 17660: // 'type' '('
+ case 17662: // 'union' '('
+ case 17664: // 'unordered' '('
+ case 17665: // 'updating' '('
+ case 17668: // 'validate' '('
+ case 17669: // 'value' '('
+ case 17670: // 'variable' '('
+ case 17671: // 'version' '('
+ case 17674: // 'where' '('
+ case 17675: // 'while' '('
+ case 17678: // 'with' '('
+ case 17682: // 'xquery' '('
+ case 36946: // 'attribute' 'allowing'
+ case 36985: // 'element' 'allowing'
+ case 37048: // 'namespace' 'allowing'
+ case 37080: // 'processing-instruction' 'allowing'
+ case 37458: // 'attribute' 'ancestor'
+ case 37497: // 'element' 'ancestor'
+ case 37560: // 'namespace' 'ancestor'
+ case 37592: // 'processing-instruction' 'ancestor'
+ case 37970: // 'attribute' 'ancestor-or-self'
+ case 38009: // 'element' 'ancestor-or-self'
+ case 38072: // 'namespace' 'ancestor-or-self'
+ case 38104: // 'processing-instruction' 'ancestor-or-self'
+ case 42066: // 'attribute' 'attribute'
+ case 42105: // 'element' 'attribute'
+ case 42168: // 'namespace' 'attribute'
+ case 42200: // 'processing-instruction' 'attribute'
+ case 42578: // 'attribute' 'base-uri'
+ case 42617: // 'element' 'base-uri'
+ case 42680: // 'namespace' 'base-uri'
+ case 42712: // 'processing-instruction' 'base-uri'
+ case 43602: // 'attribute' 'boundary-space'
+ case 43641: // 'element' 'boundary-space'
+ case 43704: // 'namespace' 'boundary-space'
+ case 43736: // 'processing-instruction' 'boundary-space'
+ case 44114: // 'attribute' 'break'
+ case 44153: // 'element' 'break'
+ case 44216: // 'namespace' 'break'
+ case 44248: // 'processing-instruction' 'break'
+ case 46674: // 'attribute' 'catch'
+ case 46713: // 'element' 'catch'
+ case 46776: // 'namespace' 'catch'
+ case 46808: // 'processing-instruction' 'catch'
+ case 47698: // 'attribute' 'child'
+ case 47737: // 'element' 'child'
+ case 47800: // 'namespace' 'child'
+ case 47832: // 'processing-instruction' 'child'
+ case 49234: // 'attribute' 'comment'
+ case 49273: // 'element' 'comment'
+ case 49336: // 'namespace' 'comment'
+ case 49368: // 'processing-instruction' 'comment'
+ case 49746: // 'attribute' 'constraint'
+ case 49785: // 'element' 'constraint'
+ case 49848: // 'namespace' 'constraint'
+ case 49880: // 'processing-instruction' 'constraint'
+ case 50258: // 'attribute' 'construction'
+ case 50297: // 'element' 'construction'
+ case 50360: // 'namespace' 'construction'
+ case 50392: // 'processing-instruction' 'construction'
+ case 51794: // 'attribute' 'context'
+ case 51833: // 'element' 'context'
+ case 51896: // 'namespace' 'context'
+ case 51928: // 'processing-instruction' 'context'
+ case 52306: // 'attribute' 'continue'
+ case 52345: // 'element' 'continue'
+ case 52408: // 'namespace' 'continue'
+ case 52440: // 'processing-instruction' 'continue'
+ case 52818: // 'attribute' 'copy'
+ case 52857: // 'element' 'copy'
+ case 52920: // 'namespace' 'copy'
+ case 52952: // 'processing-instruction' 'copy'
+ case 53330: // 'attribute' 'copy-namespaces'
+ case 53369: // 'element' 'copy-namespaces'
+ case 53432: // 'namespace' 'copy-namespaces'
+ case 53464: // 'processing-instruction' 'copy-namespaces'
+ case 54354: // 'attribute' 'decimal-format'
+ case 54393: // 'element' 'decimal-format'
+ case 54456: // 'namespace' 'decimal-format'
+ case 54488: // 'processing-instruction' 'decimal-format'
+ case 55378: // 'attribute' 'declare'
+ case 55417: // 'element' 'declare'
+ case 55480: // 'namespace' 'declare'
+ case 55512: // 'processing-instruction' 'declare'
+ case 56402: // 'attribute' 'delete'
+ case 56441: // 'element' 'delete'
+ case 56504: // 'namespace' 'delete'
+ case 56536: // 'processing-instruction' 'delete'
+ case 56914: // 'attribute' 'descendant'
+ case 56953: // 'element' 'descendant'
+ case 57016: // 'namespace' 'descendant'
+ case 57048: // 'processing-instruction' 'descendant'
+ case 57426: // 'attribute' 'descendant-or-self'
+ case 57465: // 'element' 'descendant-or-self'
+ case 57528: // 'namespace' 'descendant-or-self'
+ case 57560: // 'processing-instruction' 'descendant-or-self'
+ case 61010: // 'attribute' 'document'
+ case 61049: // 'element' 'document'
+ case 61112: // 'namespace' 'document'
+ case 61144: // 'processing-instruction' 'document'
+ case 61522: // 'attribute' 'document-node'
+ case 61561: // 'element' 'document-node'
+ case 61624: // 'namespace' 'document-node'
+ case 61656: // 'processing-instruction' 'document-node'
+ case 62034: // 'attribute' 'element'
+ case 62073: // 'element' 'element'
+ case 62136: // 'namespace' 'element'
+ case 62168: // 'processing-instruction' 'element'
+ case 63570: // 'attribute' 'empty-sequence'
+ case 63609: // 'element' 'empty-sequence'
+ case 63672: // 'namespace' 'empty-sequence'
+ case 63704: // 'processing-instruction' 'empty-sequence'
+ case 64082: // 'attribute' 'encoding'
+ case 64121: // 'element' 'encoding'
+ case 64184: // 'namespace' 'encoding'
+ case 64216: // 'processing-instruction' 'encoding'
+ case 66130: // 'attribute' 'every'
+ case 66169: // 'element' 'every'
+ case 66232: // 'namespace' 'every'
+ case 66264: // 'processing-instruction' 'every'
+ case 67666: // 'attribute' 'exit'
+ case 67705: // 'element' 'exit'
+ case 67768: // 'namespace' 'exit'
+ case 67800: // 'processing-instruction' 'exit'
+ case 68178: // 'attribute' 'external'
+ case 68217: // 'element' 'external'
+ case 68280: // 'namespace' 'external'
+ case 68312: // 'processing-instruction' 'external'
+ case 68690: // 'attribute' 'first'
+ case 68729: // 'element' 'first'
+ case 68792: // 'namespace' 'first'
+ case 68824: // 'processing-instruction' 'first'
+ case 69202: // 'attribute' 'following'
+ case 69241: // 'element' 'following'
+ case 69304: // 'namespace' 'following'
+ case 69336: // 'processing-instruction' 'following'
+ case 69714: // 'attribute' 'following-sibling'
+ case 69753: // 'element' 'following-sibling'
+ case 69816: // 'namespace' 'following-sibling'
+ case 69848: // 'processing-instruction' 'following-sibling'
+ case 72274: // 'attribute' 'ft-option'
+ case 72313: // 'element' 'ft-option'
+ case 72376: // 'namespace' 'ft-option'
+ case 72408: // 'processing-instruction' 'ft-option'
+ case 74322: // 'attribute' 'function'
+ case 74361: // 'element' 'function'
+ case 74424: // 'namespace' 'function'
+ case 74456: // 'processing-instruction' 'function'
+ case 77906: // 'attribute' 'if'
+ case 77945: // 'element' 'if'
+ case 78008: // 'namespace' 'if'
+ case 78040: // 'processing-instruction' 'if'
+ case 78418: // 'attribute' 'import'
+ case 78457: // 'element' 'import'
+ case 78520: // 'namespace' 'import'
+ case 78552: // 'processing-instruction' 'import'
+ case 78930: // 'attribute' 'in'
+ case 78969: // 'element' 'in'
+ case 79032: // 'namespace' 'in'
+ case 79064: // 'processing-instruction' 'in'
+ case 79442: // 'attribute' 'index'
+ case 79481: // 'element' 'index'
+ case 79544: // 'namespace' 'index'
+ case 79576: // 'processing-instruction' 'index'
+ case 81490: // 'attribute' 'insert'
+ case 81529: // 'element' 'insert'
+ case 81592: // 'namespace' 'insert'
+ case 81624: // 'processing-instruction' 'insert'
+ case 82514: // 'attribute' 'integrity'
+ case 82553: // 'element' 'integrity'
+ case 82616: // 'namespace' 'integrity'
+ case 82648: // 'processing-instruction' 'integrity'
+ case 84562: // 'attribute' 'item'
+ case 84601: // 'element' 'item'
+ case 84664: // 'namespace' 'item'
+ case 84696: // 'processing-instruction' 'item'
+ case 87122: // 'attribute' 'last'
+ case 87161: // 'element' 'last'
+ case 87224: // 'namespace' 'last'
+ case 87256: // 'processing-instruction' 'last'
+ case 87634: // 'attribute' 'lax'
+ case 87673: // 'element' 'lax'
+ case 87736: // 'namespace' 'lax'
+ case 87768: // 'processing-instruction' 'lax'
+ case 90194: // 'attribute' 'loop'
+ case 90233: // 'element' 'loop'
+ case 90296: // 'namespace' 'loop'
+ case 90328: // 'processing-instruction' 'loop'
+ case 93266: // 'attribute' 'module'
+ case 93305: // 'element' 'module'
+ case 93368: // 'namespace' 'module'
+ case 93400: // 'processing-instruction' 'module'
+ case 94290: // 'attribute' 'namespace'
+ case 94329: // 'element' 'namespace'
+ case 94392: // 'namespace' 'namespace'
+ case 94424: // 'processing-instruction' 'namespace'
+ case 94802: // 'attribute' 'namespace-node'
+ case 94841: // 'element' 'namespace-node'
+ case 94904: // 'namespace' 'namespace-node'
+ case 94936: // 'processing-instruction' 'namespace-node'
+ case 97874: // 'attribute' 'node'
+ case 97913: // 'element' 'node'
+ case 97976: // 'namespace' 'node'
+ case 98008: // 'processing-instruction' 'node'
+ case 98386: // 'attribute' 'nodes'
+ case 98425: // 'element' 'nodes'
+ case 98488: // 'namespace' 'nodes'
+ case 98520: // 'processing-instruction' 'nodes'
+ case 101970: // 'attribute' 'option'
+ case 102009: // 'element' 'option'
+ case 102072: // 'namespace' 'option'
+ case 102104: // 'processing-instruction' 'option'
+ case 103506: // 'attribute' 'ordered'
+ case 103545: // 'element' 'ordered'
+ case 103608: // 'namespace' 'ordered'
+ case 103640: // 'processing-instruction' 'ordered'
+ case 104018: // 'attribute' 'ordering'
+ case 104057: // 'element' 'ordering'
+ case 104120: // 'namespace' 'ordering'
+ case 104152: // 'processing-instruction' 'ordering'
+ case 105554: // 'attribute' 'parent'
+ case 105593: // 'element' 'parent'
+ case 105656: // 'namespace' 'parent'
+ case 105688: // 'processing-instruction' 'parent'
+ case 108626: // 'attribute' 'preceding'
+ case 108665: // 'element' 'preceding'
+ case 108728: // 'namespace' 'preceding'
+ case 108760: // 'processing-instruction' 'preceding'
+ case 109138: // 'attribute' 'preceding-sibling'
+ case 109177: // 'element' 'preceding-sibling'
+ case 109240: // 'namespace' 'preceding-sibling'
+ case 109272: // 'processing-instruction' 'preceding-sibling'
+ case 110674: // 'attribute' 'processing-instruction'
+ case 110713: // 'element' 'processing-instruction'
+ case 110776: // 'namespace' 'processing-instruction'
+ case 110808: // 'processing-instruction' 'processing-instruction'
+ case 111698: // 'attribute' 'rename'
+ case 111737: // 'element' 'rename'
+ case 111800: // 'namespace' 'rename'
+ case 111832: // 'processing-instruction' 'rename'
+ case 112210: // 'attribute' 'replace'
+ case 112249: // 'element' 'replace'
+ case 112312: // 'namespace' 'replace'
+ case 112344: // 'processing-instruction' 'replace'
+ case 113234: // 'attribute' 'returning'
+ case 113273: // 'element' 'returning'
+ case 113336: // 'namespace' 'returning'
+ case 113368: // 'processing-instruction' 'returning'
+ case 113746: // 'attribute' 'revalidation'
+ case 113785: // 'element' 'revalidation'
+ case 113848: // 'namespace' 'revalidation'
+ case 113880: // 'processing-instruction' 'revalidation'
+ case 115282: // 'attribute' 'schema'
+ case 115321: // 'element' 'schema'
+ case 115384: // 'namespace' 'schema'
+ case 115416: // 'processing-instruction' 'schema'
+ case 115794: // 'attribute' 'schema-attribute'
+ case 115833: // 'element' 'schema-attribute'
+ case 115896: // 'namespace' 'schema-attribute'
+ case 115928: // 'processing-instruction' 'schema-attribute'
+ case 116306: // 'attribute' 'schema-element'
+ case 116345: // 'element' 'schema-element'
+ case 116408: // 'namespace' 'schema-element'
+ case 116440: // 'processing-instruction' 'schema-element'
+ case 116818: // 'attribute' 'score'
+ case 116857: // 'element' 'score'
+ case 116920: // 'namespace' 'score'
+ case 116952: // 'processing-instruction' 'score'
+ case 117330: // 'attribute' 'self'
+ case 117369: // 'element' 'self'
+ case 117432: // 'namespace' 'self'
+ case 117464: // 'processing-instruction' 'self'
+ case 119890: // 'attribute' 'sliding'
+ case 119929: // 'element' 'sliding'
+ case 119992: // 'namespace' 'sliding'
+ case 120024: // 'processing-instruction' 'sliding'
+ case 120402: // 'attribute' 'some'
+ case 120441: // 'element' 'some'
+ case 120504: // 'namespace' 'some'
+ case 120536: // 'processing-instruction' 'some'
+ case 122962: // 'attribute' 'strict'
+ case 123001: // 'element' 'strict'
+ case 123064: // 'namespace' 'strict'
+ case 123096: // 'processing-instruction' 'strict'
+ case 124498: // 'attribute' 'switch'
+ case 124537: // 'element' 'switch'
+ case 124600: // 'namespace' 'switch'
+ case 124632: // 'processing-instruction' 'switch'
+ case 125010: // 'attribute' 'text'
+ case 125049: // 'element' 'text'
+ case 125112: // 'namespace' 'text'
+ case 125144: // 'processing-instruction' 'text'
+ case 128082: // 'attribute' 'try'
+ case 128121: // 'element' 'try'
+ case 128184: // 'namespace' 'try'
+ case 128216: // 'processing-instruction' 'try'
+ case 128594: // 'attribute' 'tumbling'
+ case 128633: // 'element' 'tumbling'
+ case 128696: // 'namespace' 'tumbling'
+ case 128728: // 'processing-instruction' 'tumbling'
+ case 129106: // 'attribute' 'type'
+ case 129145: // 'element' 'type'
+ case 129208: // 'namespace' 'type'
+ case 129240: // 'processing-instruction' 'type'
+ case 129618: // 'attribute' 'typeswitch'
+ case 129657: // 'element' 'typeswitch'
+ case 129720: // 'namespace' 'typeswitch'
+ case 129752: // 'processing-instruction' 'typeswitch'
+ case 131154: // 'attribute' 'unordered'
+ case 131193: // 'element' 'unordered'
+ case 131256: // 'namespace' 'unordered'
+ case 131288: // 'processing-instruction' 'unordered'
+ case 131666: // 'attribute' 'updating'
+ case 131705: // 'element' 'updating'
+ case 131768: // 'namespace' 'updating'
+ case 131800: // 'processing-instruction' 'updating'
+ case 133202: // 'attribute' 'validate'
+ case 133241: // 'element' 'validate'
+ case 133304: // 'namespace' 'validate'
+ case 133336: // 'processing-instruction' 'validate'
+ case 133714: // 'attribute' 'value'
+ case 133753: // 'element' 'value'
+ case 133816: // 'namespace' 'value'
+ case 133848: // 'processing-instruction' 'value'
+ case 134226: // 'attribute' 'variable'
+ case 134265: // 'element' 'variable'
+ case 134328: // 'namespace' 'variable'
+ case 134360: // 'processing-instruction' 'variable'
+ case 134738: // 'attribute' 'version'
+ case 134777: // 'element' 'version'
+ case 134840: // 'namespace' 'version'
+ case 134872: // 'processing-instruction' 'version'
+ case 136786: // 'attribute' 'while'
+ case 136825: // 'element' 'while'
+ case 136888: // 'namespace' 'while'
+ case 136920: // 'processing-instruction' 'while'
+ case 140370: // 'attribute' 'xquery'
+ case 140409: // 'element' 'xquery'
+ case 140472: // 'namespace' 'xquery'
+ case 140504: // 'processing-instruction' 'xquery'
+ case 141394: // 'attribute' '{'
+ case 141408: // 'comment' '{'
+ case 141431: // 'document' '{'
+ case 141433: // 'element' '{'
+ case 141496: // 'namespace' '{'
+ case 141514: // 'ordered' '{'
+ case 141528: // 'processing-instruction' '{'
+ case 141556: // 'text' '{'
+ case 141568: // 'unordered' '{'
+ try_PostfixExpr();
+ break;
+ default:
+ try_AxisStep();
+ }
+ }
+
+ function parse_AxisStep()
+ {
+ eventHandler.startNonterminal("AxisStep", e0);
+ switch (l1)
+ {
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 45: // '..'
+ case 26185: // 'ancestor' '::'
+ case 26186: // 'ancestor-or-self' '::'
+ case 26318: // 'parent' '::'
+ case 26324: // 'preceding' '::'
+ case 26325: // 'preceding-sibling' '::'
+ parse_ReverseStep();
+ break;
+ default:
+ parse_ForwardStep();
+ }
+ lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ whitespace();
+ parse_PredicateList();
+ eventHandler.endNonterminal("AxisStep", e0);
+ }
+
+ function try_AxisStep()
+ {
+ switch (l1)
+ {
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 45: // '..'
+ case 26185: // 'ancestor' '::'
+ case 26186: // 'ancestor-or-self' '::'
+ case 26318: // 'parent' '::'
+ case 26324: // 'preceding' '::'
+ case 26325: // 'preceding-sibling' '::'
+ try_ReverseStep();
+ break;
+ default:
+ try_ForwardStep();
+ }
+ lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ try_PredicateList();
+ }
+
+ function parse_ForwardStep()
+ {
+ eventHandler.startNonterminal("ForwardStep", e0);
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(243); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 229: // 'self'
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 26194: // 'attribute' '::'
+ case 26205: // 'child' '::'
+ case 26223: // 'descendant' '::'
+ case 26224: // 'descendant-or-self' '::'
+ case 26247: // 'following' '::'
+ case 26248: // 'following-sibling' '::'
+ case 26341: // 'self' '::'
+ parse_ForwardAxis();
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ break;
+ default:
+ parse_AbbrevForwardStep();
+ }
+ eventHandler.endNonterminal("ForwardStep", e0);
+ }
+
+ function try_ForwardStep()
+ {
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(243); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 229: // 'self'
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 26194: // 'attribute' '::'
+ case 26205: // 'child' '::'
+ case 26223: // 'descendant' '::'
+ case 26224: // 'descendant-or-self' '::'
+ case 26247: // 'following' '::'
+ case 26248: // 'following-sibling' '::'
+ case 26341: // 'self' '::'
+ try_ForwardAxis();
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ break;
+ default:
+ try_AbbrevForwardStep();
+ }
+ }
+
+ function parse_ForwardAxis()
+ {
+ eventHandler.startNonterminal("ForwardAxis", e0);
+ switch (l1)
+ {
+ case 93: // 'child'
+ shift(93); // 'child'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 111: // 'descendant'
+ shift(111); // 'descendant'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 82: // 'attribute'
+ shift(82); // 'attribute'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 229: // 'self'
+ shift(229); // 'self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 112: // 'descendant-or-self'
+ shift(112); // 'descendant-or-self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 136: // 'following-sibling'
+ shift(136); // 'following-sibling'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ default:
+ shift(135); // 'following'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ }
+ eventHandler.endNonterminal("ForwardAxis", e0);
+ }
+
+ function try_ForwardAxis()
+ {
+ switch (l1)
+ {
+ case 93: // 'child'
+ shiftT(93); // 'child'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 111: // 'descendant'
+ shiftT(111); // 'descendant'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 82: // 'attribute'
+ shiftT(82); // 'attribute'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 229: // 'self'
+ shiftT(229); // 'self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 112: // 'descendant-or-self'
+ shiftT(112); // 'descendant-or-self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 136: // 'following-sibling'
+ shiftT(136); // 'following-sibling'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ default:
+ shiftT(135); // 'following'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ }
+ }
+
+ function parse_AbbrevForwardStep()
+ {
+ eventHandler.startNonterminal("AbbrevForwardStep", e0);
+ if (l1 == 66) // '@'
+ {
+ shift(66); // '@'
+ }
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ eventHandler.endNonterminal("AbbrevForwardStep", e0);
+ }
+
+ function try_AbbrevForwardStep()
+ {
+ if (l1 == 66) // '@'
+ {
+ shiftT(66); // '@'
+ }
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ }
+
+ function parse_ReverseStep()
+ {
+ eventHandler.startNonterminal("ReverseStep", e0);
+ switch (l1)
+ {
+ case 45: // '..'
+ parse_AbbrevReverseStep();
+ break;
+ default:
+ parse_ReverseAxis();
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ }
+ eventHandler.endNonterminal("ReverseStep", e0);
+ }
+
+ function try_ReverseStep()
+ {
+ switch (l1)
+ {
+ case 45: // '..'
+ try_AbbrevReverseStep();
+ break;
+ default:
+ try_ReverseAxis();
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ }
+ }
+
+ function parse_ReverseAxis()
+ {
+ eventHandler.startNonterminal("ReverseAxis", e0);
+ switch (l1)
+ {
+ case 206: // 'parent'
+ shift(206); // 'parent'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 73: // 'ancestor'
+ shift(73); // 'ancestor'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 213: // 'preceding-sibling'
+ shift(213); // 'preceding-sibling'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 212: // 'preceding'
+ shift(212); // 'preceding'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ default:
+ shift(74); // 'ancestor-or-self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ }
+ eventHandler.endNonterminal("ReverseAxis", e0);
+ }
+
+ function try_ReverseAxis()
+ {
+ switch (l1)
+ {
+ case 206: // 'parent'
+ shiftT(206); // 'parent'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 73: // 'ancestor'
+ shiftT(73); // 'ancestor'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 213: // 'preceding-sibling'
+ shiftT(213); // 'preceding-sibling'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 212: // 'preceding'
+ shiftT(212); // 'preceding'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ default:
+ shiftT(74); // 'ancestor-or-self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ }
+ }
+
+ function parse_AbbrevReverseStep()
+ {
+ eventHandler.startNonterminal("AbbrevReverseStep", e0);
+ shift(45); // '..'
+ eventHandler.endNonterminal("AbbrevReverseStep", e0);
+ }
+
+ function try_AbbrevReverseStep()
+ {
+ shiftT(45); // '..'
+ }
+
+ function parse_NodeTest()
+ {
+ eventHandler.startNonterminal("NodeTest", e0);
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 244: // 'text'
+ lookahead2W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17490: // 'attribute' '('
+ case 17504: // 'comment' '('
+ case 17528: // 'document-node' '('
+ case 17529: // 'element' '('
+ case 17593: // 'namespace-node' '('
+ case 17599: // 'node' '('
+ case 17624: // 'processing-instruction' '('
+ case 17634: // 'schema-attribute' '('
+ case 17635: // 'schema-element' '('
+ case 17652: // 'text' '('
+ parse_KindTest();
+ break;
+ default:
+ parse_NameTest();
+ }
+ eventHandler.endNonterminal("NodeTest", e0);
+ }
+
+ function try_NodeTest()
+ {
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 244: // 'text'
+ lookahead2W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17490: // 'attribute' '('
+ case 17504: // 'comment' '('
+ case 17528: // 'document-node' '('
+ case 17529: // 'element' '('
+ case 17593: // 'namespace-node' '('
+ case 17599: // 'node' '('
+ case 17624: // 'processing-instruction' '('
+ case 17634: // 'schema-attribute' '('
+ case 17635: // 'schema-element' '('
+ case 17652: // 'text' '('
+ try_KindTest();
+ break;
+ default:
+ try_NameTest();
+ }
+ }
+
+ function parse_NameTest()
+ {
+ eventHandler.startNonterminal("NameTest", e0);
+ switch (l1)
+ {
+ case 5: // Wildcard
+ shift(5); // Wildcard
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("NameTest", e0);
+ }
+
+ function try_NameTest()
+ {
+ switch (l1)
+ {
+ case 5: // Wildcard
+ shiftT(5); // Wildcard
+ break;
+ default:
+ try_EQName();
+ }
+ }
+
+ function parse_PostfixExpr()
+ {
+ eventHandler.startNonterminal("PostfixExpr", e0);
+ parse_PrimaryExpr();
+ for (;;)
+ {
+ lookahead1W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ if (l1 != 34 // '('
+ && l1 != 68) // '['
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 68: // '['
+ whitespace();
+ parse_Predicate();
+ break;
+ default:
+ whitespace();
+ parse_ArgumentList();
+ }
+ }
+ eventHandler.endNonterminal("PostfixExpr", e0);
+ }
+
+ function try_PostfixExpr()
+ {
+ try_PrimaryExpr();
+ for (;;)
+ {
+ lookahead1W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ if (l1 != 34 // '('
+ && l1 != 68) // '['
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 68: // '['
+ try_Predicate();
+ break;
+ default:
+ try_ArgumentList();
+ }
+ }
+ }
+
+ function parse_ArgumentList()
+ {
+ eventHandler.startNonterminal("ArgumentList", e0);
+ shift(34); // '('
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_Argument();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Argument();
+ }
+ }
+ shift(37); // ')'
+ eventHandler.endNonterminal("ArgumentList", e0);
+ }
+
+ function try_ArgumentList()
+ {
+ shiftT(34); // '('
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 37) // ')'
+ {
+ try_Argument();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Argument();
+ }
+ }
+ shiftT(37); // ')'
+ }
+
+ function parse_PredicateList()
+ {
+ eventHandler.startNonterminal("PredicateList", e0);
+ for (;;)
+ {
+ lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ if (l1 != 68) // '['
+ {
+ break;
+ }
+ whitespace();
+ parse_Predicate();
+ }
+ eventHandler.endNonterminal("PredicateList", e0);
+ }
+
+ function try_PredicateList()
+ {
+ for (;;)
+ {
+ lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ if (l1 != 68) // '['
+ {
+ break;
+ }
+ try_Predicate();
+ }
+ }
+
+ function parse_Predicate()
+ {
+ eventHandler.startNonterminal("Predicate", e0);
+ shift(68); // '['
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(69); // ']'
+ eventHandler.endNonterminal("Predicate", e0);
+ }
+
+ function try_Predicate()
+ {
+ shiftT(68); // '['
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(69); // ']'
+ }
+
+ function parse_Literal()
+ {
+ eventHandler.startNonterminal("Literal", e0);
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ parse_NumericLiteral();
+ }
+ eventHandler.endNonterminal("Literal", e0);
+ }
+
+ function try_Literal()
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ try_NumericLiteral();
+ }
+ }
+
+ function parse_NumericLiteral()
+ {
+ eventHandler.startNonterminal("NumericLiteral", e0);
+ switch (l1)
+ {
+ case 8: // IntegerLiteral
+ shift(8); // IntegerLiteral
+ break;
+ case 9: // DecimalLiteral
+ shift(9); // DecimalLiteral
+ break;
+ default:
+ shift(10); // DoubleLiteral
+ }
+ eventHandler.endNonterminal("NumericLiteral", e0);
+ }
+
+ function try_NumericLiteral()
+ {
+ switch (l1)
+ {
+ case 8: // IntegerLiteral
+ shiftT(8); // IntegerLiteral
+ break;
+ case 9: // DecimalLiteral
+ shiftT(9); // DecimalLiteral
+ break;
+ default:
+ shiftT(10); // DoubleLiteral
+ }
+ }
+
+ function parse_VarRef()
+ {
+ eventHandler.startNonterminal("VarRef", e0);
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("VarRef", e0);
+ }
+
+ function try_VarRef()
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_VarName()
+ {
+ eventHandler.startNonterminal("VarName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("VarName", e0);
+ }
+
+ function try_VarName()
+ {
+ try_EQName();
+ }
+
+ function parse_ParenthesizedExpr()
+ {
+ eventHandler.startNonterminal("ParenthesizedExpr", e0);
+ shift(34); // '('
+ lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(37); // ')'
+ eventHandler.endNonterminal("ParenthesizedExpr", e0);
+ }
+
+ function try_ParenthesizedExpr()
+ {
+ shiftT(34); // '('
+ lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 37) // ')'
+ {
+ try_Expr();
+ }
+ shiftT(37); // ')'
+ }
+
+ function parse_ContextItemExpr()
+ {
+ eventHandler.startNonterminal("ContextItemExpr", e0);
+ shift(44); // '.'
+ eventHandler.endNonterminal("ContextItemExpr", e0);
+ }
+
+ function try_ContextItemExpr()
+ {
+ shiftT(44); // '.'
+ }
+
+ function parse_OrderedExpr()
+ {
+ eventHandler.startNonterminal("OrderedExpr", e0);
+ shift(202); // 'ordered'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("OrderedExpr", e0);
+ }
+
+ function try_OrderedExpr()
+ {
+ shiftT(202); // 'ordered'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_UnorderedExpr()
+ {
+ eventHandler.startNonterminal("UnorderedExpr", e0);
+ shift(256); // 'unordered'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("UnorderedExpr", e0);
+ }
+
+ function try_UnorderedExpr()
+ {
+ shiftT(256); // 'unordered'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_FunctionCall()
+ {
+ eventHandler.startNonterminal("FunctionCall", e0);
+ parse_FunctionName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ whitespace();
+ parse_ArgumentList();
+ eventHandler.endNonterminal("FunctionCall", e0);
+ }
+
+ function try_FunctionCall()
+ {
+ try_FunctionName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ try_ArgumentList();
+ }
+
+ function parse_Argument()
+ {
+ eventHandler.startNonterminal("Argument", e0);
+ switch (l1)
+ {
+ case 64: // '?'
+ parse_ArgumentPlaceholder();
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("Argument", e0);
+ }
+
+ function try_Argument()
+ {
+ switch (l1)
+ {
+ case 64: // '?'
+ try_ArgumentPlaceholder();
+ break;
+ default:
+ try_ExprSingle();
+ }
+ }
+
+ function parse_ArgumentPlaceholder()
+ {
+ eventHandler.startNonterminal("ArgumentPlaceholder", e0);
+ shift(64); // '?'
+ eventHandler.endNonterminal("ArgumentPlaceholder", e0);
+ }
+
+ function try_ArgumentPlaceholder()
+ {
+ shiftT(64); // '?'
+ }
+
+ function parse_Constructor()
+ {
+ eventHandler.startNonterminal("Constructor", e0);
+ switch (l1)
+ {
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ parse_DirectConstructor();
+ break;
+ default:
+ parse_ComputedConstructor();
+ }
+ eventHandler.endNonterminal("Constructor", e0);
+ }
+
+ function try_Constructor()
+ {
+ switch (l1)
+ {
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ try_DirectConstructor();
+ break;
+ default:
+ try_ComputedConstructor();
+ }
+ }
+
+ function parse_DirectConstructor()
+ {
+ eventHandler.startNonterminal("DirectConstructor", e0);
+ switch (l1)
+ {
+ case 54: // '<'
+ parse_DirElemConstructor();
+ break;
+ case 55: // '<!--'
+ parse_DirCommentConstructor();
+ break;
+ default:
+ parse_DirPIConstructor();
+ }
+ eventHandler.endNonterminal("DirectConstructor", e0);
+ }
+
+ function try_DirectConstructor()
+ {
+ switch (l1)
+ {
+ case 54: // '<'
+ try_DirElemConstructor();
+ break;
+ case 55: // '<!--'
+ try_DirCommentConstructor();
+ break;
+ default:
+ try_DirPIConstructor();
+ }
+ }
+
+ function parse_DirElemConstructor()
+ {
+ eventHandler.startNonterminal("DirElemConstructor", e0);
+ shift(54); // '<'
+ lookahead1(4); // QName
+ shift(20); // QName
+ parse_DirAttributeList();
+ switch (l1)
+ {
+ case 48: // '/>'
+ shift(48); // '/>'
+ break;
+ default:
+ shift(61); // '>'
+ for (;;)
+ {
+ lookahead1(174); // CDataSection | PredefinedEntityRef | ElementContentChar | CharRef | '<' |
+ if (l1 == 56) // '</'
+ {
+ break;
+ }
+ parse_DirElemContent();
+ }
+ shift(56); // '</'
+ lookahead1(4); // QName
+ shift(20); // QName
+ lookahead1(12); // S | '>'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ lookahead1(8); // '>'
+ shift(61); // '>'
+ }
+ eventHandler.endNonterminal("DirElemConstructor", e0);
+ }
+
+ function try_DirElemConstructor()
+ {
+ shiftT(54); // '<'
+ lookahead1(4); // QName
+ shiftT(20); // QName
+ try_DirAttributeList();
+ switch (l1)
+ {
+ case 48: // '/>'
+ shiftT(48); // '/>'
+ break;
+ default:
+ shiftT(61); // '>'
+ for (;;)
+ {
+ lookahead1(174); // CDataSection | PredefinedEntityRef | ElementContentChar | CharRef | '<' |
+ if (l1 == 56) // '</'
+ {
+ break;
+ }
+ try_DirElemContent();
+ }
+ shiftT(56); // '</'
+ lookahead1(4); // QName
+ shiftT(20); // QName
+ lookahead1(12); // S | '>'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ lookahead1(8); // '>'
+ shiftT(61); // '>'
+ }
+ }
+
+ function parse_DirAttributeList()
+ {
+ eventHandler.startNonterminal("DirAttributeList", e0);
+ for (;;)
+ {
+ lookahead1(19); // S | '/>' | '>'
+ if (l1 != 21) // S
+ {
+ break;
+ }
+ shift(21); // S
+ lookahead1(91); // QName | S | '/>' | '>'
+ if (l1 == 20) // QName
+ {
+ shift(20); // QName
+ lookahead1(11); // S | '='
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ lookahead1(7); // '='
+ shift(60); // '='
+ lookahead1(18); // S | '"' | "'"
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ parse_DirAttributeValue();
+ }
+ }
+ eventHandler.endNonterminal("DirAttributeList", e0);
+ }
+
+ function try_DirAttributeList()
+ {
+ for (;;)
+ {
+ lookahead1(19); // S | '/>' | '>'
+ if (l1 != 21) // S
+ {
+ break;
+ }
+ shiftT(21); // S
+ lookahead1(91); // QName | S | '/>' | '>'
+ if (l1 == 20) // QName
+ {
+ shiftT(20); // QName
+ lookahead1(11); // S | '='
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ lookahead1(7); // '='
+ shiftT(60); // '='
+ lookahead1(18); // S | '"' | "'"
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ try_DirAttributeValue();
+ }
+ }
+ }
+
+ function parse_DirAttributeValue()
+ {
+ eventHandler.startNonterminal("DirAttributeValue", e0);
+ lookahead1(14); // '"' | "'"
+ switch (l1)
+ {
+ case 28: // '"'
+ shift(28); // '"'
+ for (;;)
+ {
+ lookahead1(167); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | '"' | '{' |
+ if (l1 == 28) // '"'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 13: // EscapeQuot
+ shift(13); // EscapeQuot
+ break;
+ default:
+ parse_QuotAttrValueContent();
+ }
+ }
+ shift(28); // '"'
+ break;
+ default:
+ shift(33); // "'"
+ for (;;)
+ {
+ lookahead1(168); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | "'" | '{' |
+ if (l1 == 33) // "'"
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 14: // EscapeApos
+ shift(14); // EscapeApos
+ break;
+ default:
+ parse_AposAttrValueContent();
+ }
+ }
+ shift(33); // "'"
+ }
+ eventHandler.endNonterminal("DirAttributeValue", e0);
+ }
+
+ function try_DirAttributeValue()
+ {
+ lookahead1(14); // '"' | "'"
+ switch (l1)
+ {
+ case 28: // '"'
+ shiftT(28); // '"'
+ for (;;)
+ {
+ lookahead1(167); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | '"' | '{' |
+ if (l1 == 28) // '"'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 13: // EscapeQuot
+ shiftT(13); // EscapeQuot
+ break;
+ default:
+ try_QuotAttrValueContent();
+ }
+ }
+ shiftT(28); // '"'
+ break;
+ default:
+ shiftT(33); // "'"
+ for (;;)
+ {
+ lookahead1(168); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | "'" | '{' |
+ if (l1 == 33) // "'"
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 14: // EscapeApos
+ shiftT(14); // EscapeApos
+ break;
+ default:
+ try_AposAttrValueContent();
+ }
+ }
+ shiftT(33); // "'"
+ }
+ }
+
+ function parse_QuotAttrValueContent()
+ {
+ eventHandler.startNonterminal("QuotAttrValueContent", e0);
+ switch (l1)
+ {
+ case 16: // QuotAttrContentChar
+ shift(16); // QuotAttrContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("QuotAttrValueContent", e0);
+ }
+
+ function try_QuotAttrValueContent()
+ {
+ switch (l1)
+ {
+ case 16: // QuotAttrContentChar
+ shiftT(16); // QuotAttrContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_AposAttrValueContent()
+ {
+ eventHandler.startNonterminal("AposAttrValueContent", e0);
+ switch (l1)
+ {
+ case 17: // AposAttrContentChar
+ shift(17); // AposAttrContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("AposAttrValueContent", e0);
+ }
+
+ function try_AposAttrValueContent()
+ {
+ switch (l1)
+ {
+ case 17: // AposAttrContentChar
+ shiftT(17); // AposAttrContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_DirElemContent()
+ {
+ eventHandler.startNonterminal("DirElemContent", e0);
+ switch (l1)
+ {
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ parse_DirectConstructor();
+ break;
+ case 4: // CDataSection
+ shift(4); // CDataSection
+ break;
+ case 15: // ElementContentChar
+ shift(15); // ElementContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("DirElemContent", e0);
+ }
+
+ function try_DirElemContent()
+ {
+ switch (l1)
+ {
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ try_DirectConstructor();
+ break;
+ case 4: // CDataSection
+ shiftT(4); // CDataSection
+ break;
+ case 15: // ElementContentChar
+ shiftT(15); // ElementContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_DirCommentConstructor()
+ {
+ eventHandler.startNonterminal("DirCommentConstructor", e0);
+ shift(55); // '<!--'
+ lookahead1(1); // DirCommentContents
+ shift(2); // DirCommentContents
+ lookahead1(6); // '-->'
+ shift(43); // '-->'
+ eventHandler.endNonterminal("DirCommentConstructor", e0);
+ }
+
+ function try_DirCommentConstructor()
+ {
+ shiftT(55); // '<!--'
+ lookahead1(1); // DirCommentContents
+ shiftT(2); // DirCommentContents
+ lookahead1(6); // '-->'
+ shiftT(43); // '-->'
+ }
+
+ function parse_DirPIConstructor()
+ {
+ eventHandler.startNonterminal("DirPIConstructor", e0);
+ shift(59); // '<?'
+ lookahead1(3); // PITarget
+ shift(18); // PITarget
+ lookahead1(13); // S | '?>'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ lookahead1(2); // DirPIContents
+ shift(3); // DirPIContents
+ }
+ lookahead1(9); // '?>'
+ shift(65); // '?>'
+ eventHandler.endNonterminal("DirPIConstructor", e0);
+ }
+
+ function try_DirPIConstructor()
+ {
+ shiftT(59); // '<?'
+ lookahead1(3); // PITarget
+ shiftT(18); // PITarget
+ lookahead1(13); // S | '?>'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ lookahead1(2); // DirPIContents
+ shiftT(3); // DirPIContents
+ }
+ lookahead1(9); // '?>'
+ shiftT(65); // '?>'
+ }
+
+ function parse_ComputedConstructor()
+ {
+ eventHandler.startNonterminal("ComputedConstructor", e0);
+ switch (l1)
+ {
+ case 119: // 'document'
+ parse_CompDocConstructor();
+ break;
+ case 121: // 'element'
+ parse_CompElemConstructor();
+ break;
+ case 82: // 'attribute'
+ parse_CompAttrConstructor();
+ break;
+ case 184: // 'namespace'
+ parse_CompNamespaceConstructor();
+ break;
+ case 244: // 'text'
+ parse_CompTextConstructor();
+ break;
+ case 96: // 'comment'
+ parse_CompCommentConstructor();
+ break;
+ default:
+ parse_CompPIConstructor();
+ }
+ eventHandler.endNonterminal("ComputedConstructor", e0);
+ }
+
+ function try_ComputedConstructor()
+ {
+ switch (l1)
+ {
+ case 119: // 'document'
+ try_CompDocConstructor();
+ break;
+ case 121: // 'element'
+ try_CompElemConstructor();
+ break;
+ case 82: // 'attribute'
+ try_CompAttrConstructor();
+ break;
+ case 184: // 'namespace'
+ try_CompNamespaceConstructor();
+ break;
+ case 244: // 'text'
+ try_CompTextConstructor();
+ break;
+ case 96: // 'comment'
+ try_CompCommentConstructor();
+ break;
+ default:
+ try_CompPIConstructor();
+ }
+ }
+
+ function parse_CompElemConstructor()
+ {
+ eventHandler.startNonterminal("CompElemConstructor", e0);
+ shift(121); // 'element'
+ lookahead1W(252); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_EQName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_ContentExpr();
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("CompElemConstructor", e0);
+ }
+
+ function try_CompElemConstructor()
+ {
+ shiftT(121); // 'element'
+ lookahead1W(252); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 276: // '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ break;
+ default:
+ try_EQName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ try_ContentExpr();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_CompNamespaceConstructor()
+ {
+ eventHandler.startNonterminal("CompNamespaceConstructor", e0);
+ shift(184); // 'namespace'
+ lookahead1W(253); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PrefixExpr();
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_Prefix();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_URIExpr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("CompNamespaceConstructor", e0);
+ }
+
+ function try_CompNamespaceConstructor()
+ {
+ shiftT(184); // 'namespace'
+ lookahead1W(253); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 276: // '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_PrefixExpr();
+ shiftT(282); // '}'
+ break;
+ default:
+ try_Prefix();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_URIExpr();
+ shiftT(282); // '}'
+ }
+
+ function parse_Prefix()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ }
+
+ function try_Prefix()
+ {
+ try_NCName();
+ }
+
+ function parse_PrefixExpr()
+ {
+ eventHandler.startNonterminal("PrefixExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("PrefixExpr", e0);
+ }
+
+ function try_PrefixExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_URIExpr()
+ {
+ eventHandler.startNonterminal("URIExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("URIExpr", e0);
+ }
+
+ function try_URIExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_FunctionItemExpr()
+ {
+ eventHandler.startNonterminal("FunctionItemExpr", e0);
+ switch (l1)
+ {
+ case 145: // 'function'
+ lookahead2W(92); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 32: // '%'
+ case 17553: // 'function' '('
+ parse_InlineFunctionExpr();
+ break;
+ default:
+ parse_NamedFunctionRef();
+ }
+ eventHandler.endNonterminal("FunctionItemExpr", e0);
+ }
+
+ function try_FunctionItemExpr()
+ {
+ switch (l1)
+ {
+ case 145: // 'function'
+ lookahead2W(92); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 32: // '%'
+ case 17553: // 'function' '('
+ try_InlineFunctionExpr();
+ break;
+ default:
+ try_NamedFunctionRef();
+ }
+ }
+
+ function parse_NamedFunctionRef()
+ {
+ eventHandler.startNonterminal("NamedFunctionRef", e0);
+ parse_EQName();
+ lookahead1W(20); // S^WS | '#' | '(:'
+ shift(29); // '#'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ eventHandler.endNonterminal("NamedFunctionRef", e0);
+ }
+
+ function try_NamedFunctionRef()
+ {
+ try_EQName();
+ lookahead1W(20); // S^WS | '#' | '(:'
+ shiftT(29); // '#'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+
+ function parse_InlineFunctionExpr()
+ {
+ eventHandler.startNonterminal("InlineFunctionExpr", e0);
+ for (;;)
+ {
+ lookahead1W(97); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ shift(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(94); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ whitespace();
+ parse_ParamList();
+ }
+ shift(37); // ')'
+ lookahead1W(111); // S^WS | '(:' | 'as' | '{'
+ if (l1 == 79) // 'as'
+ {
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_FunctionBody();
+ eventHandler.endNonterminal("InlineFunctionExpr", e0);
+ }
+
+ function try_InlineFunctionExpr()
+ {
+ for (;;)
+ {
+ lookahead1W(97); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ shiftT(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(94); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ try_ParamList();
+ }
+ shiftT(37); // ')'
+ lookahead1W(111); // S^WS | '(:' | 'as' | '{'
+ if (l1 == 79) // 'as'
+ {
+ shiftT(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_FunctionBody();
+ }
+
+ function parse_SingleType()
+ {
+ eventHandler.startNonterminal("SingleType", e0);
+ parse_SimpleTypeName();
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 64) // '?'
+ {
+ shift(64); // '?'
+ }
+ eventHandler.endNonterminal("SingleType", e0);
+ }
+
+ function try_SingleType()
+ {
+ try_SimpleTypeName();
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 64) // '?'
+ {
+ shiftT(64); // '?'
+ }
+ }
+
+ function parse_TypeDeclaration()
+ {
+ eventHandler.startNonterminal("TypeDeclaration", e0);
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("TypeDeclaration", e0);
+ }
+
+ function try_TypeDeclaration()
+ {
+ shiftT(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+
+ function parse_SequenceType()
+ {
+ eventHandler.startNonterminal("SequenceType", e0);
+ switch (l1)
+ {
+ case 124: // 'empty-sequence'
+ lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17532: // 'empty-sequence' '('
+ shift(124); // 'empty-sequence'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ break;
+ default:
+ parse_ItemType();
+ lookahead1W(237); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ switch (l1)
+ {
+ case 39: // '*'
+ case 40: // '+'
+ case 64: // '?'
+ whitespace();
+ parse_OccurrenceIndicator();
+ break;
+ default:
+ break;
+ }
+ }
+ eventHandler.endNonterminal("SequenceType", e0);
+ }
+
+ function try_SequenceType()
+ {
+ switch (l1)
+ {
+ case 124: // 'empty-sequence'
+ lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17532: // 'empty-sequence' '('
+ shiftT(124); // 'empty-sequence'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ break;
+ default:
+ try_ItemType();
+ lookahead1W(237); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ switch (l1)
+ {
+ case 39: // '*'
+ case 40: // '+'
+ case 64: // '?'
+ try_OccurrenceIndicator();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ function parse_OccurrenceIndicator()
+ {
+ eventHandler.startNonterminal("OccurrenceIndicator", e0);
+ switch (l1)
+ {
+ case 64: // '?'
+ shift(64); // '?'
+ break;
+ case 39: // '*'
+ shift(39); // '*'
+ break;
+ default:
+ shift(40); // '+'
+ }
+ eventHandler.endNonterminal("OccurrenceIndicator", e0);
+ }
+
+ function try_OccurrenceIndicator()
+ {
+ switch (l1)
+ {
+ case 64: // '?'
+ shiftT(64); // '?'
+ break;
+ case 39: // '*'
+ shiftT(39); // '*'
+ break;
+ default:
+ shiftT(40); // '+'
+ }
+ }
+
+ function parse_ItemType()
+ {
+ eventHandler.startNonterminal("ItemType", e0);
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 145: // 'function'
+ case 165: // 'item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 244: // 'text'
+ lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17490: // 'attribute' '('
+ case 17504: // 'comment' '('
+ case 17528: // 'document-node' '('
+ case 17529: // 'element' '('
+ case 17593: // 'namespace-node' '('
+ case 17599: // 'node' '('
+ case 17624: // 'processing-instruction' '('
+ case 17634: // 'schema-attribute' '('
+ case 17635: // 'schema-element' '('
+ case 17652: // 'text' '('
+ parse_KindTest();
+ break;
+ case 17573: // 'item' '('
+ shift(165); // 'item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ break;
+ case 32: // '%'
+ case 17553: // 'function' '('
+ parse_FunctionTest();
+ break;
+ case 34: // '('
+ parse_ParenthesizedItemType();
+ break;
+ case 78: // 'array'
+ case 167: // 'json-item'
+ case 194: // 'object'
+ parse_JSONTest();
+ break;
+ case 242: // 'structured-item'
+ parse_StructuredItemTest();
+ break;
+ default:
+ parse_AtomicOrUnionType();
+ }
+ eventHandler.endNonterminal("ItemType", e0);
+ }
+
+ function try_ItemType()
+ {
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 145: // 'function'
+ case 165: // 'item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 244: // 'text'
+ lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17490: // 'attribute' '('
+ case 17504: // 'comment' '('
+ case 17528: // 'document-node' '('
+ case 17529: // 'element' '('
+ case 17593: // 'namespace-node' '('
+ case 17599: // 'node' '('
+ case 17624: // 'processing-instruction' '('
+ case 17634: // 'schema-attribute' '('
+ case 17635: // 'schema-element' '('
+ case 17652: // 'text' '('
+ try_KindTest();
+ break;
+ case 17573: // 'item' '('
+ shiftT(165); // 'item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ break;
+ case 32: // '%'
+ case 17553: // 'function' '('
+ try_FunctionTest();
+ break;
+ case 34: // '('
+ try_ParenthesizedItemType();
+ break;
+ case 78: // 'array'
+ case 167: // 'json-item'
+ case 194: // 'object'
+ try_JSONTest();
+ break;
+ case 242: // 'structured-item'
+ try_StructuredItemTest();
+ break;
+ default:
+ try_AtomicOrUnionType();
+ }
+ }
+
+ function parse_JSONTest()
+ {
+ eventHandler.startNonterminal("JSONTest", e0);
+ switch (l1)
+ {
+ case 167: // 'json-item'
+ parse_JSONItemTest();
+ break;
+ case 194: // 'object'
+ parse_JSONObjectTest();
+ break;
+ default:
+ parse_JSONArrayTest();
+ }
+ eventHandler.endNonterminal("JSONTest", e0);
+ }
+
+ function try_JSONTest()
+ {
+ switch (l1)
+ {
+ case 167: // 'json-item'
+ try_JSONItemTest();
+ break;
+ case 194: // 'object'
+ try_JSONObjectTest();
+ break;
+ default:
+ try_JSONArrayTest();
+ }
+ }
+
+ function parse_StructuredItemTest()
+ {
+ eventHandler.startNonterminal("StructuredItemTest", e0);
+ shift(242); // 'structured-item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("StructuredItemTest", e0);
+ }
+
+ function try_StructuredItemTest()
+ {
+ shiftT(242); // 'structured-item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_JSONItemTest()
+ {
+ eventHandler.startNonterminal("JSONItemTest", e0);
+ shift(167); // 'json-item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("JSONItemTest", e0);
+ }
+
+ function try_JSONItemTest()
+ {
+ shiftT(167); // 'json-item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_JSONObjectTest()
+ {
+ eventHandler.startNonterminal("JSONObjectTest", e0);
+ shift(194); // 'object'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("JSONObjectTest", e0);
+ }
+
+ function try_JSONObjectTest()
+ {
+ shiftT(194); // 'object'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_JSONArrayTest()
+ {
+ eventHandler.startNonterminal("JSONArrayTest", e0);
+ shift(78); // 'array'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("JSONArrayTest", e0);
+ }
+
+ function try_JSONArrayTest()
+ {
+ shiftT(78); // 'array'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_AtomicOrUnionType()
+ {
+ eventHandler.startNonterminal("AtomicOrUnionType", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AtomicOrUnionType", e0);
+ }
+
+ function try_AtomicOrUnionType()
+ {
+ try_EQName();
+ }
+
+ function parse_KindTest()
+ {
+ eventHandler.startNonterminal("KindTest", e0);
+ switch (l1)
+ {
+ case 120: // 'document-node'
+ parse_DocumentTest();
+ break;
+ case 121: // 'element'
+ parse_ElementTest();
+ break;
+ case 82: // 'attribute'
+ parse_AttributeTest();
+ break;
+ case 227: // 'schema-element'
+ parse_SchemaElementTest();
+ break;
+ case 226: // 'schema-attribute'
+ parse_SchemaAttributeTest();
+ break;
+ case 216: // 'processing-instruction'
+ parse_PITest();
+ break;
+ case 96: // 'comment'
+ parse_CommentTest();
+ break;
+ case 244: // 'text'
+ parse_TextTest();
+ break;
+ case 185: // 'namespace-node'
+ parse_NamespaceNodeTest();
+ break;
+ default:
+ parse_AnyKindTest();
+ }
+ eventHandler.endNonterminal("KindTest", e0);
+ }
+
+ function try_KindTest()
+ {
+ switch (l1)
+ {
+ case 120: // 'document-node'
+ try_DocumentTest();
+ break;
+ case 121: // 'element'
+ try_ElementTest();
+ break;
+ case 82: // 'attribute'
+ try_AttributeTest();
+ break;
+ case 227: // 'schema-element'
+ try_SchemaElementTest();
+ break;
+ case 226: // 'schema-attribute'
+ try_SchemaAttributeTest();
+ break;
+ case 216: // 'processing-instruction'
+ try_PITest();
+ break;
+ case 96: // 'comment'
+ try_CommentTest();
+ break;
+ case 244: // 'text'
+ try_TextTest();
+ break;
+ case 185: // 'namespace-node'
+ try_NamespaceNodeTest();
+ break;
+ default:
+ try_AnyKindTest();
+ }
+ }
+
+ function parse_AnyKindTest()
+ {
+ eventHandler.startNonterminal("AnyKindTest", e0);
+ shift(191); // 'node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("AnyKindTest", e0);
+ }
+
+ function try_AnyKindTest()
+ {
+ shiftT(191); // 'node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_DocumentTest()
+ {
+ eventHandler.startNonterminal("DocumentTest", e0);
+ shift(120); // 'document-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(144); // S^WS | '(:' | ')' | 'element' | 'schema-element'
+ if (l1 != 37) // ')'
+ {
+ switch (l1)
+ {
+ case 121: // 'element'
+ whitespace();
+ parse_ElementTest();
+ break;
+ default:
+ whitespace();
+ parse_SchemaElementTest();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("DocumentTest", e0);
+ }
+
+ function try_DocumentTest()
+ {
+ shiftT(120); // 'document-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(144); // S^WS | '(:' | ')' | 'element' | 'schema-element'
+ if (l1 != 37) // ')'
+ {
+ switch (l1)
+ {
+ case 121: // 'element'
+ try_ElementTest();
+ break;
+ default:
+ try_SchemaElementTest();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_TextTest()
+ {
+ eventHandler.startNonterminal("TextTest", e0);
+ shift(244); // 'text'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("TextTest", e0);
+ }
+
+ function try_TextTest()
+ {
+ shiftT(244); // 'text'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_CommentTest()
+ {
+ eventHandler.startNonterminal("CommentTest", e0);
+ shift(96); // 'comment'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("CommentTest", e0);
+ }
+
+ function try_CommentTest()
+ {
+ shiftT(96); // 'comment'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_NamespaceNodeTest()
+ {
+ eventHandler.startNonterminal("NamespaceNodeTest", e0);
+ shift(185); // 'namespace-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("NamespaceNodeTest", e0);
+ }
+
+ function try_NamespaceNodeTest()
+ {
+ shiftT(185); // 'namespace-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_PITest()
+ {
+ eventHandler.startNonterminal("PITest", e0);
+ shift(216); // 'processing-instruction'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(256); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 37) // ')'
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("PITest", e0);
+ }
+
+ function try_PITest()
+ {
+ shiftT(216); // 'processing-instruction'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(256); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 37) // ')'
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ try_NCName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_AttributeTest()
+ {
+ eventHandler.startNonterminal("AttributeTest", e0);
+ shift(82); // 'attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_AttribNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shift(41); // ','
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("AttributeTest", e0);
+ }
+
+ function try_AttributeTest()
+ {
+ shiftT(82); // 'attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 37) // ')'
+ {
+ try_AttribNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shiftT(41); // ','
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_AttribNameOrWildcard()
+ {
+ eventHandler.startNonterminal("AttribNameOrWildcard", e0);
+ switch (l1)
+ {
+ case 38: // '*'
+ shift(38); // '*'
+ break;
+ default:
+ parse_AttributeName();
+ }
+ eventHandler.endNonterminal("AttribNameOrWildcard", e0);
+ }
+
+ function try_AttribNameOrWildcard()
+ {
+ switch (l1)
+ {
+ case 38: // '*'
+ shiftT(38); // '*'
+ break;
+ default:
+ try_AttributeName();
+ }
+ }
+
+ function parse_SchemaAttributeTest()
+ {
+ eventHandler.startNonterminal("SchemaAttributeTest", e0);
+ shift(226); // 'schema-attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_AttributeDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("SchemaAttributeTest", e0);
+ }
+
+ function try_SchemaAttributeTest()
+ {
+ shiftT(226); // 'schema-attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_AttributeDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_AttributeDeclaration()
+ {
+ eventHandler.startNonterminal("AttributeDeclaration", e0);
+ parse_AttributeName();
+ eventHandler.endNonterminal("AttributeDeclaration", e0);
+ }
+
+ function try_AttributeDeclaration()
+ {
+ try_AttributeName();
+ }
+
+ function parse_ElementTest()
+ {
+ eventHandler.startNonterminal("ElementTest", e0);
+ shift(121); // 'element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_ElementNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shift(41); // ','
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ lookahead1W(102); // S^WS | '(:' | ')' | '?'
+ if (l1 == 64) // '?'
+ {
+ shift(64); // '?'
+ }
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("ElementTest", e0);
+ }
+
+ function try_ElementTest()
+ {
+ shiftT(121); // 'element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 37) // ')'
+ {
+ try_ElementNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shiftT(41); // ','
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ lookahead1W(102); // S^WS | '(:' | ')' | '?'
+ if (l1 == 64) // '?'
+ {
+ shiftT(64); // '?'
+ }
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_ElementNameOrWildcard()
+ {
+ eventHandler.startNonterminal("ElementNameOrWildcard", e0);
+ switch (l1)
+ {
+ case 38: // '*'
+ shift(38); // '*'
+ break;
+ default:
+ parse_ElementName();
+ }
+ eventHandler.endNonterminal("ElementNameOrWildcard", e0);
+ }
+
+ function try_ElementNameOrWildcard()
+ {
+ switch (l1)
+ {
+ case 38: // '*'
+ shiftT(38); // '*'
+ break;
+ default:
+ try_ElementName();
+ }
+ }
+
+ function parse_SchemaElementTest()
+ {
+ eventHandler.startNonterminal("SchemaElementTest", e0);
+ shift(227); // 'schema-element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ElementDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("SchemaElementTest", e0);
+ }
+
+ function try_SchemaElementTest()
+ {
+ shiftT(227); // 'schema-element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_ElementDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_ElementDeclaration()
+ {
+ eventHandler.startNonterminal("ElementDeclaration", e0);
+ parse_ElementName();
+ eventHandler.endNonterminal("ElementDeclaration", e0);
+ }
+
+ function try_ElementDeclaration()
+ {
+ try_ElementName();
+ }
+
+ function parse_AttributeName()
+ {
+ eventHandler.startNonterminal("AttributeName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AttributeName", e0);
+ }
+
+ function try_AttributeName()
+ {
+ try_EQName();
+ }
+
+ function parse_ElementName()
+ {
+ eventHandler.startNonterminal("ElementName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("ElementName", e0);
+ }
+
+ function try_ElementName()
+ {
+ try_EQName();
+ }
+
+ function parse_SimpleTypeName()
+ {
+ eventHandler.startNonterminal("SimpleTypeName", e0);
+ parse_TypeName();
+ eventHandler.endNonterminal("SimpleTypeName", e0);
+ }
+
+ function try_SimpleTypeName()
+ {
+ try_TypeName();
+ }
+
+ function parse_TypeName()
+ {
+ eventHandler.startNonterminal("TypeName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("TypeName", e0);
+ }
+
+ function try_TypeName()
+ {
+ try_EQName();
+ }
+
+ function parse_FunctionTest()
+ {
+ eventHandler.startNonterminal("FunctionTest", e0);
+ for (;;)
+ {
+ lookahead1W(97); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ switch (l1)
+ {
+ case 145: // 'function'
+ lookahead2W(22); // S^WS | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ lk = memoized(4, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_AnyFunctionTest();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(4, e0, lk);
+ }
+ switch (lk)
+ {
+ case -1:
+ whitespace();
+ parse_AnyFunctionTest();
+ break;
+ default:
+ whitespace();
+ parse_TypedFunctionTest();
+ }
+ eventHandler.endNonterminal("FunctionTest", e0);
+ }
+
+ function try_FunctionTest()
+ {
+ for (;;)
+ {
+ lookahead1W(97); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ switch (l1)
+ {
+ case 145: // 'function'
+ lookahead2W(22); // S^WS | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ lk = memoized(4, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_AnyFunctionTest();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(4, e0, lk);
+ }
+ switch (lk)
+ {
+ case -1:
+ try_AnyFunctionTest();
+ break;
+ default:
+ try_TypedFunctionTest();
+ }
+ }
+
+ function parse_AnyFunctionTest()
+ {
+ eventHandler.startNonterminal("AnyFunctionTest", e0);
+ shift(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(24); // S^WS | '(:' | '*'
+ shift(38); // '*'
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("AnyFunctionTest", e0);
+ }
+
+ function try_AnyFunctionTest()
+ {
+ shiftT(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(24); // S^WS | '(:' | '*'
+ shiftT(38); // '*'
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_TypedFunctionTest()
+ {
+ eventHandler.startNonterminal("TypedFunctionTest", e0);
+ shift(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(261); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_SequenceType();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ }
+ shift(37); // ')'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("TypedFunctionTest", e0);
+ }
+
+ function try_TypedFunctionTest()
+ {
+ shiftT(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(261); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 37) // ')'
+ {
+ try_SequenceType();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+ shiftT(37); // ')'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+
+ function parse_ParenthesizedItemType()
+ {
+ eventHandler.startNonterminal("ParenthesizedItemType", e0);
+ shift(34); // '('
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ItemType();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("ParenthesizedItemType", e0);
+ }
+
+ function try_ParenthesizedItemType()
+ {
+ shiftT(34); // '('
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_ItemType();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_RevalidationDecl()
+ {
+ eventHandler.startNonterminal("RevalidationDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(72); // S^WS | '(:' | 'revalidation'
+ shift(222); // 'revalidation'
+ lookahead1W(152); // S^WS | '(:' | 'lax' | 'skip' | 'strict'
+ switch (l1)
+ {
+ case 240: // 'strict'
+ shift(240); // 'strict'
+ break;
+ case 171: // 'lax'
+ shift(171); // 'lax'
+ break;
+ default:
+ shift(233); // 'skip'
+ }
+ eventHandler.endNonterminal("RevalidationDecl", e0);
+ }
+
+ function parse_InsertExprTargetChoice()
+ {
+ eventHandler.startNonterminal("InsertExprTargetChoice", e0);
+ switch (l1)
+ {
+ case 70: // 'after'
+ shift(70); // 'after'
+ break;
+ case 84: // 'before'
+ shift(84); // 'before'
+ break;
+ default:
+ if (l1 == 79) // 'as'
+ {
+ shift(79); // 'as'
+ lookahead1W(119); // S^WS | '(:' | 'first' | 'last'
+ switch (l1)
+ {
+ case 134: // 'first'
+ shift(134); // 'first'
+ break;
+ default:
+ shift(170); // 'last'
+ }
+ }
+ lookahead1W(54); // S^WS | '(:' | 'into'
+ shift(163); // 'into'
+ }
+ eventHandler.endNonterminal("InsertExprTargetChoice", e0);
+ }
+
+ function try_InsertExprTargetChoice()
+ {
+ switch (l1)
+ {
+ case 70: // 'after'
+ shiftT(70); // 'after'
+ break;
+ case 84: // 'before'
+ shiftT(84); // 'before'
+ break;
+ default:
+ if (l1 == 79) // 'as'
+ {
+ shiftT(79); // 'as'
+ lookahead1W(119); // S^WS | '(:' | 'first' | 'last'
+ switch (l1)
+ {
+ case 134: // 'first'
+ shiftT(134); // 'first'
+ break;
+ default:
+ shiftT(170); // 'last'
+ }
+ }
+ lookahead1W(54); // S^WS | '(:' | 'into'
+ shiftT(163); // 'into'
+ }
+ }
+
+ function parse_InsertExpr()
+ {
+ eventHandler.startNonterminal("InsertExpr", e0);
+ shift(159); // 'insert'
+ lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 191: // 'node'
+ shift(191); // 'node'
+ break;
+ default:
+ shift(192); // 'nodes'
+ }
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_SourceExpr();
+ whitespace();
+ parse_InsertExprTargetChoice();
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_TargetExpr();
+ eventHandler.endNonterminal("InsertExpr", e0);
+ }
+
+ function try_InsertExpr()
+ {
+ shiftT(159); // 'insert'
+ lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 191: // 'node'
+ shiftT(191); // 'node'
+ break;
+ default:
+ shiftT(192); // 'nodes'
+ }
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_SourceExpr();
+ try_InsertExprTargetChoice();
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_TargetExpr();
+ }
+
+ function parse_DeleteExpr()
+ {
+ eventHandler.startNonterminal("DeleteExpr", e0);
+ shift(110); // 'delete'
+ lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 191: // 'node'
+ shift(191); // 'node'
+ break;
+ default:
+ shift(192); // 'nodes'
+ }
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_TargetExpr();
+ eventHandler.endNonterminal("DeleteExpr", e0);
+ }
+
+ function try_DeleteExpr()
+ {
+ shiftT(110); // 'delete'
+ lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 191: // 'node'
+ shiftT(191); // 'node'
+ break;
+ default:
+ shiftT(192); // 'nodes'
+ }
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_TargetExpr();
+ }
+
+ function parse_ReplaceExpr()
+ {
+ eventHandler.startNonterminal("ReplaceExpr", e0);
+ shift(219); // 'replace'
+ lookahead1W(130); // S^WS | '(:' | 'node' | 'value'
+ if (l1 == 261) // 'value'
+ {
+ shift(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shift(196); // 'of'
+ }
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shift(191); // 'node'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_TargetExpr();
+ shift(270); // 'with'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ReplaceExpr", e0);
+ }
+
+ function try_ReplaceExpr()
+ {
+ shiftT(219); // 'replace'
+ lookahead1W(130); // S^WS | '(:' | 'node' | 'value'
+ if (l1 == 261) // 'value'
+ {
+ shiftT(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shiftT(196); // 'of'
+ }
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shiftT(191); // 'node'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_TargetExpr();
+ shiftT(270); // 'with'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_RenameExpr()
+ {
+ eventHandler.startNonterminal("RenameExpr", e0);
+ shift(218); // 'rename'
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shift(191); // 'node'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_TargetExpr();
+ shift(79); // 'as'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_NewNameExpr();
+ eventHandler.endNonterminal("RenameExpr", e0);
+ }
+
+ function try_RenameExpr()
+ {
+ shiftT(218); // 'rename'
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shiftT(191); // 'node'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_TargetExpr();
+ shiftT(79); // 'as'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_NewNameExpr();
+ }
+
+ function parse_SourceExpr()
+ {
+ eventHandler.startNonterminal("SourceExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SourceExpr", e0);
+ }
+
+ function try_SourceExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TargetExpr()
+ {
+ eventHandler.startNonterminal("TargetExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TargetExpr", e0);
+ }
+
+ function try_TargetExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_NewNameExpr()
+ {
+ eventHandler.startNonterminal("NewNameExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("NewNameExpr", e0);
+ }
+
+ function try_NewNameExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TransformExpr()
+ {
+ eventHandler.startNonterminal("TransformExpr", e0);
+ shift(103); // 'copy'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ shift(181); // 'modify'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TransformExpr", e0);
+ }
+
+ function try_TransformExpr()
+ {
+ shiftT(103); // 'copy'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ shiftT(181); // 'modify'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_FTSelection()
+ {
+ eventHandler.startNonterminal("FTSelection", e0);
+ parse_FTOr();
+ for (;;)
+ {
+ lookahead1W(211); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(151); // S^WS | '(:' | 'end' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 115 // 'different'
+ && lk != 117 // 'distance'
+ && lk != 127 // 'entire'
+ && lk != 202 // 'ordered'
+ && lk != 223 // 'same'
+ && lk != 269 // 'window'
+ && lk != 64593 // 'at' 'end'
+ && lk != 121425) // 'at' 'start'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTPosFilter();
+ }
+ eventHandler.endNonterminal("FTSelection", e0);
+ }
+
+ function try_FTSelection()
+ {
+ try_FTOr();
+ for (;;)
+ {
+ lookahead1W(211); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(151); // S^WS | '(:' | 'end' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 115 // 'different'
+ && lk != 117 // 'distance'
+ && lk != 127 // 'entire'
+ && lk != 202 // 'ordered'
+ && lk != 223 // 'same'
+ && lk != 269 // 'window'
+ && lk != 64593 // 'at' 'end'
+ && lk != 121425) // 'at' 'start'
+ {
+ break;
+ }
+ try_FTPosFilter();
+ }
+ }
+
+ function parse_FTWeight()
+ {
+ eventHandler.startNonterminal("FTWeight", e0);
+ shift(264); // 'weight'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("FTWeight", e0);
+ }
+
+ function try_FTWeight()
+ {
+ shiftT(264); // 'weight'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_FTOr()
+ {
+ eventHandler.startNonterminal("FTOr", e0);
+ parse_FTAnd();
+ for (;;)
+ {
+ if (l1 != 144) // 'ftor'
+ {
+ break;
+ }
+ shift(144); // 'ftor'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTAnd();
+ }
+ eventHandler.endNonterminal("FTOr", e0);
+ }
+
+ function try_FTOr()
+ {
+ try_FTAnd();
+ for (;;)
+ {
+ if (l1 != 144) // 'ftor'
+ {
+ break;
+ }
+ shiftT(144); // 'ftor'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTAnd();
+ }
+ }
+
+ function parse_FTAnd()
+ {
+ eventHandler.startNonterminal("FTAnd", e0);
+ parse_FTMildNot();
+ for (;;)
+ {
+ if (l1 != 142) // 'ftand'
+ {
+ break;
+ }
+ shift(142); // 'ftand'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTMildNot();
+ }
+ eventHandler.endNonterminal("FTAnd", e0);
+ }
+
+ function try_FTAnd()
+ {
+ try_FTMildNot();
+ for (;;)
+ {
+ if (l1 != 142) // 'ftand'
+ {
+ break;
+ }
+ shiftT(142); // 'ftand'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTMildNot();
+ }
+ }
+
+ function parse_FTMildNot()
+ {
+ eventHandler.startNonterminal("FTMildNot", e0);
+ parse_FTUnaryNot();
+ for (;;)
+ {
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 193) // 'not'
+ {
+ break;
+ }
+ shift(193); // 'not'
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTUnaryNot();
+ }
+ eventHandler.endNonterminal("FTMildNot", e0);
+ }
+
+ function try_FTMildNot()
+ {
+ try_FTUnaryNot();
+ for (;;)
+ {
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 193) // 'not'
+ {
+ break;
+ }
+ shiftT(193); // 'not'
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTUnaryNot();
+ }
+ }
+
+ function parse_FTUnaryNot()
+ {
+ eventHandler.startNonterminal("FTUnaryNot", e0);
+ if (l1 == 143) // 'ftnot'
+ {
+ shift(143); // 'ftnot'
+ }
+ lookahead1W(155); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{'
+ whitespace();
+ parse_FTPrimaryWithOptions();
+ eventHandler.endNonterminal("FTUnaryNot", e0);
+ }
+
+ function try_FTUnaryNot()
+ {
+ if (l1 == 143) // 'ftnot'
+ {
+ shiftT(143); // 'ftnot'
+ }
+ lookahead1W(155); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{'
+ try_FTPrimaryWithOptions();
+ }
+
+ function parse_FTPrimaryWithOptions()
+ {
+ eventHandler.startNonterminal("FTPrimaryWithOptions", e0);
+ parse_FTPrimary();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 259) // 'using'
+ {
+ whitespace();
+ parse_FTMatchOptions();
+ }
+ if (l1 == 264) // 'weight'
+ {
+ whitespace();
+ parse_FTWeight();
+ }
+ eventHandler.endNonterminal("FTPrimaryWithOptions", e0);
+ }
+
+ function try_FTPrimaryWithOptions()
+ {
+ try_FTPrimary();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 259) // 'using'
+ {
+ try_FTMatchOptions();
+ }
+ if (l1 == 264) // 'weight'
+ {
+ try_FTWeight();
+ }
+ }
+
+ function parse_FTPrimary()
+ {
+ eventHandler.startNonterminal("FTPrimary", e0);
+ switch (l1)
+ {
+ case 34: // '('
+ shift(34); // '('
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTSelection();
+ shift(37); // ')'
+ break;
+ case 35: // '(#'
+ parse_FTExtensionSelection();
+ break;
+ default:
+ parse_FTWords();
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 195) // 'occurs'
+ {
+ whitespace();
+ parse_FTTimes();
+ }
+ }
+ eventHandler.endNonterminal("FTPrimary", e0);
+ }
+
+ function try_FTPrimary()
+ {
+ switch (l1)
+ {
+ case 34: // '('
+ shiftT(34); // '('
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTSelection();
+ shiftT(37); // ')'
+ break;
+ case 35: // '(#'
+ try_FTExtensionSelection();
+ break;
+ default:
+ try_FTWords();
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 195) // 'occurs'
+ {
+ try_FTTimes();
+ }
+ }
+ }
+
+ function parse_FTWords()
+ {
+ eventHandler.startNonterminal("FTWords", e0);
+ parse_FTWordsValue();
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 71 // 'all'
+ || l1 == 76 // 'any'
+ || l1 == 210) // 'phrase'
+ {
+ whitespace();
+ parse_FTAnyallOption();
+ }
+ eventHandler.endNonterminal("FTWords", e0);
+ }
+
+ function try_FTWords()
+ {
+ try_FTWordsValue();
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 71 // 'all'
+ || l1 == 76 // 'any'
+ || l1 == 210) // 'phrase'
+ {
+ try_FTAnyallOption();
+ }
+ }
+
+ function parse_FTWordsValue()
+ {
+ eventHandler.startNonterminal("FTWordsValue", e0);
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ }
+ eventHandler.endNonterminal("FTWordsValue", e0);
+ }
+
+ function try_FTWordsValue()
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ }
+ }
+
+ function parse_FTExtensionSelection()
+ {
+ eventHandler.startNonterminal("FTExtensionSelection", e0);
+ for (;;)
+ {
+ whitespace();
+ parse_Pragma();
+ lookahead1W(100); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 35) // '(#'
+ {
+ break;
+ }
+ }
+ shift(276); // '{'
+ lookahead1W(166); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}'
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_FTSelection();
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("FTExtensionSelection", e0);
+ }
+
+ function try_FTExtensionSelection()
+ {
+ for (;;)
+ {
+ try_Pragma();
+ lookahead1W(100); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 35) // '(#'
+ {
+ break;
+ }
+ }
+ shiftT(276); // '{'
+ lookahead1W(166); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}'
+ if (l1 != 282) // '}'
+ {
+ try_FTSelection();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_FTAnyallOption()
+ {
+ eventHandler.startNonterminal("FTAnyallOption", e0);
+ switch (l1)
+ {
+ case 76: // 'any'
+ shift(76); // 'any'
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 272) // 'word'
+ {
+ shift(272); // 'word'
+ }
+ break;
+ case 71: // 'all'
+ shift(71); // 'all'
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 273) // 'words'
+ {
+ shift(273); // 'words'
+ }
+ break;
+ default:
+ shift(210); // 'phrase'
+ }
+ eventHandler.endNonterminal("FTAnyallOption", e0);
+ }
+
+ function try_FTAnyallOption()
+ {
+ switch (l1)
+ {
+ case 76: // 'any'
+ shiftT(76); // 'any'
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 272) // 'word'
+ {
+ shiftT(272); // 'word'
+ }
+ break;
+ case 71: // 'all'
+ shiftT(71); // 'all'
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 273) // 'words'
+ {
+ shiftT(273); // 'words'
+ }
+ break;
+ default:
+ shiftT(210); // 'phrase'
+ }
+ }
+
+ function parse_FTTimes()
+ {
+ eventHandler.startNonterminal("FTTimes", e0);
+ shift(195); // 'occurs'
+ lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ whitespace();
+ parse_FTRange();
+ shift(247); // 'times'
+ eventHandler.endNonterminal("FTTimes", e0);
+ }
+
+ function try_FTTimes()
+ {
+ shiftT(195); // 'occurs'
+ lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ try_FTRange();
+ shiftT(247); // 'times'
+ }
+
+ function parse_FTRange()
+ {
+ eventHandler.startNonterminal("FTRange", e0);
+ switch (l1)
+ {
+ case 130: // 'exactly'
+ shift(130); // 'exactly'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ case 81: // 'at'
+ shift(81); // 'at'
+ lookahead1W(125); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 173: // 'least'
+ shift(173); // 'least'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ default:
+ shift(183); // 'most'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ break;
+ default:
+ shift(140); // 'from'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ shift(248); // 'to'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ eventHandler.endNonterminal("FTRange", e0);
+ }
+
+ function try_FTRange()
+ {
+ switch (l1)
+ {
+ case 130: // 'exactly'
+ shiftT(130); // 'exactly'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ break;
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ lookahead1W(125); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 173: // 'least'
+ shiftT(173); // 'least'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ break;
+ default:
+ shiftT(183); // 'most'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ }
+ break;
+ default:
+ shiftT(140); // 'from'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ shiftT(248); // 'to'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ }
+ }
+
+ function parse_FTPosFilter()
+ {
+ eventHandler.startNonterminal("FTPosFilter", e0);
+ switch (l1)
+ {
+ case 202: // 'ordered'
+ parse_FTOrder();
+ break;
+ case 269: // 'window'
+ parse_FTWindow();
+ break;
+ case 117: // 'distance'
+ parse_FTDistance();
+ break;
+ case 115: // 'different'
+ case 223: // 'same'
+ parse_FTScope();
+ break;
+ default:
+ parse_FTContent();
+ }
+ eventHandler.endNonterminal("FTPosFilter", e0);
+ }
+
+ function try_FTPosFilter()
+ {
+ switch (l1)
+ {
+ case 202: // 'ordered'
+ try_FTOrder();
+ break;
+ case 269: // 'window'
+ try_FTWindow();
+ break;
+ case 117: // 'distance'
+ try_FTDistance();
+ break;
+ case 115: // 'different'
+ case 223: // 'same'
+ try_FTScope();
+ break;
+ default:
+ try_FTContent();
+ }
+ }
+
+ function parse_FTOrder()
+ {
+ eventHandler.startNonterminal("FTOrder", e0);
+ shift(202); // 'ordered'
+ eventHandler.endNonterminal("FTOrder", e0);
+ }
+
+ function try_FTOrder()
+ {
+ shiftT(202); // 'ordered'
+ }
+
+ function parse_FTWindow()
+ {
+ eventHandler.startNonterminal("FTWindow", e0);
+ shift(269); // 'window'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTWindow", e0);
+ }
+
+ function try_FTWindow()
+ {
+ shiftT(269); // 'window'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ try_FTUnit();
+ }
+
+ function parse_FTDistance()
+ {
+ eventHandler.startNonterminal("FTDistance", e0);
+ shift(117); // 'distance'
+ lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ whitespace();
+ parse_FTRange();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTDistance", e0);
+ }
+
+ function try_FTDistance()
+ {
+ shiftT(117); // 'distance'
+ lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ try_FTRange();
+ try_FTUnit();
+ }
+
+ function parse_FTUnit()
+ {
+ eventHandler.startNonterminal("FTUnit", e0);
+ switch (l1)
+ {
+ case 273: // 'words'
+ shift(273); // 'words'
+ break;
+ case 232: // 'sentences'
+ shift(232); // 'sentences'
+ break;
+ default:
+ shift(205); // 'paragraphs'
+ }
+ eventHandler.endNonterminal("FTUnit", e0);
+ }
+
+ function try_FTUnit()
+ {
+ switch (l1)
+ {
+ case 273: // 'words'
+ shiftT(273); // 'words'
+ break;
+ case 232: // 'sentences'
+ shiftT(232); // 'sentences'
+ break;
+ default:
+ shiftT(205); // 'paragraphs'
+ }
+ }
+
+ function parse_FTScope()
+ {
+ eventHandler.startNonterminal("FTScope", e0);
+ switch (l1)
+ {
+ case 223: // 'same'
+ shift(223); // 'same'
+ break;
+ default:
+ shift(115); // 'different'
+ }
+ lookahead1W(132); // S^WS | '(:' | 'paragraph' | 'sentence'
+ whitespace();
+ parse_FTBigUnit();
+ eventHandler.endNonterminal("FTScope", e0);
+ }
+
+ function try_FTScope()
+ {
+ switch (l1)
+ {
+ case 223: // 'same'
+ shiftT(223); // 'same'
+ break;
+ default:
+ shiftT(115); // 'different'
+ }
+ lookahead1W(132); // S^WS | '(:' | 'paragraph' | 'sentence'
+ try_FTBigUnit();
+ }
+
+ function parse_FTBigUnit()
+ {
+ eventHandler.startNonterminal("FTBigUnit", e0);
+ switch (l1)
+ {
+ case 231: // 'sentence'
+ shift(231); // 'sentence'
+ break;
+ default:
+ shift(204); // 'paragraph'
+ }
+ eventHandler.endNonterminal("FTBigUnit", e0);
+ }
+
+ function try_FTBigUnit()
+ {
+ switch (l1)
+ {
+ case 231: // 'sentence'
+ shiftT(231); // 'sentence'
+ break;
+ default:
+ shiftT(204); // 'paragraph'
+ }
+ }
+
+ function parse_FTContent()
+ {
+ eventHandler.startNonterminal("FTContent", e0);
+ switch (l1)
+ {
+ case 81: // 'at'
+ shift(81); // 'at'
+ lookahead1W(117); // S^WS | '(:' | 'end' | 'start'
+ switch (l1)
+ {
+ case 237: // 'start'
+ shift(237); // 'start'
+ break;
+ default:
+ shift(126); // 'end'
+ }
+ break;
+ default:
+ shift(127); // 'entire'
+ lookahead1W(42); // S^WS | '(:' | 'content'
+ shift(100); // 'content'
+ }
+ eventHandler.endNonterminal("FTContent", e0);
+ }
+
+ function try_FTContent()
+ {
+ switch (l1)
+ {
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ lookahead1W(117); // S^WS | '(:' | 'end' | 'start'
+ switch (l1)
+ {
+ case 237: // 'start'
+ shiftT(237); // 'start'
+ break;
+ default:
+ shiftT(126); // 'end'
+ }
+ break;
+ default:
+ shiftT(127); // 'entire'
+ lookahead1W(42); // S^WS | '(:' | 'content'
+ shiftT(100); // 'content'
+ }
+ }
+
+ function parse_FTMatchOptions()
+ {
+ eventHandler.startNonterminal("FTMatchOptions", e0);
+ for (;;)
+ {
+ shift(259); // 'using'
+ lookahead1W(182); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ whitespace();
+ parse_FTMatchOption();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 259) // 'using'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("FTMatchOptions", e0);
+ }
+
+ function try_FTMatchOptions()
+ {
+ for (;;)
+ {
+ shiftT(259); // 'using'
+ lookahead1W(182); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ try_FTMatchOption();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 259) // 'using'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_FTMatchOption()
+ {
+ eventHandler.startNonterminal("FTMatchOption", e0);
+ switch (l1)
+ {
+ case 188: // 'no'
+ lookahead2W(161); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 169: // 'language'
+ parse_FTLanguageOption();
+ break;
+ case 268: // 'wildcards'
+ case 137404: // 'no' 'wildcards'
+ parse_FTWildCardOption();
+ break;
+ case 246: // 'thesaurus'
+ case 126140: // 'no' 'thesaurus'
+ parse_FTThesaurusOption();
+ break;
+ case 238: // 'stemming'
+ case 122044: // 'no' 'stemming'
+ parse_FTStemOption();
+ break;
+ case 114: // 'diacritics'
+ parse_FTDiacriticsOption();
+ break;
+ case 239: // 'stop'
+ case 122556: // 'no' 'stop'
+ parse_FTStopWordOption();
+ break;
+ case 199: // 'option'
+ parse_FTExtensionOption();
+ break;
+ default:
+ parse_FTCaseOption();
+ }
+ eventHandler.endNonterminal("FTMatchOption", e0);
+ }
+
+ function try_FTMatchOption()
+ {
+ switch (l1)
+ {
+ case 188: // 'no'
+ lookahead2W(161); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 169: // 'language'
+ try_FTLanguageOption();
+ break;
+ case 268: // 'wildcards'
+ case 137404: // 'no' 'wildcards'
+ try_FTWildCardOption();
+ break;
+ case 246: // 'thesaurus'
+ case 126140: // 'no' 'thesaurus'
+ try_FTThesaurusOption();
+ break;
+ case 238: // 'stemming'
+ case 122044: // 'no' 'stemming'
+ try_FTStemOption();
+ break;
+ case 114: // 'diacritics'
+ try_FTDiacriticsOption();
+ break;
+ case 239: // 'stop'
+ case 122556: // 'no' 'stop'
+ try_FTStopWordOption();
+ break;
+ case 199: // 'option'
+ try_FTExtensionOption();
+ break;
+ default:
+ try_FTCaseOption();
+ }
+ }
+
+ function parse_FTCaseOption()
+ {
+ eventHandler.startNonterminal("FTCaseOption", e0);
+ switch (l1)
+ {
+ case 88: // 'case'
+ shift(88); // 'case'
+ lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 158: // 'insensitive'
+ shift(158); // 'insensitive'
+ break;
+ default:
+ shift(230); // 'sensitive'
+ }
+ break;
+ case 177: // 'lowercase'
+ shift(177); // 'lowercase'
+ break;
+ default:
+ shift(258); // 'uppercase'
+ }
+ eventHandler.endNonterminal("FTCaseOption", e0);
+ }
+
+ function try_FTCaseOption()
+ {
+ switch (l1)
+ {
+ case 88: // 'case'
+ shiftT(88); // 'case'
+ lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 158: // 'insensitive'
+ shiftT(158); // 'insensitive'
+ break;
+ default:
+ shiftT(230); // 'sensitive'
+ }
+ break;
+ case 177: // 'lowercase'
+ shiftT(177); // 'lowercase'
+ break;
+ default:
+ shiftT(258); // 'uppercase'
+ }
+ }
+
+ function parse_FTDiacriticsOption()
+ {
+ eventHandler.startNonterminal("FTDiacriticsOption", e0);
+ shift(114); // 'diacritics'
+ lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 158: // 'insensitive'
+ shift(158); // 'insensitive'
+ break;
+ default:
+ shift(230); // 'sensitive'
+ }
+ eventHandler.endNonterminal("FTDiacriticsOption", e0);
+ }
+
+ function try_FTDiacriticsOption()
+ {
+ shiftT(114); // 'diacritics'
+ lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 158: // 'insensitive'
+ shiftT(158); // 'insensitive'
+ break;
+ default:
+ shiftT(230); // 'sensitive'
+ }
+ }
+
+ function parse_FTStemOption()
+ {
+ eventHandler.startNonterminal("FTStemOption", e0);
+ switch (l1)
+ {
+ case 238: // 'stemming'
+ shift(238); // 'stemming'
+ break;
+ default:
+ shift(188); // 'no'
+ lookahead1W(74); // S^WS | '(:' | 'stemming'
+ shift(238); // 'stemming'
+ }
+ eventHandler.endNonterminal("FTStemOption", e0);
+ }
+
+ function try_FTStemOption()
+ {
+ switch (l1)
+ {
+ case 238: // 'stemming'
+ shiftT(238); // 'stemming'
+ break;
+ default:
+ shiftT(188); // 'no'
+ lookahead1W(74); // S^WS | '(:' | 'stemming'
+ shiftT(238); // 'stemming'
+ }
+ }
+
+ function parse_FTThesaurusOption()
+ {
+ eventHandler.startNonterminal("FTThesaurusOption", e0);
+ switch (l1)
+ {
+ case 246: // 'thesaurus'
+ shift(246); // 'thesaurus'
+ lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 81: // 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ break;
+ case 109: // 'default'
+ shift(109); // 'default'
+ break;
+ default:
+ shift(34); // '('
+ lookahead1W(112); // S^WS | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 81: // 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ break;
+ default:
+ shift(109); // 'default'
+ }
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(31); // S^WS | '(:' | 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ }
+ shift(37); // ')'
+ }
+ break;
+ default:
+ shift(188); // 'no'
+ lookahead1W(78); // S^WS | '(:' | 'thesaurus'
+ shift(246); // 'thesaurus'
+ }
+ eventHandler.endNonterminal("FTThesaurusOption", e0);
+ }
+
+ function try_FTThesaurusOption()
+ {
+ switch (l1)
+ {
+ case 246: // 'thesaurus'
+ shiftT(246); // 'thesaurus'
+ lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 81: // 'at'
+ try_FTThesaurusID();
+ break;
+ case 109: // 'default'
+ shiftT(109); // 'default'
+ break;
+ default:
+ shiftT(34); // '('
+ lookahead1W(112); // S^WS | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 81: // 'at'
+ try_FTThesaurusID();
+ break;
+ default:
+ shiftT(109); // 'default'
+ }
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(31); // S^WS | '(:' | 'at'
+ try_FTThesaurusID();
+ }
+ shiftT(37); // ')'
+ }
+ break;
+ default:
+ shiftT(188); // 'no'
+ lookahead1W(78); // S^WS | '(:' | 'thesaurus'
+ shiftT(246); // 'thesaurus'
+ }
+ }
+
+ function parse_FTThesaurusID()
+ {
+ eventHandler.startNonterminal("FTThesaurusID", e0);
+ shift(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 217) // 'relationship'
+ {
+ shift(217); // 'relationship'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(165); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 130 // 'exactly'
+ || lk == 140 // 'from'
+ || lk == 88657 // 'at' 'least'
+ || lk == 93777) // 'at' 'most'
+ {
+ whitespace();
+ parse_FTLiteralRange();
+ lookahead1W(58); // S^WS | '(:' | 'levels'
+ shift(175); // 'levels'
+ }
+ eventHandler.endNonterminal("FTThesaurusID", e0);
+ }
+
+ function try_FTThesaurusID()
+ {
+ shiftT(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 217) // 'relationship'
+ {
+ shiftT(217); // 'relationship'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(165); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 130 // 'exactly'
+ || lk == 140 // 'from'
+ || lk == 88657 // 'at' 'least'
+ || lk == 93777) // 'at' 'most'
+ {
+ try_FTLiteralRange();
+ lookahead1W(58); // S^WS | '(:' | 'levels'
+ shiftT(175); // 'levels'
+ }
+ }
+
+ function parse_FTLiteralRange()
+ {
+ eventHandler.startNonterminal("FTLiteralRange", e0);
+ switch (l1)
+ {
+ case 130: // 'exactly'
+ shift(130); // 'exactly'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ break;
+ case 81: // 'at'
+ shift(81); // 'at'
+ lookahead1W(125); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 173: // 'least'
+ shift(173); // 'least'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ break;
+ default:
+ shift(183); // 'most'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ }
+ break;
+ default:
+ shift(140); // 'from'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ lookahead1W(79); // S^WS | '(:' | 'to'
+ shift(248); // 'to'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ }
+ eventHandler.endNonterminal("FTLiteralRange", e0);
+ }
+
+ function try_FTLiteralRange()
+ {
+ switch (l1)
+ {
+ case 130: // 'exactly'
+ shiftT(130); // 'exactly'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ break;
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ lookahead1W(125); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 173: // 'least'
+ shiftT(173); // 'least'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ break;
+ default:
+ shiftT(183); // 'most'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+ break;
+ default:
+ shiftT(140); // 'from'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ lookahead1W(79); // S^WS | '(:' | 'to'
+ shiftT(248); // 'to'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+ }
+
+ function parse_FTStopWordOption()
+ {
+ eventHandler.startNonterminal("FTStopWordOption", e0);
+ switch (l1)
+ {
+ case 239: // 'stop'
+ shift(239); // 'stop'
+ lookahead1W(86); // S^WS | '(:' | 'words'
+ shift(273); // 'words'
+ lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 109: // 'default'
+ shift(109); // 'default'
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 131 // 'except'
+ && l1 != 254) // 'union'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTStopWordsInclExcl();
+ }
+ break;
+ default:
+ whitespace();
+ parse_FTStopWords();
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 131 // 'except'
+ && l1 != 254) // 'union'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTStopWordsInclExcl();
+ }
+ }
+ break;
+ default:
+ shift(188); // 'no'
+ lookahead1W(75); // S^WS | '(:' | 'stop'
+ shift(239); // 'stop'
+ lookahead1W(86); // S^WS | '(:' | 'words'
+ shift(273); // 'words'
+ }
+ eventHandler.endNonterminal("FTStopWordOption", e0);
+ }
+
+ function try_FTStopWordOption()
+ {
+ switch (l1)
+ {
+ case 239: // 'stop'
+ shiftT(239); // 'stop'
+ lookahead1W(86); // S^WS | '(:' | 'words'
+ shiftT(273); // 'words'
+ lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 109: // 'default'
+ shiftT(109); // 'default'
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 131 // 'except'
+ && l1 != 254) // 'union'
+ {
+ break;
+ }
+ try_FTStopWordsInclExcl();
+ }
+ break;
+ default:
+ try_FTStopWords();
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 131 // 'except'
+ && l1 != 254) // 'union'
+ {
+ break;
+ }
+ try_FTStopWordsInclExcl();
+ }
+ }
+ break;
+ default:
+ shiftT(188); // 'no'
+ lookahead1W(75); // S^WS | '(:' | 'stop'
+ shiftT(239); // 'stop'
+ lookahead1W(86); // S^WS | '(:' | 'words'
+ shiftT(273); // 'words'
+ }
+ }
+
+ function parse_FTStopWords()
+ {
+ eventHandler.startNonterminal("FTStopWords", e0);
+ switch (l1)
+ {
+ case 81: // 'at'
+ shift(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ break;
+ default:
+ shift(34); // '('
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ shift(37); // ')'
+ }
+ eventHandler.endNonterminal("FTStopWords", e0);
+ }
+
+ function try_FTStopWords()
+ {
+ switch (l1)
+ {
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ break;
+ default:
+ shiftT(34); // '('
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+ shiftT(37); // ')'
+ }
+ }
+
+ function parse_FTStopWordsInclExcl()
+ {
+ eventHandler.startNonterminal("FTStopWordsInclExcl", e0);
+ switch (l1)
+ {
+ case 254: // 'union'
+ shift(254); // 'union'
+ break;
+ default:
+ shift(131); // 'except'
+ }
+ lookahead1W(99); // S^WS | '(' | '(:' | 'at'
+ whitespace();
+ parse_FTStopWords();
+ eventHandler.endNonterminal("FTStopWordsInclExcl", e0);
+ }
+
+ function try_FTStopWordsInclExcl()
+ {
+ switch (l1)
+ {
+ case 254: // 'union'
+ shiftT(254); // 'union'
+ break;
+ default:
+ shiftT(131); // 'except'
+ }
+ lookahead1W(99); // S^WS | '(' | '(:' | 'at'
+ try_FTStopWords();
+ }
+
+ function parse_FTLanguageOption()
+ {
+ eventHandler.startNonterminal("FTLanguageOption", e0);
+ shift(169); // 'language'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("FTLanguageOption", e0);
+ }
+
+ function try_FTLanguageOption()
+ {
+ shiftT(169); // 'language'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+
+ function parse_FTWildCardOption()
+ {
+ eventHandler.startNonterminal("FTWildCardOption", e0);
+ switch (l1)
+ {
+ case 268: // 'wildcards'
+ shift(268); // 'wildcards'
+ break;
+ default:
+ shift(188); // 'no'
+ lookahead1W(84); // S^WS | '(:' | 'wildcards'
+ shift(268); // 'wildcards'
+ }
+ eventHandler.endNonterminal("FTWildCardOption", e0);
+ }
+
+ function try_FTWildCardOption()
+ {
+ switch (l1)
+ {
+ case 268: // 'wildcards'
+ shiftT(268); // 'wildcards'
+ break;
+ default:
+ shiftT(188); // 'no'
+ lookahead1W(84); // S^WS | '(:' | 'wildcards'
+ shiftT(268); // 'wildcards'
+ }
+ }
+
+ function parse_FTExtensionOption()
+ {
+ eventHandler.startNonterminal("FTExtensionOption", e0);
+ shift(199); // 'option'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("FTExtensionOption", e0);
+ }
+
+ function try_FTExtensionOption()
+ {
+ shiftT(199); // 'option'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+
+ function parse_FTIgnoreOption()
+ {
+ eventHandler.startNonterminal("FTIgnoreOption", e0);
+ shift(271); // 'without'
+ lookahead1W(42); // S^WS | '(:' | 'content'
+ shift(100); // 'content'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_UnionExpr();
+ eventHandler.endNonterminal("FTIgnoreOption", e0);
+ }
+
+ function try_FTIgnoreOption()
+ {
+ shiftT(271); // 'without'
+ lookahead1W(42); // S^WS | '(:' | 'content'
+ shiftT(100); // 'content'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_UnionExpr();
+ }
+
+ function parse_CollectionDecl()
+ {
+ eventHandler.startNonterminal("CollectionDecl", e0);
+ shift(95); // 'collection'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(107); // S^WS | '(:' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_CollectionTypeDecl();
+ }
+ eventHandler.endNonterminal("CollectionDecl", e0);
+ }
+
+ function parse_CollectionTypeDecl()
+ {
+ eventHandler.startNonterminal("CollectionTypeDecl", e0);
+ shift(79); // 'as'
+ lookahead1W(178); // S^WS | '(:' | 'attribute' | 'comment' | 'document-node' | 'element' |
+ whitespace();
+ parse_KindTest();
+ lookahead1W(156); // S^WS | '(:' | '*' | '+' | ';' | '?'
+ if (l1 != 53) // ';'
+ {
+ whitespace();
+ parse_OccurrenceIndicator();
+ }
+ eventHandler.endNonterminal("CollectionTypeDecl", e0);
+ }
+
+ function parse_IndexName()
+ {
+ eventHandler.startNonterminal("IndexName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("IndexName", e0);
+ }
+
+ function parse_IndexDomainExpr()
+ {
+ eventHandler.startNonterminal("IndexDomainExpr", e0);
+ parse_PathExpr();
+ eventHandler.endNonterminal("IndexDomainExpr", e0);
+ }
+
+ function parse_IndexKeySpec()
+ {
+ eventHandler.startNonterminal("IndexKeySpec", e0);
+ parse_IndexKeyExpr();
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_IndexKeyTypeDecl();
+ }
+ lookahead1W(146); // S^WS | '(:' | ',' | ';' | 'collation'
+ if (l1 == 94) // 'collation'
+ {
+ whitespace();
+ parse_IndexKeyCollation();
+ }
+ eventHandler.endNonterminal("IndexKeySpec", e0);
+ }
+
+ function parse_IndexKeyExpr()
+ {
+ eventHandler.startNonterminal("IndexKeyExpr", e0);
+ parse_PathExpr();
+ eventHandler.endNonterminal("IndexKeyExpr", e0);
+ }
+
+ function parse_IndexKeyTypeDecl()
+ {
+ eventHandler.startNonterminal("IndexKeyTypeDecl", e0);
+ shift(79); // 'as'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_AtomicType();
+ lookahead1W(169); // S^WS | '(:' | '*' | '+' | ',' | ';' | '?' | 'collation'
+ if (l1 == 39 // '*'
+ || l1 == 40 // '+'
+ || l1 == 64) // '?'
+ {
+ whitespace();
+ parse_OccurrenceIndicator();
+ }
+ eventHandler.endNonterminal("IndexKeyTypeDecl", e0);
+ }
+
+ function parse_AtomicType()
+ {
+ eventHandler.startNonterminal("AtomicType", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AtomicType", e0);
+ }
+
+ function parse_IndexKeyCollation()
+ {
+ eventHandler.startNonterminal("IndexKeyCollation", e0);
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("IndexKeyCollation", e0);
+ }
+
+ function parse_IndexDecl()
+ {
+ eventHandler.startNonterminal("IndexDecl", e0);
+ shift(155); // 'index'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_IndexName();
+ lookahead1W(65); // S^WS | '(:' | 'on'
+ shift(197); // 'on'
+ lookahead1W(63); // S^WS | '(:' | 'nodes'
+ shift(192); // 'nodes'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_IndexDomainExpr();
+ shift(87); // 'by'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_IndexKeySpec();
+ for (;;)
+ {
+ lookahead1W(103); // S^WS | '(:' | ',' | ';'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_IndexKeySpec();
+ }
+ eventHandler.endNonterminal("IndexDecl", e0);
+ }
+
+ function parse_ICDecl()
+ {
+ eventHandler.startNonterminal("ICDecl", e0);
+ shift(161); // 'integrity'
+ lookahead1W(40); // S^WS | '(:' | 'constraint'
+ shift(97); // 'constraint'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(120); // S^WS | '(:' | 'foreign' | 'on'
+ switch (l1)
+ {
+ case 197: // 'on'
+ whitespace();
+ parse_ICCollection();
+ break;
+ default:
+ whitespace();
+ parse_ICForeignKey();
+ }
+ eventHandler.endNonterminal("ICDecl", e0);
+ }
+
+ function parse_ICCollection()
+ {
+ eventHandler.startNonterminal("ICCollection", e0);
+ shift(197); // 'on'
+ lookahead1W(39); // S^WS | '(:' | 'collection'
+ shift(95); // 'collection'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(140); // S^WS | '$' | '(:' | 'foreach' | 'node'
+ switch (l1)
+ {
+ case 31: // '$'
+ whitespace();
+ parse_ICCollSequence();
+ break;
+ case 191: // 'node'
+ whitespace();
+ parse_ICCollSequenceUnique();
+ break;
+ default:
+ whitespace();
+ parse_ICCollNode();
+ }
+ eventHandler.endNonterminal("ICCollection", e0);
+ }
+
+ function parse_ICCollSequence()
+ {
+ eventHandler.startNonterminal("ICCollSequence", e0);
+ parse_VarRef();
+ lookahead1W(37); // S^WS | '(:' | 'check'
+ shift(92); // 'check'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ICCollSequence", e0);
+ }
+
+ function parse_ICCollSequenceUnique()
+ {
+ eventHandler.startNonterminal("ICCollSequenceUnique", e0);
+ shift(191); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(37); // S^WS | '(:' | 'check'
+ shift(92); // 'check'
+ lookahead1W(80); // S^WS | '(:' | 'unique'
+ shift(255); // 'unique'
+ lookahead1W(57); // S^WS | '(:' | 'key'
+ shift(168); // 'key'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PathExpr();
+ eventHandler.endNonterminal("ICCollSequenceUnique", e0);
+ }
+
+ function parse_ICCollNode()
+ {
+ eventHandler.startNonterminal("ICCollNode", e0);
+ shift(138); // 'foreach'
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shift(191); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(37); // S^WS | '(:' | 'check'
+ shift(92); // 'check'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ICCollNode", e0);
+ }
+
+ function parse_ICForeignKey()
+ {
+ eventHandler.startNonterminal("ICForeignKey", e0);
+ shift(139); // 'foreign'
+ lookahead1W(57); // S^WS | '(:' | 'key'
+ shift(168); // 'key'
+ lookahead1W(51); // S^WS | '(:' | 'from'
+ whitespace();
+ parse_ICForeignKeySource();
+ whitespace();
+ parse_ICForeignKeyTarget();
+ eventHandler.endNonterminal("ICForeignKey", e0);
+ }
+
+ function parse_ICForeignKeySource()
+ {
+ eventHandler.startNonterminal("ICForeignKeySource", e0);
+ shift(140); // 'from'
+ lookahead1W(39); // S^WS | '(:' | 'collection'
+ whitespace();
+ parse_ICForeignKeyValues();
+ eventHandler.endNonterminal("ICForeignKeySource", e0);
+ }
+
+ function parse_ICForeignKeyTarget()
+ {
+ eventHandler.startNonterminal("ICForeignKeyTarget", e0);
+ shift(248); // 'to'
+ lookahead1W(39); // S^WS | '(:' | 'collection'
+ whitespace();
+ parse_ICForeignKeyValues();
+ eventHandler.endNonterminal("ICForeignKeyTarget", e0);
+ }
+
+ function parse_ICForeignKeyValues()
+ {
+ eventHandler.startNonterminal("ICForeignKeyValues", e0);
+ shift(95); // 'collection'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shift(191); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(57); // S^WS | '(:' | 'key'
+ shift(168); // 'key'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PathExpr();
+ eventHandler.endNonterminal("ICForeignKeyValues", e0);
+ }
+
+ function try_Comment()
+ {
+ shiftT(36); // '(:'
+ for (;;)
+ {
+ lookahead1(89); // CommentContents | '(:' | ':)'
+ if (l1 == 50) // ':)'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 24: // CommentContents
+ shiftT(24); // CommentContents
+ break;
+ default:
+ try_Comment();
+ }
+ }
+ shiftT(50); // ':)'
+ }
+
+ function try_Whitespace()
+ {
+ switch (l1)
+ {
+ case 22: // S^WS
+ shiftT(22); // S^WS
+ break;
+ default:
+ try_Comment();
+ }
+ }
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ lookahead1(247); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ shift(82); // 'attribute'
+ break;
+ case 96: // 'comment'
+ shift(96); // 'comment'
+ break;
+ case 120: // 'document-node'
+ shift(120); // 'document-node'
+ break;
+ case 121: // 'element'
+ shift(121); // 'element'
+ break;
+ case 124: // 'empty-sequence'
+ shift(124); // 'empty-sequence'
+ break;
+ case 145: // 'function'
+ shift(145); // 'function'
+ break;
+ case 152: // 'if'
+ shift(152); // 'if'
+ break;
+ case 165: // 'item'
+ shift(165); // 'item'
+ break;
+ case 185: // 'namespace-node'
+ shift(185); // 'namespace-node'
+ break;
+ case 191: // 'node'
+ shift(191); // 'node'
+ break;
+ case 216: // 'processing-instruction'
+ shift(216); // 'processing-instruction'
+ break;
+ case 226: // 'schema-attribute'
+ shift(226); // 'schema-attribute'
+ break;
+ case 227: // 'schema-element'
+ shift(227); // 'schema-element'
+ break;
+ case 243: // 'switch'
+ shift(243); // 'switch'
+ break;
+ case 244: // 'text'
+ shift(244); // 'text'
+ break;
+ case 253: // 'typeswitch'
+ shift(253); // 'typeswitch'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function try_EQName()
+ {
+ lookahead1(247); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ shiftT(82); // 'attribute'
+ break;
+ case 96: // 'comment'
+ shiftT(96); // 'comment'
+ break;
+ case 120: // 'document-node'
+ shiftT(120); // 'document-node'
+ break;
+ case 121: // 'element'
+ shiftT(121); // 'element'
+ break;
+ case 124: // 'empty-sequence'
+ shiftT(124); // 'empty-sequence'
+ break;
+ case 145: // 'function'
+ shiftT(145); // 'function'
+ break;
+ case 152: // 'if'
+ shiftT(152); // 'if'
+ break;
+ case 165: // 'item'
+ shiftT(165); // 'item'
+ break;
+ case 185: // 'namespace-node'
+ shiftT(185); // 'namespace-node'
+ break;
+ case 191: // 'node'
+ shiftT(191); // 'node'
+ break;
+ case 216: // 'processing-instruction'
+ shiftT(216); // 'processing-instruction'
+ break;
+ case 226: // 'schema-attribute'
+ shiftT(226); // 'schema-attribute'
+ break;
+ case 227: // 'schema-element'
+ shiftT(227); // 'schema-element'
+ break;
+ case 243: // 'switch'
+ shiftT(243); // 'switch'
+ break;
+ case 244: // 'text'
+ shiftT(244); // 'text'
+ break;
+ case 253: // 'typeswitch'
+ shiftT(253); // 'typeswitch'
+ break;
+ default:
+ try_FunctionName();
+ }
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 6: // EQName^Token
+ shift(6); // EQName^Token
+ break;
+ case 70: // 'after'
+ shift(70); // 'after'
+ break;
+ case 73: // 'ancestor'
+ shift(73); // 'ancestor'
+ break;
+ case 74: // 'ancestor-or-self'
+ shift(74); // 'ancestor-or-self'
+ break;
+ case 75: // 'and'
+ shift(75); // 'and'
+ break;
+ case 79: // 'as'
+ shift(79); // 'as'
+ break;
+ case 80: // 'ascending'
+ shift(80); // 'ascending'
+ break;
+ case 84: // 'before'
+ shift(84); // 'before'
+ break;
+ case 88: // 'case'
+ shift(88); // 'case'
+ break;
+ case 89: // 'cast'
+ shift(89); // 'cast'
+ break;
+ case 90: // 'castable'
+ shift(90); // 'castable'
+ break;
+ case 93: // 'child'
+ shift(93); // 'child'
+ break;
+ case 94: // 'collation'
+ shift(94); // 'collation'
+ break;
+ case 103: // 'copy'
+ shift(103); // 'copy'
+ break;
+ case 105: // 'count'
+ shift(105); // 'count'
+ break;
+ case 108: // 'declare'
+ shift(108); // 'declare'
+ break;
+ case 109: // 'default'
+ shift(109); // 'default'
+ break;
+ case 110: // 'delete'
+ shift(110); // 'delete'
+ break;
+ case 111: // 'descendant'
+ shift(111); // 'descendant'
+ break;
+ case 112: // 'descendant-or-self'
+ shift(112); // 'descendant-or-self'
+ break;
+ case 113: // 'descending'
+ shift(113); // 'descending'
+ break;
+ case 118: // 'div'
+ shift(118); // 'div'
+ break;
+ case 119: // 'document'
+ shift(119); // 'document'
+ break;
+ case 122: // 'else'
+ shift(122); // 'else'
+ break;
+ case 123: // 'empty'
+ shift(123); // 'empty'
+ break;
+ case 126: // 'end'
+ shift(126); // 'end'
+ break;
+ case 128: // 'eq'
+ shift(128); // 'eq'
+ break;
+ case 129: // 'every'
+ shift(129); // 'every'
+ break;
+ case 131: // 'except'
+ shift(131); // 'except'
+ break;
+ case 134: // 'first'
+ shift(134); // 'first'
+ break;
+ case 135: // 'following'
+ shift(135); // 'following'
+ break;
+ case 136: // 'following-sibling'
+ shift(136); // 'following-sibling'
+ break;
+ case 137: // 'for'
+ shift(137); // 'for'
+ break;
+ case 146: // 'ge'
+ shift(146); // 'ge'
+ break;
+ case 148: // 'group'
+ shift(148); // 'group'
+ break;
+ case 150: // 'gt'
+ shift(150); // 'gt'
+ break;
+ case 151: // 'idiv'
+ shift(151); // 'idiv'
+ break;
+ case 153: // 'import'
+ shift(153); // 'import'
+ break;
+ case 159: // 'insert'
+ shift(159); // 'insert'
+ break;
+ case 160: // 'instance'
+ shift(160); // 'instance'
+ break;
+ case 162: // 'intersect'
+ shift(162); // 'intersect'
+ break;
+ case 163: // 'into'
+ shift(163); // 'into'
+ break;
+ case 164: // 'is'
+ shift(164); // 'is'
+ break;
+ case 170: // 'last'
+ shift(170); // 'last'
+ break;
+ case 172: // 'le'
+ shift(172); // 'le'
+ break;
+ case 174: // 'let'
+ shift(174); // 'let'
+ break;
+ case 178: // 'lt'
+ shift(178); // 'lt'
+ break;
+ case 180: // 'mod'
+ shift(180); // 'mod'
+ break;
+ case 181: // 'modify'
+ shift(181); // 'modify'
+ break;
+ case 182: // 'module'
+ shift(182); // 'module'
+ break;
+ case 184: // 'namespace'
+ shift(184); // 'namespace'
+ break;
+ case 186: // 'ne'
+ shift(186); // 'ne'
+ break;
+ case 198: // 'only'
+ shift(198); // 'only'
+ break;
+ case 200: // 'or'
+ shift(200); // 'or'
+ break;
+ case 201: // 'order'
+ shift(201); // 'order'
+ break;
+ case 202: // 'ordered'
+ shift(202); // 'ordered'
+ break;
+ case 206: // 'parent'
+ shift(206); // 'parent'
+ break;
+ case 212: // 'preceding'
+ shift(212); // 'preceding'
+ break;
+ case 213: // 'preceding-sibling'
+ shift(213); // 'preceding-sibling'
+ break;
+ case 218: // 'rename'
+ shift(218); // 'rename'
+ break;
+ case 219: // 'replace'
+ shift(219); // 'replace'
+ break;
+ case 220: // 'return'
+ shift(220); // 'return'
+ break;
+ case 224: // 'satisfies'
+ shift(224); // 'satisfies'
+ break;
+ case 229: // 'self'
+ shift(229); // 'self'
+ break;
+ case 235: // 'some'
+ shift(235); // 'some'
+ break;
+ case 236: // 'stable'
+ shift(236); // 'stable'
+ break;
+ case 237: // 'start'
+ shift(237); // 'start'
+ break;
+ case 248: // 'to'
+ shift(248); // 'to'
+ break;
+ case 249: // 'treat'
+ shift(249); // 'treat'
+ break;
+ case 250: // 'try'
+ shift(250); // 'try'
+ break;
+ case 254: // 'union'
+ shift(254); // 'union'
+ break;
+ case 256: // 'unordered'
+ shift(256); // 'unordered'
+ break;
+ case 260: // 'validate'
+ shift(260); // 'validate'
+ break;
+ case 266: // 'where'
+ shift(266); // 'where'
+ break;
+ case 270: // 'with'
+ shift(270); // 'with'
+ break;
+ case 274: // 'xquery'
+ shift(274); // 'xquery'
+ break;
+ case 72: // 'allowing'
+ shift(72); // 'allowing'
+ break;
+ case 81: // 'at'
+ shift(81); // 'at'
+ break;
+ case 83: // 'base-uri'
+ shift(83); // 'base-uri'
+ break;
+ case 85: // 'boundary-space'
+ shift(85); // 'boundary-space'
+ break;
+ case 86: // 'break'
+ shift(86); // 'break'
+ break;
+ case 91: // 'catch'
+ shift(91); // 'catch'
+ break;
+ case 98: // 'construction'
+ shift(98); // 'construction'
+ break;
+ case 101: // 'context'
+ shift(101); // 'context'
+ break;
+ case 102: // 'continue'
+ shift(102); // 'continue'
+ break;
+ case 104: // 'copy-namespaces'
+ shift(104); // 'copy-namespaces'
+ break;
+ case 106: // 'decimal-format'
+ shift(106); // 'decimal-format'
+ break;
+ case 125: // 'encoding'
+ shift(125); // 'encoding'
+ break;
+ case 132: // 'exit'
+ shift(132); // 'exit'
+ break;
+ case 133: // 'external'
+ shift(133); // 'external'
+ break;
+ case 141: // 'ft-option'
+ shift(141); // 'ft-option'
+ break;
+ case 154: // 'in'
+ shift(154); // 'in'
+ break;
+ case 155: // 'index'
+ shift(155); // 'index'
+ break;
+ case 161: // 'integrity'
+ shift(161); // 'integrity'
+ break;
+ case 171: // 'lax'
+ shift(171); // 'lax'
+ break;
+ case 192: // 'nodes'
+ shift(192); // 'nodes'
+ break;
+ case 199: // 'option'
+ shift(199); // 'option'
+ break;
+ case 203: // 'ordering'
+ shift(203); // 'ordering'
+ break;
+ case 222: // 'revalidation'
+ shift(222); // 'revalidation'
+ break;
+ case 225: // 'schema'
+ shift(225); // 'schema'
+ break;
+ case 228: // 'score'
+ shift(228); // 'score'
+ break;
+ case 234: // 'sliding'
+ shift(234); // 'sliding'
+ break;
+ case 240: // 'strict'
+ shift(240); // 'strict'
+ break;
+ case 251: // 'tumbling'
+ shift(251); // 'tumbling'
+ break;
+ case 252: // 'type'
+ shift(252); // 'type'
+ break;
+ case 257: // 'updating'
+ shift(257); // 'updating'
+ break;
+ case 261: // 'value'
+ shift(261); // 'value'
+ break;
+ case 262: // 'variable'
+ shift(262); // 'variable'
+ break;
+ case 263: // 'version'
+ shift(263); // 'version'
+ break;
+ case 267: // 'while'
+ shift(267); // 'while'
+ break;
+ case 97: // 'constraint'
+ shift(97); // 'constraint'
+ break;
+ case 176: // 'loop'
+ shift(176); // 'loop'
+ break;
+ default:
+ shift(221); // 'returning'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function try_FunctionName()
+ {
+ switch (l1)
+ {
+ case 6: // EQName^Token
+ shiftT(6); // EQName^Token
+ break;
+ case 70: // 'after'
+ shiftT(70); // 'after'
+ break;
+ case 73: // 'ancestor'
+ shiftT(73); // 'ancestor'
+ break;
+ case 74: // 'ancestor-or-self'
+ shiftT(74); // 'ancestor-or-self'
+ break;
+ case 75: // 'and'
+ shiftT(75); // 'and'
+ break;
+ case 79: // 'as'
+ shiftT(79); // 'as'
+ break;
+ case 80: // 'ascending'
+ shiftT(80); // 'ascending'
+ break;
+ case 84: // 'before'
+ shiftT(84); // 'before'
+ break;
+ case 88: // 'case'
+ shiftT(88); // 'case'
+ break;
+ case 89: // 'cast'
+ shiftT(89); // 'cast'
+ break;
+ case 90: // 'castable'
+ shiftT(90); // 'castable'
+ break;
+ case 93: // 'child'
+ shiftT(93); // 'child'
+ break;
+ case 94: // 'collation'
+ shiftT(94); // 'collation'
+ break;
+ case 103: // 'copy'
+ shiftT(103); // 'copy'
+ break;
+ case 105: // 'count'
+ shiftT(105); // 'count'
+ break;
+ case 108: // 'declare'
+ shiftT(108); // 'declare'
+ break;
+ case 109: // 'default'
+ shiftT(109); // 'default'
+ break;
+ case 110: // 'delete'
+ shiftT(110); // 'delete'
+ break;
+ case 111: // 'descendant'
+ shiftT(111); // 'descendant'
+ break;
+ case 112: // 'descendant-or-self'
+ shiftT(112); // 'descendant-or-self'
+ break;
+ case 113: // 'descending'
+ shiftT(113); // 'descending'
+ break;
+ case 118: // 'div'
+ shiftT(118); // 'div'
+ break;
+ case 119: // 'document'
+ shiftT(119); // 'document'
+ break;
+ case 122: // 'else'
+ shiftT(122); // 'else'
+ break;
+ case 123: // 'empty'
+ shiftT(123); // 'empty'
+ break;
+ case 126: // 'end'
+ shiftT(126); // 'end'
+ break;
+ case 128: // 'eq'
+ shiftT(128); // 'eq'
+ break;
+ case 129: // 'every'
+ shiftT(129); // 'every'
+ break;
+ case 131: // 'except'
+ shiftT(131); // 'except'
+ break;
+ case 134: // 'first'
+ shiftT(134); // 'first'
+ break;
+ case 135: // 'following'
+ shiftT(135); // 'following'
+ break;
+ case 136: // 'following-sibling'
+ shiftT(136); // 'following-sibling'
+ break;
+ case 137: // 'for'
+ shiftT(137); // 'for'
+ break;
+ case 146: // 'ge'
+ shiftT(146); // 'ge'
+ break;
+ case 148: // 'group'
+ shiftT(148); // 'group'
+ break;
+ case 150: // 'gt'
+ shiftT(150); // 'gt'
+ break;
+ case 151: // 'idiv'
+ shiftT(151); // 'idiv'
+ break;
+ case 153: // 'import'
+ shiftT(153); // 'import'
+ break;
+ case 159: // 'insert'
+ shiftT(159); // 'insert'
+ break;
+ case 160: // 'instance'
+ shiftT(160); // 'instance'
+ break;
+ case 162: // 'intersect'
+ shiftT(162); // 'intersect'
+ break;
+ case 163: // 'into'
+ shiftT(163); // 'into'
+ break;
+ case 164: // 'is'
+ shiftT(164); // 'is'
+ break;
+ case 170: // 'last'
+ shiftT(170); // 'last'
+ break;
+ case 172: // 'le'
+ shiftT(172); // 'le'
+ break;
+ case 174: // 'let'
+ shiftT(174); // 'let'
+ break;
+ case 178: // 'lt'
+ shiftT(178); // 'lt'
+ break;
+ case 180: // 'mod'
+ shiftT(180); // 'mod'
+ break;
+ case 181: // 'modify'
+ shiftT(181); // 'modify'
+ break;
+ case 182: // 'module'
+ shiftT(182); // 'module'
+ break;
+ case 184: // 'namespace'
+ shiftT(184); // 'namespace'
+ break;
+ case 186: // 'ne'
+ shiftT(186); // 'ne'
+ break;
+ case 198: // 'only'
+ shiftT(198); // 'only'
+ break;
+ case 200: // 'or'
+ shiftT(200); // 'or'
+ break;
+ case 201: // 'order'
+ shiftT(201); // 'order'
+ break;
+ case 202: // 'ordered'
+ shiftT(202); // 'ordered'
+ break;
+ case 206: // 'parent'
+ shiftT(206); // 'parent'
+ break;
+ case 212: // 'preceding'
+ shiftT(212); // 'preceding'
+ break;
+ case 213: // 'preceding-sibling'
+ shiftT(213); // 'preceding-sibling'
+ break;
+ case 218: // 'rename'
+ shiftT(218); // 'rename'
+ break;
+ case 219: // 'replace'
+ shiftT(219); // 'replace'
+ break;
+ case 220: // 'return'
+ shiftT(220); // 'return'
+ break;
+ case 224: // 'satisfies'
+ shiftT(224); // 'satisfies'
+ break;
+ case 229: // 'self'
+ shiftT(229); // 'self'
+ break;
+ case 235: // 'some'
+ shiftT(235); // 'some'
+ break;
+ case 236: // 'stable'
+ shiftT(236); // 'stable'
+ break;
+ case 237: // 'start'
+ shiftT(237); // 'start'
+ break;
+ case 248: // 'to'
+ shiftT(248); // 'to'
+ break;
+ case 249: // 'treat'
+ shiftT(249); // 'treat'
+ break;
+ case 250: // 'try'
+ shiftT(250); // 'try'
+ break;
+ case 254: // 'union'
+ shiftT(254); // 'union'
+ break;
+ case 256: // 'unordered'
+ shiftT(256); // 'unordered'
+ break;
+ case 260: // 'validate'
+ shiftT(260); // 'validate'
+ break;
+ case 266: // 'where'
+ shiftT(266); // 'where'
+ break;
+ case 270: // 'with'
+ shiftT(270); // 'with'
+ break;
+ case 274: // 'xquery'
+ shiftT(274); // 'xquery'
+ break;
+ case 72: // 'allowing'
+ shiftT(72); // 'allowing'
+ break;
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ break;
+ case 83: // 'base-uri'
+ shiftT(83); // 'base-uri'
+ break;
+ case 85: // 'boundary-space'
+ shiftT(85); // 'boundary-space'
+ break;
+ case 86: // 'break'
+ shiftT(86); // 'break'
+ break;
+ case 91: // 'catch'
+ shiftT(91); // 'catch'
+ break;
+ case 98: // 'construction'
+ shiftT(98); // 'construction'
+ break;
+ case 101: // 'context'
+ shiftT(101); // 'context'
+ break;
+ case 102: // 'continue'
+ shiftT(102); // 'continue'
+ break;
+ case 104: // 'copy-namespaces'
+ shiftT(104); // 'copy-namespaces'
+ break;
+ case 106: // 'decimal-format'
+ shiftT(106); // 'decimal-format'
+ break;
+ case 125: // 'encoding'
+ shiftT(125); // 'encoding'
+ break;
+ case 132: // 'exit'
+ shiftT(132); // 'exit'
+ break;
+ case 133: // 'external'
+ shiftT(133); // 'external'
+ break;
+ case 141: // 'ft-option'
+ shiftT(141); // 'ft-option'
+ break;
+ case 154: // 'in'
+ shiftT(154); // 'in'
+ break;
+ case 155: // 'index'
+ shiftT(155); // 'index'
+ break;
+ case 161: // 'integrity'
+ shiftT(161); // 'integrity'
+ break;
+ case 171: // 'lax'
+ shiftT(171); // 'lax'
+ break;
+ case 192: // 'nodes'
+ shiftT(192); // 'nodes'
+ break;
+ case 199: // 'option'
+ shiftT(199); // 'option'
+ break;
+ case 203: // 'ordering'
+ shiftT(203); // 'ordering'
+ break;
+ case 222: // 'revalidation'
+ shiftT(222); // 'revalidation'
+ break;
+ case 225: // 'schema'
+ shiftT(225); // 'schema'
+ break;
+ case 228: // 'score'
+ shiftT(228); // 'score'
+ break;
+ case 234: // 'sliding'
+ shiftT(234); // 'sliding'
+ break;
+ case 240: // 'strict'
+ shiftT(240); // 'strict'
+ break;
+ case 251: // 'tumbling'
+ shiftT(251); // 'tumbling'
+ break;
+ case 252: // 'type'
+ shiftT(252); // 'type'
+ break;
+ case 257: // 'updating'
+ shiftT(257); // 'updating'
+ break;
+ case 261: // 'value'
+ shiftT(261); // 'value'
+ break;
+ case 262: // 'variable'
+ shiftT(262); // 'variable'
+ break;
+ case 263: // 'version'
+ shiftT(263); // 'version'
+ break;
+ case 267: // 'while'
+ shiftT(267); // 'while'
+ break;
+ case 97: // 'constraint'
+ shiftT(97); // 'constraint'
+ break;
+ case 176: // 'loop'
+ shiftT(176); // 'loop'
+ break;
+ default:
+ shiftT(221); // 'returning'
+ }
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 19: // NCName^Token
+ shift(19); // NCName^Token
+ break;
+ case 70: // 'after'
+ shift(70); // 'after'
+ break;
+ case 75: // 'and'
+ shift(75); // 'and'
+ break;
+ case 79: // 'as'
+ shift(79); // 'as'
+ break;
+ case 80: // 'ascending'
+ shift(80); // 'ascending'
+ break;
+ case 84: // 'before'
+ shift(84); // 'before'
+ break;
+ case 88: // 'case'
+ shift(88); // 'case'
+ break;
+ case 89: // 'cast'
+ shift(89); // 'cast'
+ break;
+ case 90: // 'castable'
+ shift(90); // 'castable'
+ break;
+ case 94: // 'collation'
+ shift(94); // 'collation'
+ break;
+ case 105: // 'count'
+ shift(105); // 'count'
+ break;
+ case 109: // 'default'
+ shift(109); // 'default'
+ break;
+ case 113: // 'descending'
+ shift(113); // 'descending'
+ break;
+ case 118: // 'div'
+ shift(118); // 'div'
+ break;
+ case 122: // 'else'
+ shift(122); // 'else'
+ break;
+ case 123: // 'empty'
+ shift(123); // 'empty'
+ break;
+ case 126: // 'end'
+ shift(126); // 'end'
+ break;
+ case 128: // 'eq'
+ shift(128); // 'eq'
+ break;
+ case 131: // 'except'
+ shift(131); // 'except'
+ break;
+ case 137: // 'for'
+ shift(137); // 'for'
+ break;
+ case 146: // 'ge'
+ shift(146); // 'ge'
+ break;
+ case 148: // 'group'
+ shift(148); // 'group'
+ break;
+ case 150: // 'gt'
+ shift(150); // 'gt'
+ break;
+ case 151: // 'idiv'
+ shift(151); // 'idiv'
+ break;
+ case 160: // 'instance'
+ shift(160); // 'instance'
+ break;
+ case 162: // 'intersect'
+ shift(162); // 'intersect'
+ break;
+ case 163: // 'into'
+ shift(163); // 'into'
+ break;
+ case 164: // 'is'
+ shift(164); // 'is'
+ break;
+ case 172: // 'le'
+ shift(172); // 'le'
+ break;
+ case 174: // 'let'
+ shift(174); // 'let'
+ break;
+ case 178: // 'lt'
+ shift(178); // 'lt'
+ break;
+ case 180: // 'mod'
+ shift(180); // 'mod'
+ break;
+ case 181: // 'modify'
+ shift(181); // 'modify'
+ break;
+ case 186: // 'ne'
+ shift(186); // 'ne'
+ break;
+ case 198: // 'only'
+ shift(198); // 'only'
+ break;
+ case 200: // 'or'
+ shift(200); // 'or'
+ break;
+ case 201: // 'order'
+ shift(201); // 'order'
+ break;
+ case 220: // 'return'
+ shift(220); // 'return'
+ break;
+ case 224: // 'satisfies'
+ shift(224); // 'satisfies'
+ break;
+ case 236: // 'stable'
+ shift(236); // 'stable'
+ break;
+ case 237: // 'start'
+ shift(237); // 'start'
+ break;
+ case 248: // 'to'
+ shift(248); // 'to'
+ break;
+ case 249: // 'treat'
+ shift(249); // 'treat'
+ break;
+ case 254: // 'union'
+ shift(254); // 'union'
+ break;
+ case 266: // 'where'
+ shift(266); // 'where'
+ break;
+ case 270: // 'with'
+ shift(270); // 'with'
+ break;
+ case 73: // 'ancestor'
+ shift(73); // 'ancestor'
+ break;
+ case 74: // 'ancestor-or-self'
+ shift(74); // 'ancestor-or-self'
+ break;
+ case 82: // 'attribute'
+ shift(82); // 'attribute'
+ break;
+ case 93: // 'child'
+ shift(93); // 'child'
+ break;
+ case 96: // 'comment'
+ shift(96); // 'comment'
+ break;
+ case 103: // 'copy'
+ shift(103); // 'copy'
+ break;
+ case 108: // 'declare'
+ shift(108); // 'declare'
+ break;
+ case 110: // 'delete'
+ shift(110); // 'delete'
+ break;
+ case 111: // 'descendant'
+ shift(111); // 'descendant'
+ break;
+ case 112: // 'descendant-or-self'
+ shift(112); // 'descendant-or-self'
+ break;
+ case 119: // 'document'
+ shift(119); // 'document'
+ break;
+ case 120: // 'document-node'
+ shift(120); // 'document-node'
+ break;
+ case 121: // 'element'
+ shift(121); // 'element'
+ break;
+ case 124: // 'empty-sequence'
+ shift(124); // 'empty-sequence'
+ break;
+ case 129: // 'every'
+ shift(129); // 'every'
+ break;
+ case 134: // 'first'
+ shift(134); // 'first'
+ break;
+ case 135: // 'following'
+ shift(135); // 'following'
+ break;
+ case 136: // 'following-sibling'
+ shift(136); // 'following-sibling'
+ break;
+ case 145: // 'function'
+ shift(145); // 'function'
+ break;
+ case 152: // 'if'
+ shift(152); // 'if'
+ break;
+ case 153: // 'import'
+ shift(153); // 'import'
+ break;
+ case 159: // 'insert'
+ shift(159); // 'insert'
+ break;
+ case 165: // 'item'
+ shift(165); // 'item'
+ break;
+ case 170: // 'last'
+ shift(170); // 'last'
+ break;
+ case 182: // 'module'
+ shift(182); // 'module'
+ break;
+ case 184: // 'namespace'
+ shift(184); // 'namespace'
+ break;
+ case 185: // 'namespace-node'
+ shift(185); // 'namespace-node'
+ break;
+ case 191: // 'node'
+ shift(191); // 'node'
+ break;
+ case 202: // 'ordered'
+ shift(202); // 'ordered'
+ break;
+ case 206: // 'parent'
+ shift(206); // 'parent'
+ break;
+ case 212: // 'preceding'
+ shift(212); // 'preceding'
+ break;
+ case 213: // 'preceding-sibling'
+ shift(213); // 'preceding-sibling'
+ break;
+ case 216: // 'processing-instruction'
+ shift(216); // 'processing-instruction'
+ break;
+ case 218: // 'rename'
+ shift(218); // 'rename'
+ break;
+ case 219: // 'replace'
+ shift(219); // 'replace'
+ break;
+ case 226: // 'schema-attribute'
+ shift(226); // 'schema-attribute'
+ break;
+ case 227: // 'schema-element'
+ shift(227); // 'schema-element'
+ break;
+ case 229: // 'self'
+ shift(229); // 'self'
+ break;
+ case 235: // 'some'
+ shift(235); // 'some'
+ break;
+ case 243: // 'switch'
+ shift(243); // 'switch'
+ break;
+ case 244: // 'text'
+ shift(244); // 'text'
+ break;
+ case 250: // 'try'
+ shift(250); // 'try'
+ break;
+ case 253: // 'typeswitch'
+ shift(253); // 'typeswitch'
+ break;
+ case 256: // 'unordered'
+ shift(256); // 'unordered'
+ break;
+ case 260: // 'validate'
+ shift(260); // 'validate'
+ break;
+ case 262: // 'variable'
+ shift(262); // 'variable'
+ break;
+ case 274: // 'xquery'
+ shift(274); // 'xquery'
+ break;
+ case 72: // 'allowing'
+ shift(72); // 'allowing'
+ break;
+ case 81: // 'at'
+ shift(81); // 'at'
+ break;
+ case 83: // 'base-uri'
+ shift(83); // 'base-uri'
+ break;
+ case 85: // 'boundary-space'
+ shift(85); // 'boundary-space'
+ break;
+ case 86: // 'break'
+ shift(86); // 'break'
+ break;
+ case 91: // 'catch'
+ shift(91); // 'catch'
+ break;
+ case 98: // 'construction'
+ shift(98); // 'construction'
+ break;
+ case 101: // 'context'
+ shift(101); // 'context'
+ break;
+ case 102: // 'continue'
+ shift(102); // 'continue'
+ break;
+ case 104: // 'copy-namespaces'
+ shift(104); // 'copy-namespaces'
+ break;
+ case 106: // 'decimal-format'
+ shift(106); // 'decimal-format'
+ break;
+ case 125: // 'encoding'
+ shift(125); // 'encoding'
+ break;
+ case 132: // 'exit'
+ shift(132); // 'exit'
+ break;
+ case 133: // 'external'
+ shift(133); // 'external'
+ break;
+ case 141: // 'ft-option'
+ shift(141); // 'ft-option'
+ break;
+ case 154: // 'in'
+ shift(154); // 'in'
+ break;
+ case 155: // 'index'
+ shift(155); // 'index'
+ break;
+ case 161: // 'integrity'
+ shift(161); // 'integrity'
+ break;
+ case 171: // 'lax'
+ shift(171); // 'lax'
+ break;
+ case 192: // 'nodes'
+ shift(192); // 'nodes'
+ break;
+ case 199: // 'option'
+ shift(199); // 'option'
+ break;
+ case 203: // 'ordering'
+ shift(203); // 'ordering'
+ break;
+ case 222: // 'revalidation'
+ shift(222); // 'revalidation'
+ break;
+ case 225: // 'schema'
+ shift(225); // 'schema'
+ break;
+ case 228: // 'score'
+ shift(228); // 'score'
+ break;
+ case 234: // 'sliding'
+ shift(234); // 'sliding'
+ break;
+ case 240: // 'strict'
+ shift(240); // 'strict'
+ break;
+ case 251: // 'tumbling'
+ shift(251); // 'tumbling'
+ break;
+ case 252: // 'type'
+ shift(252); // 'type'
+ break;
+ case 257: // 'updating'
+ shift(257); // 'updating'
+ break;
+ case 261: // 'value'
+ shift(261); // 'value'
+ break;
+ case 263: // 'version'
+ shift(263); // 'version'
+ break;
+ case 267: // 'while'
+ shift(267); // 'while'
+ break;
+ case 97: // 'constraint'
+ shift(97); // 'constraint'
+ break;
+ case 176: // 'loop'
+ shift(176); // 'loop'
+ break;
+ default:
+ shift(221); // 'returning'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function try_NCName()
+ {
+ switch (l1)
+ {
+ case 19: // NCName^Token
+ shiftT(19); // NCName^Token
+ break;
+ case 70: // 'after'
+ shiftT(70); // 'after'
+ break;
+ case 75: // 'and'
+ shiftT(75); // 'and'
+ break;
+ case 79: // 'as'
+ shiftT(79); // 'as'
+ break;
+ case 80: // 'ascending'
+ shiftT(80); // 'ascending'
+ break;
+ case 84: // 'before'
+ shiftT(84); // 'before'
+ break;
+ case 88: // 'case'
+ shiftT(88); // 'case'
+ break;
+ case 89: // 'cast'
+ shiftT(89); // 'cast'
+ break;
+ case 90: // 'castable'
+ shiftT(90); // 'castable'
+ break;
+ case 94: // 'collation'
+ shiftT(94); // 'collation'
+ break;
+ case 105: // 'count'
+ shiftT(105); // 'count'
+ break;
+ case 109: // 'default'
+ shiftT(109); // 'default'
+ break;
+ case 113: // 'descending'
+ shiftT(113); // 'descending'
+ break;
+ case 118: // 'div'
+ shiftT(118); // 'div'
+ break;
+ case 122: // 'else'
+ shiftT(122); // 'else'
+ break;
+ case 123: // 'empty'
+ shiftT(123); // 'empty'
+ break;
+ case 126: // 'end'
+ shiftT(126); // 'end'
+ break;
+ case 128: // 'eq'
+ shiftT(128); // 'eq'
+ break;
+ case 131: // 'except'
+ shiftT(131); // 'except'
+ break;
+ case 137: // 'for'
+ shiftT(137); // 'for'
+ break;
+ case 146: // 'ge'
+ shiftT(146); // 'ge'
+ break;
+ case 148: // 'group'
+ shiftT(148); // 'group'
+ break;
+ case 150: // 'gt'
+ shiftT(150); // 'gt'
+ break;
+ case 151: // 'idiv'
+ shiftT(151); // 'idiv'
+ break;
+ case 160: // 'instance'
+ shiftT(160); // 'instance'
+ break;
+ case 162: // 'intersect'
+ shiftT(162); // 'intersect'
+ break;
+ case 163: // 'into'
+ shiftT(163); // 'into'
+ break;
+ case 164: // 'is'
+ shiftT(164); // 'is'
+ break;
+ case 172: // 'le'
+ shiftT(172); // 'le'
+ break;
+ case 174: // 'let'
+ shiftT(174); // 'let'
+ break;
+ case 178: // 'lt'
+ shiftT(178); // 'lt'
+ break;
+ case 180: // 'mod'
+ shiftT(180); // 'mod'
+ break;
+ case 181: // 'modify'
+ shiftT(181); // 'modify'
+ break;
+ case 186: // 'ne'
+ shiftT(186); // 'ne'
+ break;
+ case 198: // 'only'
+ shiftT(198); // 'only'
+ break;
+ case 200: // 'or'
+ shiftT(200); // 'or'
+ break;
+ case 201: // 'order'
+ shiftT(201); // 'order'
+ break;
+ case 220: // 'return'
+ shiftT(220); // 'return'
+ break;
+ case 224: // 'satisfies'
+ shiftT(224); // 'satisfies'
+ break;
+ case 236: // 'stable'
+ shiftT(236); // 'stable'
+ break;
+ case 237: // 'start'
+ shiftT(237); // 'start'
+ break;
+ case 248: // 'to'
+ shiftT(248); // 'to'
+ break;
+ case 249: // 'treat'
+ shiftT(249); // 'treat'
+ break;
+ case 254: // 'union'
+ shiftT(254); // 'union'
+ break;
+ case 266: // 'where'
+ shiftT(266); // 'where'
+ break;
+ case 270: // 'with'
+ shiftT(270); // 'with'
+ break;
+ case 73: // 'ancestor'
+ shiftT(73); // 'ancestor'
+ break;
+ case 74: // 'ancestor-or-self'
+ shiftT(74); // 'ancestor-or-self'
+ break;
+ case 82: // 'attribute'
+ shiftT(82); // 'attribute'
+ break;
+ case 93: // 'child'
+ shiftT(93); // 'child'
+ break;
+ case 96: // 'comment'
+ shiftT(96); // 'comment'
+ break;
+ case 103: // 'copy'
+ shiftT(103); // 'copy'
+ break;
+ case 108: // 'declare'
+ shiftT(108); // 'declare'
+ break;
+ case 110: // 'delete'
+ shiftT(110); // 'delete'
+ break;
+ case 111: // 'descendant'
+ shiftT(111); // 'descendant'
+ break;
+ case 112: // 'descendant-or-self'
+ shiftT(112); // 'descendant-or-self'
+ break;
+ case 119: // 'document'
+ shiftT(119); // 'document'
+ break;
+ case 120: // 'document-node'
+ shiftT(120); // 'document-node'
+ break;
+ case 121: // 'element'
+ shiftT(121); // 'element'
+ break;
+ case 124: // 'empty-sequence'
+ shiftT(124); // 'empty-sequence'
+ break;
+ case 129: // 'every'
+ shiftT(129); // 'every'
+ break;
+ case 134: // 'first'
+ shiftT(134); // 'first'
+ break;
+ case 135: // 'following'
+ shiftT(135); // 'following'
+ break;
+ case 136: // 'following-sibling'
+ shiftT(136); // 'following-sibling'
+ break;
+ case 145: // 'function'
+ shiftT(145); // 'function'
+ break;
+ case 152: // 'if'
+ shiftT(152); // 'if'
+ break;
+ case 153: // 'import'
+ shiftT(153); // 'import'
+ break;
+ case 159: // 'insert'
+ shiftT(159); // 'insert'
+ break;
+ case 165: // 'item'
+ shiftT(165); // 'item'
+ break;
+ case 170: // 'last'
+ shiftT(170); // 'last'
+ break;
+ case 182: // 'module'
+ shiftT(182); // 'module'
+ break;
+ case 184: // 'namespace'
+ shiftT(184); // 'namespace'
+ break;
+ case 185: // 'namespace-node'
+ shiftT(185); // 'namespace-node'
+ break;
+ case 191: // 'node'
+ shiftT(191); // 'node'
+ break;
+ case 202: // 'ordered'
+ shiftT(202); // 'ordered'
+ break;
+ case 206: // 'parent'
+ shiftT(206); // 'parent'
+ break;
+ case 212: // 'preceding'
+ shiftT(212); // 'preceding'
+ break;
+ case 213: // 'preceding-sibling'
+ shiftT(213); // 'preceding-sibling'
+ break;
+ case 216: // 'processing-instruction'
+ shiftT(216); // 'processing-instruction'
+ break;
+ case 218: // 'rename'
+ shiftT(218); // 'rename'
+ break;
+ case 219: // 'replace'
+ shiftT(219); // 'replace'
+ break;
+ case 226: // 'schema-attribute'
+ shiftT(226); // 'schema-attribute'
+ break;
+ case 227: // 'schema-element'
+ shiftT(227); // 'schema-element'
+ break;
+ case 229: // 'self'
+ shiftT(229); // 'self'
+ break;
+ case 235: // 'some'
+ shiftT(235); // 'some'
+ break;
+ case 243: // 'switch'
+ shiftT(243); // 'switch'
+ break;
+ case 244: // 'text'
+ shiftT(244); // 'text'
+ break;
+ case 250: // 'try'
+ shiftT(250); // 'try'
+ break;
+ case 253: // 'typeswitch'
+ shiftT(253); // 'typeswitch'
+ break;
+ case 256: // 'unordered'
+ shiftT(256); // 'unordered'
+ break;
+ case 260: // 'validate'
+ shiftT(260); // 'validate'
+ break;
+ case 262: // 'variable'
+ shiftT(262); // 'variable'
+ break;
+ case 274: // 'xquery'
+ shiftT(274); // 'xquery'
+ break;
+ case 72: // 'allowing'
+ shiftT(72); // 'allowing'
+ break;
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ break;
+ case 83: // 'base-uri'
+ shiftT(83); // 'base-uri'
+ break;
+ case 85: // 'boundary-space'
+ shiftT(85); // 'boundary-space'
+ break;
+ case 86: // 'break'
+ shiftT(86); // 'break'
+ break;
+ case 91: // 'catch'
+ shiftT(91); // 'catch'
+ break;
+ case 98: // 'construction'
+ shiftT(98); // 'construction'
+ break;
+ case 101: // 'context'
+ shiftT(101); // 'context'
+ break;
+ case 102: // 'continue'
+ shiftT(102); // 'continue'
+ break;
+ case 104: // 'copy-namespaces'
+ shiftT(104); // 'copy-namespaces'
+ break;
+ case 106: // 'decimal-format'
+ shiftT(106); // 'decimal-format'
+ break;
+ case 125: // 'encoding'
+ shiftT(125); // 'encoding'
+ break;
+ case 132: // 'exit'
+ shiftT(132); // 'exit'
+ break;
+ case 133: // 'external'
+ shiftT(133); // 'external'
+ break;
+ case 141: // 'ft-option'
+ shiftT(141); // 'ft-option'
+ break;
+ case 154: // 'in'
+ shiftT(154); // 'in'
+ break;
+ case 155: // 'index'
+ shiftT(155); // 'index'
+ break;
+ case 161: // 'integrity'
+ shiftT(161); // 'integrity'
+ break;
+ case 171: // 'lax'
+ shiftT(171); // 'lax'
+ break;
+ case 192: // 'nodes'
+ shiftT(192); // 'nodes'
+ break;
+ case 199: // 'option'
+ shiftT(199); // 'option'
+ break;
+ case 203: // 'ordering'
+ shiftT(203); // 'ordering'
+ break;
+ case 222: // 'revalidation'
+ shiftT(222); // 'revalidation'
+ break;
+ case 225: // 'schema'
+ shiftT(225); // 'schema'
+ break;
+ case 228: // 'score'
+ shiftT(228); // 'score'
+ break;
+ case 234: // 'sliding'
+ shiftT(234); // 'sliding'
+ break;
+ case 240: // 'strict'
+ shiftT(240); // 'strict'
+ break;
+ case 251: // 'tumbling'
+ shiftT(251); // 'tumbling'
+ break;
+ case 252: // 'type'
+ shiftT(252); // 'type'
+ break;
+ case 257: // 'updating'
+ shiftT(257); // 'updating'
+ break;
+ case 261: // 'value'
+ shiftT(261); // 'value'
+ break;
+ case 263: // 'version'
+ shiftT(263); // 'version'
+ break;
+ case 267: // 'while'
+ shiftT(267); // 'while'
+ break;
+ case 97: // 'constraint'
+ shiftT(97); // 'constraint'
+ break;
+ case 176: // 'loop'
+ shiftT(176); // 'loop'
+ break;
+ default:
+ shiftT(221); // 'returning'
+ }
+ }
+
+ function parse_MainModule()
+ {
+ eventHandler.startNonterminal("MainModule", e0);
+ parse_Prolog();
+ whitespace();
+ parse_Program();
+ eventHandler.endNonterminal("MainModule", e0);
+ }
+
+ function parse_Program()
+ {
+ eventHandler.startNonterminal("Program", e0);
+ parse_StatementsAndOptionalExpr();
+ eventHandler.endNonterminal("Program", e0);
+ }
+
+ function parse_Statements()
+ {
+ eventHandler.startNonterminal("Statements", e0);
+ for (;;)
+ {
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 34: // '('
+ lookahead2W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 35: // '(#'
+ lookahead2(248); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ break;
+ case 46: // '/'
+ lookahead2W(281); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 47: // '//'
+ lookahead2W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 54: // '<'
+ lookahead2(4); // QName
+ break;
+ case 55: // '<!--'
+ lookahead2(1); // DirCommentContents
+ break;
+ case 59: // '<?'
+ lookahead2(3); // PITarget
+ break;
+ case 66: // '@'
+ lookahead2W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 68: // '['
+ lookahead2W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 77: // 'append'
+ lookahead2W(56); // S^WS | '(:' | 'json'
+ break;
+ case 82: // 'attribute'
+ lookahead2W(278); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 121: // 'element'
+ lookahead2W(276); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 132: // 'exit'
+ lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 137: // 'for'
+ lookahead2W(206); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 174: // 'let'
+ lookahead2W(204); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 218: // 'rename'
+ lookahead2W(205); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 219: // 'replace'
+ lookahead2W(208); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 260: // 'validate'
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 278: // '{|'
+ lookahead2W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 5: // Wildcard
+ case 45: // '..'
+ lookahead2W(186); // S^WS | EOF | '!' | '!=' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 40: // '+'
+ case 42: // '-'
+ lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(200); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(207); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 124: // 'empty-sequence'
+ case 165: // 'item'
+ lookahead2W(191); // S^WS | EOF | '!' | '!=' | '#' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(277); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ case 262: // 'variable'
+ lookahead2W(197); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 44: // '.'
+ lookahead2W(192); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 250: // 'try'
+ case 256: // 'unordered'
+ lookahead2W(203); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 229: // 'self'
+ lookahead2W(198); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 120: // 'document-node'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 131: // 'except'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 141: // 'ft-option'
+ case 145: // 'function'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 152: // 'if'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 185: // 'namespace-node'
+ case 186: // 'ne'
+ case 191: // 'node'
+ case 192: // 'nodes'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 228: // 'score'
+ case 234: // 'sliding'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 243: // 'switch'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 253: // 'typeswitch'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 261: // 'value'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(195); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 282 // '}'
+ && lk != 12805 // Wildcard EOF
+ && lk != 12806 // EQName^Token EOF
+ && lk != 12808 // IntegerLiteral EOF
+ && lk != 12809 // DecimalLiteral EOF
+ && lk != 12810 // DoubleLiteral EOF
+ && lk != 12811 // StringLiteral EOF
+ && lk != 12844 // '.' EOF
+ && lk != 12845 // '..' EOF
+ && lk != 12846 // '/' EOF
+ && lk != 12870 // 'after' EOF
+ && lk != 12872 // 'allowing' EOF
+ && lk != 12873 // 'ancestor' EOF
+ && lk != 12874 // 'ancestor-or-self' EOF
+ && lk != 12875 // 'and' EOF
+ && lk != 12879 // 'as' EOF
+ && lk != 12880 // 'ascending' EOF
+ && lk != 12881 // 'at' EOF
+ && lk != 12882 // 'attribute' EOF
+ && lk != 12883 // 'base-uri' EOF
+ && lk != 12884 // 'before' EOF
+ && lk != 12885 // 'boundary-space' EOF
+ && lk != 12886 // 'break' EOF
+ && lk != 12888 // 'case' EOF
+ && lk != 12889 // 'cast' EOF
+ && lk != 12890 // 'castable' EOF
+ && lk != 12891 // 'catch' EOF
+ && lk != 12893 // 'child' EOF
+ && lk != 12894 // 'collation' EOF
+ && lk != 12896 // 'comment' EOF
+ && lk != 12897 // 'constraint' EOF
+ && lk != 12898 // 'construction' EOF
+ && lk != 12901 // 'context' EOF
+ && lk != 12902 // 'continue' EOF
+ && lk != 12903 // 'copy' EOF
+ && lk != 12904 // 'copy-namespaces' EOF
+ && lk != 12905 // 'count' EOF
+ && lk != 12906 // 'decimal-format' EOF
+ && lk != 12908 // 'declare' EOF
+ && lk != 12909 // 'default' EOF
+ && lk != 12910 // 'delete' EOF
+ && lk != 12911 // 'descendant' EOF
+ && lk != 12912 // 'descendant-or-self' EOF
+ && lk != 12913 // 'descending' EOF
+ && lk != 12918 // 'div' EOF
+ && lk != 12919 // 'document' EOF
+ && lk != 12920 // 'document-node' EOF
+ && lk != 12921 // 'element' EOF
+ && lk != 12922 // 'else' EOF
+ && lk != 12923 // 'empty' EOF
+ && lk != 12924 // 'empty-sequence' EOF
+ && lk != 12925 // 'encoding' EOF
+ && lk != 12926 // 'end' EOF
+ && lk != 12928 // 'eq' EOF
+ && lk != 12929 // 'every' EOF
+ && lk != 12931 // 'except' EOF
+ && lk != 12932 // 'exit' EOF
+ && lk != 12933 // 'external' EOF
+ && lk != 12934 // 'first' EOF
+ && lk != 12935 // 'following' EOF
+ && lk != 12936 // 'following-sibling' EOF
+ && lk != 12937 // 'for' EOF
+ && lk != 12941 // 'ft-option' EOF
+ && lk != 12945 // 'function' EOF
+ && lk != 12946 // 'ge' EOF
+ && lk != 12948 // 'group' EOF
+ && lk != 12950 // 'gt' EOF
+ && lk != 12951 // 'idiv' EOF
+ && lk != 12952 // 'if' EOF
+ && lk != 12953 // 'import' EOF
+ && lk != 12954 // 'in' EOF
+ && lk != 12955 // 'index' EOF
+ && lk != 12959 // 'insert' EOF
+ && lk != 12960 // 'instance' EOF
+ && lk != 12961 // 'integrity' EOF
+ && lk != 12962 // 'intersect' EOF
+ && lk != 12963 // 'into' EOF
+ && lk != 12964 // 'is' EOF
+ && lk != 12965 // 'item' EOF
+ && lk != 12970 // 'last' EOF
+ && lk != 12971 // 'lax' EOF
+ && lk != 12972 // 'le' EOF
+ && lk != 12974 // 'let' EOF
+ && lk != 12976 // 'loop' EOF
+ && lk != 12978 // 'lt' EOF
+ && lk != 12980 // 'mod' EOF
+ && lk != 12981 // 'modify' EOF
+ && lk != 12982 // 'module' EOF
+ && lk != 12984 // 'namespace' EOF
+ && lk != 12985 // 'namespace-node' EOF
+ && lk != 12986 // 'ne' EOF
+ && lk != 12991 // 'node' EOF
+ && lk != 12992 // 'nodes' EOF
+ && lk != 12998 // 'only' EOF
+ && lk != 12999 // 'option' EOF
+ && lk != 13000 // 'or' EOF
+ && lk != 13001 // 'order' EOF
+ && lk != 13002 // 'ordered' EOF
+ && lk != 13003 // 'ordering' EOF
+ && lk != 13006 // 'parent' EOF
+ && lk != 13012 // 'preceding' EOF
+ && lk != 13013 // 'preceding-sibling' EOF
+ && lk != 13016 // 'processing-instruction' EOF
+ && lk != 13018 // 'rename' EOF
+ && lk != 13019 // 'replace' EOF
+ && lk != 13020 // 'return' EOF
+ && lk != 13021 // 'returning' EOF
+ && lk != 13022 // 'revalidation' EOF
+ && lk != 13024 // 'satisfies' EOF
+ && lk != 13025 // 'schema' EOF
+ && lk != 13026 // 'schema-attribute' EOF
+ && lk != 13027 // 'schema-element' EOF
+ && lk != 13028 // 'score' EOF
+ && lk != 13029 // 'self' EOF
+ && lk != 13034 // 'sliding' EOF
+ && lk != 13035 // 'some' EOF
+ && lk != 13036 // 'stable' EOF
+ && lk != 13037 // 'start' EOF
+ && lk != 13040 // 'strict' EOF
+ && lk != 13043 // 'switch' EOF
+ && lk != 13044 // 'text' EOF
+ && lk != 13048 // 'to' EOF
+ && lk != 13049 // 'treat' EOF
+ && lk != 13050 // 'try' EOF
+ && lk != 13051 // 'tumbling' EOF
+ && lk != 13052 // 'type' EOF
+ && lk != 13053 // 'typeswitch' EOF
+ && lk != 13054 // 'union' EOF
+ && lk != 13056 // 'unordered' EOF
+ && lk != 13057 // 'updating' EOF
+ && lk != 13060 // 'validate' EOF
+ && lk != 13061 // 'value' EOF
+ && lk != 13062 // 'variable' EOF
+ && lk != 13063 // 'version' EOF
+ && lk != 13066 // 'where' EOF
+ && lk != 13067 // 'while' EOF
+ && lk != 13070 // 'with' EOF
+ && lk != 13074 // 'xquery' EOF
+ && lk != 16134 // 'variable' '$'
+ && lk != 20997 // Wildcard ','
+ && lk != 20998 // EQName^Token ','
+ && lk != 21000 // IntegerLiteral ','
+ && lk != 21001 // DecimalLiteral ','
+ && lk != 21002 // DoubleLiteral ','
+ && lk != 21003 // StringLiteral ','
+ && lk != 21036 // '.' ','
+ && lk != 21037 // '..' ','
+ && lk != 21038 // '/' ','
+ && lk != 21062 // 'after' ','
+ && lk != 21064 // 'allowing' ','
+ && lk != 21065 // 'ancestor' ','
+ && lk != 21066 // 'ancestor-or-self' ','
+ && lk != 21067 // 'and' ','
+ && lk != 21071 // 'as' ','
+ && lk != 21072 // 'ascending' ','
+ && lk != 21073 // 'at' ','
+ && lk != 21074 // 'attribute' ','
+ && lk != 21075 // 'base-uri' ','
+ && lk != 21076 // 'before' ','
+ && lk != 21077 // 'boundary-space' ','
+ && lk != 21078 // 'break' ','
+ && lk != 21080 // 'case' ','
+ && lk != 21081 // 'cast' ','
+ && lk != 21082 // 'castable' ','
+ && lk != 21083 // 'catch' ','
+ && lk != 21085 // 'child' ','
+ && lk != 21086 // 'collation' ','
+ && lk != 21088 // 'comment' ','
+ && lk != 21089 // 'constraint' ','
+ && lk != 21090 // 'construction' ','
+ && lk != 21093 // 'context' ','
+ && lk != 21094 // 'continue' ','
+ && lk != 21095 // 'copy' ','
+ && lk != 21096 // 'copy-namespaces' ','
+ && lk != 21097 // 'count' ','
+ && lk != 21098 // 'decimal-format' ','
+ && lk != 21100 // 'declare' ','
+ && lk != 21101 // 'default' ','
+ && lk != 21102 // 'delete' ','
+ && lk != 21103 // 'descendant' ','
+ && lk != 21104 // 'descendant-or-self' ','
+ && lk != 21105 // 'descending' ','
+ && lk != 21110 // 'div' ','
+ && lk != 21111 // 'document' ','
+ && lk != 21112 // 'document-node' ','
+ && lk != 21113 // 'element' ','
+ && lk != 21114 // 'else' ','
+ && lk != 21115 // 'empty' ','
+ && lk != 21116 // 'empty-sequence' ','
+ && lk != 21117 // 'encoding' ','
+ && lk != 21118 // 'end' ','
+ && lk != 21120 // 'eq' ','
+ && lk != 21121 // 'every' ','
+ && lk != 21123 // 'except' ','
+ && lk != 21124 // 'exit' ','
+ && lk != 21125 // 'external' ','
+ && lk != 21126 // 'first' ','
+ && lk != 21127 // 'following' ','
+ && lk != 21128 // 'following-sibling' ','
+ && lk != 21129 // 'for' ','
+ && lk != 21133 // 'ft-option' ','
+ && lk != 21137 // 'function' ','
+ && lk != 21138 // 'ge' ','
+ && lk != 21140 // 'group' ','
+ && lk != 21142 // 'gt' ','
+ && lk != 21143 // 'idiv' ','
+ && lk != 21144 // 'if' ','
+ && lk != 21145 // 'import' ','
+ && lk != 21146 // 'in' ','
+ && lk != 21147 // 'index' ','
+ && lk != 21151 // 'insert' ','
+ && lk != 21152 // 'instance' ','
+ && lk != 21153 // 'integrity' ','
+ && lk != 21154 // 'intersect' ','
+ && lk != 21155 // 'into' ','
+ && lk != 21156 // 'is' ','
+ && lk != 21157 // 'item' ','
+ && lk != 21162 // 'last' ','
+ && lk != 21163 // 'lax' ','
+ && lk != 21164 // 'le' ','
+ && lk != 21166 // 'let' ','
+ && lk != 21168 // 'loop' ','
+ && lk != 21170 // 'lt' ','
+ && lk != 21172 // 'mod' ','
+ && lk != 21173 // 'modify' ','
+ && lk != 21174 // 'module' ','
+ && lk != 21176 // 'namespace' ','
+ && lk != 21177 // 'namespace-node' ','
+ && lk != 21178 // 'ne' ','
+ && lk != 21183 // 'node' ','
+ && lk != 21184 // 'nodes' ','
+ && lk != 21190 // 'only' ','
+ && lk != 21191 // 'option' ','
+ && lk != 21192 // 'or' ','
+ && lk != 21193 // 'order' ','
+ && lk != 21194 // 'ordered' ','
+ && lk != 21195 // 'ordering' ','
+ && lk != 21198 // 'parent' ','
+ && lk != 21204 // 'preceding' ','
+ && lk != 21205 // 'preceding-sibling' ','
+ && lk != 21208 // 'processing-instruction' ','
+ && lk != 21210 // 'rename' ','
+ && lk != 21211 // 'replace' ','
+ && lk != 21212 // 'return' ','
+ && lk != 21213 // 'returning' ','
+ && lk != 21214 // 'revalidation' ','
+ && lk != 21216 // 'satisfies' ','
+ && lk != 21217 // 'schema' ','
+ && lk != 21218 // 'schema-attribute' ','
+ && lk != 21219 // 'schema-element' ','
+ && lk != 21220 // 'score' ','
+ && lk != 21221 // 'self' ','
+ && lk != 21226 // 'sliding' ','
+ && lk != 21227 // 'some' ','
+ && lk != 21228 // 'stable' ','
+ && lk != 21229 // 'start' ','
+ && lk != 21232 // 'strict' ','
+ && lk != 21235 // 'switch' ','
+ && lk != 21236 // 'text' ','
+ && lk != 21240 // 'to' ','
+ && lk != 21241 // 'treat' ','
+ && lk != 21242 // 'try' ','
+ && lk != 21243 // 'tumbling' ','
+ && lk != 21244 // 'type' ','
+ && lk != 21245 // 'typeswitch' ','
+ && lk != 21246 // 'union' ','
+ && lk != 21248 // 'unordered' ','
+ && lk != 21249 // 'updating' ','
+ && lk != 21252 // 'validate' ','
+ && lk != 21253 // 'value' ','
+ && lk != 21254 // 'variable' ','
+ && lk != 21255 // 'version' ','
+ && lk != 21258 // 'where' ','
+ && lk != 21259 // 'while' ','
+ && lk != 21262 // 'with' ','
+ && lk != 21266 // 'xquery' ','
+ && lk != 27141 // Wildcard ';'
+ && lk != 27142 // EQName^Token ';'
+ && lk != 27144 // IntegerLiteral ';'
+ && lk != 27145 // DecimalLiteral ';'
+ && lk != 27146 // DoubleLiteral ';'
+ && lk != 27147 // StringLiteral ';'
+ && lk != 27180 // '.' ';'
+ && lk != 27181 // '..' ';'
+ && lk != 27182 // '/' ';'
+ && lk != 27206 // 'after' ';'
+ && lk != 27208 // 'allowing' ';'
+ && lk != 27209 // 'ancestor' ';'
+ && lk != 27210 // 'ancestor-or-self' ';'
+ && lk != 27211 // 'and' ';'
+ && lk != 27215 // 'as' ';'
+ && lk != 27216 // 'ascending' ';'
+ && lk != 27217 // 'at' ';'
+ && lk != 27218 // 'attribute' ';'
+ && lk != 27219 // 'base-uri' ';'
+ && lk != 27220 // 'before' ';'
+ && lk != 27221 // 'boundary-space' ';'
+ && lk != 27222 // 'break' ';'
+ && lk != 27224 // 'case' ';'
+ && lk != 27225 // 'cast' ';'
+ && lk != 27226 // 'castable' ';'
+ && lk != 27227 // 'catch' ';'
+ && lk != 27229 // 'child' ';'
+ && lk != 27230 // 'collation' ';'
+ && lk != 27232 // 'comment' ';'
+ && lk != 27233 // 'constraint' ';'
+ && lk != 27234 // 'construction' ';'
+ && lk != 27237 // 'context' ';'
+ && lk != 27238 // 'continue' ';'
+ && lk != 27239 // 'copy' ';'
+ && lk != 27240 // 'copy-namespaces' ';'
+ && lk != 27241 // 'count' ';'
+ && lk != 27242 // 'decimal-format' ';'
+ && lk != 27244 // 'declare' ';'
+ && lk != 27245 // 'default' ';'
+ && lk != 27246 // 'delete' ';'
+ && lk != 27247 // 'descendant' ';'
+ && lk != 27248 // 'descendant-or-self' ';'
+ && lk != 27249 // 'descending' ';'
+ && lk != 27254 // 'div' ';'
+ && lk != 27255 // 'document' ';'
+ && lk != 27256 // 'document-node' ';'
+ && lk != 27257 // 'element' ';'
+ && lk != 27258 // 'else' ';'
+ && lk != 27259 // 'empty' ';'
+ && lk != 27260 // 'empty-sequence' ';'
+ && lk != 27261 // 'encoding' ';'
+ && lk != 27262 // 'end' ';'
+ && lk != 27264 // 'eq' ';'
+ && lk != 27265 // 'every' ';'
+ && lk != 27267 // 'except' ';'
+ && lk != 27268 // 'exit' ';'
+ && lk != 27269 // 'external' ';'
+ && lk != 27270 // 'first' ';'
+ && lk != 27271 // 'following' ';'
+ && lk != 27272 // 'following-sibling' ';'
+ && lk != 27273 // 'for' ';'
+ && lk != 27277 // 'ft-option' ';'
+ && lk != 27281 // 'function' ';'
+ && lk != 27282 // 'ge' ';'
+ && lk != 27284 // 'group' ';'
+ && lk != 27286 // 'gt' ';'
+ && lk != 27287 // 'idiv' ';'
+ && lk != 27288 // 'if' ';'
+ && lk != 27289 // 'import' ';'
+ && lk != 27290 // 'in' ';'
+ && lk != 27291 // 'index' ';'
+ && lk != 27295 // 'insert' ';'
+ && lk != 27296 // 'instance' ';'
+ && lk != 27297 // 'integrity' ';'
+ && lk != 27298 // 'intersect' ';'
+ && lk != 27299 // 'into' ';'
+ && lk != 27300 // 'is' ';'
+ && lk != 27301 // 'item' ';'
+ && lk != 27306 // 'last' ';'
+ && lk != 27307 // 'lax' ';'
+ && lk != 27308 // 'le' ';'
+ && lk != 27310 // 'let' ';'
+ && lk != 27312 // 'loop' ';'
+ && lk != 27314 // 'lt' ';'
+ && lk != 27316 // 'mod' ';'
+ && lk != 27317 // 'modify' ';'
+ && lk != 27318 // 'module' ';'
+ && lk != 27320 // 'namespace' ';'
+ && lk != 27321 // 'namespace-node' ';'
+ && lk != 27322 // 'ne' ';'
+ && lk != 27327 // 'node' ';'
+ && lk != 27328 // 'nodes' ';'
+ && lk != 27334 // 'only' ';'
+ && lk != 27335 // 'option' ';'
+ && lk != 27336 // 'or' ';'
+ && lk != 27337 // 'order' ';'
+ && lk != 27338 // 'ordered' ';'
+ && lk != 27339 // 'ordering' ';'
+ && lk != 27342 // 'parent' ';'
+ && lk != 27348 // 'preceding' ';'
+ && lk != 27349 // 'preceding-sibling' ';'
+ && lk != 27352 // 'processing-instruction' ';'
+ && lk != 27354 // 'rename' ';'
+ && lk != 27355 // 'replace' ';'
+ && lk != 27356 // 'return' ';'
+ && lk != 27357 // 'returning' ';'
+ && lk != 27358 // 'revalidation' ';'
+ && lk != 27360 // 'satisfies' ';'
+ && lk != 27361 // 'schema' ';'
+ && lk != 27362 // 'schema-attribute' ';'
+ && lk != 27363 // 'schema-element' ';'
+ && lk != 27364 // 'score' ';'
+ && lk != 27365 // 'self' ';'
+ && lk != 27370 // 'sliding' ';'
+ && lk != 27371 // 'some' ';'
+ && lk != 27372 // 'stable' ';'
+ && lk != 27373 // 'start' ';'
+ && lk != 27376 // 'strict' ';'
+ && lk != 27379 // 'switch' ';'
+ && lk != 27380 // 'text' ';'
+ && lk != 27384 // 'to' ';'
+ && lk != 27385 // 'treat' ';'
+ && lk != 27386 // 'try' ';'
+ && lk != 27387 // 'tumbling' ';'
+ && lk != 27388 // 'type' ';'
+ && lk != 27389 // 'typeswitch' ';'
+ && lk != 27390 // 'union' ';'
+ && lk != 27392 // 'unordered' ';'
+ && lk != 27393 // 'updating' ';'
+ && lk != 27396 // 'validate' ';'
+ && lk != 27397 // 'value' ';'
+ && lk != 27398 // 'variable' ';'
+ && lk != 27399 // 'version' ';'
+ && lk != 27402 // 'where' ';'
+ && lk != 27403 // 'while' ';'
+ && lk != 27406 // 'with' ';'
+ && lk != 27410 // 'xquery' ';'
+ && lk != 90198 // 'break' 'loop'
+ && lk != 90214 // 'continue' 'loop'
+ && lk != 113284 // 'exit' 'returning'
+ && lk != 144389 // Wildcard '}'
+ && lk != 144390 // EQName^Token '}'
+ && lk != 144392 // IntegerLiteral '}'
+ && lk != 144393 // DecimalLiteral '}'
+ && lk != 144394 // DoubleLiteral '}'
+ && lk != 144395 // StringLiteral '}'
+ && lk != 144428 // '.' '}'
+ && lk != 144429 // '..' '}'
+ && lk != 144430 // '/' '}'
+ && lk != 144454 // 'after' '}'
+ && lk != 144456 // 'allowing' '}'
+ && lk != 144457 // 'ancestor' '}'
+ && lk != 144458 // 'ancestor-or-self' '}'
+ && lk != 144459 // 'and' '}'
+ && lk != 144463 // 'as' '}'
+ && lk != 144464 // 'ascending' '}'
+ && lk != 144465 // 'at' '}'
+ && lk != 144466 // 'attribute' '}'
+ && lk != 144467 // 'base-uri' '}'
+ && lk != 144468 // 'before' '}'
+ && lk != 144469 // 'boundary-space' '}'
+ && lk != 144470 // 'break' '}'
+ && lk != 144472 // 'case' '}'
+ && lk != 144473 // 'cast' '}'
+ && lk != 144474 // 'castable' '}'
+ && lk != 144475 // 'catch' '}'
+ && lk != 144477 // 'child' '}'
+ && lk != 144478 // 'collation' '}'
+ && lk != 144480 // 'comment' '}'
+ && lk != 144481 // 'constraint' '}'
+ && lk != 144482 // 'construction' '}'
+ && lk != 144485 // 'context' '}'
+ && lk != 144486 // 'continue' '}'
+ && lk != 144487 // 'copy' '}'
+ && lk != 144488 // 'copy-namespaces' '}'
+ && lk != 144489 // 'count' '}'
+ && lk != 144490 // 'decimal-format' '}'
+ && lk != 144492 // 'declare' '}'
+ && lk != 144493 // 'default' '}'
+ && lk != 144494 // 'delete' '}'
+ && lk != 144495 // 'descendant' '}'
+ && lk != 144496 // 'descendant-or-self' '}'
+ && lk != 144497 // 'descending' '}'
+ && lk != 144502 // 'div' '}'
+ && lk != 144503 // 'document' '}'
+ && lk != 144504 // 'document-node' '}'
+ && lk != 144505 // 'element' '}'
+ && lk != 144506 // 'else' '}'
+ && lk != 144507 // 'empty' '}'
+ && lk != 144508 // 'empty-sequence' '}'
+ && lk != 144509 // 'encoding' '}'
+ && lk != 144510 // 'end' '}'
+ && lk != 144512 // 'eq' '}'
+ && lk != 144513 // 'every' '}'
+ && lk != 144515 // 'except' '}'
+ && lk != 144516 // 'exit' '}'
+ && lk != 144517 // 'external' '}'
+ && lk != 144518 // 'first' '}'
+ && lk != 144519 // 'following' '}'
+ && lk != 144520 // 'following-sibling' '}'
+ && lk != 144521 // 'for' '}'
+ && lk != 144525 // 'ft-option' '}'
+ && lk != 144529 // 'function' '}'
+ && lk != 144530 // 'ge' '}'
+ && lk != 144532 // 'group' '}'
+ && lk != 144534 // 'gt' '}'
+ && lk != 144535 // 'idiv' '}'
+ && lk != 144536 // 'if' '}'
+ && lk != 144537 // 'import' '}'
+ && lk != 144538 // 'in' '}'
+ && lk != 144539 // 'index' '}'
+ && lk != 144543 // 'insert' '}'
+ && lk != 144544 // 'instance' '}'
+ && lk != 144545 // 'integrity' '}'
+ && lk != 144546 // 'intersect' '}'
+ && lk != 144547 // 'into' '}'
+ && lk != 144548 // 'is' '}'
+ && lk != 144549 // 'item' '}'
+ && lk != 144554 // 'last' '}'
+ && lk != 144555 // 'lax' '}'
+ && lk != 144556 // 'le' '}'
+ && lk != 144558 // 'let' '}'
+ && lk != 144560 // 'loop' '}'
+ && lk != 144562 // 'lt' '}'
+ && lk != 144564 // 'mod' '}'
+ && lk != 144565 // 'modify' '}'
+ && lk != 144566 // 'module' '}'
+ && lk != 144568 // 'namespace' '}'
+ && lk != 144569 // 'namespace-node' '}'
+ && lk != 144570 // 'ne' '}'
+ && lk != 144575 // 'node' '}'
+ && lk != 144576 // 'nodes' '}'
+ && lk != 144582 // 'only' '}'
+ && lk != 144583 // 'option' '}'
+ && lk != 144584 // 'or' '}'
+ && lk != 144585 // 'order' '}'
+ && lk != 144586 // 'ordered' '}'
+ && lk != 144587 // 'ordering' '}'
+ && lk != 144590 // 'parent' '}'
+ && lk != 144596 // 'preceding' '}'
+ && lk != 144597 // 'preceding-sibling' '}'
+ && lk != 144600 // 'processing-instruction' '}'
+ && lk != 144602 // 'rename' '}'
+ && lk != 144603 // 'replace' '}'
+ && lk != 144604 // 'return' '}'
+ && lk != 144605 // 'returning' '}'
+ && lk != 144606 // 'revalidation' '}'
+ && lk != 144608 // 'satisfies' '}'
+ && lk != 144609 // 'schema' '}'
+ && lk != 144610 // 'schema-attribute' '}'
+ && lk != 144611 // 'schema-element' '}'
+ && lk != 144612 // 'score' '}'
+ && lk != 144613 // 'self' '}'
+ && lk != 144618 // 'sliding' '}'
+ && lk != 144619 // 'some' '}'
+ && lk != 144620 // 'stable' '}'
+ && lk != 144621 // 'start' '}'
+ && lk != 144624 // 'strict' '}'
+ && lk != 144627 // 'switch' '}'
+ && lk != 144628 // 'text' '}'
+ && lk != 144632 // 'to' '}'
+ && lk != 144633 // 'treat' '}'
+ && lk != 144634 // 'try' '}'
+ && lk != 144635 // 'tumbling' '}'
+ && lk != 144636 // 'type' '}'
+ && lk != 144637 // 'typeswitch' '}'
+ && lk != 144638 // 'union' '}'
+ && lk != 144640 // 'unordered' '}'
+ && lk != 144641 // 'updating' '}'
+ && lk != 144644 // 'validate' '}'
+ && lk != 144645 // 'value' '}'
+ && lk != 144646 // 'variable' '}'
+ && lk != 144647 // 'version' '}'
+ && lk != 144650 // 'where' '}'
+ && lk != 144651 // 'while' '}'
+ && lk != 144654 // 'with' '}'
+ && lk != 144658) // 'xquery' '}'
+ {
+ lk = memoized(5, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Statement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(5, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 16134 // 'variable' '$'
+ && lk != 27141 // Wildcard ';'
+ && lk != 27142 // EQName^Token ';'
+ && lk != 27144 // IntegerLiteral ';'
+ && lk != 27145 // DecimalLiteral ';'
+ && lk != 27146 // DoubleLiteral ';'
+ && lk != 27147 // StringLiteral ';'
+ && lk != 27180 // '.' ';'
+ && lk != 27181 // '..' ';'
+ && lk != 27182 // '/' ';'
+ && lk != 27206 // 'after' ';'
+ && lk != 27208 // 'allowing' ';'
+ && lk != 27209 // 'ancestor' ';'
+ && lk != 27210 // 'ancestor-or-self' ';'
+ && lk != 27211 // 'and' ';'
+ && lk != 27215 // 'as' ';'
+ && lk != 27216 // 'ascending' ';'
+ && lk != 27217 // 'at' ';'
+ && lk != 27218 // 'attribute' ';'
+ && lk != 27219 // 'base-uri' ';'
+ && lk != 27220 // 'before' ';'
+ && lk != 27221 // 'boundary-space' ';'
+ && lk != 27222 // 'break' ';'
+ && lk != 27224 // 'case' ';'
+ && lk != 27225 // 'cast' ';'
+ && lk != 27226 // 'castable' ';'
+ && lk != 27227 // 'catch' ';'
+ && lk != 27229 // 'child' ';'
+ && lk != 27230 // 'collation' ';'
+ && lk != 27232 // 'comment' ';'
+ && lk != 27233 // 'constraint' ';'
+ && lk != 27234 // 'construction' ';'
+ && lk != 27237 // 'context' ';'
+ && lk != 27238 // 'continue' ';'
+ && lk != 27239 // 'copy' ';'
+ && lk != 27240 // 'copy-namespaces' ';'
+ && lk != 27241 // 'count' ';'
+ && lk != 27242 // 'decimal-format' ';'
+ && lk != 27244 // 'declare' ';'
+ && lk != 27245 // 'default' ';'
+ && lk != 27246 // 'delete' ';'
+ && lk != 27247 // 'descendant' ';'
+ && lk != 27248 // 'descendant-or-self' ';'
+ && lk != 27249 // 'descending' ';'
+ && lk != 27254 // 'div' ';'
+ && lk != 27255 // 'document' ';'
+ && lk != 27256 // 'document-node' ';'
+ && lk != 27257 // 'element' ';'
+ && lk != 27258 // 'else' ';'
+ && lk != 27259 // 'empty' ';'
+ && lk != 27260 // 'empty-sequence' ';'
+ && lk != 27261 // 'encoding' ';'
+ && lk != 27262 // 'end' ';'
+ && lk != 27264 // 'eq' ';'
+ && lk != 27265 // 'every' ';'
+ && lk != 27267 // 'except' ';'
+ && lk != 27268 // 'exit' ';'
+ && lk != 27269 // 'external' ';'
+ && lk != 27270 // 'first' ';'
+ && lk != 27271 // 'following' ';'
+ && lk != 27272 // 'following-sibling' ';'
+ && lk != 27273 // 'for' ';'
+ && lk != 27277 // 'ft-option' ';'
+ && lk != 27281 // 'function' ';'
+ && lk != 27282 // 'ge' ';'
+ && lk != 27284 // 'group' ';'
+ && lk != 27286 // 'gt' ';'
+ && lk != 27287 // 'idiv' ';'
+ && lk != 27288 // 'if' ';'
+ && lk != 27289 // 'import' ';'
+ && lk != 27290 // 'in' ';'
+ && lk != 27291 // 'index' ';'
+ && lk != 27295 // 'insert' ';'
+ && lk != 27296 // 'instance' ';'
+ && lk != 27297 // 'integrity' ';'
+ && lk != 27298 // 'intersect' ';'
+ && lk != 27299 // 'into' ';'
+ && lk != 27300 // 'is' ';'
+ && lk != 27301 // 'item' ';'
+ && lk != 27306 // 'last' ';'
+ && lk != 27307 // 'lax' ';'
+ && lk != 27308 // 'le' ';'
+ && lk != 27310 // 'let' ';'
+ && lk != 27312 // 'loop' ';'
+ && lk != 27314 // 'lt' ';'
+ && lk != 27316 // 'mod' ';'
+ && lk != 27317 // 'modify' ';'
+ && lk != 27318 // 'module' ';'
+ && lk != 27320 // 'namespace' ';'
+ && lk != 27321 // 'namespace-node' ';'
+ && lk != 27322 // 'ne' ';'
+ && lk != 27327 // 'node' ';'
+ && lk != 27328 // 'nodes' ';'
+ && lk != 27334 // 'only' ';'
+ && lk != 27335 // 'option' ';'
+ && lk != 27336 // 'or' ';'
+ && lk != 27337 // 'order' ';'
+ && lk != 27338 // 'ordered' ';'
+ && lk != 27339 // 'ordering' ';'
+ && lk != 27342 // 'parent' ';'
+ && lk != 27348 // 'preceding' ';'
+ && lk != 27349 // 'preceding-sibling' ';'
+ && lk != 27352 // 'processing-instruction' ';'
+ && lk != 27354 // 'rename' ';'
+ && lk != 27355 // 'replace' ';'
+ && lk != 27356 // 'return' ';'
+ && lk != 27357 // 'returning' ';'
+ && lk != 27358 // 'revalidation' ';'
+ && lk != 27360 // 'satisfies' ';'
+ && lk != 27361 // 'schema' ';'
+ && lk != 27362 // 'schema-attribute' ';'
+ && lk != 27363 // 'schema-element' ';'
+ && lk != 27364 // 'score' ';'
+ && lk != 27365 // 'self' ';'
+ && lk != 27370 // 'sliding' ';'
+ && lk != 27371 // 'some' ';'
+ && lk != 27372 // 'stable' ';'
+ && lk != 27373 // 'start' ';'
+ && lk != 27376 // 'strict' ';'
+ && lk != 27379 // 'switch' ';'
+ && lk != 27380 // 'text' ';'
+ && lk != 27384 // 'to' ';'
+ && lk != 27385 // 'treat' ';'
+ && lk != 27386 // 'try' ';'
+ && lk != 27387 // 'tumbling' ';'
+ && lk != 27388 // 'type' ';'
+ && lk != 27389 // 'typeswitch' ';'
+ && lk != 27390 // 'union' ';'
+ && lk != 27392 // 'unordered' ';'
+ && lk != 27393 // 'updating' ';'
+ && lk != 27396 // 'validate' ';'
+ && lk != 27397 // 'value' ';'
+ && lk != 27398 // 'variable' ';'
+ && lk != 27399 // 'version' ';'
+ && lk != 27402 // 'where' ';'
+ && lk != 27403 // 'while' ';'
+ && lk != 27406 // 'with' ';'
+ && lk != 27410 // 'xquery' ';'
+ && lk != 90198 // 'break' 'loop'
+ && lk != 90214 // 'continue' 'loop'
+ && lk != 113284) // 'exit' 'returning'
+ {
+ break;
+ }
+ whitespace();
+ parse_Statement();
+ }
+ eventHandler.endNonterminal("Statements", e0);
+ }
+
+ function try_Statements()
+ {
+ for (;;)
+ {
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 34: // '('
+ lookahead2W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 35: // '(#'
+ lookahead2(248); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ break;
+ case 46: // '/'
+ lookahead2W(281); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 47: // '//'
+ lookahead2W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 54: // '<'
+ lookahead2(4); // QName
+ break;
+ case 55: // '<!--'
+ lookahead2(1); // DirCommentContents
+ break;
+ case 59: // '<?'
+ lookahead2(3); // PITarget
+ break;
+ case 66: // '@'
+ lookahead2W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 68: // '['
+ lookahead2W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 77: // 'append'
+ lookahead2W(56); // S^WS | '(:' | 'json'
+ break;
+ case 82: // 'attribute'
+ lookahead2W(278); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 121: // 'element'
+ lookahead2W(276); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 132: // 'exit'
+ lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 137: // 'for'
+ lookahead2W(206); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 174: // 'let'
+ lookahead2W(204); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 218: // 'rename'
+ lookahead2W(205); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 219: // 'replace'
+ lookahead2W(208); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 260: // 'validate'
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 278: // '{|'
+ lookahead2W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 5: // Wildcard
+ case 45: // '..'
+ lookahead2W(186); // S^WS | EOF | '!' | '!=' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 40: // '+'
+ case 42: // '-'
+ lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(200); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(207); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 124: // 'empty-sequence'
+ case 165: // 'item'
+ lookahead2W(191); // S^WS | EOF | '!' | '!=' | '#' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(277); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ case 262: // 'variable'
+ lookahead2W(197); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 44: // '.'
+ lookahead2W(192); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 250: // 'try'
+ case 256: // 'unordered'
+ lookahead2W(203); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 229: // 'self'
+ lookahead2W(198); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 120: // 'document-node'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 131: // 'except'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 141: // 'ft-option'
+ case 145: // 'function'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 152: // 'if'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 185: // 'namespace-node'
+ case 186: // 'ne'
+ case 191: // 'node'
+ case 192: // 'nodes'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 228: // 'score'
+ case 234: // 'sliding'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 243: // 'switch'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 253: // 'typeswitch'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 261: // 'value'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(195); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 282 // '}'
+ && lk != 12805 // Wildcard EOF
+ && lk != 12806 // EQName^Token EOF
+ && lk != 12808 // IntegerLiteral EOF
+ && lk != 12809 // DecimalLiteral EOF
+ && lk != 12810 // DoubleLiteral EOF
+ && lk != 12811 // StringLiteral EOF
+ && lk != 12844 // '.' EOF
+ && lk != 12845 // '..' EOF
+ && lk != 12846 // '/' EOF
+ && lk != 12870 // 'after' EOF
+ && lk != 12872 // 'allowing' EOF
+ && lk != 12873 // 'ancestor' EOF
+ && lk != 12874 // 'ancestor-or-self' EOF
+ && lk != 12875 // 'and' EOF
+ && lk != 12879 // 'as' EOF
+ && lk != 12880 // 'ascending' EOF
+ && lk != 12881 // 'at' EOF
+ && lk != 12882 // 'attribute' EOF
+ && lk != 12883 // 'base-uri' EOF
+ && lk != 12884 // 'before' EOF
+ && lk != 12885 // 'boundary-space' EOF
+ && lk != 12886 // 'break' EOF
+ && lk != 12888 // 'case' EOF
+ && lk != 12889 // 'cast' EOF
+ && lk != 12890 // 'castable' EOF
+ && lk != 12891 // 'catch' EOF
+ && lk != 12893 // 'child' EOF
+ && lk != 12894 // 'collation' EOF
+ && lk != 12896 // 'comment' EOF
+ && lk != 12897 // 'constraint' EOF
+ && lk != 12898 // 'construction' EOF
+ && lk != 12901 // 'context' EOF
+ && lk != 12902 // 'continue' EOF
+ && lk != 12903 // 'copy' EOF
+ && lk != 12904 // 'copy-namespaces' EOF
+ && lk != 12905 // 'count' EOF
+ && lk != 12906 // 'decimal-format' EOF
+ && lk != 12908 // 'declare' EOF
+ && lk != 12909 // 'default' EOF
+ && lk != 12910 // 'delete' EOF
+ && lk != 12911 // 'descendant' EOF
+ && lk != 12912 // 'descendant-or-self' EOF
+ && lk != 12913 // 'descending' EOF
+ && lk != 12918 // 'div' EOF
+ && lk != 12919 // 'document' EOF
+ && lk != 12920 // 'document-node' EOF
+ && lk != 12921 // 'element' EOF
+ && lk != 12922 // 'else' EOF
+ && lk != 12923 // 'empty' EOF
+ && lk != 12924 // 'empty-sequence' EOF
+ && lk != 12925 // 'encoding' EOF
+ && lk != 12926 // 'end' EOF
+ && lk != 12928 // 'eq' EOF
+ && lk != 12929 // 'every' EOF
+ && lk != 12931 // 'except' EOF
+ && lk != 12932 // 'exit' EOF
+ && lk != 12933 // 'external' EOF
+ && lk != 12934 // 'first' EOF
+ && lk != 12935 // 'following' EOF
+ && lk != 12936 // 'following-sibling' EOF
+ && lk != 12937 // 'for' EOF
+ && lk != 12941 // 'ft-option' EOF
+ && lk != 12945 // 'function' EOF
+ && lk != 12946 // 'ge' EOF
+ && lk != 12948 // 'group' EOF
+ && lk != 12950 // 'gt' EOF
+ && lk != 12951 // 'idiv' EOF
+ && lk != 12952 // 'if' EOF
+ && lk != 12953 // 'import' EOF
+ && lk != 12954 // 'in' EOF
+ && lk != 12955 // 'index' EOF
+ && lk != 12959 // 'insert' EOF
+ && lk != 12960 // 'instance' EOF
+ && lk != 12961 // 'integrity' EOF
+ && lk != 12962 // 'intersect' EOF
+ && lk != 12963 // 'into' EOF
+ && lk != 12964 // 'is' EOF
+ && lk != 12965 // 'item' EOF
+ && lk != 12970 // 'last' EOF
+ && lk != 12971 // 'lax' EOF
+ && lk != 12972 // 'le' EOF
+ && lk != 12974 // 'let' EOF
+ && lk != 12976 // 'loop' EOF
+ && lk != 12978 // 'lt' EOF
+ && lk != 12980 // 'mod' EOF
+ && lk != 12981 // 'modify' EOF
+ && lk != 12982 // 'module' EOF
+ && lk != 12984 // 'namespace' EOF
+ && lk != 12985 // 'namespace-node' EOF
+ && lk != 12986 // 'ne' EOF
+ && lk != 12991 // 'node' EOF
+ && lk != 12992 // 'nodes' EOF
+ && lk != 12998 // 'only' EOF
+ && lk != 12999 // 'option' EOF
+ && lk != 13000 // 'or' EOF
+ && lk != 13001 // 'order' EOF
+ && lk != 13002 // 'ordered' EOF
+ && lk != 13003 // 'ordering' EOF
+ && lk != 13006 // 'parent' EOF
+ && lk != 13012 // 'preceding' EOF
+ && lk != 13013 // 'preceding-sibling' EOF
+ && lk != 13016 // 'processing-instruction' EOF
+ && lk != 13018 // 'rename' EOF
+ && lk != 13019 // 'replace' EOF
+ && lk != 13020 // 'return' EOF
+ && lk != 13021 // 'returning' EOF
+ && lk != 13022 // 'revalidation' EOF
+ && lk != 13024 // 'satisfies' EOF
+ && lk != 13025 // 'schema' EOF
+ && lk != 13026 // 'schema-attribute' EOF
+ && lk != 13027 // 'schema-element' EOF
+ && lk != 13028 // 'score' EOF
+ && lk != 13029 // 'self' EOF
+ && lk != 13034 // 'sliding' EOF
+ && lk != 13035 // 'some' EOF
+ && lk != 13036 // 'stable' EOF
+ && lk != 13037 // 'start' EOF
+ && lk != 13040 // 'strict' EOF
+ && lk != 13043 // 'switch' EOF
+ && lk != 13044 // 'text' EOF
+ && lk != 13048 // 'to' EOF
+ && lk != 13049 // 'treat' EOF
+ && lk != 13050 // 'try' EOF
+ && lk != 13051 // 'tumbling' EOF
+ && lk != 13052 // 'type' EOF
+ && lk != 13053 // 'typeswitch' EOF
+ && lk != 13054 // 'union' EOF
+ && lk != 13056 // 'unordered' EOF
+ && lk != 13057 // 'updating' EOF
+ && lk != 13060 // 'validate' EOF
+ && lk != 13061 // 'value' EOF
+ && lk != 13062 // 'variable' EOF
+ && lk != 13063 // 'version' EOF
+ && lk != 13066 // 'where' EOF
+ && lk != 13067 // 'while' EOF
+ && lk != 13070 // 'with' EOF
+ && lk != 13074 // 'xquery' EOF
+ && lk != 16134 // 'variable' '$'
+ && lk != 20997 // Wildcard ','
+ && lk != 20998 // EQName^Token ','
+ && lk != 21000 // IntegerLiteral ','
+ && lk != 21001 // DecimalLiteral ','
+ && lk != 21002 // DoubleLiteral ','
+ && lk != 21003 // StringLiteral ','
+ && lk != 21036 // '.' ','
+ && lk != 21037 // '..' ','
+ && lk != 21038 // '/' ','
+ && lk != 21062 // 'after' ','
+ && lk != 21064 // 'allowing' ','
+ && lk != 21065 // 'ancestor' ','
+ && lk != 21066 // 'ancestor-or-self' ','
+ && lk != 21067 // 'and' ','
+ && lk != 21071 // 'as' ','
+ && lk != 21072 // 'ascending' ','
+ && lk != 21073 // 'at' ','
+ && lk != 21074 // 'attribute' ','
+ && lk != 21075 // 'base-uri' ','
+ && lk != 21076 // 'before' ','
+ && lk != 21077 // 'boundary-space' ','
+ && lk != 21078 // 'break' ','
+ && lk != 21080 // 'case' ','
+ && lk != 21081 // 'cast' ','
+ && lk != 21082 // 'castable' ','
+ && lk != 21083 // 'catch' ','
+ && lk != 21085 // 'child' ','
+ && lk != 21086 // 'collation' ','
+ && lk != 21088 // 'comment' ','
+ && lk != 21089 // 'constraint' ','
+ && lk != 21090 // 'construction' ','
+ && lk != 21093 // 'context' ','
+ && lk != 21094 // 'continue' ','
+ && lk != 21095 // 'copy' ','
+ && lk != 21096 // 'copy-namespaces' ','
+ && lk != 21097 // 'count' ','
+ && lk != 21098 // 'decimal-format' ','
+ && lk != 21100 // 'declare' ','
+ && lk != 21101 // 'default' ','
+ && lk != 21102 // 'delete' ','
+ && lk != 21103 // 'descendant' ','
+ && lk != 21104 // 'descendant-or-self' ','
+ && lk != 21105 // 'descending' ','
+ && lk != 21110 // 'div' ','
+ && lk != 21111 // 'document' ','
+ && lk != 21112 // 'document-node' ','
+ && lk != 21113 // 'element' ','
+ && lk != 21114 // 'else' ','
+ && lk != 21115 // 'empty' ','
+ && lk != 21116 // 'empty-sequence' ','
+ && lk != 21117 // 'encoding' ','
+ && lk != 21118 // 'end' ','
+ && lk != 21120 // 'eq' ','
+ && lk != 21121 // 'every' ','
+ && lk != 21123 // 'except' ','
+ && lk != 21124 // 'exit' ','
+ && lk != 21125 // 'external' ','
+ && lk != 21126 // 'first' ','
+ && lk != 21127 // 'following' ','
+ && lk != 21128 // 'following-sibling' ','
+ && lk != 21129 // 'for' ','
+ && lk != 21133 // 'ft-option' ','
+ && lk != 21137 // 'function' ','
+ && lk != 21138 // 'ge' ','
+ && lk != 21140 // 'group' ','
+ && lk != 21142 // 'gt' ','
+ && lk != 21143 // 'idiv' ','
+ && lk != 21144 // 'if' ','
+ && lk != 21145 // 'import' ','
+ && lk != 21146 // 'in' ','
+ && lk != 21147 // 'index' ','
+ && lk != 21151 // 'insert' ','
+ && lk != 21152 // 'instance' ','
+ && lk != 21153 // 'integrity' ','
+ && lk != 21154 // 'intersect' ','
+ && lk != 21155 // 'into' ','
+ && lk != 21156 // 'is' ','
+ && lk != 21157 // 'item' ','
+ && lk != 21162 // 'last' ','
+ && lk != 21163 // 'lax' ','
+ && lk != 21164 // 'le' ','
+ && lk != 21166 // 'let' ','
+ && lk != 21168 // 'loop' ','
+ && lk != 21170 // 'lt' ','
+ && lk != 21172 // 'mod' ','
+ && lk != 21173 // 'modify' ','
+ && lk != 21174 // 'module' ','
+ && lk != 21176 // 'namespace' ','
+ && lk != 21177 // 'namespace-node' ','
+ && lk != 21178 // 'ne' ','
+ && lk != 21183 // 'node' ','
+ && lk != 21184 // 'nodes' ','
+ && lk != 21190 // 'only' ','
+ && lk != 21191 // 'option' ','
+ && lk != 21192 // 'or' ','
+ && lk != 21193 // 'order' ','
+ && lk != 21194 // 'ordered' ','
+ && lk != 21195 // 'ordering' ','
+ && lk != 21198 // 'parent' ','
+ && lk != 21204 // 'preceding' ','
+ && lk != 21205 // 'preceding-sibling' ','
+ && lk != 21208 // 'processing-instruction' ','
+ && lk != 21210 // 'rename' ','
+ && lk != 21211 // 'replace' ','
+ && lk != 21212 // 'return' ','
+ && lk != 21213 // 'returning' ','
+ && lk != 21214 // 'revalidation' ','
+ && lk != 21216 // 'satisfies' ','
+ && lk != 21217 // 'schema' ','
+ && lk != 21218 // 'schema-attribute' ','
+ && lk != 21219 // 'schema-element' ','
+ && lk != 21220 // 'score' ','
+ && lk != 21221 // 'self' ','
+ && lk != 21226 // 'sliding' ','
+ && lk != 21227 // 'some' ','
+ && lk != 21228 // 'stable' ','
+ && lk != 21229 // 'start' ','
+ && lk != 21232 // 'strict' ','
+ && lk != 21235 // 'switch' ','
+ && lk != 21236 // 'text' ','
+ && lk != 21240 // 'to' ','
+ && lk != 21241 // 'treat' ','
+ && lk != 21242 // 'try' ','
+ && lk != 21243 // 'tumbling' ','
+ && lk != 21244 // 'type' ','
+ && lk != 21245 // 'typeswitch' ','
+ && lk != 21246 // 'union' ','
+ && lk != 21248 // 'unordered' ','
+ && lk != 21249 // 'updating' ','
+ && lk != 21252 // 'validate' ','
+ && lk != 21253 // 'value' ','
+ && lk != 21254 // 'variable' ','
+ && lk != 21255 // 'version' ','
+ && lk != 21258 // 'where' ','
+ && lk != 21259 // 'while' ','
+ && lk != 21262 // 'with' ','
+ && lk != 21266 // 'xquery' ','
+ && lk != 27141 // Wildcard ';'
+ && lk != 27142 // EQName^Token ';'
+ && lk != 27144 // IntegerLiteral ';'
+ && lk != 27145 // DecimalLiteral ';'
+ && lk != 27146 // DoubleLiteral ';'
+ && lk != 27147 // StringLiteral ';'
+ && lk != 27180 // '.' ';'
+ && lk != 27181 // '..' ';'
+ && lk != 27182 // '/' ';'
+ && lk != 27206 // 'after' ';'
+ && lk != 27208 // 'allowing' ';'
+ && lk != 27209 // 'ancestor' ';'
+ && lk != 27210 // 'ancestor-or-self' ';'
+ && lk != 27211 // 'and' ';'
+ && lk != 27215 // 'as' ';'
+ && lk != 27216 // 'ascending' ';'
+ && lk != 27217 // 'at' ';'
+ && lk != 27218 // 'attribute' ';'
+ && lk != 27219 // 'base-uri' ';'
+ && lk != 27220 // 'before' ';'
+ && lk != 27221 // 'boundary-space' ';'
+ && lk != 27222 // 'break' ';'
+ && lk != 27224 // 'case' ';'
+ && lk != 27225 // 'cast' ';'
+ && lk != 27226 // 'castable' ';'
+ && lk != 27227 // 'catch' ';'
+ && lk != 27229 // 'child' ';'
+ && lk != 27230 // 'collation' ';'
+ && lk != 27232 // 'comment' ';'
+ && lk != 27233 // 'constraint' ';'
+ && lk != 27234 // 'construction' ';'
+ && lk != 27237 // 'context' ';'
+ && lk != 27238 // 'continue' ';'
+ && lk != 27239 // 'copy' ';'
+ && lk != 27240 // 'copy-namespaces' ';'
+ && lk != 27241 // 'count' ';'
+ && lk != 27242 // 'decimal-format' ';'
+ && lk != 27244 // 'declare' ';'
+ && lk != 27245 // 'default' ';'
+ && lk != 27246 // 'delete' ';'
+ && lk != 27247 // 'descendant' ';'
+ && lk != 27248 // 'descendant-or-self' ';'
+ && lk != 27249 // 'descending' ';'
+ && lk != 27254 // 'div' ';'
+ && lk != 27255 // 'document' ';'
+ && lk != 27256 // 'document-node' ';'
+ && lk != 27257 // 'element' ';'
+ && lk != 27258 // 'else' ';'
+ && lk != 27259 // 'empty' ';'
+ && lk != 27260 // 'empty-sequence' ';'
+ && lk != 27261 // 'encoding' ';'
+ && lk != 27262 // 'end' ';'
+ && lk != 27264 // 'eq' ';'
+ && lk != 27265 // 'every' ';'
+ && lk != 27267 // 'except' ';'
+ && lk != 27268 // 'exit' ';'
+ && lk != 27269 // 'external' ';'
+ && lk != 27270 // 'first' ';'
+ && lk != 27271 // 'following' ';'
+ && lk != 27272 // 'following-sibling' ';'
+ && lk != 27273 // 'for' ';'
+ && lk != 27277 // 'ft-option' ';'
+ && lk != 27281 // 'function' ';'
+ && lk != 27282 // 'ge' ';'
+ && lk != 27284 // 'group' ';'
+ && lk != 27286 // 'gt' ';'
+ && lk != 27287 // 'idiv' ';'
+ && lk != 27288 // 'if' ';'
+ && lk != 27289 // 'import' ';'
+ && lk != 27290 // 'in' ';'
+ && lk != 27291 // 'index' ';'
+ && lk != 27295 // 'insert' ';'
+ && lk != 27296 // 'instance' ';'
+ && lk != 27297 // 'integrity' ';'
+ && lk != 27298 // 'intersect' ';'
+ && lk != 27299 // 'into' ';'
+ && lk != 27300 // 'is' ';'
+ && lk != 27301 // 'item' ';'
+ && lk != 27306 // 'last' ';'
+ && lk != 27307 // 'lax' ';'
+ && lk != 27308 // 'le' ';'
+ && lk != 27310 // 'let' ';'
+ && lk != 27312 // 'loop' ';'
+ && lk != 27314 // 'lt' ';'
+ && lk != 27316 // 'mod' ';'
+ && lk != 27317 // 'modify' ';'
+ && lk != 27318 // 'module' ';'
+ && lk != 27320 // 'namespace' ';'
+ && lk != 27321 // 'namespace-node' ';'
+ && lk != 27322 // 'ne' ';'
+ && lk != 27327 // 'node' ';'
+ && lk != 27328 // 'nodes' ';'
+ && lk != 27334 // 'only' ';'
+ && lk != 27335 // 'option' ';'
+ && lk != 27336 // 'or' ';'
+ && lk != 27337 // 'order' ';'
+ && lk != 27338 // 'ordered' ';'
+ && lk != 27339 // 'ordering' ';'
+ && lk != 27342 // 'parent' ';'
+ && lk != 27348 // 'preceding' ';'
+ && lk != 27349 // 'preceding-sibling' ';'
+ && lk != 27352 // 'processing-instruction' ';'
+ && lk != 27354 // 'rename' ';'
+ && lk != 27355 // 'replace' ';'
+ && lk != 27356 // 'return' ';'
+ && lk != 27357 // 'returning' ';'
+ && lk != 27358 // 'revalidation' ';'
+ && lk != 27360 // 'satisfies' ';'
+ && lk != 27361 // 'schema' ';'
+ && lk != 27362 // 'schema-attribute' ';'
+ && lk != 27363 // 'schema-element' ';'
+ && lk != 27364 // 'score' ';'
+ && lk != 27365 // 'self' ';'
+ && lk != 27370 // 'sliding' ';'
+ && lk != 27371 // 'some' ';'
+ && lk != 27372 // 'stable' ';'
+ && lk != 27373 // 'start' ';'
+ && lk != 27376 // 'strict' ';'
+ && lk != 27379 // 'switch' ';'
+ && lk != 27380 // 'text' ';'
+ && lk != 27384 // 'to' ';'
+ && lk != 27385 // 'treat' ';'
+ && lk != 27386 // 'try' ';'
+ && lk != 27387 // 'tumbling' ';'
+ && lk != 27388 // 'type' ';'
+ && lk != 27389 // 'typeswitch' ';'
+ && lk != 27390 // 'union' ';'
+ && lk != 27392 // 'unordered' ';'
+ && lk != 27393 // 'updating' ';'
+ && lk != 27396 // 'validate' ';'
+ && lk != 27397 // 'value' ';'
+ && lk != 27398 // 'variable' ';'
+ && lk != 27399 // 'version' ';'
+ && lk != 27402 // 'where' ';'
+ && lk != 27403 // 'while' ';'
+ && lk != 27406 // 'with' ';'
+ && lk != 27410 // 'xquery' ';'
+ && lk != 90198 // 'break' 'loop'
+ && lk != 90214 // 'continue' 'loop'
+ && lk != 113284 // 'exit' 'returning'
+ && lk != 144389 // Wildcard '}'
+ && lk != 144390 // EQName^Token '}'
+ && lk != 144392 // IntegerLiteral '}'
+ && lk != 144393 // DecimalLiteral '}'
+ && lk != 144394 // DoubleLiteral '}'
+ && lk != 144395 // StringLiteral '}'
+ && lk != 144428 // '.' '}'
+ && lk != 144429 // '..' '}'
+ && lk != 144430 // '/' '}'
+ && lk != 144454 // 'after' '}'
+ && lk != 144456 // 'allowing' '}'
+ && lk != 144457 // 'ancestor' '}'
+ && lk != 144458 // 'ancestor-or-self' '}'
+ && lk != 144459 // 'and' '}'
+ && lk != 144463 // 'as' '}'
+ && lk != 144464 // 'ascending' '}'
+ && lk != 144465 // 'at' '}'
+ && lk != 144466 // 'attribute' '}'
+ && lk != 144467 // 'base-uri' '}'
+ && lk != 144468 // 'before' '}'
+ && lk != 144469 // 'boundary-space' '}'
+ && lk != 144470 // 'break' '}'
+ && lk != 144472 // 'case' '}'
+ && lk != 144473 // 'cast' '}'
+ && lk != 144474 // 'castable' '}'
+ && lk != 144475 // 'catch' '}'
+ && lk != 144477 // 'child' '}'
+ && lk != 144478 // 'collation' '}'
+ && lk != 144480 // 'comment' '}'
+ && lk != 144481 // 'constraint' '}'
+ && lk != 144482 // 'construction' '}'
+ && lk != 144485 // 'context' '}'
+ && lk != 144486 // 'continue' '}'
+ && lk != 144487 // 'copy' '}'
+ && lk != 144488 // 'copy-namespaces' '}'
+ && lk != 144489 // 'count' '}'
+ && lk != 144490 // 'decimal-format' '}'
+ && lk != 144492 // 'declare' '}'
+ && lk != 144493 // 'default' '}'
+ && lk != 144494 // 'delete' '}'
+ && lk != 144495 // 'descendant' '}'
+ && lk != 144496 // 'descendant-or-self' '}'
+ && lk != 144497 // 'descending' '}'
+ && lk != 144502 // 'div' '}'
+ && lk != 144503 // 'document' '}'
+ && lk != 144504 // 'document-node' '}'
+ && lk != 144505 // 'element' '}'
+ && lk != 144506 // 'else' '}'
+ && lk != 144507 // 'empty' '}'
+ && lk != 144508 // 'empty-sequence' '}'
+ && lk != 144509 // 'encoding' '}'
+ && lk != 144510 // 'end' '}'
+ && lk != 144512 // 'eq' '}'
+ && lk != 144513 // 'every' '}'
+ && lk != 144515 // 'except' '}'
+ && lk != 144516 // 'exit' '}'
+ && lk != 144517 // 'external' '}'
+ && lk != 144518 // 'first' '}'
+ && lk != 144519 // 'following' '}'
+ && lk != 144520 // 'following-sibling' '}'
+ && lk != 144521 // 'for' '}'
+ && lk != 144525 // 'ft-option' '}'
+ && lk != 144529 // 'function' '}'
+ && lk != 144530 // 'ge' '}'
+ && lk != 144532 // 'group' '}'
+ && lk != 144534 // 'gt' '}'
+ && lk != 144535 // 'idiv' '}'
+ && lk != 144536 // 'if' '}'
+ && lk != 144537 // 'import' '}'
+ && lk != 144538 // 'in' '}'
+ && lk != 144539 // 'index' '}'
+ && lk != 144543 // 'insert' '}'
+ && lk != 144544 // 'instance' '}'
+ && lk != 144545 // 'integrity' '}'
+ && lk != 144546 // 'intersect' '}'
+ && lk != 144547 // 'into' '}'
+ && lk != 144548 // 'is' '}'
+ && lk != 144549 // 'item' '}'
+ && lk != 144554 // 'last' '}'
+ && lk != 144555 // 'lax' '}'
+ && lk != 144556 // 'le' '}'
+ && lk != 144558 // 'let' '}'
+ && lk != 144560 // 'loop' '}'
+ && lk != 144562 // 'lt' '}'
+ && lk != 144564 // 'mod' '}'
+ && lk != 144565 // 'modify' '}'
+ && lk != 144566 // 'module' '}'
+ && lk != 144568 // 'namespace' '}'
+ && lk != 144569 // 'namespace-node' '}'
+ && lk != 144570 // 'ne' '}'
+ && lk != 144575 // 'node' '}'
+ && lk != 144576 // 'nodes' '}'
+ && lk != 144582 // 'only' '}'
+ && lk != 144583 // 'option' '}'
+ && lk != 144584 // 'or' '}'
+ && lk != 144585 // 'order' '}'
+ && lk != 144586 // 'ordered' '}'
+ && lk != 144587 // 'ordering' '}'
+ && lk != 144590 // 'parent' '}'
+ && lk != 144596 // 'preceding' '}'
+ && lk != 144597 // 'preceding-sibling' '}'
+ && lk != 144600 // 'processing-instruction' '}'
+ && lk != 144602 // 'rename' '}'
+ && lk != 144603 // 'replace' '}'
+ && lk != 144604 // 'return' '}'
+ && lk != 144605 // 'returning' '}'
+ && lk != 144606 // 'revalidation' '}'
+ && lk != 144608 // 'satisfies' '}'
+ && lk != 144609 // 'schema' '}'
+ && lk != 144610 // 'schema-attribute' '}'
+ && lk != 144611 // 'schema-element' '}'
+ && lk != 144612 // 'score' '}'
+ && lk != 144613 // 'self' '}'
+ && lk != 144618 // 'sliding' '}'
+ && lk != 144619 // 'some' '}'
+ && lk != 144620 // 'stable' '}'
+ && lk != 144621 // 'start' '}'
+ && lk != 144624 // 'strict' '}'
+ && lk != 144627 // 'switch' '}'
+ && lk != 144628 // 'text' '}'
+ && lk != 144632 // 'to' '}'
+ && lk != 144633 // 'treat' '}'
+ && lk != 144634 // 'try' '}'
+ && lk != 144635 // 'tumbling' '}'
+ && lk != 144636 // 'type' '}'
+ && lk != 144637 // 'typeswitch' '}'
+ && lk != 144638 // 'union' '}'
+ && lk != 144640 // 'unordered' '}'
+ && lk != 144641 // 'updating' '}'
+ && lk != 144644 // 'validate' '}'
+ && lk != 144645 // 'value' '}'
+ && lk != 144646 // 'variable' '}'
+ && lk != 144647 // 'version' '}'
+ && lk != 144650 // 'where' '}'
+ && lk != 144651 // 'while' '}'
+ && lk != 144654 // 'with' '}'
+ && lk != 144658) // 'xquery' '}'
+ {
+ lk = memoized(5, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Statement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(5, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 16134 // 'variable' '$'
+ && lk != 27141 // Wildcard ';'
+ && lk != 27142 // EQName^Token ';'
+ && lk != 27144 // IntegerLiteral ';'
+ && lk != 27145 // DecimalLiteral ';'
+ && lk != 27146 // DoubleLiteral ';'
+ && lk != 27147 // StringLiteral ';'
+ && lk != 27180 // '.' ';'
+ && lk != 27181 // '..' ';'
+ && lk != 27182 // '/' ';'
+ && lk != 27206 // 'after' ';'
+ && lk != 27208 // 'allowing' ';'
+ && lk != 27209 // 'ancestor' ';'
+ && lk != 27210 // 'ancestor-or-self' ';'
+ && lk != 27211 // 'and' ';'
+ && lk != 27215 // 'as' ';'
+ && lk != 27216 // 'ascending' ';'
+ && lk != 27217 // 'at' ';'
+ && lk != 27218 // 'attribute' ';'
+ && lk != 27219 // 'base-uri' ';'
+ && lk != 27220 // 'before' ';'
+ && lk != 27221 // 'boundary-space' ';'
+ && lk != 27222 // 'break' ';'
+ && lk != 27224 // 'case' ';'
+ && lk != 27225 // 'cast' ';'
+ && lk != 27226 // 'castable' ';'
+ && lk != 27227 // 'catch' ';'
+ && lk != 27229 // 'child' ';'
+ && lk != 27230 // 'collation' ';'
+ && lk != 27232 // 'comment' ';'
+ && lk != 27233 // 'constraint' ';'
+ && lk != 27234 // 'construction' ';'
+ && lk != 27237 // 'context' ';'
+ && lk != 27238 // 'continue' ';'
+ && lk != 27239 // 'copy' ';'
+ && lk != 27240 // 'copy-namespaces' ';'
+ && lk != 27241 // 'count' ';'
+ && lk != 27242 // 'decimal-format' ';'
+ && lk != 27244 // 'declare' ';'
+ && lk != 27245 // 'default' ';'
+ && lk != 27246 // 'delete' ';'
+ && lk != 27247 // 'descendant' ';'
+ && lk != 27248 // 'descendant-or-self' ';'
+ && lk != 27249 // 'descending' ';'
+ && lk != 27254 // 'div' ';'
+ && lk != 27255 // 'document' ';'
+ && lk != 27256 // 'document-node' ';'
+ && lk != 27257 // 'element' ';'
+ && lk != 27258 // 'else' ';'
+ && lk != 27259 // 'empty' ';'
+ && lk != 27260 // 'empty-sequence' ';'
+ && lk != 27261 // 'encoding' ';'
+ && lk != 27262 // 'end' ';'
+ && lk != 27264 // 'eq' ';'
+ && lk != 27265 // 'every' ';'
+ && lk != 27267 // 'except' ';'
+ && lk != 27268 // 'exit' ';'
+ && lk != 27269 // 'external' ';'
+ && lk != 27270 // 'first' ';'
+ && lk != 27271 // 'following' ';'
+ && lk != 27272 // 'following-sibling' ';'
+ && lk != 27273 // 'for' ';'
+ && lk != 27277 // 'ft-option' ';'
+ && lk != 27281 // 'function' ';'
+ && lk != 27282 // 'ge' ';'
+ && lk != 27284 // 'group' ';'
+ && lk != 27286 // 'gt' ';'
+ && lk != 27287 // 'idiv' ';'
+ && lk != 27288 // 'if' ';'
+ && lk != 27289 // 'import' ';'
+ && lk != 27290 // 'in' ';'
+ && lk != 27291 // 'index' ';'
+ && lk != 27295 // 'insert' ';'
+ && lk != 27296 // 'instance' ';'
+ && lk != 27297 // 'integrity' ';'
+ && lk != 27298 // 'intersect' ';'
+ && lk != 27299 // 'into' ';'
+ && lk != 27300 // 'is' ';'
+ && lk != 27301 // 'item' ';'
+ && lk != 27306 // 'last' ';'
+ && lk != 27307 // 'lax' ';'
+ && lk != 27308 // 'le' ';'
+ && lk != 27310 // 'let' ';'
+ && lk != 27312 // 'loop' ';'
+ && lk != 27314 // 'lt' ';'
+ && lk != 27316 // 'mod' ';'
+ && lk != 27317 // 'modify' ';'
+ && lk != 27318 // 'module' ';'
+ && lk != 27320 // 'namespace' ';'
+ && lk != 27321 // 'namespace-node' ';'
+ && lk != 27322 // 'ne' ';'
+ && lk != 27327 // 'node' ';'
+ && lk != 27328 // 'nodes' ';'
+ && lk != 27334 // 'only' ';'
+ && lk != 27335 // 'option' ';'
+ && lk != 27336 // 'or' ';'
+ && lk != 27337 // 'order' ';'
+ && lk != 27338 // 'ordered' ';'
+ && lk != 27339 // 'ordering' ';'
+ && lk != 27342 // 'parent' ';'
+ && lk != 27348 // 'preceding' ';'
+ && lk != 27349 // 'preceding-sibling' ';'
+ && lk != 27352 // 'processing-instruction' ';'
+ && lk != 27354 // 'rename' ';'
+ && lk != 27355 // 'replace' ';'
+ && lk != 27356 // 'return' ';'
+ && lk != 27357 // 'returning' ';'
+ && lk != 27358 // 'revalidation' ';'
+ && lk != 27360 // 'satisfies' ';'
+ && lk != 27361 // 'schema' ';'
+ && lk != 27362 // 'schema-attribute' ';'
+ && lk != 27363 // 'schema-element' ';'
+ && lk != 27364 // 'score' ';'
+ && lk != 27365 // 'self' ';'
+ && lk != 27370 // 'sliding' ';'
+ && lk != 27371 // 'some' ';'
+ && lk != 27372 // 'stable' ';'
+ && lk != 27373 // 'start' ';'
+ && lk != 27376 // 'strict' ';'
+ && lk != 27379 // 'switch' ';'
+ && lk != 27380 // 'text' ';'
+ && lk != 27384 // 'to' ';'
+ && lk != 27385 // 'treat' ';'
+ && lk != 27386 // 'try' ';'
+ && lk != 27387 // 'tumbling' ';'
+ && lk != 27388 // 'type' ';'
+ && lk != 27389 // 'typeswitch' ';'
+ && lk != 27390 // 'union' ';'
+ && lk != 27392 // 'unordered' ';'
+ && lk != 27393 // 'updating' ';'
+ && lk != 27396 // 'validate' ';'
+ && lk != 27397 // 'value' ';'
+ && lk != 27398 // 'variable' ';'
+ && lk != 27399 // 'version' ';'
+ && lk != 27402 // 'where' ';'
+ && lk != 27403 // 'while' ';'
+ && lk != 27406 // 'with' ';'
+ && lk != 27410 // 'xquery' ';'
+ && lk != 90198 // 'break' 'loop'
+ && lk != 90214 // 'continue' 'loop'
+ && lk != 113284) // 'exit' 'returning'
+ {
+ break;
+ }
+ try_Statement();
+ }
+ }
+
+ function parse_StatementsAndExpr()
+ {
+ eventHandler.startNonterminal("StatementsAndExpr", e0);
+ parse_Statements();
+ whitespace();
+ parse_Expr();
+ eventHandler.endNonterminal("StatementsAndExpr", e0);
+ }
+
+ function try_StatementsAndExpr()
+ {
+ try_Statements();
+ try_Expr();
+ }
+
+ function parse_StatementsAndOptionalExpr()
+ {
+ eventHandler.startNonterminal("StatementsAndOptionalExpr", e0);
+ parse_Statements();
+ if (l1 != 25 // EOF
+ && l1 != 282) // '}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ eventHandler.endNonterminal("StatementsAndOptionalExpr", e0);
+ }
+
+ function try_StatementsAndOptionalExpr()
+ {
+ try_Statements();
+ if (l1 != 25 // EOF
+ && l1 != 282) // '}'
+ {
+ try_Expr();
+ }
+ }
+
+ function parse_Statement()
+ {
+ eventHandler.startNonterminal("Statement", e0);
+ switch (l1)
+ {
+ case 132: // 'exit'
+ lookahead2W(189); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 137: // 'for'
+ lookahead2W(196); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 174: // 'let'
+ lookahead2W(193); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 250: // 'try'
+ lookahead2W(190); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 262: // 'variable'
+ lookahead2W(187); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(188); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 267: // 'while'
+ lookahead2W(185); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 2836 // '{' Wildcard
+ || lk == 3103 // '$' EQName^Token
+ || lk == 3104 // '%' EQName^Token
+ || lk == 3348 // '{' EQName^Token
+ || lk == 4372 // '{' IntegerLiteral
+ || lk == 4884 // '{' DecimalLiteral
+ || lk == 5396 // '{' DoubleLiteral
+ || lk == 5908 // '{' StringLiteral
+ || lk == 16148 // '{' '$'
+ || lk == 16660 // '{' '%'
+ || lk == 17675 // 'while' '('
+ || lk == 17684 // '{' '('
+ || lk == 18196 // '{' '(#'
+ || lk == 20756 // '{' '+'
+ || lk == 21780 // '{' '-'
+ || lk == 22804 // '{' '.'
+ || lk == 23316 // '{' '..'
+ || lk == 23828 // '{' '/'
+ || lk == 24340 // '{' '//'
+ || lk == 27924 // '{' '<'
+ || lk == 28436 // '{' '<!--'
+ || lk == 30484 // '{' '<?'
+ || lk == 34068 // '{' '@'
+ || lk == 35092 // '{' '['
+ || lk == 35871 // '$' 'after'
+ || lk == 35872 // '%' 'after'
+ || lk == 36116 // '{' 'after'
+ || lk == 36895 // '$' 'allowing'
+ || lk == 36896 // '%' 'allowing'
+ || lk == 37140 // '{' 'allowing'
+ || lk == 37407 // '$' 'ancestor'
+ || lk == 37408 // '%' 'ancestor'
+ || lk == 37652 // '{' 'ancestor'
+ || lk == 37919 // '$' 'ancestor-or-self'
+ || lk == 37920 // '%' 'ancestor-or-self'
+ || lk == 38164 // '{' 'ancestor-or-self'
+ || lk == 38431 // '$' 'and'
+ || lk == 38432 // '%' 'and'
+ || lk == 38676 // '{' 'and'
+ || lk == 39700 // '{' 'append'
+ || lk == 40479 // '$' 'as'
+ || lk == 40480 // '%' 'as'
+ || lk == 40724 // '{' 'as'
+ || lk == 40991 // '$' 'ascending'
+ || lk == 40992 // '%' 'ascending'
+ || lk == 41236 // '{' 'ascending'
+ || lk == 41503 // '$' 'at'
+ || lk == 41504 // '%' 'at'
+ || lk == 41748 // '{' 'at'
+ || lk == 42015 // '$' 'attribute'
+ || lk == 42016 // '%' 'attribute'
+ || lk == 42260 // '{' 'attribute'
+ || lk == 42527 // '$' 'base-uri'
+ || lk == 42528 // '%' 'base-uri'
+ || lk == 42772 // '{' 'base-uri'
+ || lk == 43039 // '$' 'before'
+ || lk == 43040 // '%' 'before'
+ || lk == 43284 // '{' 'before'
+ || lk == 43551 // '$' 'boundary-space'
+ || lk == 43552 // '%' 'boundary-space'
+ || lk == 43796 // '{' 'boundary-space'
+ || lk == 44063 // '$' 'break'
+ || lk == 44064 // '%' 'break'
+ || lk == 44308 // '{' 'break'
+ || lk == 45087 // '$' 'case'
+ || lk == 45088 // '%' 'case'
+ || lk == 45332 // '{' 'case'
+ || lk == 45599 // '$' 'cast'
+ || lk == 45600 // '%' 'cast'
+ || lk == 45844 // '{' 'cast'
+ || lk == 46111 // '$' 'castable'
+ || lk == 46112 // '%' 'castable'
+ || lk == 46356 // '{' 'castable'
+ || lk == 46623 // '$' 'catch'
+ || lk == 46624 // '%' 'catch'
+ || lk == 46868 // '{' 'catch'
+ || lk == 47647 // '$' 'child'
+ || lk == 47648 // '%' 'child'
+ || lk == 47892 // '{' 'child'
+ || lk == 48159 // '$' 'collation'
+ || lk == 48160 // '%' 'collation'
+ || lk == 48404 // '{' 'collation'
+ || lk == 49183 // '$' 'comment'
+ || lk == 49184 // '%' 'comment'
+ || lk == 49428 // '{' 'comment'
+ || lk == 49695 // '$' 'constraint'
+ || lk == 49696 // '%' 'constraint'
+ || lk == 49940 // '{' 'constraint'
+ || lk == 50207 // '$' 'construction'
+ || lk == 50208 // '%' 'construction'
+ || lk == 50452 // '{' 'construction'
+ || lk == 51743 // '$' 'context'
+ || lk == 51744 // '%' 'context'
+ || lk == 51988 // '{' 'context'
+ || lk == 52255 // '$' 'continue'
+ || lk == 52256 // '%' 'continue'
+ || lk == 52500 // '{' 'continue'
+ || lk == 52767 // '$' 'copy'
+ || lk == 52768 // '%' 'copy'
+ || lk == 53012 // '{' 'copy'
+ || lk == 53279 // '$' 'copy-namespaces'
+ || lk == 53280 // '%' 'copy-namespaces'
+ || lk == 53524 // '{' 'copy-namespaces'
+ || lk == 53791 // '$' 'count'
+ || lk == 53792 // '%' 'count'
+ || lk == 54036 // '{' 'count'
+ || lk == 54303 // '$' 'decimal-format'
+ || lk == 54304 // '%' 'decimal-format'
+ || lk == 54548 // '{' 'decimal-format'
+ || lk == 55327 // '$' 'declare'
+ || lk == 55328 // '%' 'declare'
+ || lk == 55572 // '{' 'declare'
+ || lk == 55839 // '$' 'default'
+ || lk == 55840 // '%' 'default'
+ || lk == 56084 // '{' 'default'
+ || lk == 56351 // '$' 'delete'
+ || lk == 56352 // '%' 'delete'
+ || lk == 56596 // '{' 'delete'
+ || lk == 56863 // '$' 'descendant'
+ || lk == 56864 // '%' 'descendant'
+ || lk == 57108 // '{' 'descendant'
+ || lk == 57375 // '$' 'descendant-or-self'
+ || lk == 57376 // '%' 'descendant-or-self'
+ || lk == 57620 // '{' 'descendant-or-self'
+ || lk == 57887 // '$' 'descending'
+ || lk == 57888 // '%' 'descending'
+ || lk == 58132 // '{' 'descending'
+ || lk == 60447 // '$' 'div'
+ || lk == 60448 // '%' 'div'
+ || lk == 60692 // '{' 'div'
+ || lk == 60959 // '$' 'document'
+ || lk == 60960 // '%' 'document'
+ || lk == 61204 // '{' 'document'
+ || lk == 61471 // '$' 'document-node'
+ || lk == 61472 // '%' 'document-node'
+ || lk == 61716 // '{' 'document-node'
+ || lk == 61983 // '$' 'element'
+ || lk == 61984 // '%' 'element'
+ || lk == 62228 // '{' 'element'
+ || lk == 62495 // '$' 'else'
+ || lk == 62496 // '%' 'else'
+ || lk == 62740 // '{' 'else'
+ || lk == 63007 // '$' 'empty'
+ || lk == 63008 // '%' 'empty'
+ || lk == 63252 // '{' 'empty'
+ || lk == 63519 // '$' 'empty-sequence'
+ || lk == 63520 // '%' 'empty-sequence'
+ || lk == 63764 // '{' 'empty-sequence'
+ || lk == 64031 // '$' 'encoding'
+ || lk == 64032 // '%' 'encoding'
+ || lk == 64276 // '{' 'encoding'
+ || lk == 64543 // '$' 'end'
+ || lk == 64544 // '%' 'end'
+ || lk == 64788 // '{' 'end'
+ || lk == 65567 // '$' 'eq'
+ || lk == 65568 // '%' 'eq'
+ || lk == 65812 // '{' 'eq'
+ || lk == 66079 // '$' 'every'
+ || lk == 66080 // '%' 'every'
+ || lk == 66324 // '{' 'every'
+ || lk == 67103 // '$' 'except'
+ || lk == 67104 // '%' 'except'
+ || lk == 67348 // '{' 'except'
+ || lk == 67615 // '$' 'exit'
+ || lk == 67616 // '%' 'exit'
+ || lk == 67860 // '{' 'exit'
+ || lk == 68127 // '$' 'external'
+ || lk == 68128 // '%' 'external'
+ || lk == 68372 // '{' 'external'
+ || lk == 68639 // '$' 'first'
+ || lk == 68640 // '%' 'first'
+ || lk == 68884 // '{' 'first'
+ || lk == 69151 // '$' 'following'
+ || lk == 69152 // '%' 'following'
+ || lk == 69396 // '{' 'following'
+ || lk == 69663 // '$' 'following-sibling'
+ || lk == 69664 // '%' 'following-sibling'
+ || lk == 69908 // '{' 'following-sibling'
+ || lk == 70175 // '$' 'for'
+ || lk == 70176 // '%' 'for'
+ || lk == 70420 // '{' 'for'
+ || lk == 72223 // '$' 'ft-option'
+ || lk == 72224 // '%' 'ft-option'
+ || lk == 72468 // '{' 'ft-option'
+ || lk == 74271 // '$' 'function'
+ || lk == 74272 // '%' 'function'
+ || lk == 74516 // '{' 'function'
+ || lk == 74783 // '$' 'ge'
+ || lk == 74784 // '%' 'ge'
+ || lk == 75028 // '{' 'ge'
+ || lk == 75807 // '$' 'group'
+ || lk == 75808 // '%' 'group'
+ || lk == 76052 // '{' 'group'
+ || lk == 76831 // '$' 'gt'
+ || lk == 76832 // '%' 'gt'
+ || lk == 77076 // '{' 'gt'
+ || lk == 77343 // '$' 'idiv'
+ || lk == 77344 // '%' 'idiv'
+ || lk == 77588 // '{' 'idiv'
+ || lk == 77855 // '$' 'if'
+ || lk == 77856 // '%' 'if'
+ || lk == 78100 // '{' 'if'
+ || lk == 78367 // '$' 'import'
+ || lk == 78368 // '%' 'import'
+ || lk == 78612 // '{' 'import'
+ || lk == 78879 // '$' 'in'
+ || lk == 78880 // '%' 'in'
+ || lk == 79124 // '{' 'in'
+ || lk == 79391 // '$' 'index'
+ || lk == 79392 // '%' 'index'
+ || lk == 79636 // '{' 'index'
+ || lk == 81439 // '$' 'insert'
+ || lk == 81440 // '%' 'insert'
+ || lk == 81684 // '{' 'insert'
+ || lk == 81951 // '$' 'instance'
+ || lk == 81952 // '%' 'instance'
+ || lk == 82196 // '{' 'instance'
+ || lk == 82463 // '$' 'integrity'
+ || lk == 82464 // '%' 'integrity'
+ || lk == 82708 // '{' 'integrity'
+ || lk == 82975 // '$' 'intersect'
+ || lk == 82976 // '%' 'intersect'
+ || lk == 83220 // '{' 'intersect'
+ || lk == 83487 // '$' 'into'
+ || lk == 83488 // '%' 'into'
+ || lk == 83732 // '{' 'into'
+ || lk == 83999 // '$' 'is'
+ || lk == 84000 // '%' 'is'
+ || lk == 84244 // '{' 'is'
+ || lk == 84511 // '$' 'item'
+ || lk == 84512 // '%' 'item'
+ || lk == 84756 // '{' 'item'
+ || lk == 87071 // '$' 'last'
+ || lk == 87072 // '%' 'last'
+ || lk == 87316 // '{' 'last'
+ || lk == 87583 // '$' 'lax'
+ || lk == 87584 // '%' 'lax'
+ || lk == 87828 // '{' 'lax'
+ || lk == 88095 // '$' 'le'
+ || lk == 88096 // '%' 'le'
+ || lk == 88340 // '{' 'le'
+ || lk == 89119 // '$' 'let'
+ || lk == 89120 // '%' 'let'
+ || lk == 89364 // '{' 'let'
+ || lk == 90143 // '$' 'loop'
+ || lk == 90144 // '%' 'loop'
+ || lk == 90388 // '{' 'loop'
+ || lk == 91167 // '$' 'lt'
+ || lk == 91168 // '%' 'lt'
+ || lk == 91412 // '{' 'lt'
+ || lk == 92191 // '$' 'mod'
+ || lk == 92192 // '%' 'mod'
+ || lk == 92436 // '{' 'mod'
+ || lk == 92703 // '$' 'modify'
+ || lk == 92704 // '%' 'modify'
+ || lk == 92948 // '{' 'modify'
+ || lk == 93215 // '$' 'module'
+ || lk == 93216 // '%' 'module'
+ || lk == 93460 // '{' 'module'
+ || lk == 94239 // '$' 'namespace'
+ || lk == 94240 // '%' 'namespace'
+ || lk == 94484 // '{' 'namespace'
+ || lk == 94751 // '$' 'namespace-node'
+ || lk == 94752 // '%' 'namespace-node'
+ || lk == 94996 // '{' 'namespace-node'
+ || lk == 95263 // '$' 'ne'
+ || lk == 95264 // '%' 'ne'
+ || lk == 95508 // '{' 'ne'
+ || lk == 97823 // '$' 'node'
+ || lk == 97824 // '%' 'node'
+ || lk == 98068 // '{' 'node'
+ || lk == 98335 // '$' 'nodes'
+ || lk == 98336 // '%' 'nodes'
+ || lk == 98580 // '{' 'nodes'
+ || lk == 101407 // '$' 'only'
+ || lk == 101408 // '%' 'only'
+ || lk == 101652 // '{' 'only'
+ || lk == 101919 // '$' 'option'
+ || lk == 101920 // '%' 'option'
+ || lk == 102164 // '{' 'option'
+ || lk == 102431 // '$' 'or'
+ || lk == 102432 // '%' 'or'
+ || lk == 102676 // '{' 'or'
+ || lk == 102943 // '$' 'order'
+ || lk == 102944 // '%' 'order'
+ || lk == 103188 // '{' 'order'
+ || lk == 103455 // '$' 'ordered'
+ || lk == 103456 // '%' 'ordered'
+ || lk == 103700 // '{' 'ordered'
+ || lk == 103967 // '$' 'ordering'
+ || lk == 103968 // '%' 'ordering'
+ || lk == 104212 // '{' 'ordering'
+ || lk == 105503 // '$' 'parent'
+ || lk == 105504 // '%' 'parent'
+ || lk == 105748 // '{' 'parent'
+ || lk == 108575 // '$' 'preceding'
+ || lk == 108576 // '%' 'preceding'
+ || lk == 108820 // '{' 'preceding'
+ || lk == 109087 // '$' 'preceding-sibling'
+ || lk == 109088 // '%' 'preceding-sibling'
+ || lk == 109332 // '{' 'preceding-sibling'
+ || lk == 110623 // '$' 'processing-instruction'
+ || lk == 110624 // '%' 'processing-instruction'
+ || lk == 110868 // '{' 'processing-instruction'
+ || lk == 111647 // '$' 'rename'
+ || lk == 111648 // '%' 'rename'
+ || lk == 111892 // '{' 'rename'
+ || lk == 112159 // '$' 'replace'
+ || lk == 112160 // '%' 'replace'
+ || lk == 112404 // '{' 'replace'
+ || lk == 112671 // '$' 'return'
+ || lk == 112672 // '%' 'return'
+ || lk == 112916 // '{' 'return'
+ || lk == 113183 // '$' 'returning'
+ || lk == 113184 // '%' 'returning'
+ || lk == 113428 // '{' 'returning'
+ || lk == 113695 // '$' 'revalidation'
+ || lk == 113696 // '%' 'revalidation'
+ || lk == 113940 // '{' 'revalidation'
+ || lk == 114719 // '$' 'satisfies'
+ || lk == 114720 // '%' 'satisfies'
+ || lk == 114964 // '{' 'satisfies'
+ || lk == 115231 // '$' 'schema'
+ || lk == 115232 // '%' 'schema'
+ || lk == 115476 // '{' 'schema'
+ || lk == 115743 // '$' 'schema-attribute'
+ || lk == 115744 // '%' 'schema-attribute'
+ || lk == 115988 // '{' 'schema-attribute'
+ || lk == 116255 // '$' 'schema-element'
+ || lk == 116256 // '%' 'schema-element'
+ || lk == 116500 // '{' 'schema-element'
+ || lk == 116767 // '$' 'score'
+ || lk == 116768 // '%' 'score'
+ || lk == 117012 // '{' 'score'
+ || lk == 117279 // '$' 'self'
+ || lk == 117280 // '%' 'self'
+ || lk == 117524 // '{' 'self'
+ || lk == 119839 // '$' 'sliding'
+ || lk == 119840 // '%' 'sliding'
+ || lk == 120084 // '{' 'sliding'
+ || lk == 120351 // '$' 'some'
+ || lk == 120352 // '%' 'some'
+ || lk == 120596 // '{' 'some'
+ || lk == 120863 // '$' 'stable'
+ || lk == 120864 // '%' 'stable'
+ || lk == 121108 // '{' 'stable'
+ || lk == 121375 // '$' 'start'
+ || lk == 121376 // '%' 'start'
+ || lk == 121620 // '{' 'start'
+ || lk == 122911 // '$' 'strict'
+ || lk == 122912 // '%' 'strict'
+ || lk == 123156 // '{' 'strict'
+ || lk == 124447 // '$' 'switch'
+ || lk == 124448 // '%' 'switch'
+ || lk == 124692 // '{' 'switch'
+ || lk == 124959 // '$' 'text'
+ || lk == 124960 // '%' 'text'
+ || lk == 125204 // '{' 'text'
+ || lk == 127007 // '$' 'to'
+ || lk == 127008 // '%' 'to'
+ || lk == 127252 // '{' 'to'
+ || lk == 127519 // '$' 'treat'
+ || lk == 127520 // '%' 'treat'
+ || lk == 127764 // '{' 'treat'
+ || lk == 128031 // '$' 'try'
+ || lk == 128032 // '%' 'try'
+ || lk == 128276 // '{' 'try'
+ || lk == 128543 // '$' 'tumbling'
+ || lk == 128544 // '%' 'tumbling'
+ || lk == 128788 // '{' 'tumbling'
+ || lk == 129055 // '$' 'type'
+ || lk == 129056 // '%' 'type'
+ || lk == 129300 // '{' 'type'
+ || lk == 129567 // '$' 'typeswitch'
+ || lk == 129568 // '%' 'typeswitch'
+ || lk == 129812 // '{' 'typeswitch'
+ || lk == 130079 // '$' 'union'
+ || lk == 130080 // '%' 'union'
+ || lk == 130324 // '{' 'union'
+ || lk == 131103 // '$' 'unordered'
+ || lk == 131104 // '%' 'unordered'
+ || lk == 131348 // '{' 'unordered'
+ || lk == 131615 // '$' 'updating'
+ || lk == 131616 // '%' 'updating'
+ || lk == 131860 // '{' 'updating'
+ || lk == 133151 // '$' 'validate'
+ || lk == 133152 // '%' 'validate'
+ || lk == 133396 // '{' 'validate'
+ || lk == 133663 // '$' 'value'
+ || lk == 133664 // '%' 'value'
+ || lk == 133908 // '{' 'value'
+ || lk == 134175 // '$' 'variable'
+ || lk == 134176 // '%' 'variable'
+ || lk == 134420 // '{' 'variable'
+ || lk == 134687 // '$' 'version'
+ || lk == 134688 // '%' 'version'
+ || lk == 134932 // '{' 'version'
+ || lk == 136223 // '$' 'where'
+ || lk == 136224 // '%' 'where'
+ || lk == 136468 // '{' 'where'
+ || lk == 136735 // '$' 'while'
+ || lk == 136736 // '%' 'while'
+ || lk == 136980 // '{' 'while'
+ || lk == 138271 // '$' 'with'
+ || lk == 138272 // '%' 'with'
+ || lk == 138516 // '{' 'with'
+ || lk == 140319 // '$' 'xquery'
+ || lk == 140320 // '%' 'xquery'
+ || lk == 140564 // '{' 'xquery'
+ || lk == 141588 // '{' '{'
+ || lk == 142612 // '{' '{|'
+ || lk == 144660) // '{' '}'
+ {
+ lk = memoized(6, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ApplyStatement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_AssignStatement();
+ lk = -2;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_BlockStatement();
+ lk = -3;
+ }
+ catch (p3A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_VarDeclStatement();
+ lk = -12;
+ }
+ catch (p12A)
+ {
+ lk = -13;
+ }
+ }
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(6, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ parse_AssignStatement();
+ break;
+ case -3:
+ parse_BlockStatement();
+ break;
+ case 90198: // 'break' 'loop'
+ parse_BreakStatement();
+ break;
+ case 90214: // 'continue' 'loop'
+ parse_ContinueStatement();
+ break;
+ case 113284: // 'exit' 'returning'
+ parse_ExitStatement();
+ break;
+ case 16009: // 'for' '$'
+ case 16046: // 'let' '$'
+ case 116910: // 'let' 'score'
+ case 119945: // 'for' 'sliding'
+ case 128649: // 'for' 'tumbling'
+ parse_FLWORStatement();
+ break;
+ case 17560: // 'if' '('
+ parse_IfStatement();
+ break;
+ case 17651: // 'switch' '('
+ parse_SwitchStatement();
+ break;
+ case 141562: // 'try' '{'
+ parse_TryCatchStatement();
+ break;
+ case 17661: // 'typeswitch' '('
+ parse_TypeswitchStatement();
+ break;
+ case -12:
+ case 16134: // 'variable' '$'
+ parse_VarDeclStatement();
+ break;
+ case -13:
+ parse_WhileStatement();
+ break;
+ default:
+ parse_ApplyStatement();
+ }
+ eventHandler.endNonterminal("Statement", e0);
+ }
+
+ function try_Statement()
+ {
+ switch (l1)
+ {
+ case 132: // 'exit'
+ lookahead2W(189); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 137: // 'for'
+ lookahead2W(196); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 174: // 'let'
+ lookahead2W(193); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 250: // 'try'
+ lookahead2W(190); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 262: // 'variable'
+ lookahead2W(187); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(188); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 267: // 'while'
+ lookahead2W(185); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 2836 // '{' Wildcard
+ || lk == 3103 // '$' EQName^Token
+ || lk == 3104 // '%' EQName^Token
+ || lk == 3348 // '{' EQName^Token
+ || lk == 4372 // '{' IntegerLiteral
+ || lk == 4884 // '{' DecimalLiteral
+ || lk == 5396 // '{' DoubleLiteral
+ || lk == 5908 // '{' StringLiteral
+ || lk == 16148 // '{' '$'
+ || lk == 16660 // '{' '%'
+ || lk == 17675 // 'while' '('
+ || lk == 17684 // '{' '('
+ || lk == 18196 // '{' '(#'
+ || lk == 20756 // '{' '+'
+ || lk == 21780 // '{' '-'
+ || lk == 22804 // '{' '.'
+ || lk == 23316 // '{' '..'
+ || lk == 23828 // '{' '/'
+ || lk == 24340 // '{' '//'
+ || lk == 27924 // '{' '<'
+ || lk == 28436 // '{' '<!--'
+ || lk == 30484 // '{' '<?'
+ || lk == 34068 // '{' '@'
+ || lk == 35092 // '{' '['
+ || lk == 35871 // '$' 'after'
+ || lk == 35872 // '%' 'after'
+ || lk == 36116 // '{' 'after'
+ || lk == 36895 // '$' 'allowing'
+ || lk == 36896 // '%' 'allowing'
+ || lk == 37140 // '{' 'allowing'
+ || lk == 37407 // '$' 'ancestor'
+ || lk == 37408 // '%' 'ancestor'
+ || lk == 37652 // '{' 'ancestor'
+ || lk == 37919 // '$' 'ancestor-or-self'
+ || lk == 37920 // '%' 'ancestor-or-self'
+ || lk == 38164 // '{' 'ancestor-or-self'
+ || lk == 38431 // '$' 'and'
+ || lk == 38432 // '%' 'and'
+ || lk == 38676 // '{' 'and'
+ || lk == 39700 // '{' 'append'
+ || lk == 40479 // '$' 'as'
+ || lk == 40480 // '%' 'as'
+ || lk == 40724 // '{' 'as'
+ || lk == 40991 // '$' 'ascending'
+ || lk == 40992 // '%' 'ascending'
+ || lk == 41236 // '{' 'ascending'
+ || lk == 41503 // '$' 'at'
+ || lk == 41504 // '%' 'at'
+ || lk == 41748 // '{' 'at'
+ || lk == 42015 // '$' 'attribute'
+ || lk == 42016 // '%' 'attribute'
+ || lk == 42260 // '{' 'attribute'
+ || lk == 42527 // '$' 'base-uri'
+ || lk == 42528 // '%' 'base-uri'
+ || lk == 42772 // '{' 'base-uri'
+ || lk == 43039 // '$' 'before'
+ || lk == 43040 // '%' 'before'
+ || lk == 43284 // '{' 'before'
+ || lk == 43551 // '$' 'boundary-space'
+ || lk == 43552 // '%' 'boundary-space'
+ || lk == 43796 // '{' 'boundary-space'
+ || lk == 44063 // '$' 'break'
+ || lk == 44064 // '%' 'break'
+ || lk == 44308 // '{' 'break'
+ || lk == 45087 // '$' 'case'
+ || lk == 45088 // '%' 'case'
+ || lk == 45332 // '{' 'case'
+ || lk == 45599 // '$' 'cast'
+ || lk == 45600 // '%' 'cast'
+ || lk == 45844 // '{' 'cast'
+ || lk == 46111 // '$' 'castable'
+ || lk == 46112 // '%' 'castable'
+ || lk == 46356 // '{' 'castable'
+ || lk == 46623 // '$' 'catch'
+ || lk == 46624 // '%' 'catch'
+ || lk == 46868 // '{' 'catch'
+ || lk == 47647 // '$' 'child'
+ || lk == 47648 // '%' 'child'
+ || lk == 47892 // '{' 'child'
+ || lk == 48159 // '$' 'collation'
+ || lk == 48160 // '%' 'collation'
+ || lk == 48404 // '{' 'collation'
+ || lk == 49183 // '$' 'comment'
+ || lk == 49184 // '%' 'comment'
+ || lk == 49428 // '{' 'comment'
+ || lk == 49695 // '$' 'constraint'
+ || lk == 49696 // '%' 'constraint'
+ || lk == 49940 // '{' 'constraint'
+ || lk == 50207 // '$' 'construction'
+ || lk == 50208 // '%' 'construction'
+ || lk == 50452 // '{' 'construction'
+ || lk == 51743 // '$' 'context'
+ || lk == 51744 // '%' 'context'
+ || lk == 51988 // '{' 'context'
+ || lk == 52255 // '$' 'continue'
+ || lk == 52256 // '%' 'continue'
+ || lk == 52500 // '{' 'continue'
+ || lk == 52767 // '$' 'copy'
+ || lk == 52768 // '%' 'copy'
+ || lk == 53012 // '{' 'copy'
+ || lk == 53279 // '$' 'copy-namespaces'
+ || lk == 53280 // '%' 'copy-namespaces'
+ || lk == 53524 // '{' 'copy-namespaces'
+ || lk == 53791 // '$' 'count'
+ || lk == 53792 // '%' 'count'
+ || lk == 54036 // '{' 'count'
+ || lk == 54303 // '$' 'decimal-format'
+ || lk == 54304 // '%' 'decimal-format'
+ || lk == 54548 // '{' 'decimal-format'
+ || lk == 55327 // '$' 'declare'
+ || lk == 55328 // '%' 'declare'
+ || lk == 55572 // '{' 'declare'
+ || lk == 55839 // '$' 'default'
+ || lk == 55840 // '%' 'default'
+ || lk == 56084 // '{' 'default'
+ || lk == 56351 // '$' 'delete'
+ || lk == 56352 // '%' 'delete'
+ || lk == 56596 // '{' 'delete'
+ || lk == 56863 // '$' 'descendant'
+ || lk == 56864 // '%' 'descendant'
+ || lk == 57108 // '{' 'descendant'
+ || lk == 57375 // '$' 'descendant-or-self'
+ || lk == 57376 // '%' 'descendant-or-self'
+ || lk == 57620 // '{' 'descendant-or-self'
+ || lk == 57887 // '$' 'descending'
+ || lk == 57888 // '%' 'descending'
+ || lk == 58132 // '{' 'descending'
+ || lk == 60447 // '$' 'div'
+ || lk == 60448 // '%' 'div'
+ || lk == 60692 // '{' 'div'
+ || lk == 60959 // '$' 'document'
+ || lk == 60960 // '%' 'document'
+ || lk == 61204 // '{' 'document'
+ || lk == 61471 // '$' 'document-node'
+ || lk == 61472 // '%' 'document-node'
+ || lk == 61716 // '{' 'document-node'
+ || lk == 61983 // '$' 'element'
+ || lk == 61984 // '%' 'element'
+ || lk == 62228 // '{' 'element'
+ || lk == 62495 // '$' 'else'
+ || lk == 62496 // '%' 'else'
+ || lk == 62740 // '{' 'else'
+ || lk == 63007 // '$' 'empty'
+ || lk == 63008 // '%' 'empty'
+ || lk == 63252 // '{' 'empty'
+ || lk == 63519 // '$' 'empty-sequence'
+ || lk == 63520 // '%' 'empty-sequence'
+ || lk == 63764 // '{' 'empty-sequence'
+ || lk == 64031 // '$' 'encoding'
+ || lk == 64032 // '%' 'encoding'
+ || lk == 64276 // '{' 'encoding'
+ || lk == 64543 // '$' 'end'
+ || lk == 64544 // '%' 'end'
+ || lk == 64788 // '{' 'end'
+ || lk == 65567 // '$' 'eq'
+ || lk == 65568 // '%' 'eq'
+ || lk == 65812 // '{' 'eq'
+ || lk == 66079 // '$' 'every'
+ || lk == 66080 // '%' 'every'
+ || lk == 66324 // '{' 'every'
+ || lk == 67103 // '$' 'except'
+ || lk == 67104 // '%' 'except'
+ || lk == 67348 // '{' 'except'
+ || lk == 67615 // '$' 'exit'
+ || lk == 67616 // '%' 'exit'
+ || lk == 67860 // '{' 'exit'
+ || lk == 68127 // '$' 'external'
+ || lk == 68128 // '%' 'external'
+ || lk == 68372 // '{' 'external'
+ || lk == 68639 // '$' 'first'
+ || lk == 68640 // '%' 'first'
+ || lk == 68884 // '{' 'first'
+ || lk == 69151 // '$' 'following'
+ || lk == 69152 // '%' 'following'
+ || lk == 69396 // '{' 'following'
+ || lk == 69663 // '$' 'following-sibling'
+ || lk == 69664 // '%' 'following-sibling'
+ || lk == 69908 // '{' 'following-sibling'
+ || lk == 70175 // '$' 'for'
+ || lk == 70176 // '%' 'for'
+ || lk == 70420 // '{' 'for'
+ || lk == 72223 // '$' 'ft-option'
+ || lk == 72224 // '%' 'ft-option'
+ || lk == 72468 // '{' 'ft-option'
+ || lk == 74271 // '$' 'function'
+ || lk == 74272 // '%' 'function'
+ || lk == 74516 // '{' 'function'
+ || lk == 74783 // '$' 'ge'
+ || lk == 74784 // '%' 'ge'
+ || lk == 75028 // '{' 'ge'
+ || lk == 75807 // '$' 'group'
+ || lk == 75808 // '%' 'group'
+ || lk == 76052 // '{' 'group'
+ || lk == 76831 // '$' 'gt'
+ || lk == 76832 // '%' 'gt'
+ || lk == 77076 // '{' 'gt'
+ || lk == 77343 // '$' 'idiv'
+ || lk == 77344 // '%' 'idiv'
+ || lk == 77588 // '{' 'idiv'
+ || lk == 77855 // '$' 'if'
+ || lk == 77856 // '%' 'if'
+ || lk == 78100 // '{' 'if'
+ || lk == 78367 // '$' 'import'
+ || lk == 78368 // '%' 'import'
+ || lk == 78612 // '{' 'import'
+ || lk == 78879 // '$' 'in'
+ || lk == 78880 // '%' 'in'
+ || lk == 79124 // '{' 'in'
+ || lk == 79391 // '$' 'index'
+ || lk == 79392 // '%' 'index'
+ || lk == 79636 // '{' 'index'
+ || lk == 81439 // '$' 'insert'
+ || lk == 81440 // '%' 'insert'
+ || lk == 81684 // '{' 'insert'
+ || lk == 81951 // '$' 'instance'
+ || lk == 81952 // '%' 'instance'
+ || lk == 82196 // '{' 'instance'
+ || lk == 82463 // '$' 'integrity'
+ || lk == 82464 // '%' 'integrity'
+ || lk == 82708 // '{' 'integrity'
+ || lk == 82975 // '$' 'intersect'
+ || lk == 82976 // '%' 'intersect'
+ || lk == 83220 // '{' 'intersect'
+ || lk == 83487 // '$' 'into'
+ || lk == 83488 // '%' 'into'
+ || lk == 83732 // '{' 'into'
+ || lk == 83999 // '$' 'is'
+ || lk == 84000 // '%' 'is'
+ || lk == 84244 // '{' 'is'
+ || lk == 84511 // '$' 'item'
+ || lk == 84512 // '%' 'item'
+ || lk == 84756 // '{' 'item'
+ || lk == 87071 // '$' 'last'
+ || lk == 87072 // '%' 'last'
+ || lk == 87316 // '{' 'last'
+ || lk == 87583 // '$' 'lax'
+ || lk == 87584 // '%' 'lax'
+ || lk == 87828 // '{' 'lax'
+ || lk == 88095 // '$' 'le'
+ || lk == 88096 // '%' 'le'
+ || lk == 88340 // '{' 'le'
+ || lk == 89119 // '$' 'let'
+ || lk == 89120 // '%' 'let'
+ || lk == 89364 // '{' 'let'
+ || lk == 90143 // '$' 'loop'
+ || lk == 90144 // '%' 'loop'
+ || lk == 90388 // '{' 'loop'
+ || lk == 91167 // '$' 'lt'
+ || lk == 91168 // '%' 'lt'
+ || lk == 91412 // '{' 'lt'
+ || lk == 92191 // '$' 'mod'
+ || lk == 92192 // '%' 'mod'
+ || lk == 92436 // '{' 'mod'
+ || lk == 92703 // '$' 'modify'
+ || lk == 92704 // '%' 'modify'
+ || lk == 92948 // '{' 'modify'
+ || lk == 93215 // '$' 'module'
+ || lk == 93216 // '%' 'module'
+ || lk == 93460 // '{' 'module'
+ || lk == 94239 // '$' 'namespace'
+ || lk == 94240 // '%' 'namespace'
+ || lk == 94484 // '{' 'namespace'
+ || lk == 94751 // '$' 'namespace-node'
+ || lk == 94752 // '%' 'namespace-node'
+ || lk == 94996 // '{' 'namespace-node'
+ || lk == 95263 // '$' 'ne'
+ || lk == 95264 // '%' 'ne'
+ || lk == 95508 // '{' 'ne'
+ || lk == 97823 // '$' 'node'
+ || lk == 97824 // '%' 'node'
+ || lk == 98068 // '{' 'node'
+ || lk == 98335 // '$' 'nodes'
+ || lk == 98336 // '%' 'nodes'
+ || lk == 98580 // '{' 'nodes'
+ || lk == 101407 // '$' 'only'
+ || lk == 101408 // '%' 'only'
+ || lk == 101652 // '{' 'only'
+ || lk == 101919 // '$' 'option'
+ || lk == 101920 // '%' 'option'
+ || lk == 102164 // '{' 'option'
+ || lk == 102431 // '$' 'or'
+ || lk == 102432 // '%' 'or'
+ || lk == 102676 // '{' 'or'
+ || lk == 102943 // '$' 'order'
+ || lk == 102944 // '%' 'order'
+ || lk == 103188 // '{' 'order'
+ || lk == 103455 // '$' 'ordered'
+ || lk == 103456 // '%' 'ordered'
+ || lk == 103700 // '{' 'ordered'
+ || lk == 103967 // '$' 'ordering'
+ || lk == 103968 // '%' 'ordering'
+ || lk == 104212 // '{' 'ordering'
+ || lk == 105503 // '$' 'parent'
+ || lk == 105504 // '%' 'parent'
+ || lk == 105748 // '{' 'parent'
+ || lk == 108575 // '$' 'preceding'
+ || lk == 108576 // '%' 'preceding'
+ || lk == 108820 // '{' 'preceding'
+ || lk == 109087 // '$' 'preceding-sibling'
+ || lk == 109088 // '%' 'preceding-sibling'
+ || lk == 109332 // '{' 'preceding-sibling'
+ || lk == 110623 // '$' 'processing-instruction'
+ || lk == 110624 // '%' 'processing-instruction'
+ || lk == 110868 // '{' 'processing-instruction'
+ || lk == 111647 // '$' 'rename'
+ || lk == 111648 // '%' 'rename'
+ || lk == 111892 // '{' 'rename'
+ || lk == 112159 // '$' 'replace'
+ || lk == 112160 // '%' 'replace'
+ || lk == 112404 // '{' 'replace'
+ || lk == 112671 // '$' 'return'
+ || lk == 112672 // '%' 'return'
+ || lk == 112916 // '{' 'return'
+ || lk == 113183 // '$' 'returning'
+ || lk == 113184 // '%' 'returning'
+ || lk == 113428 // '{' 'returning'
+ || lk == 113695 // '$' 'revalidation'
+ || lk == 113696 // '%' 'revalidation'
+ || lk == 113940 // '{' 'revalidation'
+ || lk == 114719 // '$' 'satisfies'
+ || lk == 114720 // '%' 'satisfies'
+ || lk == 114964 // '{' 'satisfies'
+ || lk == 115231 // '$' 'schema'
+ || lk == 115232 // '%' 'schema'
+ || lk == 115476 // '{' 'schema'
+ || lk == 115743 // '$' 'schema-attribute'
+ || lk == 115744 // '%' 'schema-attribute'
+ || lk == 115988 // '{' 'schema-attribute'
+ || lk == 116255 // '$' 'schema-element'
+ || lk == 116256 // '%' 'schema-element'
+ || lk == 116500 // '{' 'schema-element'
+ || lk == 116767 // '$' 'score'
+ || lk == 116768 // '%' 'score'
+ || lk == 117012 // '{' 'score'
+ || lk == 117279 // '$' 'self'
+ || lk == 117280 // '%' 'self'
+ || lk == 117524 // '{' 'self'
+ || lk == 119839 // '$' 'sliding'
+ || lk == 119840 // '%' 'sliding'
+ || lk == 120084 // '{' 'sliding'
+ || lk == 120351 // '$' 'some'
+ || lk == 120352 // '%' 'some'
+ || lk == 120596 // '{' 'some'
+ || lk == 120863 // '$' 'stable'
+ || lk == 120864 // '%' 'stable'
+ || lk == 121108 // '{' 'stable'
+ || lk == 121375 // '$' 'start'
+ || lk == 121376 // '%' 'start'
+ || lk == 121620 // '{' 'start'
+ || lk == 122911 // '$' 'strict'
+ || lk == 122912 // '%' 'strict'
+ || lk == 123156 // '{' 'strict'
+ || lk == 124447 // '$' 'switch'
+ || lk == 124448 // '%' 'switch'
+ || lk == 124692 // '{' 'switch'
+ || lk == 124959 // '$' 'text'
+ || lk == 124960 // '%' 'text'
+ || lk == 125204 // '{' 'text'
+ || lk == 127007 // '$' 'to'
+ || lk == 127008 // '%' 'to'
+ || lk == 127252 // '{' 'to'
+ || lk == 127519 // '$' 'treat'
+ || lk == 127520 // '%' 'treat'
+ || lk == 127764 // '{' 'treat'
+ || lk == 128031 // '$' 'try'
+ || lk == 128032 // '%' 'try'
+ || lk == 128276 // '{' 'try'
+ || lk == 128543 // '$' 'tumbling'
+ || lk == 128544 // '%' 'tumbling'
+ || lk == 128788 // '{' 'tumbling'
+ || lk == 129055 // '$' 'type'
+ || lk == 129056 // '%' 'type'
+ || lk == 129300 // '{' 'type'
+ || lk == 129567 // '$' 'typeswitch'
+ || lk == 129568 // '%' 'typeswitch'
+ || lk == 129812 // '{' 'typeswitch'
+ || lk == 130079 // '$' 'union'
+ || lk == 130080 // '%' 'union'
+ || lk == 130324 // '{' 'union'
+ || lk == 131103 // '$' 'unordered'
+ || lk == 131104 // '%' 'unordered'
+ || lk == 131348 // '{' 'unordered'
+ || lk == 131615 // '$' 'updating'
+ || lk == 131616 // '%' 'updating'
+ || lk == 131860 // '{' 'updating'
+ || lk == 133151 // '$' 'validate'
+ || lk == 133152 // '%' 'validate'
+ || lk == 133396 // '{' 'validate'
+ || lk == 133663 // '$' 'value'
+ || lk == 133664 // '%' 'value'
+ || lk == 133908 // '{' 'value'
+ || lk == 134175 // '$' 'variable'
+ || lk == 134176 // '%' 'variable'
+ || lk == 134420 // '{' 'variable'
+ || lk == 134687 // '$' 'version'
+ || lk == 134688 // '%' 'version'
+ || lk == 134932 // '{' 'version'
+ || lk == 136223 // '$' 'where'
+ || lk == 136224 // '%' 'where'
+ || lk == 136468 // '{' 'where'
+ || lk == 136735 // '$' 'while'
+ || lk == 136736 // '%' 'while'
+ || lk == 136980 // '{' 'while'
+ || lk == 138271 // '$' 'with'
+ || lk == 138272 // '%' 'with'
+ || lk == 138516 // '{' 'with'
+ || lk == 140319 // '$' 'xquery'
+ || lk == 140320 // '%' 'xquery'
+ || lk == 140564 // '{' 'xquery'
+ || lk == 141588 // '{' '{'
+ || lk == 142612 // '{' '{|'
+ || lk == 144660) // '{' '}'
+ {
+ lk = memoized(6, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ApplyStatement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_AssignStatement();
+ lk = -2;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_BlockStatement();
+ lk = -3;
+ }
+ catch (p3A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_VarDeclStatement();
+ lk = -12;
+ }
+ catch (p12A)
+ {
+ lk = -13;
+ }
+ }
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(6, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ try_AssignStatement();
+ break;
+ case -3:
+ try_BlockStatement();
+ break;
+ case 90198: // 'break' 'loop'
+ try_BreakStatement();
+ break;
+ case 90214: // 'continue' 'loop'
+ try_ContinueStatement();
+ break;
+ case 113284: // 'exit' 'returning'
+ try_ExitStatement();
+ break;
+ case 16009: // 'for' '$'
+ case 16046: // 'let' '$'
+ case 116910: // 'let' 'score'
+ case 119945: // 'for' 'sliding'
+ case 128649: // 'for' 'tumbling'
+ try_FLWORStatement();
+ break;
+ case 17560: // 'if' '('
+ try_IfStatement();
+ break;
+ case 17651: // 'switch' '('
+ try_SwitchStatement();
+ break;
+ case 141562: // 'try' '{'
+ try_TryCatchStatement();
+ break;
+ case 17661: // 'typeswitch' '('
+ try_TypeswitchStatement();
+ break;
+ case -12:
+ case 16134: // 'variable' '$'
+ try_VarDeclStatement();
+ break;
+ case -13:
+ try_WhileStatement();
+ break;
+ default:
+ try_ApplyStatement();
+ }
+ }
+
+ function parse_ApplyStatement()
+ {
+ eventHandler.startNonterminal("ApplyStatement", e0);
+ parse_ExprSimple();
+ shift(53); // ';'
+ eventHandler.endNonterminal("ApplyStatement", e0);
+ }
+
+ function try_ApplyStatement()
+ {
+ try_ExprSimple();
+ shiftT(53); // ';'
+ }
+
+ function parse_AssignStatement()
+ {
+ eventHandler.startNonterminal("AssignStatement", e0);
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(53); // ';'
+ eventHandler.endNonterminal("AssignStatement", e0);
+ }
+
+ function try_AssignStatement()
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(53); // ';'
+ }
+
+ function parse_BlockStatement()
+ {
+ eventHandler.startNonterminal("BlockStatement", e0);
+ shift(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statements();
+ shift(282); // '}'
+ eventHandler.endNonterminal("BlockStatement", e0);
+ }
+
+ function try_BlockStatement()
+ {
+ shiftT(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statements();
+ shiftT(282); // '}'
+ }
+
+ function parse_BreakStatement()
+ {
+ eventHandler.startNonterminal("BreakStatement", e0);
+ shift(86); // 'break'
+ lookahead1W(59); // S^WS | '(:' | 'loop'
+ shift(176); // 'loop'
+ lookahead1W(28); // S^WS | '(:' | ';'
+ shift(53); // ';'
+ eventHandler.endNonterminal("BreakStatement", e0);
+ }
+
+ function try_BreakStatement()
+ {
+ shiftT(86); // 'break'
+ lookahead1W(59); // S^WS | '(:' | 'loop'
+ shiftT(176); // 'loop'
+ lookahead1W(28); // S^WS | '(:' | ';'
+ shiftT(53); // ';'
+ }
+
+ function parse_ContinueStatement()
+ {
+ eventHandler.startNonterminal("ContinueStatement", e0);
+ shift(102); // 'continue'
+ lookahead1W(59); // S^WS | '(:' | 'loop'
+ shift(176); // 'loop'
+ lookahead1W(28); // S^WS | '(:' | ';'
+ shift(53); // ';'
+ eventHandler.endNonterminal("ContinueStatement", e0);
+ }
+
+ function try_ContinueStatement()
+ {
+ shiftT(102); // 'continue'
+ lookahead1W(59); // S^WS | '(:' | 'loop'
+ shiftT(176); // 'loop'
+ lookahead1W(28); // S^WS | '(:' | ';'
+ shiftT(53); // ';'
+ }
+
+ function parse_ExitStatement()
+ {
+ eventHandler.startNonterminal("ExitStatement", e0);
+ shift(132); // 'exit'
+ lookahead1W(71); // S^WS | '(:' | 'returning'
+ shift(221); // 'returning'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(53); // ';'
+ eventHandler.endNonterminal("ExitStatement", e0);
+ }
+
+ function try_ExitStatement()
+ {
+ shiftT(132); // 'exit'
+ lookahead1W(71); // S^WS | '(:' | 'returning'
+ shiftT(221); // 'returning'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(53); // ';'
+ }
+
+ function parse_FLWORStatement()
+ {
+ eventHandler.startNonterminal("FLWORStatement", e0);
+ parse_InitialClause();
+ for (;;)
+ {
+ lookahead1W(173); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 220) // 'return'
+ {
+ break;
+ }
+ whitespace();
+ parse_IntermediateClause();
+ }
+ whitespace();
+ parse_ReturnStatement();
+ eventHandler.endNonterminal("FLWORStatement", e0);
+ }
+
+ function try_FLWORStatement()
+ {
+ try_InitialClause();
+ for (;;)
+ {
+ lookahead1W(173); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 220) // 'return'
+ {
+ break;
+ }
+ try_IntermediateClause();
+ }
+ try_ReturnStatement();
+ }
+
+ function parse_ReturnStatement()
+ {
+ eventHandler.startNonterminal("ReturnStatement", e0);
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("ReturnStatement", e0);
+ }
+
+ function try_ReturnStatement()
+ {
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_IfStatement()
+ {
+ eventHandler.startNonterminal("IfStatement", e0);
+ shift(152); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ lookahead1W(77); // S^WS | '(:' | 'then'
+ shift(245); // 'then'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ lookahead1W(48); // S^WS | '(:' | 'else'
+ shift(122); // 'else'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("IfStatement", e0);
+ }
+
+ function try_IfStatement()
+ {
+ shiftT(152); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(37); // ')'
+ lookahead1W(77); // S^WS | '(:' | 'then'
+ shiftT(245); // 'then'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ lookahead1W(48); // S^WS | '(:' | 'else'
+ shiftT(122); // 'else'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_SwitchStatement()
+ {
+ eventHandler.startNonterminal("SwitchStatement", e0);
+ shift(243); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_SwitchCaseStatement();
+ lookahead1W(113); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(109); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("SwitchStatement", e0);
+ }
+
+ function try_SwitchStatement()
+ {
+ shiftT(243); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ try_SwitchCaseStatement();
+ lookahead1W(113); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(109); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_SwitchCaseStatement()
+ {
+ eventHandler.startNonterminal("SwitchCaseStatement", e0);
+ for (;;)
+ {
+ shift(88); // 'case'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_SwitchCaseOperand();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("SwitchCaseStatement", e0);
+ }
+
+ function try_SwitchCaseStatement()
+ {
+ for (;;)
+ {
+ shiftT(88); // 'case'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_SwitchCaseOperand();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_TryCatchStatement()
+ {
+ eventHandler.startNonterminal("TryCatchStatement", e0);
+ shift(250); // 'try'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shift(91); // 'catch'
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CatchErrorList();
+ whitespace();
+ parse_BlockStatement();
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 91: // 'catch'
+ lookahead2W(275); // Wildcard | EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 38491 // 'catch' 'and'
+ || lk == 45659 // 'catch' 'cast'
+ || lk == 46171 // 'catch' 'castable'
+ || lk == 60507 // 'catch' 'div'
+ || lk == 65627 // 'catch' 'eq'
+ || lk == 67163 // 'catch' 'except'
+ || lk == 74843 // 'catch' 'ge'
+ || lk == 76891 // 'catch' 'gt'
+ || lk == 77403 // 'catch' 'idiv'
+ || lk == 82011 // 'catch' 'instance'
+ || lk == 83035 // 'catch' 'intersect'
+ || lk == 84059 // 'catch' 'is'
+ || lk == 88155 // 'catch' 'le'
+ || lk == 91227 // 'catch' 'lt'
+ || lk == 92251 // 'catch' 'mod'
+ || lk == 95323 // 'catch' 'ne'
+ || lk == 102491 // 'catch' 'or'
+ || lk == 127067 // 'catch' 'to'
+ || lk == 127579 // 'catch' 'treat'
+ || lk == 130139) // 'catch' 'union'
+ {
+ lk = memoized(7, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ try_BlockStatement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(7, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 2651 // 'catch' Wildcard
+ && lk != 3163 // 'catch' EQName^Token
+ && lk != 35931 // 'catch' 'after'
+ && lk != 36955 // 'catch' 'allowing'
+ && lk != 37467 // 'catch' 'ancestor'
+ && lk != 37979 // 'catch' 'ancestor-or-self'
+ && lk != 40539 // 'catch' 'as'
+ && lk != 41051 // 'catch' 'ascending'
+ && lk != 41563 // 'catch' 'at'
+ && lk != 42075 // 'catch' 'attribute'
+ && lk != 42587 // 'catch' 'base-uri'
+ && lk != 43099 // 'catch' 'before'
+ && lk != 43611 // 'catch' 'boundary-space'
+ && lk != 44123 // 'catch' 'break'
+ && lk != 45147 // 'catch' 'case'
+ && lk != 46683 // 'catch' 'catch'
+ && lk != 47707 // 'catch' 'child'
+ && lk != 48219 // 'catch' 'collation'
+ && lk != 49243 // 'catch' 'comment'
+ && lk != 49755 // 'catch' 'constraint'
+ && lk != 50267 // 'catch' 'construction'
+ && lk != 51803 // 'catch' 'context'
+ && lk != 52315 // 'catch' 'continue'
+ && lk != 52827 // 'catch' 'copy'
+ && lk != 53339 // 'catch' 'copy-namespaces'
+ && lk != 53851 // 'catch' 'count'
+ && lk != 54363 // 'catch' 'decimal-format'
+ && lk != 55387 // 'catch' 'declare'
+ && lk != 55899 // 'catch' 'default'
+ && lk != 56411 // 'catch' 'delete'
+ && lk != 56923 // 'catch' 'descendant'
+ && lk != 57435 // 'catch' 'descendant-or-self'
+ && lk != 57947 // 'catch' 'descending'
+ && lk != 61019 // 'catch' 'document'
+ && lk != 61531 // 'catch' 'document-node'
+ && lk != 62043 // 'catch' 'element'
+ && lk != 62555 // 'catch' 'else'
+ && lk != 63067 // 'catch' 'empty'
+ && lk != 63579 // 'catch' 'empty-sequence'
+ && lk != 64091 // 'catch' 'encoding'
+ && lk != 64603 // 'catch' 'end'
+ && lk != 66139 // 'catch' 'every'
+ && lk != 67675 // 'catch' 'exit'
+ && lk != 68187 // 'catch' 'external'
+ && lk != 68699 // 'catch' 'first'
+ && lk != 69211 // 'catch' 'following'
+ && lk != 69723 // 'catch' 'following-sibling'
+ && lk != 70235 // 'catch' 'for'
+ && lk != 72283 // 'catch' 'ft-option'
+ && lk != 74331 // 'catch' 'function'
+ && lk != 75867 // 'catch' 'group'
+ && lk != 77915 // 'catch' 'if'
+ && lk != 78427 // 'catch' 'import'
+ && lk != 78939 // 'catch' 'in'
+ && lk != 79451 // 'catch' 'index'
+ && lk != 81499 // 'catch' 'insert'
+ && lk != 82523 // 'catch' 'integrity'
+ && lk != 83547 // 'catch' 'into'
+ && lk != 84571 // 'catch' 'item'
+ && lk != 87131 // 'catch' 'last'
+ && lk != 87643 // 'catch' 'lax'
+ && lk != 89179 // 'catch' 'let'
+ && lk != 90203 // 'catch' 'loop'
+ && lk != 92763 // 'catch' 'modify'
+ && lk != 93275 // 'catch' 'module'
+ && lk != 94299 // 'catch' 'namespace'
+ && lk != 94811 // 'catch' 'namespace-node'
+ && lk != 97883 // 'catch' 'node'
+ && lk != 98395 // 'catch' 'nodes'
+ && lk != 101467 // 'catch' 'only'
+ && lk != 101979 // 'catch' 'option'
+ && lk != 103003 // 'catch' 'order'
+ && lk != 103515 // 'catch' 'ordered'
+ && lk != 104027 // 'catch' 'ordering'
+ && lk != 105563 // 'catch' 'parent'
+ && lk != 108635 // 'catch' 'preceding'
+ && lk != 109147 // 'catch' 'preceding-sibling'
+ && lk != 110683 // 'catch' 'processing-instruction'
+ && lk != 111707 // 'catch' 'rename'
+ && lk != 112219 // 'catch' 'replace'
+ && lk != 112731 // 'catch' 'return'
+ && lk != 113243 // 'catch' 'returning'
+ && lk != 113755 // 'catch' 'revalidation'
+ && lk != 114779 // 'catch' 'satisfies'
+ && lk != 115291 // 'catch' 'schema'
+ && lk != 115803 // 'catch' 'schema-attribute'
+ && lk != 116315 // 'catch' 'schema-element'
+ && lk != 116827 // 'catch' 'score'
+ && lk != 117339 // 'catch' 'self'
+ && lk != 119899 // 'catch' 'sliding'
+ && lk != 120411 // 'catch' 'some'
+ && lk != 120923 // 'catch' 'stable'
+ && lk != 121435 // 'catch' 'start'
+ && lk != 122971 // 'catch' 'strict'
+ && lk != 124507 // 'catch' 'switch'
+ && lk != 125019 // 'catch' 'text'
+ && lk != 128091 // 'catch' 'try'
+ && lk != 128603 // 'catch' 'tumbling'
+ && lk != 129115 // 'catch' 'type'
+ && lk != 129627 // 'catch' 'typeswitch'
+ && lk != 131163 // 'catch' 'unordered'
+ && lk != 131675 // 'catch' 'updating'
+ && lk != 133211 // 'catch' 'validate'
+ && lk != 133723 // 'catch' 'value'
+ && lk != 134235 // 'catch' 'variable'
+ && lk != 134747 // 'catch' 'version'
+ && lk != 136283 // 'catch' 'where'
+ && lk != 136795 // 'catch' 'while'
+ && lk != 138331 // 'catch' 'with'
+ && lk != 140379) // 'catch' 'xquery'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("TryCatchStatement", e0);
+ }
+
+ function try_TryCatchStatement()
+ {
+ shiftT(250); // 'try'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ try_BlockStatement();
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 91: // 'catch'
+ lookahead2W(275); // Wildcard | EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 38491 // 'catch' 'and'
+ || lk == 45659 // 'catch' 'cast'
+ || lk == 46171 // 'catch' 'castable'
+ || lk == 60507 // 'catch' 'div'
+ || lk == 65627 // 'catch' 'eq'
+ || lk == 67163 // 'catch' 'except'
+ || lk == 74843 // 'catch' 'ge'
+ || lk == 76891 // 'catch' 'gt'
+ || lk == 77403 // 'catch' 'idiv'
+ || lk == 82011 // 'catch' 'instance'
+ || lk == 83035 // 'catch' 'intersect'
+ || lk == 84059 // 'catch' 'is'
+ || lk == 88155 // 'catch' 'le'
+ || lk == 91227 // 'catch' 'lt'
+ || lk == 92251 // 'catch' 'mod'
+ || lk == 95323 // 'catch' 'ne'
+ || lk == 102491 // 'catch' 'or'
+ || lk == 127067 // 'catch' 'to'
+ || lk == 127579 // 'catch' 'treat'
+ || lk == 130139) // 'catch' 'union'
+ {
+ lk = memoized(7, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(251); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ try_BlockStatement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(7, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 2651 // 'catch' Wildcard
+ && lk != 3163 // 'catch' EQName^Token
+ && lk != 35931 // 'catch' 'after'
+ && lk != 36955 // 'catch' 'allowing'
+ && lk != 37467 // 'catch' 'ancestor'
+ && lk != 37979 // 'catch' 'ancestor-or-self'
+ && lk != 40539 // 'catch' 'as'
+ && lk != 41051 // 'catch' 'ascending'
+ && lk != 41563 // 'catch' 'at'
+ && lk != 42075 // 'catch' 'attribute'
+ && lk != 42587 // 'catch' 'base-uri'
+ && lk != 43099 // 'catch' 'before'
+ && lk != 43611 // 'catch' 'boundary-space'
+ && lk != 44123 // 'catch' 'break'
+ && lk != 45147 // 'catch' 'case'
+ && lk != 46683 // 'catch' 'catch'
+ && lk != 47707 // 'catch' 'child'
+ && lk != 48219 // 'catch' 'collation'
+ && lk != 49243 // 'catch' 'comment'
+ && lk != 49755 // 'catch' 'constraint'
+ && lk != 50267 // 'catch' 'construction'
+ && lk != 51803 // 'catch' 'context'
+ && lk != 52315 // 'catch' 'continue'
+ && lk != 52827 // 'catch' 'copy'
+ && lk != 53339 // 'catch' 'copy-namespaces'
+ && lk != 53851 // 'catch' 'count'
+ && lk != 54363 // 'catch' 'decimal-format'
+ && lk != 55387 // 'catch' 'declare'
+ && lk != 55899 // 'catch' 'default'
+ && lk != 56411 // 'catch' 'delete'
+ && lk != 56923 // 'catch' 'descendant'
+ && lk != 57435 // 'catch' 'descendant-or-self'
+ && lk != 57947 // 'catch' 'descending'
+ && lk != 61019 // 'catch' 'document'
+ && lk != 61531 // 'catch' 'document-node'
+ && lk != 62043 // 'catch' 'element'
+ && lk != 62555 // 'catch' 'else'
+ && lk != 63067 // 'catch' 'empty'
+ && lk != 63579 // 'catch' 'empty-sequence'
+ && lk != 64091 // 'catch' 'encoding'
+ && lk != 64603 // 'catch' 'end'
+ && lk != 66139 // 'catch' 'every'
+ && lk != 67675 // 'catch' 'exit'
+ && lk != 68187 // 'catch' 'external'
+ && lk != 68699 // 'catch' 'first'
+ && lk != 69211 // 'catch' 'following'
+ && lk != 69723 // 'catch' 'following-sibling'
+ && lk != 70235 // 'catch' 'for'
+ && lk != 72283 // 'catch' 'ft-option'
+ && lk != 74331 // 'catch' 'function'
+ && lk != 75867 // 'catch' 'group'
+ && lk != 77915 // 'catch' 'if'
+ && lk != 78427 // 'catch' 'import'
+ && lk != 78939 // 'catch' 'in'
+ && lk != 79451 // 'catch' 'index'
+ && lk != 81499 // 'catch' 'insert'
+ && lk != 82523 // 'catch' 'integrity'
+ && lk != 83547 // 'catch' 'into'
+ && lk != 84571 // 'catch' 'item'
+ && lk != 87131 // 'catch' 'last'
+ && lk != 87643 // 'catch' 'lax'
+ && lk != 89179 // 'catch' 'let'
+ && lk != 90203 // 'catch' 'loop'
+ && lk != 92763 // 'catch' 'modify'
+ && lk != 93275 // 'catch' 'module'
+ && lk != 94299 // 'catch' 'namespace'
+ && lk != 94811 // 'catch' 'namespace-node'
+ && lk != 97883 // 'catch' 'node'
+ && lk != 98395 // 'catch' 'nodes'
+ && lk != 101467 // 'catch' 'only'
+ && lk != 101979 // 'catch' 'option'
+ && lk != 103003 // 'catch' 'order'
+ && lk != 103515 // 'catch' 'ordered'
+ && lk != 104027 // 'catch' 'ordering'
+ && lk != 105563 // 'catch' 'parent'
+ && lk != 108635 // 'catch' 'preceding'
+ && lk != 109147 // 'catch' 'preceding-sibling'
+ && lk != 110683 // 'catch' 'processing-instruction'
+ && lk != 111707 // 'catch' 'rename'
+ && lk != 112219 // 'catch' 'replace'
+ && lk != 112731 // 'catch' 'return'
+ && lk != 113243 // 'catch' 'returning'
+ && lk != 113755 // 'catch' 'revalidation'
+ && lk != 114779 // 'catch' 'satisfies'
+ && lk != 115291 // 'catch' 'schema'
+ && lk != 115803 // 'catch' 'schema-attribute'
+ && lk != 116315 // 'catch' 'schema-element'
+ && lk != 116827 // 'catch' 'score'
+ && lk != 117339 // 'catch' 'self'
+ && lk != 119899 // 'catch' 'sliding'
+ && lk != 120411 // 'catch' 'some'
+ && lk != 120923 // 'catch' 'stable'
+ && lk != 121435 // 'catch' 'start'
+ && lk != 122971 // 'catch' 'strict'
+ && lk != 124507 // 'catch' 'switch'
+ && lk != 125019 // 'catch' 'text'
+ && lk != 128091 // 'catch' 'try'
+ && lk != 128603 // 'catch' 'tumbling'
+ && lk != 129115 // 'catch' 'type'
+ && lk != 129627 // 'catch' 'typeswitch'
+ && lk != 131163 // 'catch' 'unordered'
+ && lk != 131675 // 'catch' 'updating'
+ && lk != 133211 // 'catch' 'validate'
+ && lk != 133723 // 'catch' 'value'
+ && lk != 134235 // 'catch' 'variable'
+ && lk != 134747 // 'catch' 'version'
+ && lk != 136283 // 'catch' 'where'
+ && lk != 136795 // 'catch' 'while'
+ && lk != 138331 // 'catch' 'with'
+ && lk != 140379) // 'catch' 'xquery'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_TypeswitchStatement()
+ {
+ eventHandler.startNonterminal("TypeswitchStatement", e0);
+ shift(253); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_CaseStatement();
+ lookahead1W(113); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(109); // 'default'
+ lookahead1W(95); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("TypeswitchStatement", e0);
+ }
+
+ function try_TypeswitchStatement()
+ {
+ shiftT(253); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ try_CaseStatement();
+ lookahead1W(113); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(109); // 'default'
+ lookahead1W(95); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_CaseStatement()
+ {
+ eventHandler.startNonterminal("CaseStatement", e0);
+ shift(88); // 'case'
+ lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ }
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("CaseStatement", e0);
+ }
+
+ function try_CaseStatement()
+ {
+ shiftT(88); // 'case'
+ lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ }
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_VarDeclStatement()
+ {
+ eventHandler.startNonterminal("VarDeclStatement", e0);
+ for (;;)
+ {
+ lookahead1W(98); // S^WS | '%' | '(:' | 'variable'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ shift(262); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(145); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(145); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shift(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ }
+ shift(53); // ';'
+ eventHandler.endNonterminal("VarDeclStatement", e0);
+ }
+
+ function try_VarDeclStatement()
+ {
+ for (;;)
+ {
+ lookahead1W(98); // S^WS | '%' | '(:' | 'variable'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ shiftT(262); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(145); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shiftT(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(145); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shiftT(52); // ':='
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ }
+ shiftT(53); // ';'
+ }
+
+ function parse_WhileStatement()
+ {
+ eventHandler.startNonterminal("WhileStatement", e0);
+ shift(267); // 'while'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("WhileStatement", e0);
+ }
+
+ function try_WhileStatement()
+ {
+ shiftT(267); // 'while'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(37); // ')'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_ExprSingle()
+ {
+ eventHandler.startNonterminal("ExprSingle", e0);
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ case 174: // 'let'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ case 250: // 'try'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(228); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16009: // 'for' '$'
+ case 16046: // 'let' '$'
+ case 116910: // 'let' 'score'
+ case 119945: // 'for' 'sliding'
+ case 128649: // 'for' 'tumbling'
+ parse_FLWORExpr();
+ break;
+ case 17560: // 'if' '('
+ parse_IfExpr();
+ break;
+ case 17651: // 'switch' '('
+ parse_SwitchExpr();
+ break;
+ case 141562: // 'try' '{'
+ parse_TryCatchExpr();
+ break;
+ case 17661: // 'typeswitch' '('
+ parse_TypeswitchExpr();
+ break;
+ default:
+ parse_ExprSimple();
+ }
+ eventHandler.endNonterminal("ExprSingle", e0);
+ }
+
+ function try_ExprSingle()
+ {
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ case 174: // 'let'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ case 250: // 'try'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(228); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16009: // 'for' '$'
+ case 16046: // 'let' '$'
+ case 116910: // 'let' 'score'
+ case 119945: // 'for' 'sliding'
+ case 128649: // 'for' 'tumbling'
+ try_FLWORExpr();
+ break;
+ case 17560: // 'if' '('
+ try_IfExpr();
+ break;
+ case 17651: // 'switch' '('
+ try_SwitchExpr();
+ break;
+ case 141562: // 'try' '{'
+ try_TryCatchExpr();
+ break;
+ case 17661: // 'typeswitch' '('
+ try_TypeswitchExpr();
+ break;
+ default:
+ try_ExprSimple();
+ }
+ }
+
+ function parse_ExprSimple()
+ {
+ eventHandler.startNonterminal("ExprSimple", e0);
+ switch (l1)
+ {
+ case 218: // 'rename'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 219: // 'replace'
+ lookahead2W(235); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16001: // 'every' '$'
+ case 16107: // 'some' '$'
+ parse_QuantifiedExpr();
+ break;
+ case 97951: // 'insert' 'node'
+ case 98463: // 'insert' 'nodes'
+ parse_InsertExpr();
+ break;
+ case 97902: // 'delete' 'node'
+ case 98414: // 'delete' 'nodes'
+ parse_DeleteExpr();
+ break;
+ case 98010: // 'rename' 'node'
+ parse_RenameExpr();
+ break;
+ case 98011: // 'replace' 'node'
+ case 133851: // 'replace' 'value'
+ parse_ReplaceExpr();
+ break;
+ case 15975: // 'copy' '$'
+ parse_TransformExpr();
+ break;
+ case 85102: // 'delete' 'json'
+ parse_JSONDeleteExpr();
+ break;
+ case 85151: // 'insert' 'json'
+ parse_JSONInsertExpr();
+ break;
+ case 85210: // 'rename' 'json'
+ parse_JSONRenameExpr();
+ break;
+ case 85211: // 'replace' 'json'
+ parse_JSONReplaceExpr();
+ break;
+ case 77: // 'append'
+ parse_JSONAppendExpr();
+ break;
+ default:
+ parse_OrExpr();
+ }
+ eventHandler.endNonterminal("ExprSimple", e0);
+ }
+
+ function try_ExprSimple()
+ {
+ switch (l1)
+ {
+ case 218: // 'rename'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 219: // 'replace'
+ lookahead2W(235); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16001: // 'every' '$'
+ case 16107: // 'some' '$'
+ try_QuantifiedExpr();
+ break;
+ case 97951: // 'insert' 'node'
+ case 98463: // 'insert' 'nodes'
+ try_InsertExpr();
+ break;
+ case 97902: // 'delete' 'node'
+ case 98414: // 'delete' 'nodes'
+ try_DeleteExpr();
+ break;
+ case 98010: // 'rename' 'node'
+ try_RenameExpr();
+ break;
+ case 98011: // 'replace' 'node'
+ case 133851: // 'replace' 'value'
+ try_ReplaceExpr();
+ break;
+ case 15975: // 'copy' '$'
+ try_TransformExpr();
+ break;
+ case 85102: // 'delete' 'json'
+ try_JSONDeleteExpr();
+ break;
+ case 85151: // 'insert' 'json'
+ try_JSONInsertExpr();
+ break;
+ case 85210: // 'rename' 'json'
+ try_JSONRenameExpr();
+ break;
+ case 85211: // 'replace' 'json'
+ try_JSONReplaceExpr();
+ break;
+ case 77: // 'append'
+ try_JSONAppendExpr();
+ break;
+ default:
+ try_OrExpr();
+ }
+ }
+
+ function parse_JSONDeleteExpr()
+ {
+ eventHandler.startNonterminal("JSONDeleteExpr", e0);
+ shift(110); // 'delete'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ eventHandler.endNonterminal("JSONDeleteExpr", e0);
+ }
+
+ function try_JSONDeleteExpr()
+ {
+ shiftT(110); // 'delete'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ }
+
+ function parse_JSONInsertExpr()
+ {
+ eventHandler.startNonterminal("JSONInsertExpr", e0);
+ shift(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(163); // 'into'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(69); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 108113) // 'at' 'position'
+ {
+ lk = memoized(8, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(8, e0, lk);
+ }
+ }
+ if (lk == -1)
+ {
+ shift(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shift(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("JSONInsertExpr", e0);
+ }
+
+ function try_JSONInsertExpr()
+ {
+ shiftT(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(163); // 'into'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(69); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 108113) // 'at' 'position'
+ {
+ lk = memoized(8, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(8, e0, lk);
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ }
+
+ function parse_JSONRenameExpr()
+ {
+ eventHandler.startNonterminal("JSONRenameExpr", e0);
+ shift(218); // 'rename'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ shift(79); // 'as'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONRenameExpr", e0);
+ }
+
+ function try_JSONRenameExpr()
+ {
+ shiftT(218); // 'rename'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ shiftT(79); // 'as'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_JSONReplaceExpr()
+ {
+ eventHandler.startNonterminal("JSONReplaceExpr", e0);
+ shift(219); // 'replace'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(82); // S^WS | '(:' | 'value'
+ shift(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shift(196); // 'of'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ shift(270); // 'with'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONReplaceExpr", e0);
+ }
+
+ function try_JSONReplaceExpr()
+ {
+ shiftT(219); // 'replace'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(82); // S^WS | '(:' | 'value'
+ shiftT(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shiftT(196); // 'of'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ shiftT(270); // 'with'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_JSONAppendExpr()
+ {
+ eventHandler.startNonterminal("JSONAppendExpr", e0);
+ shift(77); // 'append'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(163); // 'into'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONAppendExpr", e0);
+ }
+
+ function try_JSONAppendExpr()
+ {
+ shiftT(77); // 'append'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(163); // 'into'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_CommonContent()
+ {
+ eventHandler.startNonterminal("CommonContent", e0);
+ switch (l1)
+ {
+ case 12: // PredefinedEntityRef
+ shift(12); // PredefinedEntityRef
+ break;
+ case 23: // CharRef
+ shift(23); // CharRef
+ break;
+ case 277: // '{{'
+ shift(277); // '{{'
+ break;
+ case 283: // '}}'
+ shift(283); // '}}'
+ break;
+ default:
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CommonContent", e0);
+ }
+
+ function try_CommonContent()
+ {
+ switch (l1)
+ {
+ case 12: // PredefinedEntityRef
+ shiftT(12); // PredefinedEntityRef
+ break;
+ case 23: // CharRef
+ shiftT(23); // CharRef
+ break;
+ case 277: // '{{'
+ shiftT(277); // '{{'
+ break;
+ case 283: // '}}'
+ shiftT(283); // '}}'
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_ContentExpr()
+ {
+ eventHandler.startNonterminal("ContentExpr", e0);
+ parse_StatementsAndExpr();
+ eventHandler.endNonterminal("ContentExpr", e0);
+ }
+
+ function try_ContentExpr()
+ {
+ try_StatementsAndExpr();
+ }
+
+ function parse_CompDocConstructor()
+ {
+ eventHandler.startNonterminal("CompDocConstructor", e0);
+ shift(119); // 'document'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompDocConstructor", e0);
+ }
+
+ function try_CompDocConstructor()
+ {
+ shiftT(119); // 'document'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_CompAttrConstructor()
+ {
+ eventHandler.startNonterminal("CompAttrConstructor", e0);
+ shift(82); // 'attribute'
+ lookahead1W(252); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_EQName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(9, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(9, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CompAttrConstructor", e0);
+ }
+
+ function try_CompAttrConstructor()
+ {
+ shiftT(82); // 'attribute'
+ lookahead1W(252); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 276: // '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ break;
+ default:
+ try_EQName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(9, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(9, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompPIConstructor()
+ {
+ eventHandler.startNonterminal("CompPIConstructor", e0);
+ shift(216); // 'processing-instruction'
+ lookahead1W(253); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(10, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(10, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CompPIConstructor", e0);
+ }
+
+ function try_CompPIConstructor()
+ {
+ shiftT(216); // 'processing-instruction'
+ lookahead1W(253); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 276: // '{'
+ shiftT(276); // '{'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Expr();
+ shiftT(282); // '}'
+ break;
+ default:
+ try_NCName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(10, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(10, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompCommentConstructor()
+ {
+ eventHandler.startNonterminal("CompCommentConstructor", e0);
+ shift(96); // 'comment'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompCommentConstructor", e0);
+ }
+
+ function try_CompCommentConstructor()
+ {
+ shiftT(96); // 'comment'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_CompTextConstructor()
+ {
+ eventHandler.startNonterminal("CompTextConstructor", e0);
+ shift(244); // 'text'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompTextConstructor", e0);
+ }
+
+ function try_CompTextConstructor()
+ {
+ shiftT(244); // 'text'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_PrimaryExpr()
+ {
+ eventHandler.startNonterminal("PrimaryExpr", e0);
+ switch (l1)
+ {
+ case 184: // 'namespace'
+ lookahead2W(258); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 216: // 'processing-instruction'
+ lookahead2W(257); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 82: // 'attribute'
+ case 121: // 'element'
+ lookahead2W(254); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 96: // 'comment'
+ case 244: // 'text'
+ lookahead2W(93); // S^WS | '#' | '(:' | '{'
+ break;
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 256: // 'unordered'
+ lookahead2W(139); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 75: // 'and'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 86: // 'break'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 93: // 'child'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 102: // 'continue'
+ case 103: // 'copy'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 110: // 'delete'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 129: // 'every'
+ case 131: // 'except'
+ case 132: // 'exit'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 137: // 'for'
+ case 141: // 'ft-option'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 159: // 'insert'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 174: // 'let'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 186: // 'ne'
+ case 192: // 'nodes'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 218: // 'rename'
+ case 219: // 'replace'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 228: // 'score'
+ case 229: // 'self'
+ case 234: // 'sliding'
+ case 235: // 'some'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 250: // 'try'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 260: // 'validate'
+ case 261: // 'value'
+ case 262: // 'variable'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(92); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 2836 // '{' Wildcard
+ || lk == 3348 // '{' EQName^Token
+ || lk == 4372 // '{' IntegerLiteral
+ || lk == 4884 // '{' DecimalLiteral
+ || lk == 5396 // '{' DoubleLiteral
+ || lk == 5908 // '{' StringLiteral
+ || lk == 16148 // '{' '$'
+ || lk == 16660 // '{' '%'
+ || lk == 17684 // '{' '('
+ || lk == 18196 // '{' '(#'
+ || lk == 20756 // '{' '+'
+ || lk == 21780 // '{' '-'
+ || lk == 22804 // '{' '.'
+ || lk == 23316 // '{' '..'
+ || lk == 23828 // '{' '/'
+ || lk == 24340 // '{' '//'
+ || lk == 27924 // '{' '<'
+ || lk == 28436 // '{' '<!--'
+ || lk == 30484 // '{' '<?'
+ || lk == 34068 // '{' '@'
+ || lk == 35092 // '{' '['
+ || lk == 36116 // '{' 'after'
+ || lk == 37140 // '{' 'allowing'
+ || lk == 37652 // '{' 'ancestor'
+ || lk == 38164 // '{' 'ancestor-or-self'
+ || lk == 38676 // '{' 'and'
+ || lk == 39700 // '{' 'append'
+ || lk == 40724 // '{' 'as'
+ || lk == 41236 // '{' 'ascending'
+ || lk == 41748 // '{' 'at'
+ || lk == 42260 // '{' 'attribute'
+ || lk == 42772 // '{' 'base-uri'
+ || lk == 43284 // '{' 'before'
+ || lk == 43796 // '{' 'boundary-space'
+ || lk == 44308 // '{' 'break'
+ || lk == 45332 // '{' 'case'
+ || lk == 45844 // '{' 'cast'
+ || lk == 46356 // '{' 'castable'
+ || lk == 46868 // '{' 'catch'
+ || lk == 47892 // '{' 'child'
+ || lk == 48404 // '{' 'collation'
+ || lk == 49428 // '{' 'comment'
+ || lk == 49940 // '{' 'constraint'
+ || lk == 50452 // '{' 'construction'
+ || lk == 51988 // '{' 'context'
+ || lk == 52500 // '{' 'continue'
+ || lk == 53012 // '{' 'copy'
+ || lk == 53524 // '{' 'copy-namespaces'
+ || lk == 54036 // '{' 'count'
+ || lk == 54548 // '{' 'decimal-format'
+ || lk == 55572 // '{' 'declare'
+ || lk == 56084 // '{' 'default'
+ || lk == 56596 // '{' 'delete'
+ || lk == 57108 // '{' 'descendant'
+ || lk == 57620 // '{' 'descendant-or-self'
+ || lk == 58132 // '{' 'descending'
+ || lk == 60692 // '{' 'div'
+ || lk == 61204 // '{' 'document'
+ || lk == 61716 // '{' 'document-node'
+ || lk == 62228 // '{' 'element'
+ || lk == 62740 // '{' 'else'
+ || lk == 63252 // '{' 'empty'
+ || lk == 63764 // '{' 'empty-sequence'
+ || lk == 64276 // '{' 'encoding'
+ || lk == 64788 // '{' 'end'
+ || lk == 65812 // '{' 'eq'
+ || lk == 66324 // '{' 'every'
+ || lk == 67348 // '{' 'except'
+ || lk == 67860 // '{' 'exit'
+ || lk == 68372 // '{' 'external'
+ || lk == 68884 // '{' 'first'
+ || lk == 69396 // '{' 'following'
+ || lk == 69908 // '{' 'following-sibling'
+ || lk == 70420 // '{' 'for'
+ || lk == 72468 // '{' 'ft-option'
+ || lk == 74516 // '{' 'function'
+ || lk == 75028 // '{' 'ge'
+ || lk == 76052 // '{' 'group'
+ || lk == 77076 // '{' 'gt'
+ || lk == 77588 // '{' 'idiv'
+ || lk == 78100 // '{' 'if'
+ || lk == 78612 // '{' 'import'
+ || lk == 79124 // '{' 'in'
+ || lk == 79636 // '{' 'index'
+ || lk == 81684 // '{' 'insert'
+ || lk == 82196 // '{' 'instance'
+ || lk == 82708 // '{' 'integrity'
+ || lk == 83220 // '{' 'intersect'
+ || lk == 83732 // '{' 'into'
+ || lk == 84244 // '{' 'is'
+ || lk == 84756 // '{' 'item'
+ || lk == 87316 // '{' 'last'
+ || lk == 87828 // '{' 'lax'
+ || lk == 88340 // '{' 'le'
+ || lk == 89364 // '{' 'let'
+ || lk == 90388 // '{' 'loop'
+ || lk == 91412 // '{' 'lt'
+ || lk == 92436 // '{' 'mod'
+ || lk == 92948 // '{' 'modify'
+ || lk == 93460 // '{' 'module'
+ || lk == 94484 // '{' 'namespace'
+ || lk == 94996 // '{' 'namespace-node'
+ || lk == 95508 // '{' 'ne'
+ || lk == 98068 // '{' 'node'
+ || lk == 98580 // '{' 'nodes'
+ || lk == 101652 // '{' 'only'
+ || lk == 102164 // '{' 'option'
+ || lk == 102676 // '{' 'or'
+ || lk == 103188 // '{' 'order'
+ || lk == 103700 // '{' 'ordered'
+ || lk == 104212 // '{' 'ordering'
+ || lk == 105748 // '{' 'parent'
+ || lk == 108820 // '{' 'preceding'
+ || lk == 109332 // '{' 'preceding-sibling'
+ || lk == 110868 // '{' 'processing-instruction'
+ || lk == 111892 // '{' 'rename'
+ || lk == 112404 // '{' 'replace'
+ || lk == 112916 // '{' 'return'
+ || lk == 113428 // '{' 'returning'
+ || lk == 113940 // '{' 'revalidation'
+ || lk == 114964 // '{' 'satisfies'
+ || lk == 115476 // '{' 'schema'
+ || lk == 115988 // '{' 'schema-attribute'
+ || lk == 116500 // '{' 'schema-element'
+ || lk == 117012 // '{' 'score'
+ || lk == 117524 // '{' 'self'
+ || lk == 120084 // '{' 'sliding'
+ || lk == 120596 // '{' 'some'
+ || lk == 121108 // '{' 'stable'
+ || lk == 121620 // '{' 'start'
+ || lk == 123156 // '{' 'strict'
+ || lk == 124692 // '{' 'switch'
+ || lk == 125204 // '{' 'text'
+ || lk == 127252 // '{' 'to'
+ || lk == 127764 // '{' 'treat'
+ || lk == 128276 // '{' 'try'
+ || lk == 128788 // '{' 'tumbling'
+ || lk == 129300 // '{' 'type'
+ || lk == 129812 // '{' 'typeswitch'
+ || lk == 130324 // '{' 'union'
+ || lk == 131348 // '{' 'unordered'
+ || lk == 131860 // '{' 'updating'
+ || lk == 133396 // '{' 'validate'
+ || lk == 133908 // '{' 'value'
+ || lk == 134420 // '{' 'variable'
+ || lk == 134932 // '{' 'version'
+ || lk == 136468 // '{' 'where'
+ || lk == 136980 // '{' 'while'
+ || lk == 138516 // '{' 'with'
+ || lk == 140564 // '{' 'xquery'
+ || lk == 141588 // '{' '{'
+ || lk == 142612 // '{' '{|'
+ || lk == 144660) // '{' '}'
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_BlockExpr();
+ lk = -10;
+ }
+ catch (p10A)
+ {
+ lk = -11;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(11, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ parse_Literal();
+ break;
+ case 31: // '$'
+ parse_VarRef();
+ break;
+ case 34: // '('
+ parse_ParenthesizedExpr();
+ break;
+ case 44: // '.'
+ parse_ContextItemExpr();
+ break;
+ case 17414: // EQName^Token '('
+ case 17478: // 'after' '('
+ case 17480: // 'allowing' '('
+ case 17481: // 'ancestor' '('
+ case 17482: // 'ancestor-or-self' '('
+ case 17483: // 'and' '('
+ case 17487: // 'as' '('
+ case 17488: // 'ascending' '('
+ case 17489: // 'at' '('
+ case 17491: // 'base-uri' '('
+ case 17492: // 'before' '('
+ case 17493: // 'boundary-space' '('
+ case 17494: // 'break' '('
+ case 17496: // 'case' '('
+ case 17497: // 'cast' '('
+ case 17498: // 'castable' '('
+ case 17499: // 'catch' '('
+ case 17501: // 'child' '('
+ case 17502: // 'collation' '('
+ case 17505: // 'constraint' '('
+ case 17506: // 'construction' '('
+ case 17509: // 'context' '('
+ case 17510: // 'continue' '('
+ case 17511: // 'copy' '('
+ case 17512: // 'copy-namespaces' '('
+ case 17513: // 'count' '('
+ case 17514: // 'decimal-format' '('
+ case 17516: // 'declare' '('
+ case 17517: // 'default' '('
+ case 17518: // 'delete' '('
+ case 17519: // 'descendant' '('
+ case 17520: // 'descendant-or-self' '('
+ case 17521: // 'descending' '('
+ case 17526: // 'div' '('
+ case 17527: // 'document' '('
+ case 17530: // 'else' '('
+ case 17531: // 'empty' '('
+ case 17533: // 'encoding' '('
+ case 17534: // 'end' '('
+ case 17536: // 'eq' '('
+ case 17537: // 'every' '('
+ case 17539: // 'except' '('
+ case 17540: // 'exit' '('
+ case 17541: // 'external' '('
+ case 17542: // 'first' '('
+ case 17543: // 'following' '('
+ case 17544: // 'following-sibling' '('
+ case 17545: // 'for' '('
+ case 17549: // 'ft-option' '('
+ case 17554: // 'ge' '('
+ case 17556: // 'group' '('
+ case 17558: // 'gt' '('
+ case 17559: // 'idiv' '('
+ case 17561: // 'import' '('
+ case 17562: // 'in' '('
+ case 17563: // 'index' '('
+ case 17567: // 'insert' '('
+ case 17568: // 'instance' '('
+ case 17569: // 'integrity' '('
+ case 17570: // 'intersect' '('
+ case 17571: // 'into' '('
+ case 17572: // 'is' '('
+ case 17578: // 'last' '('
+ case 17579: // 'lax' '('
+ case 17580: // 'le' '('
+ case 17582: // 'let' '('
+ case 17584: // 'loop' '('
+ case 17586: // 'lt' '('
+ case 17588: // 'mod' '('
+ case 17589: // 'modify' '('
+ case 17590: // 'module' '('
+ case 17592: // 'namespace' '('
+ case 17594: // 'ne' '('
+ case 17600: // 'nodes' '('
+ case 17606: // 'only' '('
+ case 17607: // 'option' '('
+ case 17608: // 'or' '('
+ case 17609: // 'order' '('
+ case 17610: // 'ordered' '('
+ case 17611: // 'ordering' '('
+ case 17614: // 'parent' '('
+ case 17620: // 'preceding' '('
+ case 17621: // 'preceding-sibling' '('
+ case 17626: // 'rename' '('
+ case 17627: // 'replace' '('
+ case 17628: // 'return' '('
+ case 17629: // 'returning' '('
+ case 17630: // 'revalidation' '('
+ case 17632: // 'satisfies' '('
+ case 17633: // 'schema' '('
+ case 17636: // 'score' '('
+ case 17637: // 'self' '('
+ case 17642: // 'sliding' '('
+ case 17643: // 'some' '('
+ case 17644: // 'stable' '('
+ case 17645: // 'start' '('
+ case 17648: // 'strict' '('
+ case 17656: // 'to' '('
+ case 17657: // 'treat' '('
+ case 17658: // 'try' '('
+ case 17659: // 'tumbling' '('
+ case 17660: // 'type' '('
+ case 17662: // 'union' '('
+ case 17664: // 'unordered' '('
+ case 17665: // 'updating' '('
+ case 17668: // 'validate' '('
+ case 17669: // 'value' '('
+ case 17670: // 'variable' '('
+ case 17671: // 'version' '('
+ case 17674: // 'where' '('
+ case 17675: // 'while' '('
+ case 17678: // 'with' '('
+ case 17682: // 'xquery' '('
+ parse_FunctionCall();
+ break;
+ case 141514: // 'ordered' '{'
+ parse_OrderedExpr();
+ break;
+ case 141568: // 'unordered' '{'
+ parse_UnorderedExpr();
+ break;
+ case 32: // '%'
+ case 120: // 'document-node'
+ case 124: // 'empty-sequence'
+ case 145: // 'function'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 14854: // EQName^Token '#'
+ case 14918: // 'after' '#'
+ case 14920: // 'allowing' '#'
+ case 14921: // 'ancestor' '#'
+ case 14922: // 'ancestor-or-self' '#'
+ case 14923: // 'and' '#'
+ case 14927: // 'as' '#'
+ case 14928: // 'ascending' '#'
+ case 14929: // 'at' '#'
+ case 14930: // 'attribute' '#'
+ case 14931: // 'base-uri' '#'
+ case 14932: // 'before' '#'
+ case 14933: // 'boundary-space' '#'
+ case 14934: // 'break' '#'
+ case 14936: // 'case' '#'
+ case 14937: // 'cast' '#'
+ case 14938: // 'castable' '#'
+ case 14939: // 'catch' '#'
+ case 14941: // 'child' '#'
+ case 14942: // 'collation' '#'
+ case 14944: // 'comment' '#'
+ case 14945: // 'constraint' '#'
+ case 14946: // 'construction' '#'
+ case 14949: // 'context' '#'
+ case 14950: // 'continue' '#'
+ case 14951: // 'copy' '#'
+ case 14952: // 'copy-namespaces' '#'
+ case 14953: // 'count' '#'
+ case 14954: // 'decimal-format' '#'
+ case 14956: // 'declare' '#'
+ case 14957: // 'default' '#'
+ case 14958: // 'delete' '#'
+ case 14959: // 'descendant' '#'
+ case 14960: // 'descendant-or-self' '#'
+ case 14961: // 'descending' '#'
+ case 14966: // 'div' '#'
+ case 14967: // 'document' '#'
+ case 14969: // 'element' '#'
+ case 14970: // 'else' '#'
+ case 14971: // 'empty' '#'
+ case 14973: // 'encoding' '#'
+ case 14974: // 'end' '#'
+ case 14976: // 'eq' '#'
+ case 14977: // 'every' '#'
+ case 14979: // 'except' '#'
+ case 14980: // 'exit' '#'
+ case 14981: // 'external' '#'
+ case 14982: // 'first' '#'
+ case 14983: // 'following' '#'
+ case 14984: // 'following-sibling' '#'
+ case 14985: // 'for' '#'
+ case 14989: // 'ft-option' '#'
+ case 14994: // 'ge' '#'
+ case 14996: // 'group' '#'
+ case 14998: // 'gt' '#'
+ case 14999: // 'idiv' '#'
+ case 15001: // 'import' '#'
+ case 15002: // 'in' '#'
+ case 15003: // 'index' '#'
+ case 15007: // 'insert' '#'
+ case 15008: // 'instance' '#'
+ case 15009: // 'integrity' '#'
+ case 15010: // 'intersect' '#'
+ case 15011: // 'into' '#'
+ case 15012: // 'is' '#'
+ case 15018: // 'last' '#'
+ case 15019: // 'lax' '#'
+ case 15020: // 'le' '#'
+ case 15022: // 'let' '#'
+ case 15024: // 'loop' '#'
+ case 15026: // 'lt' '#'
+ case 15028: // 'mod' '#'
+ case 15029: // 'modify' '#'
+ case 15030: // 'module' '#'
+ case 15032: // 'namespace' '#'
+ case 15034: // 'ne' '#'
+ case 15040: // 'nodes' '#'
+ case 15046: // 'only' '#'
+ case 15047: // 'option' '#'
+ case 15048: // 'or' '#'
+ case 15049: // 'order' '#'
+ case 15050: // 'ordered' '#'
+ case 15051: // 'ordering' '#'
+ case 15054: // 'parent' '#'
+ case 15060: // 'preceding' '#'
+ case 15061: // 'preceding-sibling' '#'
+ case 15064: // 'processing-instruction' '#'
+ case 15066: // 'rename' '#'
+ case 15067: // 'replace' '#'
+ case 15068: // 'return' '#'
+ case 15069: // 'returning' '#'
+ case 15070: // 'revalidation' '#'
+ case 15072: // 'satisfies' '#'
+ case 15073: // 'schema' '#'
+ case 15076: // 'score' '#'
+ case 15077: // 'self' '#'
+ case 15082: // 'sliding' '#'
+ case 15083: // 'some' '#'
+ case 15084: // 'stable' '#'
+ case 15085: // 'start' '#'
+ case 15088: // 'strict' '#'
+ case 15092: // 'text' '#'
+ case 15096: // 'to' '#'
+ case 15097: // 'treat' '#'
+ case 15098: // 'try' '#'
+ case 15099: // 'tumbling' '#'
+ case 15100: // 'type' '#'
+ case 15102: // 'union' '#'
+ case 15104: // 'unordered' '#'
+ case 15105: // 'updating' '#'
+ case 15108: // 'validate' '#'
+ case 15109: // 'value' '#'
+ case 15110: // 'variable' '#'
+ case 15111: // 'version' '#'
+ case 15114: // 'where' '#'
+ case 15115: // 'while' '#'
+ case 15118: // 'with' '#'
+ case 15122: // 'xquery' '#'
+ parse_FunctionItemExpr();
+ break;
+ case -10:
+ parse_BlockExpr();
+ break;
+ case -11:
+ parse_ObjectConstructor();
+ break;
+ case 68: // '['
+ parse_ArrayConstructor();
+ break;
+ case 278: // '{|'
+ parse_JSONSimpleObjectUnion();
+ break;
+ default:
+ parse_Constructor();
+ }
+ eventHandler.endNonterminal("PrimaryExpr", e0);
+ }
+
+ function try_PrimaryExpr()
+ {
+ switch (l1)
+ {
+ case 184: // 'namespace'
+ lookahead2W(258); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 216: // 'processing-instruction'
+ lookahead2W(257); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 276: // '{'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 82: // 'attribute'
+ case 121: // 'element'
+ lookahead2W(254); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 96: // 'comment'
+ case 244: // 'text'
+ lookahead2W(93); // S^WS | '#' | '(:' | '{'
+ break;
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 256: // 'unordered'
+ lookahead2W(139); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 75: // 'and'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 86: // 'break'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 93: // 'child'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 102: // 'continue'
+ case 103: // 'copy'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 110: // 'delete'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 129: // 'every'
+ case 131: // 'except'
+ case 132: // 'exit'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 137: // 'for'
+ case 141: // 'ft-option'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 159: // 'insert'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 174: // 'let'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 186: // 'ne'
+ case 192: // 'nodes'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 218: // 'rename'
+ case 219: // 'replace'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 228: // 'score'
+ case 229: // 'self'
+ case 234: // 'sliding'
+ case 235: // 'some'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 250: // 'try'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 260: // 'validate'
+ case 261: // 'value'
+ case 262: // 'variable'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(92); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 2836 // '{' Wildcard
+ || lk == 3348 // '{' EQName^Token
+ || lk == 4372 // '{' IntegerLiteral
+ || lk == 4884 // '{' DecimalLiteral
+ || lk == 5396 // '{' DoubleLiteral
+ || lk == 5908 // '{' StringLiteral
+ || lk == 16148 // '{' '$'
+ || lk == 16660 // '{' '%'
+ || lk == 17684 // '{' '('
+ || lk == 18196 // '{' '(#'
+ || lk == 20756 // '{' '+'
+ || lk == 21780 // '{' '-'
+ || lk == 22804 // '{' '.'
+ || lk == 23316 // '{' '..'
+ || lk == 23828 // '{' '/'
+ || lk == 24340 // '{' '//'
+ || lk == 27924 // '{' '<'
+ || lk == 28436 // '{' '<!--'
+ || lk == 30484 // '{' '<?'
+ || lk == 34068 // '{' '@'
+ || lk == 35092 // '{' '['
+ || lk == 36116 // '{' 'after'
+ || lk == 37140 // '{' 'allowing'
+ || lk == 37652 // '{' 'ancestor'
+ || lk == 38164 // '{' 'ancestor-or-self'
+ || lk == 38676 // '{' 'and'
+ || lk == 39700 // '{' 'append'
+ || lk == 40724 // '{' 'as'
+ || lk == 41236 // '{' 'ascending'
+ || lk == 41748 // '{' 'at'
+ || lk == 42260 // '{' 'attribute'
+ || lk == 42772 // '{' 'base-uri'
+ || lk == 43284 // '{' 'before'
+ || lk == 43796 // '{' 'boundary-space'
+ || lk == 44308 // '{' 'break'
+ || lk == 45332 // '{' 'case'
+ || lk == 45844 // '{' 'cast'
+ || lk == 46356 // '{' 'castable'
+ || lk == 46868 // '{' 'catch'
+ || lk == 47892 // '{' 'child'
+ || lk == 48404 // '{' 'collation'
+ || lk == 49428 // '{' 'comment'
+ || lk == 49940 // '{' 'constraint'
+ || lk == 50452 // '{' 'construction'
+ || lk == 51988 // '{' 'context'
+ || lk == 52500 // '{' 'continue'
+ || lk == 53012 // '{' 'copy'
+ || lk == 53524 // '{' 'copy-namespaces'
+ || lk == 54036 // '{' 'count'
+ || lk == 54548 // '{' 'decimal-format'
+ || lk == 55572 // '{' 'declare'
+ || lk == 56084 // '{' 'default'
+ || lk == 56596 // '{' 'delete'
+ || lk == 57108 // '{' 'descendant'
+ || lk == 57620 // '{' 'descendant-or-self'
+ || lk == 58132 // '{' 'descending'
+ || lk == 60692 // '{' 'div'
+ || lk == 61204 // '{' 'document'
+ || lk == 61716 // '{' 'document-node'
+ || lk == 62228 // '{' 'element'
+ || lk == 62740 // '{' 'else'
+ || lk == 63252 // '{' 'empty'
+ || lk == 63764 // '{' 'empty-sequence'
+ || lk == 64276 // '{' 'encoding'
+ || lk == 64788 // '{' 'end'
+ || lk == 65812 // '{' 'eq'
+ || lk == 66324 // '{' 'every'
+ || lk == 67348 // '{' 'except'
+ || lk == 67860 // '{' 'exit'
+ || lk == 68372 // '{' 'external'
+ || lk == 68884 // '{' 'first'
+ || lk == 69396 // '{' 'following'
+ || lk == 69908 // '{' 'following-sibling'
+ || lk == 70420 // '{' 'for'
+ || lk == 72468 // '{' 'ft-option'
+ || lk == 74516 // '{' 'function'
+ || lk == 75028 // '{' 'ge'
+ || lk == 76052 // '{' 'group'
+ || lk == 77076 // '{' 'gt'
+ || lk == 77588 // '{' 'idiv'
+ || lk == 78100 // '{' 'if'
+ || lk == 78612 // '{' 'import'
+ || lk == 79124 // '{' 'in'
+ || lk == 79636 // '{' 'index'
+ || lk == 81684 // '{' 'insert'
+ || lk == 82196 // '{' 'instance'
+ || lk == 82708 // '{' 'integrity'
+ || lk == 83220 // '{' 'intersect'
+ || lk == 83732 // '{' 'into'
+ || lk == 84244 // '{' 'is'
+ || lk == 84756 // '{' 'item'
+ || lk == 87316 // '{' 'last'
+ || lk == 87828 // '{' 'lax'
+ || lk == 88340 // '{' 'le'
+ || lk == 89364 // '{' 'let'
+ || lk == 90388 // '{' 'loop'
+ || lk == 91412 // '{' 'lt'
+ || lk == 92436 // '{' 'mod'
+ || lk == 92948 // '{' 'modify'
+ || lk == 93460 // '{' 'module'
+ || lk == 94484 // '{' 'namespace'
+ || lk == 94996 // '{' 'namespace-node'
+ || lk == 95508 // '{' 'ne'
+ || lk == 98068 // '{' 'node'
+ || lk == 98580 // '{' 'nodes'
+ || lk == 101652 // '{' 'only'
+ || lk == 102164 // '{' 'option'
+ || lk == 102676 // '{' 'or'
+ || lk == 103188 // '{' 'order'
+ || lk == 103700 // '{' 'ordered'
+ || lk == 104212 // '{' 'ordering'
+ || lk == 105748 // '{' 'parent'
+ || lk == 108820 // '{' 'preceding'
+ || lk == 109332 // '{' 'preceding-sibling'
+ || lk == 110868 // '{' 'processing-instruction'
+ || lk == 111892 // '{' 'rename'
+ || lk == 112404 // '{' 'replace'
+ || lk == 112916 // '{' 'return'
+ || lk == 113428 // '{' 'returning'
+ || lk == 113940 // '{' 'revalidation'
+ || lk == 114964 // '{' 'satisfies'
+ || lk == 115476 // '{' 'schema'
+ || lk == 115988 // '{' 'schema-attribute'
+ || lk == 116500 // '{' 'schema-element'
+ || lk == 117012 // '{' 'score'
+ || lk == 117524 // '{' 'self'
+ || lk == 120084 // '{' 'sliding'
+ || lk == 120596 // '{' 'some'
+ || lk == 121108 // '{' 'stable'
+ || lk == 121620 // '{' 'start'
+ || lk == 123156 // '{' 'strict'
+ || lk == 124692 // '{' 'switch'
+ || lk == 125204 // '{' 'text'
+ || lk == 127252 // '{' 'to'
+ || lk == 127764 // '{' 'treat'
+ || lk == 128276 // '{' 'try'
+ || lk == 128788 // '{' 'tumbling'
+ || lk == 129300 // '{' 'type'
+ || lk == 129812 // '{' 'typeswitch'
+ || lk == 130324 // '{' 'union'
+ || lk == 131348 // '{' 'unordered'
+ || lk == 131860 // '{' 'updating'
+ || lk == 133396 // '{' 'validate'
+ || lk == 133908 // '{' 'value'
+ || lk == 134420 // '{' 'variable'
+ || lk == 134932 // '{' 'version'
+ || lk == 136468 // '{' 'where'
+ || lk == 136980 // '{' 'while'
+ || lk == 138516 // '{' 'with'
+ || lk == 140564 // '{' 'xquery'
+ || lk == 141588 // '{' '{'
+ || lk == 142612 // '{' '{|'
+ || lk == 144660) // '{' '}'
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_BlockExpr();
+ lk = -10;
+ }
+ catch (p10A)
+ {
+ lk = -11;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(11, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ try_Literal();
+ break;
+ case 31: // '$'
+ try_VarRef();
+ break;
+ case 34: // '('
+ try_ParenthesizedExpr();
+ break;
+ case 44: // '.'
+ try_ContextItemExpr();
+ break;
+ case 17414: // EQName^Token '('
+ case 17478: // 'after' '('
+ case 17480: // 'allowing' '('
+ case 17481: // 'ancestor' '('
+ case 17482: // 'ancestor-or-self' '('
+ case 17483: // 'and' '('
+ case 17487: // 'as' '('
+ case 17488: // 'ascending' '('
+ case 17489: // 'at' '('
+ case 17491: // 'base-uri' '('
+ case 17492: // 'before' '('
+ case 17493: // 'boundary-space' '('
+ case 17494: // 'break' '('
+ case 17496: // 'case' '('
+ case 17497: // 'cast' '('
+ case 17498: // 'castable' '('
+ case 17499: // 'catch' '('
+ case 17501: // 'child' '('
+ case 17502: // 'collation' '('
+ case 17505: // 'constraint' '('
+ case 17506: // 'construction' '('
+ case 17509: // 'context' '('
+ case 17510: // 'continue' '('
+ case 17511: // 'copy' '('
+ case 17512: // 'copy-namespaces' '('
+ case 17513: // 'count' '('
+ case 17514: // 'decimal-format' '('
+ case 17516: // 'declare' '('
+ case 17517: // 'default' '('
+ case 17518: // 'delete' '('
+ case 17519: // 'descendant' '('
+ case 17520: // 'descendant-or-self' '('
+ case 17521: // 'descending' '('
+ case 17526: // 'div' '('
+ case 17527: // 'document' '('
+ case 17530: // 'else' '('
+ case 17531: // 'empty' '('
+ case 17533: // 'encoding' '('
+ case 17534: // 'end' '('
+ case 17536: // 'eq' '('
+ case 17537: // 'every' '('
+ case 17539: // 'except' '('
+ case 17540: // 'exit' '('
+ case 17541: // 'external' '('
+ case 17542: // 'first' '('
+ case 17543: // 'following' '('
+ case 17544: // 'following-sibling' '('
+ case 17545: // 'for' '('
+ case 17549: // 'ft-option' '('
+ case 17554: // 'ge' '('
+ case 17556: // 'group' '('
+ case 17558: // 'gt' '('
+ case 17559: // 'idiv' '('
+ case 17561: // 'import' '('
+ case 17562: // 'in' '('
+ case 17563: // 'index' '('
+ case 17567: // 'insert' '('
+ case 17568: // 'instance' '('
+ case 17569: // 'integrity' '('
+ case 17570: // 'intersect' '('
+ case 17571: // 'into' '('
+ case 17572: // 'is' '('
+ case 17578: // 'last' '('
+ case 17579: // 'lax' '('
+ case 17580: // 'le' '('
+ case 17582: // 'let' '('
+ case 17584: // 'loop' '('
+ case 17586: // 'lt' '('
+ case 17588: // 'mod' '('
+ case 17589: // 'modify' '('
+ case 17590: // 'module' '('
+ case 17592: // 'namespace' '('
+ case 17594: // 'ne' '('
+ case 17600: // 'nodes' '('
+ case 17606: // 'only' '('
+ case 17607: // 'option' '('
+ case 17608: // 'or' '('
+ case 17609: // 'order' '('
+ case 17610: // 'ordered' '('
+ case 17611: // 'ordering' '('
+ case 17614: // 'parent' '('
+ case 17620: // 'preceding' '('
+ case 17621: // 'preceding-sibling' '('
+ case 17626: // 'rename' '('
+ case 17627: // 'replace' '('
+ case 17628: // 'return' '('
+ case 17629: // 'returning' '('
+ case 17630: // 'revalidation' '('
+ case 17632: // 'satisfies' '('
+ case 17633: // 'schema' '('
+ case 17636: // 'score' '('
+ case 17637: // 'self' '('
+ case 17642: // 'sliding' '('
+ case 17643: // 'some' '('
+ case 17644: // 'stable' '('
+ case 17645: // 'start' '('
+ case 17648: // 'strict' '('
+ case 17656: // 'to' '('
+ case 17657: // 'treat' '('
+ case 17658: // 'try' '('
+ case 17659: // 'tumbling' '('
+ case 17660: // 'type' '('
+ case 17662: // 'union' '('
+ case 17664: // 'unordered' '('
+ case 17665: // 'updating' '('
+ case 17668: // 'validate' '('
+ case 17669: // 'value' '('
+ case 17670: // 'variable' '('
+ case 17671: // 'version' '('
+ case 17674: // 'where' '('
+ case 17675: // 'while' '('
+ case 17678: // 'with' '('
+ case 17682: // 'xquery' '('
+ try_FunctionCall();
+ break;
+ case 141514: // 'ordered' '{'
+ try_OrderedExpr();
+ break;
+ case 141568: // 'unordered' '{'
+ try_UnorderedExpr();
+ break;
+ case 32: // '%'
+ case 120: // 'document-node'
+ case 124: // 'empty-sequence'
+ case 145: // 'function'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 14854: // EQName^Token '#'
+ case 14918: // 'after' '#'
+ case 14920: // 'allowing' '#'
+ case 14921: // 'ancestor' '#'
+ case 14922: // 'ancestor-or-self' '#'
+ case 14923: // 'and' '#'
+ case 14927: // 'as' '#'
+ case 14928: // 'ascending' '#'
+ case 14929: // 'at' '#'
+ case 14930: // 'attribute' '#'
+ case 14931: // 'base-uri' '#'
+ case 14932: // 'before' '#'
+ case 14933: // 'boundary-space' '#'
+ case 14934: // 'break' '#'
+ case 14936: // 'case' '#'
+ case 14937: // 'cast' '#'
+ case 14938: // 'castable' '#'
+ case 14939: // 'catch' '#'
+ case 14941: // 'child' '#'
+ case 14942: // 'collation' '#'
+ case 14944: // 'comment' '#'
+ case 14945: // 'constraint' '#'
+ case 14946: // 'construction' '#'
+ case 14949: // 'context' '#'
+ case 14950: // 'continue' '#'
+ case 14951: // 'copy' '#'
+ case 14952: // 'copy-namespaces' '#'
+ case 14953: // 'count' '#'
+ case 14954: // 'decimal-format' '#'
+ case 14956: // 'declare' '#'
+ case 14957: // 'default' '#'
+ case 14958: // 'delete' '#'
+ case 14959: // 'descendant' '#'
+ case 14960: // 'descendant-or-self' '#'
+ case 14961: // 'descending' '#'
+ case 14966: // 'div' '#'
+ case 14967: // 'document' '#'
+ case 14969: // 'element' '#'
+ case 14970: // 'else' '#'
+ case 14971: // 'empty' '#'
+ case 14973: // 'encoding' '#'
+ case 14974: // 'end' '#'
+ case 14976: // 'eq' '#'
+ case 14977: // 'every' '#'
+ case 14979: // 'except' '#'
+ case 14980: // 'exit' '#'
+ case 14981: // 'external' '#'
+ case 14982: // 'first' '#'
+ case 14983: // 'following' '#'
+ case 14984: // 'following-sibling' '#'
+ case 14985: // 'for' '#'
+ case 14989: // 'ft-option' '#'
+ case 14994: // 'ge' '#'
+ case 14996: // 'group' '#'
+ case 14998: // 'gt' '#'
+ case 14999: // 'idiv' '#'
+ case 15001: // 'import' '#'
+ case 15002: // 'in' '#'
+ case 15003: // 'index' '#'
+ case 15007: // 'insert' '#'
+ case 15008: // 'instance' '#'
+ case 15009: // 'integrity' '#'
+ case 15010: // 'intersect' '#'
+ case 15011: // 'into' '#'
+ case 15012: // 'is' '#'
+ case 15018: // 'last' '#'
+ case 15019: // 'lax' '#'
+ case 15020: // 'le' '#'
+ case 15022: // 'let' '#'
+ case 15024: // 'loop' '#'
+ case 15026: // 'lt' '#'
+ case 15028: // 'mod' '#'
+ case 15029: // 'modify' '#'
+ case 15030: // 'module' '#'
+ case 15032: // 'namespace' '#'
+ case 15034: // 'ne' '#'
+ case 15040: // 'nodes' '#'
+ case 15046: // 'only' '#'
+ case 15047: // 'option' '#'
+ case 15048: // 'or' '#'
+ case 15049: // 'order' '#'
+ case 15050: // 'ordered' '#'
+ case 15051: // 'ordering' '#'
+ case 15054: // 'parent' '#'
+ case 15060: // 'preceding' '#'
+ case 15061: // 'preceding-sibling' '#'
+ case 15064: // 'processing-instruction' '#'
+ case 15066: // 'rename' '#'
+ case 15067: // 'replace' '#'
+ case 15068: // 'return' '#'
+ case 15069: // 'returning' '#'
+ case 15070: // 'revalidation' '#'
+ case 15072: // 'satisfies' '#'
+ case 15073: // 'schema' '#'
+ case 15076: // 'score' '#'
+ case 15077: // 'self' '#'
+ case 15082: // 'sliding' '#'
+ case 15083: // 'some' '#'
+ case 15084: // 'stable' '#'
+ case 15085: // 'start' '#'
+ case 15088: // 'strict' '#'
+ case 15092: // 'text' '#'
+ case 15096: // 'to' '#'
+ case 15097: // 'treat' '#'
+ case 15098: // 'try' '#'
+ case 15099: // 'tumbling' '#'
+ case 15100: // 'type' '#'
+ case 15102: // 'union' '#'
+ case 15104: // 'unordered' '#'
+ case 15105: // 'updating' '#'
+ case 15108: // 'validate' '#'
+ case 15109: // 'value' '#'
+ case 15110: // 'variable' '#'
+ case 15111: // 'version' '#'
+ case 15114: // 'where' '#'
+ case 15115: // 'while' '#'
+ case 15118: // 'with' '#'
+ case 15122: // 'xquery' '#'
+ try_FunctionItemExpr();
+ break;
+ case -10:
+ try_BlockExpr();
+ break;
+ case -11:
+ try_ObjectConstructor();
+ break;
+ case 68: // '['
+ try_ArrayConstructor();
+ break;
+ case 278: // '{|'
+ try_JSONSimpleObjectUnion();
+ break;
+ default:
+ try_Constructor();
+ }
+ }
+
+ function parse_JSONSimpleObjectUnion()
+ {
+ eventHandler.startNonterminal("JSONSimpleObjectUnion", e0);
+ shift(278); // '{|'
+ lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 281) // '|}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(281); // '|}'
+ eventHandler.endNonterminal("JSONSimpleObjectUnion", e0);
+ }
+
+ function try_JSONSimpleObjectUnion()
+ {
+ shiftT(278); // '{|'
+ lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 281) // '|}'
+ {
+ try_Expr();
+ }
+ shiftT(281); // '|}'
+ }
+
+ function parse_ObjectConstructor()
+ {
+ eventHandler.startNonterminal("ObjectConstructor", e0);
+ shift(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PairConstructor();
+ }
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("ObjectConstructor", e0);
+ }
+
+ function try_ObjectConstructor()
+ {
+ shiftT(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ try_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_PairConstructor();
+ }
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_PairConstructor()
+ {
+ eventHandler.startNonterminal("PairConstructor", e0);
+ parse_ExprSingle();
+ shift(49); // ':'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("PairConstructor", e0);
+ }
+
+ function try_PairConstructor()
+ {
+ try_ExprSingle();
+ shiftT(49); // ':'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_ArrayConstructor()
+ {
+ eventHandler.startNonterminal("ArrayConstructor", e0);
+ shift(68); // '['
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 69) // ']'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(69); // ']'
+ eventHandler.endNonterminal("ArrayConstructor", e0);
+ }
+
+ function try_ArrayConstructor()
+ {
+ shiftT(68); // '['
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 69) // ']'
+ {
+ try_Expr();
+ }
+ shiftT(69); // ']'
+ }
+
+ function parse_BlockExpr()
+ {
+ eventHandler.startNonterminal("BlockExpr", e0);
+ shift(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("BlockExpr", e0);
+ }
+
+ function try_BlockExpr()
+ {
+ shiftT(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StatementsAndOptionalExpr();
+ shiftT(282); // '}'
+ }
+
+ function parse_FunctionDecl()
+ {
+ eventHandler.startNonterminal("FunctionDecl", e0);
+ shift(145); // 'function'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(94); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ whitespace();
+ parse_ParamList();
+ }
+ shift(37); // ')'
+ lookahead1W(148); // S^WS | '(:' | 'as' | 'external' | '{'
+ if (l1 == 79) // 'as'
+ {
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ lookahead1W(118); // S^WS | '(:' | 'external' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(282); // '}'
+ break;
+ default:
+ shift(133); // 'external'
+ }
+ eventHandler.endNonterminal("FunctionDecl", e0);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var l2, b2, e2;
+ var bx, ex, sx, lx, tx;
+ var memo;
+ var eventHandler;
+
+ function memoize(i, e, v)
+ {
+ memo[(e << 4) + i] = v;
+ }
+
+ function memoized(i, e)
+ {
+ var v = memo[(e << 4) + i];
+ return typeof v != "undefined" ? v : 0;
+ }
+
+ function error(b, e, s, l, t)
+ {
+ if (e > ex)
+ {
+ bx = b;
+ ex = e;
+ sx = s;
+ lx = l;
+ tx = t;
+ }
+ throw new ParseException(bx, ex, sx, lx, tx);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(XQueryParser.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = l2; if (l1 != 0) {
+ b1 = b2; e1 = e2; l2 = 0; }
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function shiftT(t)
+ {
+ if (l1 == t)
+ {
+ b0 = b1; e0 = e1; l1 = l2; if (l1 != 0) {
+ b1 = b2; e1 = e2; l2 = 0; }
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function skip(code)
+ {
+ var b0W = b0; var e0W = e0; var l1W = l1;
+ var b1W = b1; var e1W = e1;
+
+ l1 = code; b1 = begin; e1 = end;
+ l2 = 0;
+
+ try_Whitespace();
+
+ b0 = b0W; e0 = e0W; l1 = l1W; if (l1 != 0) {
+ b1 = b1W; e1 = e1W; }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 22) // S^WS
+ {
+ if (code != 36) // '(:'
+ {
+ break;
+ }
+ skip(code);
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead2W(set)
+ {
+ if (l2 == 0)
+ {
+ l2 = matchW(set);
+ b2 = begin;
+ e2 = end;
+ }
+ lk = (l2 << 9) | l1;
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead2(set)
+ {
+ if (l2 == 0)
+ {
+ l2 = match(set);
+ b2 = begin;
+ e2 = end;
+ }
+ lk = (l2 << 9) | l1;
+ }
+
+ var input;
+ var size;
+ var begin;
+ var end;
+ var state;
+
+ function match(tokenset)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = XQueryParser.INITIAL[tokenset];
+
+ for (var code = result & 4095; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = XQueryParser.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ var c2 = c1 >> 5;
+ charclass = XQueryParser.MAP1[(c0 & 15) + XQueryParser.MAP1[(c1 & 31) + XQueryParser.MAP1[c2]]];
+ }
+ else
+ {
+ if (c0 < 0xdc00)
+ {
+ var c1 = current < size ? input.charCodeAt(current) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000)
+ {
+ ++current;
+ c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000;
+ nonbmp = true;
+ }
+ }
+ var lo = 0, hi = 5;
+ for (var m = 3; ; m = (hi + lo) >> 1)
+ {
+ if (XQueryParser.MAP2[m] > c0) hi = m - 1;
+ else if (XQueryParser.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = XQueryParser.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 12) + code - 1;
+ var i1 = i0 >> 4;
+ code = XQueryParser.TRANSITION[(i0 & 15) + XQueryParser.TRANSITION[i1]];
+
+ if (code > 4095)
+ {
+ result = code;
+ code &= 4095;
+ end = current;
+ }
+ }
+
+ result >>= 12;
+ if (result == 0)
+ {
+ end = current - 1;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ error(begin, end, state, -1, -1);
+ }
+
+ if (nonbmp)
+ {
+ for (var i = result >> 9; i > 0; --i)
+ {
+ --end;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ }
+ }
+ else
+ {
+ end -= result >> 9;
+ }
+
+ return (result & 511) - 1;
+ }
+
+ function getExpectedTokenSet(s)
+ {
+ var set = new Array;
+ if (s > 0)
+ {
+ for (var i = 0; i < 284; i += 32)
+ {
+ var j = i;
+ for (var f = ec(i >>> 5, s); f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set[set.length] = XQueryParser.TOKEN[j];
+ }
+ }
+ }
+ }
+ return set;
+ }
+
+ function ec(t, s)
+ {
+ var i0 = t * 3121 + s - 1;
+ var i1 = i0 >> 1;
+ var i2 = i1 >> 2;
+ var i3 = i2 >> 2;
+ return XQueryParser.EXPECTED[(i0 & 1) + XQueryParser.EXPECTED[(i1 & 3) + XQueryParser.EXPECTED[(i2 & 3) + XQueryParser.EXPECTED[i3]]]];
+ }
+}
+
+XQueryParser.MAP0 =
+[ 70, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 26, 30, 30, 30, 30, 30, 31, 32, 33, 30, 30, 34, 30, 30, 35, 30, 30, 30, 36, 30, 30, 37, 38, 39, 38, 30, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 38, 38
+];
+
+XQueryParser.MAP1 =
+[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 355, 371, 387, 423, 423, 423, 415, 339, 331, 339, 331, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 440, 440, 440, 440, 440, 440, 440, 324, 339, 339, 339, 339, 339, 339, 339, 339, 401, 423, 423, 424, 422, 423, 423, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 338, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 423, 70, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 26, 30, 30, 30, 30, 30, 31, 32, 33, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 38, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 34, 30, 30, 35, 30, 30, 30, 36, 30, 30, 37, 38, 39, 38, 30, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 30, 30, 38, 38, 38, 38, 38, 38, 38, 69, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69
+];
+
+XQueryParser.MAP2 =
+[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 38, 30, 38, 30, 30, 38
+];
+
+XQueryParser.INITIAL =
+[ 1, 12290, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284
+];
+
+XQueryParser.TRANSITION =
+[ 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19001, 18176, 18196, 18196, 18196, 18203, 18196, 18196, 18196, 18196, 18228, 18196, 18196, 18196, 18196, 18219, 18196, 18180, 45874, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 31351, 45726, 18265, 18278, 18290, 18302, 19964, 45732, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 45156, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21127, 19964, 18325, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18777, 18342, 19964, 19964, 19964, 21208, 19964, 19964, 18309, 18473, 18361, 19964, 19964, 19964, 19964, 19964, 18398, 18411, 29735, 19964, 19964, 19964, 21659, 19964, 19964, 45481, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 27311, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18551, 18499, 19964, 19964, 19964, 34351, 19964, 19964, 37600, 19964, 31351, 46136, 18442, 18467, 18458, 18489, 18520, 18539, 28425, 19964, 19964, 19964, 21891, 19964, 19964, 20611, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 36458, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18578, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18597, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 46372, 19964, 19964, 19964, 20465, 46377, 19964, 41089, 19964, 18616, 38671, 18647, 19964, 18654, 19964, 18670, 18683, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 18711, 19964, 19964, 19964, 31011, 19964, 19964, 18730, 19964, 19964, 18752, 18765, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 34247, 19964, 19964, 19964, 19964, 19964, 19964, 19586, 29775, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 27304, 19964, 19964, 19964, 19964, 19964, 19964, 21693, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18824, 18793, 19964, 19964, 19964, 38821, 19964, 19964, 20128, 18736, 21058, 19964, 19964, 19964, 19964, 19964, 19122, 18812, 33767, 19964, 19964, 19964, 21659, 19964, 19964, 40887, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20125, 45886, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18695, 18855, 18930, 18930, 18930, 18862, 18925, 18930, 18935, 18897, 18840, 18960, 18878, 18891, 18913, 18951, 18976, 18989, 28425, 19964, 19964, 19964, 25695, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19017, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19068, 19964, 19964, 19964, 20208, 46487, 19964, 32563, 46493, 31351, 19067, 19964, 19038, 19044, 19060, 19084, 19094, 19110, 19964, 19964, 19964, 22936, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19582, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 45342, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 41222, 43119, 31656, 19167, 19153, 19170, 19138, 37787, 19186, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 40483, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 42610, 43332, 46180, 19227, 19247, 19227, 19261, 46180, 19231, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 33222, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19318, 19964, 19964, 19964, 19576, 19284, 19964, 36109, 19314, 43835, 19334, 19394, 19399, 19399, 19415, 19964, 19346, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19438, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 31351, 34760, 19461, 19481, 19461, 19495, 34760, 19465, 19518, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 19569, 19964, 19602, 19964, 18244, 19623, 33222, 24460, 19964, 19964, 19964, 19964, 21509, 38487, 19689, 19689, 35856, 25105, 31245, 19840, 22099, 38220, 22099, 35266, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 20458, 19648, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 33491, 38998, 19964, 19964, 19964, 19964, 32536, 19964, 19964, 41799, 19688, 19689, 19689, 24898, 24115, 31245, 31245, 31245, 30352, 42412, 22099, 22099, 22099, 32147, 28013, 19964, 19964, 19964, 19964, 19706, 19964, 24619, 35625, 19689, 19689, 31245, 19725, 31245, 22445, 22098, 39548, 22099, 24525, 29188, 19964, 19964, 19747, 19964, 34033, 19689, 19689, 19763, 31245, 46092, 41840, 22099, 29852, 41849, 41022, 19964, 39646, 19781, 38245, 19689, 23346, 19798, 31246, 45980, 22099, 41851, 19820, 45624, 40465, 29413, 42651, 19837, 41008, 24524, 29192, 19856, 33899, 37333, 41452, 26125, 19875, 27999, 19921, 19950, 44584, 26552, 35261, 31427, 28114, 24594, 31424, 27393, 19981, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 24196, 31351, 19964, 19964, 19964, 19964, 19964, 20354, 20367, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 20056, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 20076, 19569, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21509, 19689, 19689, 19689, 35856, 31245, 31245, 19840, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 20121, 19964, 19964, 19964, 20510, 19964, 19964, 19964, 19964, 31351, 44933, 20144, 20167, 20189, 20201, 44934, 20151, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 46401, 19964, 27585, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 20224, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 45386, 31351, 19964, 19964, 19964, 19964, 19964, 44638, 44651, 20241, 19964, 19964, 19964, 21659, 19964, 19964, 20277, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 20297, 19569, 19964, 19964, 19964, 18244, 19964, 36130, 20322, 19964, 19964, 19964, 19964, 21509, 19689, 19689, 19689, 35856, 31245, 31245, 19840, 22099, 22099, 22099, 46221, 29320, 20340, 19964, 19964, 19964, 19964, 19964, 45613, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 27760, 20400, 19964, 19964, 19964, 19964, 24238, 19964, 19964, 37831, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 27708, 22099, 22099, 22099, 22099, 29314, 38958, 19964, 19964, 19964, 19964, 19964, 24848, 20426, 19689, 19689, 19689, 31245, 31245, 31245, 41537, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 39358, 19689, 19689, 23346, 31245, 31245, 41141, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 20173, 19964, 19964, 19964, 23706, 26163, 19964, 19964, 20444, 31351, 30193, 34344, 20481, 20487, 20503, 19964, 34441, 20526, 19964, 19964, 19964, 25957, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 22290, 41429, 19964, 20563, 20568, 20916, 20584, 19964, 19964, 19964, 20606, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21426, 41428, 41428, 41428, 20925, 19964, 19964, 20680, 20857, 20857, 20857, 20568, 20633, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 41425, 41428, 41428, 41428, 41428, 20925, 19964, 19964, 19964, 19964, 20854, 20857, 20857, 20857, 20857, 20627, 20649, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 41428, 41428, 41428, 41428, 21433, 19964, 19964, 19964, 19964, 35582, 20857, 20857, 20857, 20857, 20627, 20649, 19964, 19964, 19964, 19964, 19964, 19964, 22294, 41428, 41428, 41428, 19964, 19964, 19964, 19964, 20856, 20857, 20857, 20715, 20671, 19964, 19964, 19964, 19964, 20774, 41428, 41428, 21434, 19964, 19964, 35581, 20857, 20857, 20696, 20678, 19964, 19964, 19964, 41425, 41428, 21434, 19964, 20225, 20857, 20857, 20698, 19964, 19964, 20773, 41428, 21436, 19964, 20855, 20714, 20675, 20771, 41428, 19964, 20855, 20731, 41419, 21435, 35583, 20758, 22293, 20922, 20853, 20793, 20821, 35581, 20790, 20820, 35581, 20809, 20847, 20837, 20873, 20903, 20889, 20679, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 43187, 19964, 19964, 19964, 19576, 20948, 19964, 19964, 20943, 42771, 20964, 20972, 20972, 20972, 20988, 19964, 21011, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 36571, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 32413, 21048, 19964, 19964, 19964, 19964, 21074, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 34295, 19964, 19964, 19964, 19964, 19964, 29197, 38974, 19964, 19964, 19964, 19964, 19964, 19964, 25279, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24951, 19964, 19964, 19964, 19964, 19964, 41032, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 40905, 46341, 21094, 21094, 21094, 21103, 27774, 27787, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 46434, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21126, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19358, 37044, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 31351, 19292, 21143, 21143, 21143, 21152, 19964, 19298, 28480, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 37776, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21175, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19198, 19207, 19964, 19964, 19964, 21159, 19964, 19964, 19964, 19964, 31351, 26133, 21192, 21192, 21192, 21201, 19964, 26139, 21224, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 45503, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 26197, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 34881, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21288, 19964, 19964, 19964, 19964, 19576, 21238, 19964, 19964, 37291, 44678, 19964, 19964, 19964, 21242, 21258, 37290, 21276, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 20261, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 36778, 19964, 21304, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 19964, 45431, 21321, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 37450, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 25067, 21387, 19964, 19964, 19964, 19964, 24238, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 38958, 19964, 19964, 19964, 42019, 19964, 19964, 20426, 19689, 19689, 19689, 31245, 31245, 31245, 25364, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 39358, 19689, 19689, 23346, 31245, 31245, 41141, 22099, 22099, 41849, 29195, 19964, 38814, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 37450, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 25067, 21387, 19964, 19964, 19964, 19964, 24238, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 38958, 19964, 19964, 19964, 19964, 19964, 19964, 20426, 19689, 19689, 19689, 31245, 31245, 31245, 25364, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 39358, 19689, 19689, 23346, 31245, 31245, 41141, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 37450, 37683, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 25067, 21387, 19964, 19964, 19964, 19964, 24238, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 38958, 19964, 19964, 19964, 19964, 19964, 19964, 20426, 19689, 19689, 19689, 31245, 31245, 31245, 25364, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 39358, 19689, 19689, 23346, 31245, 31245, 41141, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 37450, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 25067, 21387, 19964, 19964, 19964, 19964, 21413, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 38958, 19964, 19964, 19964, 19964, 19964, 19964, 20426, 19689, 19689, 19689, 31245, 31245, 31245, 25364, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 39358, 19689, 19689, 23346, 31245, 31245, 41141, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 21452, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19653, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 37450, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 25067, 21387, 19964, 19964, 19964, 19964, 24238, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 38958, 19964, 19964, 19964, 19964, 19964, 19964, 20426, 19689, 19689, 19689, 31245, 31245, 31245, 25364, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 39358, 19689, 19689, 23346, 31245, 31245, 41141, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21472, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 21496, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 37019, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19370, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 44228, 25495, 25507, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 40080, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21532, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 31351, 20739, 21553, 21573, 21595, 21607, 20742, 21557, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 24969, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19958, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 19964, 19964, 19586, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 31351, 45827, 19964, 21630, 21636, 21652, 41655, 24553, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21675, 19964, 19964, 19964, 19964, 21692, 19964, 19964, 34862, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 20324, 19964, 19964, 19964, 20995, 21709, 21740, 20927, 21725, 21757, 21788, 21797, 21813, 21827, 21839, 21855, 21868, 20020, 21884, 46494, 19964, 21907, 42177, 42133, 20384, 21938, 21954, 21970, 34413, 21999, 21981, 22036, 22051, 43532, 22081, 22116, 22132, 22169, 22199, 19964, 19964, 19964, 22215, 22252, 43778, 34267, 19964, 22270, 19964, 22310, 22327, 19689, 19689, 30586, 35856, 31245, 31245, 22350, 22099, 22099, 35881, 24398, 29320, 21370, 28400, 19964, 22366, 28382, 36712, 37450, 22386, 19964, 31106, 31720, 22405, 35473, 19689, 27661, 22978, 37716, 22440, 31245, 22461, 22487, 26113, 44104, 22099, 43606, 35358, 22530, 39585, 21387, 22586, 29834, 22605, 37501, 24238, 19964, 35424, 22626, 23509, 32060, 24086, 22643, 43241, 22662, 31245, 22692, 33957, 26610, 22728, 25562, 39101, 33049, 31963, 39991, 41288, 22756, 19964, 22781, 41944, 19964, 22797, 39201, 19689, 22834, 22863, 31245, 25446, 27506, 22913, 22099, 33202, 43366, 43808, 22929, 22952, 29578, 43453, 26881, 40666, 23022, 23346, 23046, 23105, 41141, 23127, 39749, 23649, 23181, 19964, 34316, 19964, 20428, 23197, 23214, 23239, 23262, 39666, 39686, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 42522, 23300, 41831, 32910, 26701, 23326, 31825, 30394, 23342, 24594, 27382, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 23362, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 38138, 23381, 19964, 23415, 23421, 23437, 23453, 23465, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 24442, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 35603, 37450, 23481, 19964, 23484, 19964, 19669, 19689, 19689, 19689, 23502, 35856, 31245, 31245, 31245, 23525, 22096, 22099, 22099, 22099, 23547, 29314, 25067, 21387, 19964, 19964, 19964, 19964, 24238, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 38958, 19964, 33531, 19964, 36058, 19964, 23570, 23587, 19689, 19689, 44035, 23616, 31245, 31245, 30694, 23640, 22099, 22099, 37412, 29188, 19964, 19964, 19964, 19964, 39358, 19689, 19689, 23346, 31245, 31245, 41141, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 30952, 27958, 23665, 23699, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 23722, 19964, 19964, 20995, 19964, 23758, 19964, 23776, 41116, 23795, 23804, 23820, 23835, 23847, 23863, 23876, 20020, 19964, 19964, 19022, 43785, 19964, 18796, 19964, 19964, 23892, 19964, 19964, 19964, 20033, 19782, 41063, 21516, 28932, 28302, 31854, 23910, 23940, 19709, 19964, 19964, 23964, 19964, 23991, 19964, 24010, 26964, 24035, 24054, 24075, 43990, 19689, 19689, 32159, 24109, 31245, 24505, 24131, 24170, 22099, 46221, 29320, 21370, 24190, 19964, 19964, 24212, 19964, 24231, 36150, 24258, 19964, 19964, 24295, 42248, 36087, 40367, 19689, 20306, 45796, 24351, 24371, 31245, 22545, 23081, 24393, 34568, 22099, 29314, 25067, 21387, 19964, 22311, 19964, 22627, 24238, 19964, 19964, 19964, 19689, 19689, 19689, 32632, 23345, 31245, 31245, 31245, 24414, 26610, 22099, 22099, 22099, 24437, 43752, 38958, 24458, 19964, 31472, 19964, 24279, 19964, 20426, 19689, 40777, 19689, 31245, 31245, 25343, 25364, 22098, 22099, 44833, 24525, 29188, 19964, 40043, 19964, 19964, 24476, 19689, 43864, 23346, 31245, 24502, 41141, 22099, 24521, 41150, 24541, 19964, 40591, 29794, 24877, 38361, 23346, 24569, 24588, 35051, 42368, 41851, 19964, 19964, 24612, 19689, 25030, 31245, 24635, 46001, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 26746, 24653, 24694, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 27830, 24710, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 18426, 19964, 19964, 20995, 19964, 24734, 19268, 19964, 33345, 24753, 24762, 24778, 24792, 24801, 24817, 24829, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 24847, 24845, 19964, 24864, 24871, 24893, 43274, 43065, 46221, 19547, 21363, 19964, 24914, 24967, 18244, 42103, 19964, 26075, 19964, 35004, 24985, 19632, 42641, 35209, 25017, 27881, 31975, 25053, 25097, 22471, 25121, 25140, 25180, 24335, 29320, 21370, 19964, 19964, 32194, 25202, 28705, 37450, 19964, 19964, 19964, 23390, 19669, 19689, 19689, 39703, 19689, 35856, 31245, 31245, 33940, 31245, 22096, 22099, 22099, 22100, 22099, 35790, 25219, 25258, 19964, 19964, 34406, 25274, 24238, 19964, 19964, 25295, 32029, 45193, 19689, 19689, 25316, 25337, 25359, 31245, 42792, 29287, 25380, 25400, 22099, 38452, 29314, 38958, 19964, 19964, 19964, 19964, 36503, 19964, 25419, 19689, 36002, 19689, 25443, 31245, 36954, 25364, 25462, 22099, 36035, 24174, 29188, 42851, 41965, 19964, 29708, 39358, 37166, 34813, 23346, 43305, 25482, 41141, 39242, 30939, 41849, 29195, 25523, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 25542, 34032, 19689, 29098, 31245, 25560, 40849, 29192, 34030, 19689, 31245, 35879, 25578, 20101, 19764, 24596, 35531, 35375, 25321, 23273, 26276, 22818, 25602, 25625, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19965, 25644, 19964, 20995, 21579, 25663, 19964, 25687, 26463, 25711, 25720, 25736, 25750, 25762, 25778, 25790, 20020, 45887, 25806, 30253, 21659, 25842, 44217, 21452, 45149, 25858, 25887, 25903, 43696, 25919, 25949, 25871, 25973, 26028, 26044, 26060, 26098, 26155, 21772, 22283, 21397, 18244, 26179, 33167, 23779, 19964, 19964, 35574, 19964, 40140, 40558, 19890, 40674, 34637, 26213, 24421, 26247, 32918, 26263, 26004, 26302, 29320, 21370, 26344, 26364, 26380, 26401, 26417, 26433, 26449, 42067, 33745, 26479, 26494, 43722, 26523, 26539, 26574, 26598, 26633, 39867, 26649, 26665, 26688, 35696, 26717, 26733, 26768, 26792, 26823, 21387, 26859, 44851, 26907, 26926, 26949, 26986, 27013, 36672, 32064, 22989, 29540, 27029, 39857, 29131, 27053, 26672, 27072, 27106, 39273, 27130, 34522, 40869, 27147, 35561, 44457, 31455, 27163, 29383, 44248, 25164, 27188, 42239, 40568, 30621, 27215, 27237, 27257, 27291, 27327, 27350, 27371, 27420, 29188, 19964, 33676, 27451, 19964, 27469, 42687, 27199, 23346, 38852, 27495, 41141, 42986, 27522, 41849, 29195, 27549, 27565, 27601, 27617, 27652, 27677, 27693, 35763, 27731, 27803, 27846, 38063, 25081, 27862, 27897, 23310, 40420, 31414, 27932, 31575, 27985, 33550, 31245, 28033, 28051, 28105, 28130, 23223, 41176, 24618, 41532, 28146, 28166, 29350, 28203, 30121, 28258, 28274, 28322, 23220, 28218, 28344, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 28377, 19964, 20995, 28398, 28416, 21078, 26837, 28441, 28471, 19964, 28457, 28496, 28505, 28521, 28533, 20020, 19964, 19964, 28549, 21659, 19964, 19964, 19964, 19964, 22389, 19964, 19964, 21026, 22388, 19964, 28568, 28603, 28624, 44532, 30755, 28648, 21363, 23760, 19964, 19964, 28673, 19964, 19964, 19964, 25300, 33758, 26385, 19964, 41518, 44031, 19689, 19689, 27404, 31245, 31245, 24505, 37956, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 37450, 19964, 19964, 24737, 19964, 19669, 19689, 19689, 38157, 19689, 35856, 31245, 31245, 30910, 31245, 22096, 22099, 22099, 31369, 22099, 29314, 25067, 21387, 19964, 19964, 19964, 19964, 24238, 19964, 28700, 19964, 19689, 19689, 26582, 19689, 23345, 31245, 31245, 28721, 31245, 26610, 22099, 22099, 28740, 22099, 29314, 38958, 19964, 19964, 19964, 19964, 32176, 19964, 20426, 19689, 19689, 28757, 31245, 31245, 28724, 25364, 22098, 22099, 28035, 24525, 29188, 19964, 19964, 19964, 19964, 39358, 19689, 19689, 23346, 31245, 31245, 41141, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 42880, 19964, 34032, 27631, 28950, 31245, 31553, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 27746, 28776, 44555, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 20040, 19964, 19964, 36739, 28804, 28813, 28829, 28835, 28851, 28867, 28879, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 21537, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 28895, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 34103, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 33867, 19964, 34096, 28911, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 26228, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 40502, 19964, 35082, 34997, 19964, 39125, 29632, 19689, 19689, 43159, 19689, 23345, 31245, 31245, 28930, 31245, 26610, 22099, 28741, 22099, 22099, 32766, 39785, 19964, 30448, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 37621, 19964, 39419, 34033, 19689, 19689, 28948, 31245, 45959, 41840, 22099, 26231, 41849, 39789, 28966, 28989, 29034, 29053, 29073, 29121, 43282, 29165, 32231, 43581, 29181, 23948, 33510, 29213, 22424, 29250, 29275, 39489, 29303, 29192, 29336, 29086, 38944, 32499, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 35939, 30048, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 40290, 19964, 21371, 29371, 19964, 19964, 19964, 25671, 19964, 18376, 19964, 22254, 18631, 25670, 22020, 38305, 29437, 29469, 34575, 29456, 29495, 19964, 19964, 23735, 18244, 29519, 24944, 19964, 25819, 19964, 19964, 19964, 39389, 19689, 19689, 29538, 35856, 31245, 24355, 24505, 22099, 22099, 25186, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 29556, 29575, 19669, 19689, 19689, 19689, 19689, 29594, 31245, 31245, 31245, 35858, 22096, 22099, 22099, 22099, 22099, 29612, 28013, 19964, 29648, 19964, 19964, 19964, 19964, 19964, 19964, 36452, 40719, 19689, 19689, 19689, 23345, 29665, 31245, 31245, 31245, 26610, 29686, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 29705, 19964, 19964, 19964, 24619, 19689, 19689, 31910, 31245, 31245, 31245, 29724, 22098, 22099, 22099, 29751, 29188, 19964, 19964, 29791, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 29810, 45364, 19689, 19765, 31245, 35879, 25124, 29829, 39924, 43012, 31245, 29850, 29868, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 29003, 19964, 20995, 21260, 20590, 26970, 36307, 36317, 38537, 38546, 29892, 29907, 29919, 29935, 29947, 20020, 19964, 19964, 19964, 42047, 42097, 19964, 19964, 19964, 29963, 21336, 19964, 25242, 21347, 29997, 22236, 30034, 30076, 30098, 27334, 30137, 30153, 19964, 19964, 30273, 18244, 19964, 30184, 19964, 19964, 19964, 30245, 30269, 39389, 30289, 30323, 19905, 20085, 30340, 32839, 30368, 39755, 30384, 25384, 30410, 29320, 21370, 23994, 24038, 30447, 30464, 30891, 30501, 33185, 30521, 30558, 19964, 19669, 32592, 19672, 30574, 30608, 35856, 30655, 27056, 30675, 30710, 22096, 30750, 24637, 30771, 30810, 39977, 28013, 19964, 19964, 19964, 39040, 30846, 30871, 19964, 19964, 19964, 38760, 19689, 19689, 27037, 44001, 25037, 31245, 31245, 30907, 30926, 32671, 22099, 22099, 30985, 37379, 28013, 29649, 31027, 31057, 31099, 31122, 31146, 45187, 35230, 31182, 31216, 31244, 31262, 31301, 31340, 31367, 28242, 39895, 31385, 31443, 37673, 41702, 42582, 43213, 32116, 31488, 31507, 42964, 31523, 31539, 31591, 31619, 31635, 31672, 31713, 19964, 22153, 31736, 31324, 31761, 39442, 31796, 31819, 31841, 22712, 41851, 29813, 19964, 31870, 19689, 19765, 31245, 35879, 24524, 44902, 34030, 31887, 31934, 33626, 31996, 32020, 19764, 24596, 33841, 32045, 32080, 32096, 32112, 28114, 24594, 31424, 28113, 24594, 23284, 32132, 39288, 31314, 38032, 23142, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 31463, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 18345, 31471, 33875, 23975, 38186, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 27355, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19422, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 32175, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 32192, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39170, 19689, 19689, 19689, 23345, 32210, 31245, 31245, 31245, 26610, 32230, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 20655, 19964, 20995, 19964, 31745, 19964, 29503, 32247, 32287, 32300, 32316, 32322, 32338, 32354, 32366, 20020, 19964, 32382, 19964, 21659, 19964, 42590, 32401, 19964, 19964, 29018, 19964, 29011, 38785, 29017, 32429, 44591, 32445, 44728, 32708, 32485, 32515, 22228, 19964, 23894, 32531, 19964, 23365, 21176, 32562, 20547, 26933, 32552, 43150, 32579, 30592, 32613, 43545, 22506, 32648, 38860, 32695, 22891, 32724, 43092, 32752, 21370, 30010, 19964, 19964, 19964, 24215, 19964, 19964, 19964, 19964, 19964, 32782, 33267, 32798, 42256, 42289, 43036, 32817, 32837, 29141, 37184, 26807, 32855, 32876, 42994, 27131, 29314, 28013, 19964, 34671, 29981, 19964, 35125, 45660, 19964, 19964, 19964, 19689, 19689, 40374, 37913, 23345, 31245, 31245, 32895, 32934, 26610, 22099, 22099, 32959, 32988, 29314, 28013, 44748, 19964, 19964, 33011, 19964, 19964, 24619, 44138, 19689, 19689, 31245, 33029, 31245, 22445, 22098, 33046, 22099, 24525, 29188, 33065, 19964, 19964, 33081, 34033, 33097, 19689, 33106, 33122, 31245, 33145, 43634, 22099, 42469, 29195, 33161, 19964, 33183, 20428, 32627, 23346, 45059, 31246, 22099, 33201, 41851, 19964, 33218, 34032, 19689, 27911, 40812, 35879, 23554, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 27479, 33238, 33254, 33288, 39288, 36835, 33322, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 20281, 19964, 20995, 19964, 18581, 19964, 19964, 36880, 28080, 28089, 33361, 33375, 33384, 33400, 33412, 21496, 19964, 30166, 19964, 21659, 19964, 19607, 19964, 19964, 19964, 30168, 19964, 30161, 32271, 30167, 33428, 33444, 33465, 44189, 46221, 19547, 21363, 19964, 26348, 19964, 18244, 19964, 33489, 33507, 33526, 19964, 27453, 21676, 39389, 33547, 29421, 31900, 41374, 31245, 33566, 33582, 32860, 22099, 33598, 33648, 33699, 33730, 21741, 33783, 30479, 19964, 19964, 19964, 25826, 19964, 19964, 19964, 19669, 33805, 30969, 19689, 19689, 27916, 28632, 45121, 31245, 31245, 22096, 33831, 46113, 22099, 22099, 29314, 28013, 19964, 34708, 39606, 19964, 25647, 23571, 33857, 19964, 28552, 19689, 33891, 19689, 33915, 23345, 34948, 33938, 41352, 33956, 42404, 22897, 22099, 34001, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 19995, 19964, 19964, 19964, 41069, 19689, 23346, 33973, 31246, 39555, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 37203, 29192, 34030, 19689, 31245, 35879, 22740, 20101, 45757, 33994, 34017, 38913, 39947, 32460, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 34049, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 18523, 19964, 21614, 19964, 18504, 34083, 26082, 34119, 34150, 34189, 34175, 34194, 34159, 34210, 34222, 20020, 19964, 34238, 34263, 34283, 34377, 34311, 19821, 19964, 20541, 34332, 34367, 34393, 19531, 34429, 34457, 34473, 34501, 34538, 34591, 34628, 21363, 30018, 19964, 19964, 34701, 24929, 19964, 34653, 34901, 34669, 34687, 34724, 39389, 34776, 23198, 19689, 30639, 45803, 19804, 24505, 37125, 36027, 42376, 46221, 34829, 21370, 34859, 39599, 30229, 19964, 19964, 19964, 34878, 19964, 19964, 34897, 34917, 27877, 19689, 19689, 19689, 40445, 34944, 31245, 31245, 31245, 23061, 34964, 22099, 22099, 22099, 31400, 28013, 19964, 19964, 19964, 37734, 19964, 19964, 35118, 34984, 19964, 31776, 19689, 28760, 19689, 35020, 31245, 31245, 45765, 45541, 30722, 22099, 22099, 38445, 36619, 43913, 28013, 35067, 35105, 36279, 43933, 36866, 35141, 35834, 35178, 40548, 35225, 33129, 35246, 35282, 22445, 27715, 35298, 35314, 35343, 29766, 38009, 35391, 35411, 35440, 35461, 36092, 30307, 35495, 27221, 30686, 35521, 38227, 43358, 35547, 28017, 35599, 19964, 18562, 35619, 23600, 28587, 44812, 35641, 35665, 35684, 41851, 35712, 36353, 38907, 35736, 29355, 35752, 42483, 35779, 29625, 35806, 31193, 27275, 31686, 26125, 35830, 35850, 35874, 35897, 35814, 35926, 35955, 35983, 39063, 36018, 36051, 28113, 24594, 35369, 23220, 27435, 36074, 38032, 24718, 36108, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 36125, 20995, 19964, 40298, 36146, 19964, 26328, 36166, 36175, 36191, 36205, 36214, 36230, 36242, 20020, 36258, 18714, 36384, 36295, 40165, 36333, 19964, 36369, 18382, 36408, 36437, 36474, 36490, 36549, 22765, 36587, 36635, 43671, 36651, 36688, 36704, 19964, 36728, 35720, 36755, 30505, 21305, 30485, 26317, 19964, 19964, 36777, 39389, 19690, 36928, 36794, 35856, 19731, 36822, 44413, 22099, 23089, 42326, 36851, 29320, 21370, 19964, 36896, 19964, 30536, 33013, 31083, 19964, 33663, 37523, 38111, 36918, 31780, 27947, 19689, 25427, 25986, 38417, 36944, 31245, 27267, 24668, 25466, 36978, 22099, 32679, 29314, 22676, 37005, 19964, 37041, 37060, 19964, 19964, 19964, 19964, 37077, 19689, 45703, 37311, 19689, 23345, 31245, 29105, 37097, 31245, 26610, 22099, 35043, 37120, 22099, 29314, 28013, 19964, 39827, 19964, 37141, 19964, 19964, 37161, 19689, 19689, 31491, 31245, 31245, 31245, 34067, 26230, 22099, 22099, 44791, 29188, 44075, 19964, 19964, 19964, 38747, 19689, 41483, 28361, 31245, 37182, 32943, 22099, 37200, 41849, 22559, 19964, 19964, 19964, 43502, 30300, 23346, 37219, 31246, 37405, 37268, 41851, 37287, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 33334, 35910, 37307, 37327, 41912, 30734, 37349, 26507, 37365, 37428, 28328, 19553, 31949, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 27818, 37232, 38032, 24154, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 30885, 20995, 19964, 19964, 37444, 30855, 37466, 37517, 19964, 18600, 37539, 37551, 37567, 37579, 20020, 19964, 19964, 37595, 21659, 19964, 19964, 19964, 37620, 21456, 19964, 19964, 37616, 37595, 19964, 24615, 33815, 29670, 37637, 37658, 37707, 21363, 22370, 37732, 19964, 18244, 19964, 37750, 37803, 19964, 37827, 19964, 37808, 39389, 37847, 37871, 35479, 43249, 37887, 26558, 37929, 37642, 37945, 26012, 37972, 38025, 38048, 19964, 30220, 24272, 19964, 38079, 38099, 19964, 19964, 19964, 19964, 19669, 19689, 29057, 19689, 19689, 35856, 31245, 38507, 31245, 31245, 22096, 22099, 27090, 22099, 22099, 29314, 23924, 38127, 25526, 19964, 19964, 42059, 19378, 35156, 39323, 29037, 19689, 41487, 38154, 19689, 23345, 31245, 38173, 31245, 31245, 43573, 22099, 38209, 22099, 22099, 29314, 28013, 29522, 19964, 19964, 38632, 19964, 19964, 38243, 19689, 43167, 19689, 31245, 31245, 38261, 31980, 22098, 22099, 38281, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 40316, 19964, 19964, 38302, 19689, 23346, 31245, 31246, 22099, 22099, 27533, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 30783, 38321, 37855, 35649, 33841, 38355, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 22610, 19964, 19964, 42556, 40756, 40759, 36515, 38377, 38396, 45924, 38412, 38433, 44110, 19547, 38468, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 30542, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38484, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 27087, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 31918, 19765, 38503, 25609, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 40281, 21110, 19964, 19964, 39351, 19964, 22570, 38523, 37025, 38562, 38575, 38584, 38600, 38612, 20020, 19964, 37495, 40073, 21659, 31130, 38628, 38648, 45654, 38666, 38687, 38707, 38734, 38776, 38801, 32004, 38837, 38876, 43899, 38892, 38929, 38990, 19964, 19964, 19964, 39014, 22589, 39030, 21480, 25544, 19964, 19964, 28066, 39056, 32597, 40948, 31228, 35856, 44358, 36962, 39079, 22099, 39095, 31285, 32736, 33714, 21370, 19964, 19964, 19964, 39117, 29973, 19964, 32262, 19964, 39123, 39141, 39162, 41331, 19689, 44502, 39186, 34060, 30659, 31245, 32214, 39221, 23157, 25403, 22099, 29689, 39258, 29314, 28013, 19964, 19964, 39315, 34739, 39339, 19964, 37145, 39374, 39412, 39435, 39205, 34791, 35998, 33922, 39458, 35505, 39475, 31245, 39505, 22099, 39520, 39536, 22099, 39571, 28013, 39622, 19964, 36421, 36666, 39642, 37481, 20105, 38334, 40020, 19689, 24377, 39459, 31245, 22445, 26617, 39662, 39682, 24525, 31000, 38691, 39626, 19964, 19964, 31871, 39702, 19689, 22065, 31245, 31245, 39719, 22099, 22099, 39771, 29195, 44437, 19964, 19964, 30964, 19689, 37252, 31245, 31246, 39805, 22099, 33299, 19964, 39825, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 25152, 39843, 34928, 39883, 39911, 24618, 35853, 35877, 19934, 39940, 39963, 29479, 28113, 24594, 35369, 23220, 28289, 40007, 27969, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19445, 20995, 40041, 31041, 40059, 40096, 40125, 40156, 40109, 40181, 40195, 40207, 40223, 40235, 20020, 40251, 26843, 19964, 40269, 19964, 19964, 37691, 19964, 37811, 19964, 40314, 40332, 21032, 40339, 40355, 40390, 40412, 45318, 46044, 40436, 21363, 40461, 40481, 40499, 40518, 40584, 19964, 19964, 19964, 20410, 40607, 19964, 40653, 40690, 40713, 19689, 39299, 40735, 31245, 24505, 42496, 38286, 22099, 46221, 29320, 21370, 36392, 19964, 23742, 31070, 40751, 19964, 19964, 19964, 19964, 30425, 19669, 40775, 40793, 19689, 45906, 35856, 40811, 40828, 31245, 32821, 22096, 40845, 40865, 22099, 32879, 33612, 28013, 19964, 19964, 40885, 40903, 19964, 38106, 40921, 36273, 40929, 40945, 19689, 44144, 42212, 28608, 31245, 31245, 40964, 31803, 31274, 22099, 22099, 40980, 36611, 43960, 41049, 41676, 19964, 41085, 29559, 19964, 41105, 24619, 19689, 22847, 19689, 31245, 31245, 41132, 22445, 22098, 22099, 41166, 24525, 29188, 19964, 41192, 40253, 41218, 30431, 32801, 38339, 23346, 38265, 46203, 25995, 34968, 30830, 41849, 29195, 19964, 41238, 37987, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 31564, 41986, 35445, 22966, 19689, 41257, 29440, 35879, 23165, 41278, 41312, 41328, 41347, 39235, 44740, 20101, 41368, 41390, 41406, 24618, 35853, 35877, 25628, 43869, 23246, 42438, 24486, 41445, 41468, 34485, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 24242, 20995, 19964, 19964, 20004, 19964, 41503, 41553, 41565, 41581, 41597, 41609, 41625, 41637, 20020, 41653, 37999, 19211, 21659, 41671, 42011, 41692, 43478, 38380, 41730, 41746, 41771, 41762, 45218, 41787, 41821, 41867, 46074, 32972, 41898, 41936, 41960, 21922, 41981, 42002, 19964, 19964, 42035, 42083, 42119, 42149, 42165, 42200, 42228, 42272, 42288, 42305, 42342, 42392, 33978, 42428, 42454, 42512, 38193, 29320, 42538, 36761, 42554, 31158, 41296, 42572, 19964, 19964, 42606, 42626, 34134, 42667, 42703, 22334, 19689, 28181, 28657, 42719, 22514, 31245, 42787, 22878, 42808, 32995, 22099, 42824, 34843, 43927, 19964, 42845, 34606, 42867, 38650, 42903, 42928, 42933, 41202, 22646, 42949, 43010, 28187, 43028, 33473, 44366, 31245, 43052, 42317, 35967, 30111, 22099, 43081, 29314, 28013, 43108, 19964, 43135, 43183, 19964, 43203, 26286, 27636, 43229, 28580, 43265, 42734, 43298, 43321, 43348, 41920, 23072, 43382, 23683, 43419, 43447, 39146, 43469, 43494, 43518, 19689, 30632, 43561, 31245, 43597, 43622, 22099, 43657, 29195, 26871, 43687, 19964, 28354, 43712, 24309, 41882, 30082, 43738, 43397, 43801, 43824, 45099, 29395, 43851, 43885, 44343, 32662, 43949, 43765, 43976, 44017, 44051, 35034, 44067, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 42760, 28788, 44091, 44126, 44160, 44176, 31314, 38032, 24146, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 44205, 19964, 19964, 44244, 19964, 38718, 40619, 40628, 44264, 40628, 40637, 44280, 44292, 20020, 19964, 19964, 19964, 42184, 19964, 35089, 19964, 19964, 19964, 19964, 35088, 19964, 44308, 19964, 24615, 44328, 44382, 24322, 31697, 44398, 44429, 44453, 19964, 19964, 18244, 19964, 19964, 44473, 44481, 19964, 19964, 33789, 40533, 44499, 19689, 19689, 44518, 31245, 31245, 27241, 32469, 22099, 22099, 33632, 44548, 44571, 44607, 28973, 44625, 19964, 19964, 19964, 44667, 44694, 19964, 36525, 19669, 23030, 36806, 24093, 33272, 35856, 22497, 44714, 29149, 23531, 22096, 27114, 34553, 43641, 42829, 40994, 28013, 19964, 35162, 37081, 19964, 19964, 19964, 26910, 19964, 25203, 19689, 37245, 19689, 19689, 23345, 45942, 31245, 31245, 31245, 34513, 28150, 22099, 22099, 22099, 29314, 22183, 19964, 36346, 19964, 19964, 19964, 31166, 44874, 19689, 19689, 19689, 44764, 31245, 31245, 22445, 44785, 22099, 22099, 24525, 33306, 19964, 19964, 37765, 19964, 19859, 42680, 19689, 40697, 44807, 31245, 29259, 44828, 22099, 23674, 29195, 44849, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 35201, 23624, 37393, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 24678, 26891, 36602, 44867, 23220, 39288, 37900, 44890, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 44950, 45009, 41714, 44984, 19964, 30794, 19964, 41711, 45006, 18249, 26997, 45025, 45037, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 26752, 40795, 45053, 42356, 46221, 19547, 21363, 19964, 33683, 22147, 18244, 19964, 19964, 19964, 19964, 19964, 45075, 19964, 39389, 29227, 30324, 19689, 41262, 31245, 23111, 24505, 35668, 22099, 26776, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 45093, 19964, 19964, 22013, 19964, 19669, 19689, 22417, 19689, 19689, 35856, 31245, 45115, 31245, 31245, 22096, 22099, 30823, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 34612, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 44990, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 30060, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 45137, 19964, 18326, 19964, 19502, 45172, 45209, 19964, 45234, 45248, 45260, 45276, 45288, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 39396, 29596, 28302, 35327, 45304, 45334, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 45358, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 45380, 19964, 19964, 19964, 45402, 19689, 19689, 19689, 33449, 31245, 31245, 31245, 31245, 42976, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 25586, 19964, 19964, 19964, 19964, 24619, 28914, 19689, 31200, 31245, 37104, 31245, 45420, 22098, 43403, 22099, 39734, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21532, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 28684, 45447, 45459, 20020, 19964, 19964, 19964, 21659, 45475, 21983, 19964, 19964, 19964, 23486, 24059, 19964, 42912, 45497, 45519, 40795, 45535, 42748, 46221, 19547, 21363, 19964, 19964, 42887, 18244, 26189, 27577, 45557, 19964, 19964, 19964, 19964, 39389, 19689, 34805, 22998, 35856, 40829, 31245, 45582, 22099, 37271, 22099, 45598, 29320, 45640, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 45676, 19964, 19964, 38083, 19689, 19689, 35192, 19689, 23345, 31245, 24572, 31245, 31245, 28233, 22099, 39809, 22099, 22099, 29314, 28013, 36564, 19964, 19964, 19964, 19964, 19964, 24619, 45702, 19689, 19689, 44769, 31245, 31245, 22445, 28306, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 45719, 19964, 19964, 21659, 19964, 19964, 44962, 19964, 19964, 19964, 19964, 44968, 19964, 19964, 45748, 41805, 33030, 28302, 36989, 45781, 45819, 19964, 30211, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 30202, 39389, 19689, 19689, 23006, 35856, 31245, 31245, 45843, 22099, 22099, 22099, 45859, 29320, 21370, 35395, 19964, 19964, 19964, 19964, 19964, 19964, 37061, 19964, 19964, 19669, 45903, 19689, 45922, 19689, 35856, 45940, 31245, 45958, 31245, 22096, 45975, 22099, 45996, 22099, 29314, 28013, 19964, 44312, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 29234, 19689, 19689, 23345, 31245, 46017, 31245, 31245, 26610, 22099, 46039, 22099, 22099, 46060, 28013, 19964, 19964, 19964, 19964, 44609, 19964, 24619, 19689, 22809, 45404, 31245, 31245, 46090, 46023, 22098, 22099, 46108, 46157, 29188, 19964, 19964, 46129, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 31649, 19964, 44483, 19964, 29404, 19689, 40396, 31245, 31246, 46152, 22099, 41851, 19964, 46173, 34032, 40025, 19765, 46196, 35879, 46219, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20379, 19964, 19964, 19964, 19964, 20995, 19964, 19964, 19964, 19964, 31351, 34753, 19964, 19964, 19964, 23975, 22705, 31603, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 21363, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 39389, 19689, 19689, 19689, 35856, 31245, 31245, 24505, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 44914, 43431, 43429, 23399, 25001, 46251, 45077, 43424, 44926, 24999, 46237, 46267, 46280, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 44698, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24950, 19964, 19964, 41033, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 25233, 19964, 31351, 29876, 46296, 46309, 46325, 46334, 46378, 46357, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 45566, 19964, 19964, 45563, 19964, 19964, 19964, 19964, 19964, 46394, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 38971, 19964, 19964, 19964, 19964, 19964, 19964, 20680, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 27172, 19964, 19964, 19964, 19964, 25933, 24019, 46417, 46450, 46456, 46427, 19964, 46472, 28425, 19964, 19964, 19964, 21659, 19964, 19964, 41241, 19964, 19964, 45686, 19964, 19964, 19964, 45682, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 20254, 19964, 19964, 19964, 19964, 19964, 19964, 20225, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 19964, 19964, 19963, 19964, 19964, 32385, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 18423, 19964, 19964, 19964, 19964, 19576, 19964, 19964, 19964, 19964, 31351, 19964, 19964, 19964, 19964, 19964, 19964, 20060, 20020, 19964, 19964, 19964, 21659, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 24615, 40795, 31245, 28302, 46221, 19547, 19569, 19964, 19964, 19964, 18244, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 21509, 19689, 19689, 19689, 35856, 31245, 31245, 19840, 22099, 22099, 22099, 46221, 29320, 21370, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19669, 19689, 19689, 19689, 19689, 35856, 31245, 31245, 31245, 31245, 22096, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19689, 19689, 19689, 19689, 23345, 31245, 31245, 31245, 31245, 26610, 22099, 22099, 22099, 22099, 29314, 28013, 19964, 19964, 19964, 19964, 19964, 19964, 24619, 19689, 19689, 19689, 31245, 31245, 31245, 22445, 22098, 22099, 22099, 24525, 29188, 19964, 19964, 19964, 19964, 34033, 19689, 19689, 23346, 31245, 31245, 41840, 22099, 22099, 41849, 29195, 19964, 19964, 19964, 20428, 19689, 23346, 31245, 31246, 22099, 22099, 41851, 19964, 19964, 34032, 19689, 19765, 31245, 35879, 24524, 29192, 34030, 19689, 31245, 35879, 26125, 20101, 19764, 24596, 33841, 24618, 35853, 35877, 31427, 28114, 24594, 31424, 28113, 24594, 35369, 23220, 39288, 31314, 38032, 24714, 29196, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 36902, 19964, 19964, 36533, 46510, 46515, 46515, 46536, 36901, 46531, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 19964, 94503, 94503, 90406, 90406, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 1, 12290, 3, 0, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 362, 94503, 90406, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 0, 90406, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 69632, 73728, 94503, 94503, 94503, 94503, 94503, 65536, 94503, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 0, 0, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 456, 456, 111048, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 456, 111048, 111048, 111048, 111048, 111048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, 1008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, 300, 118784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 331, 0, 0, 300, 0, 0, 0, 300, 119195, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 771, 774144, 0, 0, 0, 753, 300, 0, 0, 0, 0, 0, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 0, 0, 0, 0, 0, 0, 300, 0, 300, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320, 321, 0, 0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 300, 0, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, 0, 0, 0, 384, 0, 122880, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 336, 337, 338, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 122880, 0, 122880, 0, 2105629, 12290, 3, 0, 0, 291, 0, 0, 0, 0, 291, 0, 0, 0, 0, 0, 0, 0, 2629, 0, 0, 0, 0, 0, 0, 2633, 0, 0, 0, 1613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, 335, 0, 0, 0, 1765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 512, 519, 519, 0, 0, 0, 131072, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 750, 0, 0, 0, 0, 0, 750, 750, 0, 0, 810, 0, 131072, 0, 0, 131072, 131072, 0, 0, 0, 0, 0, 0, 131072, 0, 131072, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 131072, 131072, 131072, 131072, 131072, 131072, 131072, 131072, 131072, 131072, 0, 0, 0, 0, 0, 0, 131072, 0, 131072, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 298, 0, 135168, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 667, 668, 0, 0, 0, 135168, 0, 0, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 301, 0, 0, 0, 0, 0, 0, 0, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 0, 0, 0, 0, 0, 0, 135168, 0, 135168, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118784, 296, 0, 301, 139264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 726, 0, 0, 301, 301, 301, 0, 0, 0, 0, 0, 0, 301, 0, 301, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 297, 298, 298, 143728, 298, 298, 298, 143728, 69632, 73728, 298, 298, 143658, 298, 298, 65536, 298, 298, 0, 0, 298, 298, 143658, 298, 298, 298, 298, 298, 298, 298, 298, 298, 363, 298, 0, 143658, 298, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 298, 298, 143658, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 143728, 298, 298, 298, 298, 298, 298, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 298, 298, 298, 143658, 368, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 143658, 298, 298, 143658, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 0, 0, 298, 298, 298, 298, 298, 298, 298, 298, 298, 143658, 298, 143658, 143658, 143658, 143658, 298, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143728, 143728, 143728, 143728, 143728, 143728, 143728, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 90406, 90406, 90406, 90406, 0, 94503, 0, 0, 0, 2200244, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 679, 0, 0, 0, 0, 0, 0, 0, 155648, 155648, 0, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 155648, 155648, 0, 155648, 155648, 0, 12290, 3, 0, 0, 0, 126976, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 159744, 163840, 159744, 159744, 159744, 159744, 159744, 0, 0, 0, 0, 25157, 0, 0, 0, 159744, 159744, 159744, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 163840, 159744, 159744, 25157, 25157, 25157, 25157, 159744, 159744, 159744, 159744, 159744, 25157, 159744, 25157, 1, 12290, 3, 0, 0, 0, 0, 0, 253952, 0, 0, 0, 253952, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 680, 681, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 1, 12290, 3, 0, 167936, 167936, 167936, 0, 0, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, 395, 0, 0, 0, 321, 0, 0, 0, 0, 0, 0, 172032, 0, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 1, 12290, 3, 0, 0, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 0, 0, 0, 0, 172032, 172032, 0, 0, 172032, 0, 0, 172032, 172032, 0, 172032, 0, 0, 0, 0, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 1, 12290, 3, 0, 0, 0, 0, 249856, 0, 0, 0, 249856, 0, 0, 0, 0, 0, 0, 0, 278528, 0, 0, 0, 0, 0, 0, 0, 0, 0, 610304, 0, 0, 0, 0, 0, 0, 172032, 0, 172032, 172032, 0, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, 0, 0, 0, 0, 1, 286, 3, 0, 0, 0, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 1, 0, 3, 78112, 176128, 176128, 176128, 0, 0, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, 0, 0, 0, 0, 358, 78112, 86306, 0, 633, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 0, 779, 797, 0, 797, 792, 0, 0, 0, 809, 0, 0, 0, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 84881, 82480, 82480, 82480, 84885, 82480, 0, 29254, 29254, 29254, 29254, 29254, 78112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 3, 0, 0, 0, 0, 0, 1060, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 724, 0, 0, 0, 0, 0, 0, 0, 1103, 0, 0, 0, 0, 1108, 0, 0, 0, 0, 0, 0, 0, 0, 311296, 0, 0, 0, 742543, 0, 0, 0, 0, 0, 0, 0, 1578, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, 0, 29874, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30329, 29210, 30659, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29910, 0, 0, 2228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1054, 0, 0, 82480, 82480, 82480, 82480, 82480, 84237, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83237, 82480, 82480, 82480, 82480, 82480, 0, 0, 0, 2434, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2444, 31171, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 2623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 694, 82480, 82480, 82480, 82480, 82480, 84592, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83255, 82480, 82480, 82480, 82480, 82480, 2726, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 742, 82480, 82480, 84697, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 944, 2737, 0, 2819, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 31143, 29210, 2737, 0, 0, 2881, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 31564, 29210, 29210, 29210, 29916, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29926, 29210, 29210, 29210, 29936, 29210, 29210, 29940, 29210, 29210, 29210, 29210, 29945, 29210, 29210, 29210, 29952, 82480, 82480, 82480, 84833, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 31594, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 0, 0, 2991, 0, 2993, 29210, 29254, 29254, 31600, 29254, 29254, 29254, 31604, 0, 0, 0, 0, 0, 0, 2737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 322, 82480, 84966, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 31725, 29254, 29254, 0, 0, 0, 0, 0, 0, 2598, 0, 0, 0, 0, 0, 0, 0, 394, 0, 0, 0, 0, 0, 394, 0, 0, 78112, 86306, 0, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 0, 805, 0, 0, 0, 0, 0, 0, 0, 0, 0, 377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41692, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 3, 78112, 0, 188416, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83214, 82480, 82480, 82480, 2737, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30933, 0, 0, 0, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 0, 192969, 0, 1, 12290, 3, 0, 192969, 192969, 192969, 0, 0, 192969, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 304, 0, 0, 0, 0, 0, 0, 0, 0, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 0, 192969, 192969, 192969, 192969, 192969, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 155648, 0, 37163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 943, 78112, 86306, 0, 0, 0, 0, 0, 296, 297, 0, 37163, 300, 301, 0, 0, 0, 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 41692, 37268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335, 0, 0, 0, 0, 41692, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83621, 82480, 82480, 82480, 0, 1130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 306, 87041, 1463, 0, 0, 0, 1469, 0, 0, 0, 1475, 0, 0, 0, 1481, 0, 0, 0, 0, 0, 0, 184723, 184930, 184930, 184930, 184930, 184930, 184930, 184930, 184930, 184930, 0, 0, 0, 0, 0, 0, 184930, 0, 184930, 1, 12290, 3, 78112, 86306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 739, 0, 0, 0, 0, 0, 0, 1475, 1867, 0, 0, 0, 0, 1481, 1869, 0, 0, 0, 0, 0, 0, 0, 1044, 1166, 0, 0, 0, 0, 0, 0, 1172, 2250, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 0, 304, 0, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 304, 0, 0, 0, 0, 0, 0, 229376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 131072, 131072, 0, 0, 0, 204800, 204800, 0, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 205104, 204800, 204800, 205103, 205104, 204800, 205103, 205103, 204800, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 302, 0, 0, 0, 0, 0, 632, 0, 0, 0, 0, 0, 296, 297, 151552, 0, 300, 301, 0, 212992, 0, 0, 0, 0, 0, 764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 942, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 822, 822, 822, 822, 0, 0, 943, 943, 943, 943, 943, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, 379, 381, 0, 0, 0, 0, 0, 0, 0, 2200245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 738, 0, 0, 0, 0, 943, 943, 822, 822, 822, 822, 943, 943, 822, 0, 822, 822, 822, 822, 0, 0, 0, 0, 943, 943, 943, 943, 0, 0, 943, 943, 943, 943, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, 334, 0, 0, 0, 0, 943, 822, 0, 822, 822, 0, 0, 943, 943, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 944, 943, 943, 943, 943, 943, 943, 943, 822, 822, 943, 822, 0, 822, 822, 0, 0, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 822, 822, 822, 943, 943, 943, 943, 943, 822, 822, 0, 943, 0, 0, 0, 0, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 943, 943, 943, 943, 943, 943, 822, 0, 0, 0, 0, 0, 0, 2737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 822, 822, 822, 822, 822, 943, 943, 943, 943, 943, 943, 822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 822, 943, 943, 943, 943, 943, 822, 0, 0, 0, 0, 0, 0, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 0, 0, 0, 0, 943, 822, 0, 0, 0, 0, 0, 822, 822, 822, 822, 822, 822, 0, 0, 0, 0, 0, 0, 0, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 0, 0, 0, 943, 943, 943, 943, 943, 943, 0, 0, 0, 0, 822, 822, 822, 943, 0, 822, 0, 943, 0, 822, 0, 943, 0, 822, 0, 943, 0, 822, 0, 0, 0, 0, 943, 943, 943, 943, 0, 0, 822, 822, 0, 0, 943, 943, 822, 0, 822, 822, 822, 822, 822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 305, 0, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 221184, 0, 0, 221184, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 86306, 0, 0, 0, 0, 0, 0, 0, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 1, 12290, 3, 0, 0, 0, 0, 0, 773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 686, 0, 0, 0, 328454, 0, 297, 0, 300, 0, 0, 0, 300, 0, 301, 0, 0, 0, 301, 0, 0, 0, 301, 69632, 139679, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 98304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 397, 0, 0, 0, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 86306, 0, 0, 0, 345, 237568, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1008, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 253952, 0, 0, 0, 0, 241664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1048, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 270336, 0, 0, 296, 297, 0, 0, 300, 301, 200704, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 2113823, 0, 0, 0, 0, 0, 0, 293, 0, 0, 0, 293, 0, 0, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1079, 274432, 274432, 274432, 0, 0, 0, 0, 0, 0, 274432, 0, 274432, 1, 12290, 3, 0, 0, 0, 0, 0, 782, 0, 0, 0, 0, 0, 0, 0, 786, 0, 0, 800, 0, 0, 0, 0, 0, 800, 800, 0, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 683, 0, 0, 0, 1867, 0, 0, 0, 0, 0, 1869, 0, 0, 0, 0, 0, 0, 0, 1078, 0, 0, 1081, 1082, 0, 0, 0, 1086, 0, 0, 0, 1556, 0, 0, 0, 0, 0, 0, 0, 0, 1929, 0, 0, 0, 0, 0, 0, 823, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 772, 0, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 288, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 0, 565248, 0, 0, 0, 0, 0, 0, 78455, 86306, 0, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 0, 823, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29538, 29210, 29210, 29210, 29210, 29210, 82480, 1, 12290, 3, 78113, 86306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 740, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 1, 12290, 3, 0, 282624, 282624, 282624, 0, 0, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, 0, 0, 370, 0, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 0, 282624, 282624, 282624, 282624, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 336, 86306, 0, 0, 0, 0, 0, 0, 0, 286720, 286720, 0, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 2817, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1199, 2878, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1363, 0, 0, 0, 306, 0, 0, 0, 0, 0, 305, 0, 305, 306, 0, 305, 305, 0, 0, 0, 305, 305, 306, 306, 0, 0, 0, 0, 0, 0, 305, 405, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1500, 0, 0, 0, 306, 410, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 1046, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1056, 0, 0, 429, 0, 0, 0, 0, 305, 446, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 486, 486, 460, 486, 486, 486, 486, 486, 486, 486, 511, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 531, 486, 486, 486, 486, 486, 29212, 29212, 29212, 82481, 29256, 29212, 82481, 29212, 29212, 82481, 82481, 82481, 29276, 29276, 29276, 29212, 29256, 29256, 29256, 29283, 29283, 29283, 29283, 29283, 29283, 29256, 29212, 82481, 29212, 29212, 82481, 29256, 29212, 29256, 1, 12290, 3, 78112, 0, 0, 642, 0, 0, 644, 645, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0, 0, 147456, 0, 0, 0, 0, 687, 0, 0, 0, 0, 362, 362, 362, 0, 0, 696, 0, 0, 0, 0, 0, 1061, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1070, 0, 642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 757, 0, 0, 760, 0, 0, 0, 0, 766, 0, 0, 770, 0, 0, 0, 0, 776, 0, 0, 0, 0, 780, 0, 0, 0, 0, 0, 0, 0, 784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 727, 0, 0, 784, 0, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0, 0, 622592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29506, 29210, 29210, 644, 0, 0, 0, 0, 0, 814, 780, 0, 0, 0, 0, 0, 818, 819, 780, 0, 0, 0, 0, 780, 728, 780, 0, 29210, 29210, 29210, 29501, 29505, 29210, 29210, 29210, 29210, 31174, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 84430, 84431, 82480, 82480, 82808, 82812, 82480, 82480, 82480, 82480, 82480, 82832, 82480, 82836, 82480, 82841, 82480, 82844, 82480, 25938, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30497, 82480, 82857, 82480, 82480, 0, 29254, 29254, 29254, 29622, 29626, 29254, 29254, 29254, 29254, 29254, 29646, 29254, 29650, 29254, 29655, 29254, 29658, 29254, 29254, 29671, 29254, 29254, 29210, 29210, 29210, 29537, 0, 0, 0, 0, 0, 1076, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2618, 0, 0, 0, 0, 2622, 0, 0, 29254, 29626, 29505, 82812, 29501, 29685, 29537, 29210, 29210, 82808, 82937, 82844, 82480, 82480, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 2170, 0, 0, 29622, 29693, 29658, 29254, 29254, 78112, 87041, 0, 0, 1027, 1031, 0, 0, 1035, 1039, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 0, 0, 1096, 0, 0, 0, 0, 0, 0, 1047, 1048, 0, 0, 0, 0, 0, 0, 0, 0, 816, 29210, 29210, 29210, 29210, 29210, 29509, 29210, 0, 1101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 750, 0, 1159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1170, 0, 0, 0, 0, 0, 0, 1062, 0, 0, 0, 0, 0, 0, 0, 0, 0, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 1188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1897, 0, 0, 0, 0, 1170, 29874, 823, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30327, 29210, 29210, 700954, 29210, 29210, 29210, 83265, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 25938, 29874, 944, 0, 0, 0, 1513, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1053, 0, 0, 0, 0, 1560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 773, 0, 0, 0, 29874, 1614, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30297, 29210, 29210, 29210, 29210, 29210, 29210, 623130, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 559817, 29210, 29210, 29210, 29210, 875211, 29210, 82480, 82480, 82480, 82480, 83631, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 0, 82480, 82480, 82480, 82480, 82480, 82480, 83660, 82480, 82480, 83663, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83274, 82480, 82480, 82480, 82480, 82480, 25938, 29874, 944, 82480, 82480, 82480, 82480, 83672, 82480, 82480, 82480, 82480, 83677, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83634, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83234, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83649, 82480, 82480, 700976, 82480, 82480, 82480, 82480, 29254, 29254, 30515, 29210, 29210, 29210, 29254, 29254, 29210, 82480, 30523, 29210, 29210, 29210, 83775, 82480, 25938, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30451, 29254, 29254, 0, 0, 2594, 0, 0, 0, 0, 0, 2600, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 347, 345, 65536, 0, 0, 0, 1873, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1113, 0, 1115, 0, 0, 0, 0, 1900, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 741, 0, 0, 0, 0, 1959, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1923, 29210, 29210, 30688, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30656, 29210, 82480, 82480, 82480, 83960, 82480, 82480, 83961, 82480, 82480, 82480, 82480, 82480, 82480, 83968, 82480, 82480, 29254, 29254, 29254, 29254, 0, 0, 0, 1864, 0, 1028, 0, 0, 0, 1866, 83983, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83995, 82480, 82480, 82480, 29210, 29210, 29210, 29210, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31382, 29254, 29254, 29254, 29254, 29254, 29254, 30777, 29254, 29254, 30778, 29254, 29254, 29254, 29254, 29254, 29254, 30785, 29254, 29254, 29254, 29254, 29210, 29210, 82480, 29254, 0, 0, 0, 0, 0, 0, 0, 2877, 0, 0, 0, 0, 925696, 0, 0, 0, 2190, 0, 0, 0, 0, 0, 0, 0, 0, 1019904, 29210, 29210, 29210, 29503, 29507, 29510, 29210, 2212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2224, 2225, 2250, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 30929, 29210, 29210, 29210, 29210, 29210, 29210, 746010, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31673, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 29210, 29210, 29210, 927985, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30967, 29210, 29210, 29210, 29210, 29210, 30951, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30956, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 84223, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84231, 82480, 25938, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 370418, 29254, 29254, 29254, 29254, 29254, 30067, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30784, 29254, 29254, 29254, 29254, 30789, 0, 29254, 29254, 29254, 29254, 29254, 29254, 31023, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31031, 0, 2409, 0, 0, 0, 0, 2412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 208896, 0, 0, 0, 0, 2422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2431, 0, 0, 0, 0, 0, 0, 921600, 0, 0, 2749, 0, 954368, 29210, 29210, 29210, 29210, 29210, 30350, 29210, 29210, 29210, 29210, 30355, 29210, 29210, 29210, 29210, 29210, 29210, 30664, 29210, 30666, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29941, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 1028634, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31157, 29210, 29210, 29210, 29210, 29210, 29210, 31164, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30312, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 84434, 82480, 82480, 84437, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84443, 82480, 25938, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30448, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 848454, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30463, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30070, 29254, 29254, 29254, 29254, 29254, 29254, 30078, 82480, 82480, 82480, 82480, 82480, 84450, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83258, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 31224, 29254, 29254, 31227, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31233, 29254, 0, 29210, 82480, 29254, 3114, 31787, 85036, 31789, 0, 29210, 82480, 29254, 0, 29210, 82480, 25938, 0, 29254, 29254, 29254, 29254, 30445, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 922182, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 31263, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2603, 31318, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29928, 31330, 29210, 31332, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31596, 29254, 82480, 82480, 82480, 82480, 82480, 82480, 84593, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 31690, 29254, 29254, 29254, 29254, 29254, 29254, 82480, 82480, 82480, 82480, 82480, 82480, 84605, 82480, 84607, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 31647, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 31738, 0, 0, 2941, 0, 2943, 0, 29210, 31617, 29210, 31618, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 340528, 82480, 82480, 82480, 82480, 84693, 82480, 29210, 29210, 31669, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 84929, 3036, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 307, 308, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1127, 0, 0, 0, 0, 0, 418, 0, 0, 0, 0, 447, 0, 0, 0, 0, 0, 0, 0, 0, 1118208, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 447, 447, 418, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 530, 447, 530, 530, 530, 447, 530, 530, 530, 530, 447, 29213, 29213, 29213, 82482, 29257, 29213, 82482, 29213, 29213, 82482, 82482, 82482, 29213, 29213, 29213, 29213, 29257, 29257, 29257, 29257, 29257, 29257, 29257, 29257, 29257, 29213, 82482, 29213, 29287, 82540, 29257, 29287, 29298, 1, 12290, 3, 78112, 0, 0, 0, 0, 1563, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 29210, 30346, 29210, 29210, 29210, 29210, 30351, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30653, 29210, 29210, 30654, 29210, 29210, 29210, 83668, 82480, 82480, 82480, 82480, 83673, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83679, 82480, 82480, 82480, 82480, 82480, 29254, 30498, 29254, 29254, 29254, 29254, 30503, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31475, 29254, 29254, 29210, 29210, 29210, 2240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1932, 2250, 0, 0, 0, 0, 29210, 29210, 29210, 30927, 29210, 29210, 29210, 30930, 29210, 29210, 29210, 29210, 29210, 31322, 29210, 598554, 29210, 29210, 29210, 29210, 29210, 31327, 29210, 31329, 82480, 82480, 82480, 84221, 82480, 82480, 82480, 84224, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84768, 82480, 82480, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 31021, 29254, 29254, 29254, 31024, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29254, 29210, 82480, 31259, 29210, 84509, 82480, 82480, 82480, 82480, 84932, 82480, 84934, 82480, 84936, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 31255, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 0, 2406, 0, 0, 413696, 31696, 29254, 31698, 29254, 31700, 29254, 29210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 0, 0, 0, 0, 0, 0, 1077, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1516, 0, 0, 0, 0, 0, 0, 0, 310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1055, 0, 0, 0, 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1142, 0, 0, 420, 428, 430, 419, 428, 0, 310, 428, 448, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 482, 487, 487, 498, 487, 487, 487, 487, 487, 487, 487, 487, 513, 513, 526, 526, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 513, 527, 527, 527, 527, 527, 29214, 29214, 29214, 82483, 29258, 29214, 82483, 29214, 29214, 82483, 82483, 82483, 29214, 29214, 29214, 29214, 29258, 29258, 29258, 29258, 29258, 29258, 29258, 29258, 29258, 29284, 29285, 82534, 29285, 29285, 82534, 29284, 29285, 29284, 1, 12290, 3, 78112, 0, 759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1085, 0, 0, 0, 29254, 29254, 29210, 82480, 29210, 29210, 29538, 29210, 29210, 82480, 82480, 82845, 82480, 82480, 29254, 29254, 29254, 29254, 0, 0, 1467, 0, 0, 0, 0, 0, 1473, 0, 0, 29254, 29254, 29659, 29254, 29254, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 0, 909312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 0, 1094, 1054, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 82480, 29254, 29210, 82480, 29210, 29210, 0, 0, 1118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1498, 0, 0, 0, 0, 0, 1147, 0, 0, 0, 0, 1151, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 1159168, 0, 0, 0, 0, 1159168, 0, 0, 1174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1507, 0, 0, 0, 0, 0, 0, 1192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, 0, 0, 0, 0, 1174, 0, 29874, 823, 29210, 29210, 29878, 29879, 29210, 29210, 29210, 29210, 29210, 29210, 30676, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30340, 29210, 29210, 29210, 29210, 29210, 29210, 83224, 82480, 82480, 83228, 82480, 83230, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83966, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 30038, 30039, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30053, 29254, 30057, 29254, 3110, 31783, 85032, 31785, 0, 29210, 82480, 29254, 0, 29210, 82480, 29254, 0, 29210, 82480, 29254, 3118, 31791, 85040, 31793, 0, 29210, 82480, 29254, 30061, 29254, 30063, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 320070, 0, 0, 0, 0, 1489, 1490, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 1524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1547, 0, 0, 0, 1551, 0, 0, 0, 0, 0, 0, 0, 0, 1556, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, 352, 353, 354, 0, 0, 0, 0, 1579, 0, 1581, 0, 0, 0, 0, 0, 0, 1588, 0, 0, 0, 0, 0, 0, 983040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2235, 2236, 0, 0, 0, 0, 0, 0, 29874, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30299, 29210, 29210, 29210, 29210, 31334, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 84586, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29640, 29254, 29254, 29254, 29254, 29254, 30107, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 82480, 82480, 82480, 83644, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83260, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83658, 83659, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84227, 82480, 82480, 82480, 82480, 84232, 29254, 29254, 29254, 29254, 30474, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29938, 0, 82480, 82480, 82480, 82480, 82480, 84002, 84003, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83253, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 30819, 30820, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29678, 29210, 0, 0, 2173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1143, 0, 0, 2461, 0, 0, 2464, 0, 0, 0, 2467, 2250, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31714, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 84447, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 25938, 29874, 944, 29254, 29254, 31237, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29254, 29254, 31264, 0, 0, 0, 0, 0, 2597, 0, 0, 0, 2601, 0, 0, 0, 0, 0, 0, 0, 286720, 286720, 0, 286720, 286720, 1, 12290, 3, 0, 82480, 82480, 84590, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 639536, 82480, 84600, 84601, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 0, 2747, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 84706, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30481, 29254, 31667, 31668, 29210, 29210, 29210, 31671, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 84927, 84928, 82480, 25938, 0, 29254, 30442, 29254, 29254, 29254, 29254, 30447, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 3033, 0, 0, 82480, 82480, 84931, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 31691, 31692, 29254, 29254, 29254, 31695, 31781, 0, 29210, 82480, 29254, 0, 29210, 82480, 29254, 0, 29210, 82480, 29254, 0, 29210, 82480, 29254, 0, 29210, 82480, 29254, 888832, 889370, 889392, 321, 321, 371, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1600, 0, 0, 0, 0, 431, 371, 0, 436, 442, 0, 449, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 488, 488, 499, 488, 488, 488, 488, 488, 488, 488, 488, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 29215, 29215, 29215, 82484, 29259, 29215, 82484, 29215, 29215, 82484, 82484, 82484, 29215, 29215, 29215, 29215, 29259, 29259, 29259, 29259, 29259, 29259, 29259, 29259, 29259, 29215, 82484, 29215, 29215, 82484, 29259, 29215, 29259, 1, 12290, 3, 78112, 0, 0, 788, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1968, 0, 0, 0, 788, 0, 0, 0, 0, 0, 0, 0, 788, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31315, 29210, 29210, 29210, 29210, 29210, 29521, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 83957, 0, 0, 520192, 0, 0, 0, 0, 0, 0, 0, 0, 1066, 0, 1068, 1069, 0, 0, 0, 0, 0, 1105, 0, 0, 0, 0, 0, 0, 0, 0, 1114, 0, 0, 0, 0, 0, 1121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 823, 0, 0, 0, 0, 0, 0, 1071, 1072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1144, 0, 0, 0, 0, 0, 0, 741376, 0, 0, 742442, 0, 1136, 0, 520192, 1185, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 29210, 29210, 29913, 29210, 29210, 29210, 29210, 742623, 29210, 29921, 29210, 29210, 29924, 29210, 29210, 29210, 29210, 29210, 31440, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83965, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 520752, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83240, 82480, 82480, 29254, 29254, 29254, 29254, 0, 1863, 0, 0, 0, 0, 0, 1865, 0, 0, 0, 0, 0, 0, 339968, 0, 2739, 0, 0, 0, 0, 0, 0, 856064, 82480, 82480, 742702, 82480, 83248, 82480, 82480, 83251, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83235, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 311878, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 31478, 29254, 520774, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30073, 29254, 29254, 29254, 29254, 29210, 29210, 82480, 29254, 0, 0, 0, 2875, 0, 0, 0, 0, 0, 0, 0, 524288, 0, 0, 0, 0, 864256, 0, 0, 0, 742783, 29254, 30081, 29254, 29254, 30084, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30093, 29254, 29254, 29254, 29254, 29254, 1522, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1973, 82480, 83778, 29254, 29254, 29254, 30534, 0, 1863, 0, 0, 0, 0, 0, 1865, 0, 0, 0, 0, 0, 0, 1146880, 0, 1146880, 0, 0, 0, 0, 0, 0, 0, 796, 0, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 1867, 0, 0, 0, 0, 0, 1869, 0, 0, 0, 0, 0, 1872, 0, 0, 0, 0, 1913, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 944, 0, 0, 0, 944, 0, 0, 0, 0, 585728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1154, 0, 0, 0, 0, 29210, 30699, 29210, 30701, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 84882, 82480, 82480, 82480, 82480, 82480, 83959, 82480, 82480, 82480, 385584, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84251, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83975, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 2344, 0, 0, 0, 29254, 29254, 29254, 385606, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30096, 29254, 29254, 30100, 29254, 29254, 30792, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30468, 29254, 29254, 2250, 0, 0, 0, 0, 29210, 29210, 30926, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30353, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 84220, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 928031, 82480, 0, 29254, 29254, 31020, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30467, 29254, 29254, 29254, 82480, 82480, 82480, 82480, 82480, 82480, 832048, 82480, 82480, 82480, 82480, 82480, 84455, 82480, 82480, 82480, 29211, 29211, 29211, 29211, 29255, 29255, 29255, 29255, 29255, 29255, 29255, 29255, 29255, 29211, 82480, 29211, 29211, 82480, 29255, 29211, 29255, 1, 12290, 3, 78112, 0, 0, 2605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1883, 0, 0, 0, 1052672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1157, 1158, 82480, 1053232, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30800, 29254, 29254, 29254, 29254, 29254, 31543, 29210, 82480, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1105920, 0, 0, 0, 0, 0, 0, 82480, 82480, 82480, 82480, 84933, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31468, 29254, 29254, 31697, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31666, 323, 324, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1921, 0, 0, 0, 0, 0, 322, 370, 325, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 750, 0, 0, 0, 0, 0, 0, 0, 322, 0, 0, 369, 369, 399, 0, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2200244, 2200244, 362, 0, 0, 0, 0, 0, 0, 322, 0, 324, 0, 0, 0, 450, 463, 463, 463, 463, 463, 463, 463, 476, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 489, 489, 463, 489, 489, 504, 506, 489, 489, 504, 489, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 532, 515, 515, 515, 515, 515, 29216, 29216, 29216, 82485, 29260, 29216, 82485, 29216, 29216, 82485, 82485, 82485, 29216, 29216, 29216, 29216, 29260, 29260, 29260, 29260, 29260, 29260, 29260, 29260, 29260, 29216, 82485, 29216, 29216, 82485, 29260, 29216, 29260, 1, 12290, 3, 78112, 655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, 0, 0, 0, 0, 0, 0, 1150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1567, 0, 0, 0, 0, 0, 0, 0, 0, 699, 700, 0, 0, 0, 0, 0, 706, 0, 0, 0, 710, 0, 712, 0, 0, 0, 761, 0, 0, 0, 767, 768, 0, 0, 0, 0, 0, 775, 0, 0, 0, 815, 709356, 815, 0, 29210, 29210, 29210, 29502, 29210, 29508, 29210, 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 602112, 0, 708608, 0, 765952, 0, 0, 0, 0, 708608, 765952, 0, 0, 0, 765952, 765952, 708608, 765952, 0, 699, 0, 0, 804, 0, 0, 0, 0, 0, 804, 804, 807, 0, 0, 0, 0, 0, 0, 1159168, 414, 414, 0, 0, 0, 0, 0, 414, 0, 0, 777, 0, 0, 0, 0, 0, 815, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2200245, 151552, 2200245, 0, 0, 0, 151552, 29210, 602650, 29210, 709462, 29210, 766490, 29210, 29210, 29536, 29539, 29544, 29210, 29551, 29210, 29210, 82480, 83612, 82480, 82480, 82480, 82480, 83617, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 2096, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30086, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30089, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 82480, 82809, 82480, 82815, 82480, 82480, 602672, 82480, 709521, 82480, 766512, 82480, 82480, 82843, 82846, 82851, 82480, 82858, 82480, 82480, 0, 29254, 29254, 29254, 29623, 29254, 29629, 29254, 29254, 602694, 29254, 709583, 29254, 766534, 29254, 29254, 29657, 29660, 29665, 29254, 29672, 29254, 29254, 29210, 29210, 29210, 29539, 0, 0, 0, 0, 0, 1136, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 0, 0, 0, 0, 0, 384, 0, 0, 29254, 29254, 29210, 82480, 29502, 29210, 29686, 29544, 29210, 82809, 82480, 82938, 82851, 82480, 25938, 1766, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30449, 29254, 29254, 29254, 29254, 29210, 29210, 82480, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 254411, 1, 12290, 0, 0, 0, 29623, 29254, 29694, 29665, 29254, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 304, 304, 304, 0, 0, 0, 0, 0, 1100, 0, 0, 0, 0, 0, 0, 0, 0, 1109, 0, 0, 0, 0, 0, 0, 0, 1107, 0, 0, 0, 0, 0, 0, 0, 0, 180224, 0, 0, 0, 0, 0, 0, 0, 82480, 83225, 82480, 82480, 83229, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83243, 82480, 25938, 1767, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 963142, 82480, 82480, 82480, 83269, 82480, 82480, 82480, 82480, 82480, 82480, 83278, 82480, 82480, 25938, 29874, 944, 29254, 29254, 30062, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30076, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 2988, 0, 0, 0, 0, 0, 29210, 30925, 29210, 29210, 29210, 29210, 29210, 29210, 30931, 29210, 29210, 29254, 30102, 29254, 29254, 29254, 29254, 29254, 29254, 30111, 29254, 29254, 29210, 29210, 29210, 29210, 0, 0, 0, 0, 0, 1149, 0, 0, 0, 0, 1153, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 343, 342, 65536, 341, 0, 1487, 0, 364544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1067, 0, 0, 0, 503808, 0, 0, 0, 0, 0, 0, 1503, 0, 0, 1505, 786432, 1506, 0, 1508, 1509, 0, 0, 0, 0, 1514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1182, 0, 0, 0, 0, 0, 0, 0, 0, 1526, 0, 0, 0, 0, 0, 1531, 0, 0, 1534, 0, 1536, 0, 0, 0, 0, 0, 787938, 1540, 0, 0, 0, 0, 0, 0, 0, 0, 1549, 1550, 0, 0, 0, 0, 0, 0, 1036288, 0, 0, 1556, 0, 0, 0, 0, 1558, 1559, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1569, 0, 1571, 0, 0, 0, 0, 0, 325, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 1603, 917504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1595, 0, 0, 1612, 364544, 29874, 0, 30289, 29210, 30291, 30292, 29210, 30294, 29210, 29210, 29210, 365082, 29210, 29210, 29210, 29210, 29210, 31571, 29210, 29210, 82480, 82480, 84824, 82480, 82480, 82480, 84828, 82480, 30318, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30325, 30326, 30328, 29210, 29210, 29210, 29210, 30331, 788092, 29210, 29210, 30334, 30335, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30343, 29210, 29210, 29210, 29210, 29210, 84877, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83256, 82480, 82480, 82480, 82480, 82480, 967194, 29210, 29210, 29210, 29210, 29210, 29210, 1037968, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30679, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30362, 83611, 82480, 83613, 83614, 82480, 83616, 82480, 82480, 82480, 365104, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31027, 29254, 29254, 29254, 29254, 82480, 82480, 82480, 82480, 82480, 83632, 82480, 82480, 82480, 504368, 82480, 82480, 82480, 83639, 82480, 83640, 82480, 82480, 83656, 83657, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83665, 82480, 82480, 82480, 967216, 82480, 82480, 82480, 82480, 82480, 82480, 1038042, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83992, 83993, 82480, 82480, 82480, 82480, 82480, 83684, 25938, 0, 30441, 29254, 30443, 30444, 29254, 30446, 29254, 29254, 29254, 365126, 29254, 29254, 29254, 29210, 0, 0, 2986, 0, 0, 0, 0, 0, 0, 2992, 0, 29210, 30470, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30477, 30478, 30480, 29254, 29254, 29254, 29254, 30483, 788244, 29254, 29254, 30486, 30487, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30495, 29254, 29254, 29254, 29210, 2984, 2985, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29514, 967238, 29254, 29254, 29254, 29254, 29254, 29254, 1038120, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30091, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30514, 29210, 29210, 30517, 29210, 30519, 29254, 29210, 82480, 30335, 29210, 30525, 29210, 83657, 82480, 25938, 1767, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30452, 30453, 83777, 82480, 30487, 29254, 30533, 29254, 0, 1863, 0, 0, 0, 0, 0, 1865, 0, 0, 0, 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 664, 0, 0, 0, 0, 0, 0, 0, 0, 1874, 0, 0, 1877, 1878, 0, 0, 0, 1882, 0, 0, 0, 0, 0, 0, 0, 606208, 0, 2607, 0, 0, 0, 0, 0, 0, 0, 2466, 0, 2250, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31715, 29210, 82480, 82480, 82480, 0, 0, 937984, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1945, 0, 0, 0, 0, 1911, 0, 0, 0, 1915, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1556, 0, 0, 0, 0, 0, 0, 0, 1093632, 0, 0, 1931, 0, 0, 0, 0, 0, 1164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 0, 0, 0, 1934, 0, 0, 0, 0, 0, 0, 1940, 0, 1942, 0, 0, 0, 0, 0, 0, 0, 29229, 29229, 29229, 82498, 29273, 29229, 82498, 29229, 29229, 0, 0, 0, 1950, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1878, 0, 1958, 30686, 29210, 29210, 29210, 29210, 29210, 29210, 938522, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30693, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 83971, 82480, 83973, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83651, 82480, 82480, 82480, 938544, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 1073712, 82480, 25938, 1768, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 725574, 29254, 29254, 82480, 1094192, 1098288, 82480, 0, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30464, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30790, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30513, 1098310, 29254, 29210, 29210, 29210, 29210, 29254, 30781, 30657, 83964, 29210, 30837, 29210, 29210, 82480, 84087, 2197, 0, 0, 0, 0, 2202, 0, 2204, 2205, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 362, 0, 0, 0, 0, 0, 0, 2250, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 348698, 29210, 29210, 29210, 29210, 29210, 29210, 31163, 29210, 29210, 29210, 29210, 29210, 901658, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 348720, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84440, 82480, 82480, 84442, 82480, 82480, 82480, 455216, 82480, 84235, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83281, 25938, 29874, 944, 82480, 82480, 750128, 82480, 82480, 84247, 82480, 82480, 82480, 897584, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83675, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84767, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 971312, 82480, 82480, 82480, 82480, 84259, 82480, 82480, 82480, 82480, 82480, 0, 2344, 0, 0, 0, 0, 0, 0, 1203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 296, 0, 0, 0, 300, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 348742, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29674, 29254, 29210, 29210, 29210, 29210, 0, 29254, 29254, 455238, 29254, 31035, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 30117, 29210, 0, 29254, 29254, 29254, 750150, 29254, 29254, 31047, 29254, 29254, 29254, 897606, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 3062, 0, 29210, 29210, 29210, 29210, 31711, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 83209, 82480, 82480, 82480, 82480, 82480, 83221, 82480, 29254, 971334, 29254, 29254, 29254, 29254, 31059, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29254, 29210, 0, 0, 0, 0, 0, 29210, 29210, 31759, 31760, 29210, 29210, 82480, 82480, 85011, 0, 446464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1186, 0, 0, 0, 2462, 2463, 0, 0, 0, 0, 0, 2250, 0, 29210, 29210, 29210, 29210, 29210, 29210, 31712, 29210, 31713, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84449, 82480, 82480, 82480, 82480, 82480, 901680, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84261, 82480, 82480, 82480, 0, 2344, 0, 0, 0, 29254, 29254, 29254, 29254, 31239, 29254, 29254, 29254, 29254, 29254, 901702, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29254, 29210, 82480, 31392, 29210, 84642, 82480, 31396, 29254, 0, 0, 0, 0, 1077248, 0, 0, 0, 0, 0, 0, 2609, 880640, 2610, 0, 950272, 0, 2612, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2612, 0, 0, 0, 0, 0, 0, 0, 704512, 0, 0, 0, 0, 0, 0, 0, 0, 196608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 696320, 0, 0, 0, 0, 2631, 372736, 0, 659456, 0, 0, 483328, 0, 0, 2636, 29210, 29210, 29210, 29210, 29210, 29210, 373274, 29210, 29210, 29210, 422426, 29210, 29210, 29210, 29210, 31428, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 541210, 29210, 29210, 30947, 29210, 29210, 31321, 29210, 29210, 29210, 29210, 29210, 659994, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30338, 29210, 29210, 30341, 29210, 29210, 29210, 29210, 29210, 29210, 31331, 31333, 29210, 29210, 31335, 29210, 1069594, 1077786, 82480, 82480, 82480, 82480, 82480, 82480, 373296, 82480, 82480, 82480, 422448, 82480, 82480, 82480, 82480, 84596, 82480, 82480, 82480, 82480, 82480, 660016, 82480, 82480, 82480, 82480, 2092, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31026, 29254, 29254, 31029, 31030, 29254, 29254, 29254, 29254, 29254, 29254, 373318, 29254, 29254, 29254, 422470, 29254, 29254, 29254, 29254, 31375, 29254, 29210, 0, 0, 0, 0, 0, 307738, 29210, 29210, 29210, 29210, 29210, 307760, 82480, 82480, 29254, 29254, 29254, 29254, 1463, 1863, 0, 0, 0, 0, 1469, 1865, 0, 0, 0, 0, 0, 0, 225888, 225888, 225888, 225888, 225888, 225888, 225888, 225888, 225888, 225888, 225738, 225738, 225738, 225738, 225738, 225738, 225905, 225738, 225905, 1, 12290, 3, 0, 29254, 29254, 29254, 29254, 660038, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31385, 31387, 29254, 29210, 0, 0, 3083, 0, 3085, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 3106, 0, 29210, 31779, 82480, 85028, 29254, 29254, 31389, 29254, 1069638, 1077830, 31390, 29210, 29254, 29210, 82480, 29210, 31393, 82480, 84643, 29254, 31397, 0, 0, 729088, 1060864, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 340506, 29210, 29210, 29210, 30306, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29947, 29210, 29210, 29210, 29210, 29210, 29210, 31427, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 760522, 29210, 29210, 29210, 29210, 31439, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83624, 29254, 29254, 29254, 760558, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 31477, 29210, 29210, 29210, 30321, 29210, 29210, 29210, 30324, 29210, 29210, 672282, 29210, 29210, 29210, 29210, 29210, 29210, 31672, 29210, 31674, 29210, 31676, 29210, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 0, 614400, 29210, 29210, 82480, 82480, 29254, 2737, 0, 0, 0, 0, 2822, 0, 0, 2824, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 31570, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 84827, 82480, 82480, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 868352, 2602, 0, 84775, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31054, 29254, 29254, 29254, 31542, 29254, 29210, 29210, 82480, 29254, 0, 0, 0, 0, 0, 651264, 782336, 0, 0, 0, 0, 0, 1193, 0, 0, 0, 1195, 0, 0, 0, 1197, 0, 0, 0, 0, 0, 439, 0, 0, 451, 467, 467, 467, 467, 467, 467, 467, 467, 467, 477, 467, 467, 467, 467, 467, 467, 2737, 0, 0, 0, 0, 0, 2884, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 31566, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84829, 82480, 82480, 82480, 84889, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30786, 29254, 29254, 29254, 29254, 29254, 31654, 29210, 0, 0, 0, 0, 495616, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 30349, 1004058, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 975386, 29210, 29210, 1024538, 29210, 29210, 82480, 496176, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 496198, 29254, 29210, 0, 929792, 0, 0, 0, 29210, 31758, 29210, 29210, 29210, 930330, 82480, 85010, 82480, 82480, 82480, 82480, 2093, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31038, 29254, 29254, 29254, 29254, 31042, 29254, 29254, 29254, 0, 31709, 352794, 31710, 29210, 29210, 512538, 29210, 762394, 29210, 29210, 29210, 29210, 84964, 352816, 84965, 82480, 82480, 512560, 82480, 762416, 82480, 82480, 82480, 82480, 31723, 352838, 31724, 29254, 29254, 512582, 29254, 29210, 3082, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 31761, 29210, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31028, 29254, 29254, 29254, 762438, 29254, 29254, 29254, 29254, 31730, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 31620, 29210, 29210, 29210, 31624, 82480, 82480, 930352, 29254, 31766, 29254, 29254, 29254, 930374, 0, 0, 0, 0, 29210, 29210, 29210, 31311, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 84427, 82480, 82480, 82480, 82480, 82480, 0, 0, 0, 326, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1532, 0, 0, 0, 0, 0, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1499, 0, 0, 0, 0, 366, 0, 0, 0, 374, 376, 0, 0, 0, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 409, 0, 0, 0, 409, 69632, 73728, 0, 366, 366, 0, 421, 65536, 366, 0, 0, 366, 421, 496, 500, 496, 496, 505, 496, 496, 496, 505, 496, 421, 421, 0, 327, 421, 0, 0, 421, 421, 0, 0, 0, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 217088, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 29217, 29217, 29217, 82486, 29261, 29217, 82486, 29217, 29217, 82486, 82486, 82486, 29217, 29217, 29217, 29217, 29261, 29261, 29261, 29261, 29261, 29261, 29261, 29261, 29261, 29217, 82486, 29217, 29217, 82486, 29261, 29217, 29261, 1, 12290, 3, 78112, 0, 0, 806912, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1970, 0, 0, 0, 0, 773, 0, 0, 0, 0, 0, 0, 29210, 29210, 29496, 29210, 29210, 29210, 29210, 29210, 29210, 987674, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 84585, 82480, 82480, 82480, 82480, 29210, 29210, 627226, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 83954, 82480, 82480, 82480, 82803, 82480, 82480, 82480, 82480, 82480, 82480, 627248, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83635, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 29617, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 370340, 82480, 82480, 82480, 82480, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 1055, 0, 0, 0, 0, 0, 0, 0, 29231, 29231, 29231, 82500, 29275, 29231, 82500, 29231, 29231, 0, 0, 0, 0, 1951, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1545, 0, 0, 0, 0, 82480, 82480, 83986, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84254, 82480, 82480, 30803, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30801, 29210, 29210, 30960, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30684, 29210, 82480, 82480, 82480, 307782, 29254, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 29210, 29210, 29210, 438810, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 934426, 82480, 82480, 82480, 422, 422, 0, 0, 422, 437, 0, 422, 422, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 490, 490, 464, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 29218, 29218, 29218, 82487, 29262, 29218, 82487, 29218, 29218, 82487, 82487, 82487, 29218, 29218, 29218, 29218, 29262, 29262, 29262, 29262, 29262, 29262, 29262, 29262, 29262, 29218, 82487, 29218, 29218, 82487, 29262, 29218, 29262, 1, 12290, 3, 78112, 0, 29254, 29254, 29254, 29254, 29254, 78112, 87041, 0, 0, 1028, 1032, 0, 0, 1036, 1040, 0, 29874, 1615, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30946, 29210, 82480, 83984, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82845, 82480, 29210, 963098, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84694, 978944, 0, 0, 0, 0, 0, 516096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1504, 0, 0, 0, 0, 0, 0, 1032192, 0, 0, 299008, 0, 1056768, 0, 0, 0, 0, 0, 0, 0, 2621, 0, 0, 0, 0, 0, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1971, 0, 0, 0, 0, 0, 299546, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 725530, 29210, 29210, 29210, 29210, 29210, 516634, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 836122, 29210, 29210, 29210, 29210, 29210, 467482, 29210, 29210, 29210, 29210, 29210, 31509, 29210, 29210, 29210, 29210, 29210, 29210, 1053210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83978, 82480, 82480, 82480, 82480, 82480, 82480, 29210, 29210, 29210, 1032730, 29210, 29210, 1057306, 29210, 29210, 299568, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83962, 82480, 83964, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83661, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83662, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 836144, 82480, 82480, 82480, 82480, 82480, 82480, 1032752, 82480, 82480, 1057328, 82480, 82480, 299590, 29254, 29254, 1057350, 29254, 29254, 29210, 29210, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 823, 0, 0, 0, 0, 331776, 0, 0, 0, 0, 0, 0, 0, 29210, 332314, 29210, 29210, 29210, 29210, 487962, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 509899, 29210, 533018, 29210, 29210, 29210, 29210, 909850, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 332336, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 29254, 29254, 29254, 31219, 29254, 29254, 29254, 82480, 82480, 82480, 82480, 559835, 82480, 82480, 82480, 82480, 875229, 82480, 909872, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30776, 29254, 29254, 29254, 29254, 875247, 29254, 909894, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 2737, 0, 0, 2820, 0, 0, 0, 0, 0, 0, 0, 466944, 0, 0, 29210, 29210, 29210, 29210, 496154, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 389680, 84691, 82480, 82480, 82480, 684, 0, 0, 0, 0, 688, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 0, 970752, 0, 0, 0, 2221, 0, 0, 0, 0, 0, 0, 0, 667648, 475136, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 31312, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31431, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29920, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82813, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 922160, 82480, 82480, 0, 0, 29254, 29627, 29506, 82813, 29210, 29210, 29210, 29210, 29552, 82480, 82480, 82480, 82480, 82859, 82480, 0, 29254, 29254, 29254, 29254, 29627, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 0, 0, 3035, 0, 29254, 29254, 29254, 29254, 29673, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2183, 0, 0, 29210, 29933, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30685, 0, 0, 1110016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2223, 0, 0, 0, 0, 1111620, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2442, 0, 0, 1110554, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82850, 82480, 1110598, 29254, 29210, 29210, 29210, 29210, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 29254, 29254, 0, 393216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1966, 0, 0, 0, 0, 0, 0, 376832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2184, 82480, 82480, 82480, 82480, 377392, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82839, 82480, 82480, 82480, 82480, 29254, 29254, 377414, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30496, 29254, 29254, 0, 0, 2199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2457, 0, 0, 82480, 82480, 999984, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 0, 0, 0, 33402, 297, 0, 0, 49790, 301, 0, 0, 0, 29254, 29254, 29254, 1000006, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29254, 29210, 82480, 29210, 31070, 82480, 84320, 29254, 31074, 0, 0, 0, 0, 0, 0, 0, 635, 636, 0, 0, 639, 640, 0, 0, 0, 0, 0, 569344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2632, 0, 0, 0, 0, 839680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2733, 2734, 0, 29210, 84727, 82480, 31480, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1895, 0, 0, 0, 0, 82480, 1040944, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31247, 29254, 29254, 29254, 29254, 1040966, 29210, 29210, 82480, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 455, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 465, 465, 483, 491, 491, 483, 491, 491, 491, 491, 491, 491, 491, 491, 516, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 533, 524, 524, 524, 524, 524, 29219, 29219, 29219, 82488, 29263, 29219, 82488, 29219, 29219, 82488, 82488, 82488, 29219, 29219, 29219, 29219, 29263, 29263, 29263, 29263, 29263, 29263, 29263, 29263, 29263, 29219, 82488, 29219, 29219, 82488, 29263, 29219, 29263, 1, 12290, 3, 78112, 0, 0, 0, 762, 0, 0, 765, 0, 0, 769, 0, 0, 0, 0, 0, 0, 0, 1541, 0, 0, 0, 0, 0, 0, 0, 0, 1892, 0, 0, 0, 0, 0, 0, 0, 0, 786, 0, 0, 0, 0, 0, 0, 816, 782, 0, 0, 816, 0, 0, 0, 0, 0, 0, 1491, 1492, 0, 0, 0, 0, 0, 0, 0, 0, 1049, 1050, 1051, 1052, 0, 0, 0, 0, 29516, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29553, 29210, 82480, 561712, 877104, 82480, 29254, 561734, 877126, 29254, 0, 0, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 2814, 2815, 0, 82480, 82480, 82480, 82816, 82480, 82823, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84609, 82480, 82480, 82480, 82480, 29254, 82480, 82480, 82860, 82480, 0, 29254, 29254, 29254, 29254, 29254, 29630, 29254, 29637, 29254, 29254, 29254, 29254, 29254, 29254, 553542, 29254, 29254, 30797, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 352256, 3031, 0, 0, 761856, 0, 0, 0, 0, 0, 0, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29687, 29553, 82480, 82480, 82480, 82939, 82860, 0, 29254, 29254, 29254, 29695, 29674, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1116, 0, 0, 0, 0, 0, 0, 0, 1123, 0, 0, 0, 0, 0, 0, 0, 304, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 315392, 0, 0, 0, 0, 0, 0, 0, 0, 692224, 0, 0, 0, 0, 0, 0, 0, 0, 724992, 0, 0, 0, 0, 0, 0, 0, 0, 1007616, 0, 0, 1518, 0, 1089536, 0, 0, 0, 0, 0, 1175, 0, 0, 0, 1179, 0, 0, 0, 0, 0, 0, 0, 0, 676, 677, 678, 0, 0, 0, 682, 0, 0, 0, 0, 1191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1083, 1084, 0, 0, 29210, 29887, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29904, 29210, 29210, 29210, 29210, 29210, 29210, 31323, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31165, 29210, 29210, 29210, 29210, 29210, 29210, 29911, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29931, 82480, 82480, 82480, 82480, 82480, 83231, 82480, 82480, 82480, 82480, 82480, 83238, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 29254, 29254, 29254, 29254, 29254, 30774, 29254, 29254, 82480, 83267, 82480, 82480, 82480, 82480, 83272, 82480, 82480, 82480, 83279, 82480, 82480, 25938, 29874, 944, 29254, 29254, 29254, 30064, 29254, 29254, 29254, 29254, 29254, 30071, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 0, 3034, 0, 29254, 29254, 29254, 29254, 30105, 29254, 29254, 29254, 30112, 29254, 29254, 29210, 29210, 29210, 29210, 0, 0, 0, 0, 0, 1494, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1972, 29210, 29210, 29210, 29210, 29210, 1510, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2196, 0, 0, 0, 1525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1535, 0, 0, 0, 0, 0, 1515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1140, 0, 0, 0, 0, 0, 0, 0, 0, 1552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1112, 0, 0, 0, 0, 1575, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1589, 0, 0, 0, 0, 0, 1527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1517, 0, 0, 0, 0, 0, 1590, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1602, 29210, 29210, 30333, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30342, 29210, 29210, 29210, 29210, 29210, 29938, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29922, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30348, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30356, 30358, 29210, 29210, 29210, 29210, 29210, 971290, 29210, 29210, 29210, 29210, 30965, 29210, 29210, 29210, 29210, 29210, 29210, 31176, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83217, 82480, 82480, 82480, 82480, 82480, 83629, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83638, 82480, 82480, 82480, 82480, 83655, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83664, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84451, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84262, 82480, 82480, 0, 2344, 0, 0, 0, 82480, 83670, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83678, 83680, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 29254, 29254, 29254, 30772, 29254, 29254, 29254, 29254, 29210, 29210, 82480, 29254, 0, 2873, 0, 0, 2876, 0, 0, 0, 29254, 29254, 29254, 29254, 30459, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29496, 29210, 29210, 29210, 0, 29254, 29254, 30485, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30494, 29254, 29254, 29254, 29254, 29210, 29210, 82480, 29254, 2872, 0, 2874, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 367, 367, 0, 0, 65536, 367, 29254, 29254, 30500, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30508, 30510, 29254, 29254, 29254, 29254, 29254, 29254, 623174, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31243, 29254, 29254, 29254, 29254, 29254, 29254, 1909, 0, 0, 0, 0, 0, 0, 0, 1916, 0, 0, 0, 0, 0, 0, 0, 344, 0, 402, 0, 0, 0, 0, 0, 402, 1924, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1930, 0, 0, 0, 0, 0, 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1544, 0, 0, 0, 0, 0, 82480, 82480, 84000, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 942640, 82480, 82480, 84010, 82480, 82480, 82480, 0, 0, 0, 0, 29254, 29254, 29254, 29254, 30773, 29254, 29254, 29254, 29254, 29254, 29254, 832070, 29254, 29254, 29254, 29254, 29254, 31245, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 0, 2990, 0, 0, 0, 29210, 305741, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 680474, 29210, 29210, 29210, 29210, 30817, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30827, 29254, 29210, 82480, 31069, 29210, 84319, 82480, 31073, 29254, 2403, 2404, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 135168, 135168, 0, 0, 65536, 135168, 2185, 0, 0, 2187, 0, 2188, 0, 0, 0, 0, 2191, 0, 0, 2194, 0, 0, 0, 0, 0, 373, 0, 0, 0, 0, 365, 0, 382, 0, 348, 0, 0, 2198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2209, 0, 0, 0, 0, 0, 0, 1528, 0, 1530, 0, 0, 0, 1533, 0, 0, 0, 0, 0, 0, 1554, 0, 1555, 0, 0, 0, 1557, 0, 740, 0, 0, 0, 0, 0, 2215, 0, 2217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1596, 0, 0, 0, 0, 0, 0, 2226, 2227, 0, 0, 2230, 0, 0, 2233, 0, 0, 0, 0, 0, 0, 0, 0, 705, 0, 0, 0, 0, 0, 0, 0, 0, 2241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2247, 0, 0, 0, 0, 0, 0, 0, 1003520, 0, 0, 0, 0, 0, 0, 0, 0, 2246, 0, 0, 0, 0, 0, 0, 0, 30948, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30954, 29210, 29210, 29210, 29210, 29210, 29210, 31504, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30964, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30959, 29210, 29210, 29210, 29210, 29210, 29210, 30963, 29210, 29210, 30966, 29210, 29210, 29210, 29210, 29210, 29939, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29949, 29950, 29210, 84218, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 82480, 82480, 82480, 82480, 82480, 82480, 84238, 82480, 82480, 82480, 82480, 84242, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 29254, 29254, 30771, 29254, 29254, 29254, 29254, 29254, 29254, 30085, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30099, 29254, 82480, 82480, 82480, 82480, 82480, 84248, 82480, 82480, 82480, 82480, 82480, 82480, 84253, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 344602, 29210, 29210, 29210, 31314, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 84257, 82480, 82480, 84260, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 31018, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 942662, 29254, 29254, 29254, 29254, 29254, 31057, 29254, 29254, 31060, 29254, 29254, 29254, 29254, 31064, 29210, 29210, 29254, 29254, 29210, 30516, 29210, 29210, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 29254, 29254, 340550, 29254, 29254, 29254, 29254, 31463, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 31066, 31067, 84316, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 2405, 0, 0, 0, 0, 0, 0, 0, 1048576, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2211, 29210, 29210, 31147, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30969, 29210, 29210, 31158, 31159, 29210, 29210, 31162, 29210, 29210, 29210, 29210, 31166, 29210, 29210, 31168, 29210, 31170, 84433, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84444, 84445, 82480, 82480, 84448, 82480, 82480, 82480, 82480, 84452, 82480, 82480, 84454, 82480, 84456, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31464, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 410182, 410138, 410160, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2816, 82480, 84459, 82480, 82480, 82480, 82480, 82480, 0, 0, 29254, 29254, 31218, 29254, 29254, 29254, 29254, 29210, 82480, 29210, 29210, 82480, 29254, 29210, 29254, 1, 12290, 3, 78112, 31223, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31234, 31235, 29254, 29254, 31238, 29254, 29254, 29254, 29254, 31242, 29254, 29254, 31244, 29254, 31246, 29254, 29254, 0, 2593, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 29254, 31249, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31534, 29254, 29254, 29254, 29254, 29254, 29254, 29667, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 29254, 29254, 344064, 0, 0, 2595, 2596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1608, 1609, 0, 1610, 0, 0, 0, 0, 0, 0, 2626, 0, 0, 0, 0, 2630, 0, 0, 0, 0, 0, 0, 0, 375, 0, 378, 0, 0, 0, 378, 0, 0, 31319, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31328, 29210, 29210, 29210, 30648, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30315, 29210, 29210, 29210, 82480, 84589, 82480, 82480, 82480, 82480, 84594, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84005, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84603, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 31693, 29254, 29254, 29254, 29254, 29254, 29254, 344646, 29254, 29254, 29254, 31368, 29254, 29254, 29254, 29254, 31373, 29254, 29254, 29254, 29254, 29254, 29659, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29538, 0, 2746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 31144, 29210, 31500, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31510, 29210, 29210, 29210, 29210, 29937, 29210, 29210, 29210, 29210, 29943, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 999962, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31432, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 84763, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84773, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 31646, 29254, 29254, 29254, 31650, 29254, 29254, 29210, 29210, 29210, 29210, 29254, 30833, 30834, 84083, 29210, 29210, 29210, 29210, 82480, 82480, 311856, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 2096, 0, 0, 31540, 29254, 29254, 29254, 29210, 29210, 82480, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 791, 29210, 29210, 29210, 29504, 29210, 29210, 29210, 2737, 0, 0, 0, 0, 0, 0, 0, 2886, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30652, 29210, 29210, 29210, 385562, 29210, 29210, 29210, 29210, 2939, 2940, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31623, 29210, 29210, 29210, 30661, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30655, 29210, 30657, 31625, 31626, 29210, 31627, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84884, 82480, 84886, 84887, 82480, 84888, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31649, 29254, 31651, 31652, 29254, 31653, 29254, 31655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 31142, 29210, 29210, 31739, 29210, 29210, 82480, 82480, 82480, 84992, 84993, 82480, 82480, 29254, 29254, 29254, 31750, 31751, 29254, 29254, 29210, 30829, 29210, 29210, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 83205, 83206, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83220, 82480, 729, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2239, 0, 380928, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1520, 1521, 82480, 82480, 356912, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83666, 82480, 82480, 82480, 356934, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 516678, 400, 0, 0, 0, 0, 378, 0, 69632, 73728, 0, 0, 0, 0, 423, 65536, 0, 0, 0, 0, 0, 1564, 0, 0, 1566, 0, 0, 0, 0, 0, 0, 0, 658, 0, 658, 0, 0, 0, 0, 0, 0, 423, 423, 0, 0, 423, 0, 443, 423, 423, 466, 466, 466, 473, 466, 466, 466, 466, 466, 466, 466, 466, 473, 466, 466, 466, 466, 466, 466, 466, 466, 480, 466, 492, 492, 466, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 535, 29220, 29220, 29220, 82489, 29264, 29220, 82489, 29220, 29220, 82489, 82489, 82489, 29220, 29220, 29220, 29220, 29264, 29264, 29264, 29264, 29264, 29264, 29264, 29264, 29264, 29220, 82489, 29220, 29220, 82489, 29264, 29220, 29264, 1, 12290, 3, 78112, 0, 656, 657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2737, 0, 0, 0, 0, 0, 0, 734, 0, 0, 0, 0, 734, 0, 740, 0, 0, 0, 0, 0, 0, 296, 0, 0, 0, 296, 0, 297, 0, 0, 0, 721, 0, 734, 657, 0, 0, 0, 0, 0, 29210, 29210, 29497, 29210, 29210, 29210, 29511, 82804, 82480, 82480, 82480, 82818, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82847, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 31645, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30043, 29254, 29254, 29254, 30052, 29254, 29254, 29254, 29254, 0, 0, 29618, 29254, 29210, 82480, 29210, 29210, 29540, 29210, 29210, 82480, 82480, 82847, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 467526, 29254, 29254, 29254, 29254, 29254, 31539, 0, 29254, 29254, 29661, 29254, 29254, 288, 87041, 0, 0, 1028, 1032, 0, 0, 1036, 1040, 1087, 0, 0, 362, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1943, 0, 0, 0, 0, 0, 0, 1048, 0, 0, 0, 1194, 294912, 0, 0, 1047, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 29210, 29210, 29888, 29895, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29907, 29210, 29210, 29210, 29210, 30307, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29906, 565786, 29210, 29210, 29210, 29210, 29210, 29935, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29948, 29210, 29210, 29210, 29210, 549402, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30695, 30696, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 83249, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83262, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 31462, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30782, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30505, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30037, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30048, 30055, 29254, 29254, 29254, 29254, 29254, 29661, 29254, 29254, 29254, 29254, 29254, 29497, 29210, 29210, 29540, 0, 29254, 29254, 29254, 30082, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30095, 29254, 29254, 29254, 29254, 29254, 29254, 30109, 30110, 29254, 29254, 29254, 30115, 29210, 29210, 30118, 0, 29254, 30048, 29888, 83215, 29210, 29935, 29210, 29210, 82480, 83262, 82480, 82480, 29254, 30095, 29254, 29254, 29210, 29210, 29210, 29210, 29254, 29254, 29210, 82480, 30836, 29210, 29210, 29210, 84086, 82480, 0, 29874, 1615, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30300, 30301, 29210, 29210, 30320, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31155, 29210, 82480, 82480, 82480, 83630, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83681, 82480, 82480, 82480, 82480, 83642, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83263, 82480, 29254, 29254, 29254, 29254, 30460, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30049, 29254, 29254, 29254, 29254, 29254, 29254, 30472, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30511, 29254, 29254, 82480, 82480, 82480, 83987, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83997, 82480, 82480, 82480, 82480, 29254, 31643, 29254, 31644, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30044, 29254, 29254, 29254, 29254, 29254, 29254, 30058, 82480, 82480, 82480, 84001, 82480, 82480, 82480, 82480, 84004, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 29254, 31217, 29254, 29254, 29254, 29254, 29254, 29254, 30804, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30814, 29254, 29254, 29254, 29254, 29254, 29663, 29254, 29254, 29254, 29254, 29254, 336700, 29210, 29210, 29679, 0, 29254, 30818, 29254, 29254, 29254, 29254, 30821, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30479, 29254, 29254, 700998, 29254, 29254, 29254, 0, 2213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1548, 0, 84233, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82854, 29254, 31033, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30826, 29254, 29254, 0, 0, 2410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2421, 2445, 0, 0, 0, 0, 2450, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2459, 29210, 31146, 29210, 29210, 29210, 29210, 29210, 29210, 31152, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31177, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 84432, 82480, 82480, 82480, 82480, 82480, 82480, 84438, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84226, 82480, 82480, 84229, 84230, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84463, 82480, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 31222, 0, 0, 0, 0, 0, 548864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1125, 733, 0, 0, 0, 1078, 0, 2624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1572, 1573, 549446, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 928079, 0, 0, 0, 2736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1126, 0, 0, 0, 82480, 82480, 82480, 84967, 82480, 84968, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 31726, 29254, 31727, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 31736, 29210, 29210, 29210, 29210, 30308, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30357, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 84990, 82480, 82480, 82480, 82480, 82480, 82480, 31748, 29254, 29254, 29254, 29254, 29254, 29210, 31391, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 0, 0, 0, 2408, 0, 29210, 85022, 82480, 82480, 82480, 31776, 29254, 29254, 29254, 0, 0, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 0, 0, 0, 2812, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 371, 0, 65536, 0, 467, 467, 467, 451, 451, 467, 451, 451, 451, 451, 451, 451, 451, 451, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 29221, 29221, 29221, 82490, 29265, 29221, 82490, 29221, 29221, 82490, 82490, 82490, 29221, 29221, 29221, 29221, 29265, 29265, 29265, 29265, 29265, 29265, 29265, 29265, 29265, 29221, 82490, 29221, 29221, 82490, 29265, 29221, 29265, 1, 12290, 3, 78112, 0, 0, 0, 658, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29512, 29210, 29210, 29522, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 83953, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82819, 82480, 82480, 82829, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83963, 82480, 82480, 434736, 82480, 82480, 82480, 83970, 0, 1117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1871, 0, 0, 0, 1132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2744, 0, 0, 0, 0, 1146, 0, 1148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2192, 0, 0, 0, 0, 29210, 29210, 29889, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31512, 29210, 82480, 82480, 82480, 83247, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83264, 82480, 82480, 82480, 82480, 83270, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 25938, 29874, 944, 29254, 30080, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30097, 29254, 29254, 29210, 29210, 29210, 29210, 29254, 30455, 30303, 83625, 29210, 29210, 29210, 29210, 82480, 82480, 29254, 29254, 29254, 31530, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30114, 29210, 29210, 29210, 29210, 0, 29254, 29254, 30103, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 0, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0, 1587, 0, 0, 0, 0, 0, 0, 2425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1064, 0, 0, 0, 0, 0, 0, 29254, 30049, 29889, 83216, 29210, 29210, 30125, 29210, 82480, 82480, 83377, 82480, 29254, 29254, 30133, 29254, 29254, 29210, 82480, 30123, 29210, 29210, 30126, 83375, 82480, 82480, 83378, 30131, 29254, 29254, 30134, 87041, 0, 1465, 0, 0, 0, 1471, 0, 0, 0, 1477, 0, 0, 0, 1483, 0, 0, 0, 0, 0, 1593, 0, 0, 1595, 0, 0, 0, 1599, 0, 0, 0, 0, 0, 0, 1165, 0, 1055, 0, 0, 0, 0, 0, 0, 0, 296, 33405, 0, 0, 300, 49793, 0, 0, 0, 0, 0, 577536, 0, 0, 679936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1139, 0, 0, 0, 0, 0, 30302, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30313, 29210, 29210, 29210, 29210, 29210, 29210, 29532, 29210, 29210, 29210, 29210, 29549, 29210, 29210, 29210, 82480, 30454, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30465, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 2737, 0, 0, 0, 0, 1935, 1936, 0, 0, 0, 0, 0, 1941, 0, 0, 0, 0, 0, 0, 0, 1582, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 331, 331, 0, 0, 0, 0, 29210, 29210, 30660, 29210, 29210, 29210, 29210, 30665, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31506, 31507, 31508, 29210, 29210, 29210, 29210, 29210, 29210, 30687, 29210, 29210, 29210, 29210, 30692, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30704, 291376, 82480, 82480, 82480, 82480, 82480, 82480, 83972, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83667, 82480, 83999, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84009, 82480, 82480, 82480, 82480, 84591, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83280, 82480, 25938, 29874, 944, 82480, 82480, 82480, 82480, 82480, 82480, 84836, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30811, 29254, 29254, 29254, 29254, 30816, 29254, 29254, 29254, 29254, 29254, 29254, 31603, 29210, 0, 0, 0, 2935, 0, 0, 2737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29254, 995866, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 83615, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84263, 82480, 0, 0, 0, 2345, 0, 385, 387, 337, 0, 0, 0, 0, 0, 0, 336, 0, 0, 337, 0, 0, 0, 0, 0, 0, 1606, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 1598, 0, 0, 0, 0, 0, 0, 0, 1611, 0, 1591, 0, 0, 432, 336, 0, 0, 444, 0, 0, 468, 468, 468, 468, 468, 468, 468, 29222, 29222, 29222, 82491, 29266, 29222, 82491, 29222, 29222, 478, 468, 468, 468, 497, 474, 497, 497, 497, 497, 497, 497, 497, 497, 468, 468, 474, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 478, 468, 479, 478, 468, 468, 468, 468, 82491, 82491, 82491, 29222, 29222, 29222, 29222, 29266, 29266, 29266, 29266, 29266, 29266, 29266, 29266, 29266, 29222, 82491, 29222, 29222, 82491, 29266, 29222, 29266, 1, 12290, 3, 78112, 0, 0, 0, 0, 659, 0, 0, 634880, 662, 0, 0, 0, 0, 0, 0, 0, 412, 412, 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, 811008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1141, 0, 0, 0, 0, 0, 685, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 296, 0, 297, 0, 300, 0, 301, 0, 0, 0, 0, 0, 0, 0, 717, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2619, 0, 0, 0, 0, 0, 659, 0, 779, 0, 0, 0, 0, 0, 0, 0, 783, 0, 0, 0, 0, 0, 0, 303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 122880, 122880, 0, 0, 789, 0, 0, 0, 0, 0, 792, 0, 0, 0, 0, 698, 0, 0, 0, 0, 0, 0, 0, 0, 707, 0, 709, 0, 0, 0, 0, 0, 795, 0, 792, 783, 0, 0, 797, 0, 662, 0, 779, 0, 0, 0, 0, 0, 0, 1902, 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, 0, 0, 0, 0, 0, 728, 0, 0, 659, 812, 0, 779, 0, 0, 0, 0, 0, 817, 0, 0, 0, 0, 0, 0, 303, 204800, 204800, 0, 205103, 204800, 1, 12290, 3, 0, 0, 0, 783, 659, 635697, 0, 0, 0, 0, 29210, 29210, 29498, 29210, 29210, 29210, 29513, 29210, 29210, 635731, 29210, 29210, 29210, 29531, 29210, 29210, 29210, 29210, 29548, 29210, 29210, 29210, 82480, 430640, 84991, 82480, 82480, 82480, 82480, 29254, 430662, 31749, 29254, 29254, 29254, 82805, 82480, 82480, 82480, 82820, 82480, 82480, 635790, 82480, 82480, 82480, 82838, 82480, 82480, 82480, 82480, 0, 0, 0, 2097, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30809, 30810, 29254, 29254, 29254, 29254, 29254, 29254, 938566, 82855, 82480, 82480, 82480, 0, 29254, 29254, 29619, 29254, 29254, 29254, 29634, 29254, 29254, 635852, 29254, 29254, 29254, 29254, 29254, 30475, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30482, 29254, 29254, 29254, 29254, 29254, 30488, 30489, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29673, 29254, 29210, 29210, 29210, 29210, 0, 29254, 29254, 29652, 29254, 29254, 29254, 29254, 29669, 29254, 29254, 29254, 29498, 29210, 29531, 29210, 0, 0, 0, 0, 0, 1889, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2429, 0, 0, 0, 0, 0, 0, 0, 29619, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83211, 82480, 82480, 82480, 82480, 82480, 1129, 0, 0, 0, 0, 0, 0, 1050, 0, 0, 0, 0, 0, 0, 0, 1052, 0, 1160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1884, 1885, 1173, 0, 0, 0, 0, 0, 0, 0, 0, 1180, 0, 0, 0, 0, 0, 1088, 0, 362, 362, 0, 1091, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1880, 0, 0, 0, 0, 0, 0, 0, 0, 1190, 0, 0, 0, 0, 0, 0, 0, 1173, 0, 0, 0, 1198, 0, 0, 0, 0, 0, 1901, 0, 0, 0, 0, 0, 0, 0, 1906, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 29210, 29210, 29890, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29909, 29210, 29210, 29210, 30674, 29210, 30675, 29210, 30678, 29210, 29210, 29210, 29210, 29210, 829403, 29210, 29210, 29210, 29210, 705050, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 832026, 29210, 29210, 29210, 29210, 29210, 31169, 29210, 29254, 30120, 30121, 83370, 29210, 30124, 29210, 29210, 82480, 83376, 82480, 82480, 29254, 30132, 29254, 29254, 29210, 29210, 29210, 29210, 29254, 30520, 30521, 83770, 29210, 30524, 29210, 29210, 82480, 83776, 0, 0, 1488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2878, 0, 0, 0, 0, 1561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20480, 0, 0, 0, 0, 0, 1605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1155, 0, 0, 0, 0, 29874, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30296, 29210, 29210, 29210, 29210, 29210, 29210, 31572, 29210, 84822, 82480, 82480, 82480, 84826, 82480, 82480, 82480, 82480, 82480, 83628, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83967, 82480, 82480, 82480, 29254, 29254, 29254, 30458, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31231, 29254, 29254, 29254, 0, 1948, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1044480, 0, 0, 0, 0, 0, 0, 1926, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1167, 0, 0, 0, 0, 311296, 0, 1045018, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 83955, 82480, 82480, 29254, 29254, 401990, 29254, 29254, 29254, 461613, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30795, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31369, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 2176, 0, 2178, 0, 0, 2181, 0, 0, 0, 0, 819200, 0, 0, 0, 0, 0, 1914, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 722, 0, 0, 0, 0, 0, 0, 0, 905216, 2186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2193, 0, 0, 0, 0, 0, 0, 1938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1917, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2242, 0, 0, 2245, 0, 0, 0, 0, 0, 0, 0, 2249, 0, 0, 0, 0, 0, 1937, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1881, 0, 0, 0, 0, 0, 29210, 30935, 30936, 29210, 29210, 29210, 29210, 30940, 29210, 30942, 29210, 29210, 29210, 30945, 29210, 29210, 29210, 29210, 639514, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31505, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 520730, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 907502, 29210, 29210, 29210, 30962, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30944, 29210, 29210, 29210, 29210, 82480, 82480, 84234, 82480, 84236, 82480, 82480, 82480, 84239, 82480, 82480, 82480, 82480, 82480, 84243, 82480, 82480, 82480, 82480, 31642, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 1143, 82480, 82480, 82480, 82480, 819760, 82480, 82480, 82480, 82480, 82480, 82480, 907548, 82480, 82480, 82480, 84256, 29254, 29254, 29254, 31034, 29254, 31036, 29254, 29254, 29254, 31039, 29254, 29254, 29254, 29254, 29254, 31043, 29254, 29254, 29254, 29254, 29254, 819782, 29254, 29254, 29254, 29254, 29254, 29254, 907596, 29254, 29254, 29254, 29254, 29254, 29664, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29543, 0, 31056, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29254, 29254, 29254, 29254, 29254, 30502, 29254, 29254, 29254, 29254, 30507, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 31621, 29210, 29210, 29210, 0, 2423, 1081344, 573440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1497, 0, 0, 0, 2433, 0, 0, 0, 0, 0, 2436, 0, 2438, 0, 0, 0, 2441, 0, 0, 0, 0, 0, 0, 1953, 1954, 0, 1956, 0, 0, 0, 1954, 0, 0, 0, 2446, 0, 0, 2449, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2742, 0, 0, 2745, 0, 2460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31140, 29210, 29210, 29210, 29210, 29210, 30309, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29944, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31172, 29210, 29210, 31175, 29210, 29210, 1081882, 84426, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83977, 82480, 82480, 82480, 82480, 82480, 83981, 82480, 83982, 84458, 82480, 82480, 84461, 82480, 82480, 1081904, 0, 0, 31216, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 2737, 2937, 0, 31248, 29254, 29254, 31251, 29254, 29254, 1081926, 29210, 29210, 31256, 31257, 84506, 29210, 29210, 82480, 82480, 29254, 30841, 29254, 29254, 1863, 0, 1865, 0, 1867, 0, 1869, 0, 0, 0, 0, 0, 0, 1178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 943, 943, 943, 943, 943, 943, 943, 943, 943, 0, 0, 0, 598016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1546, 0, 0, 0, 2634, 0, 0, 29210, 29210, 31310, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30943, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 84602, 82480, 84604, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 31590, 29254, 31592, 29254, 29254, 29254, 29254, 29254, 29254, 31364, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 488006, 29254, 29254, 29254, 31376, 29254, 598598, 29254, 29254, 29254, 29254, 29254, 31381, 29254, 31383, 29254, 29254, 29254, 29254, 29254, 29254, 30462, 29254, 29254, 29254, 504390, 29254, 29254, 29254, 30469, 29254, 0, 389120, 0, 2728, 0, 0, 0, 581632, 0, 0, 0, 0, 0, 0, 0, 0, 1079, 0, 0, 0, 0, 0, 0, 0, 389658, 31425, 29210, 29210, 29210, 31429, 31430, 29210, 29210, 29210, 582170, 29210, 29210, 29210, 29210, 31436, 84695, 84696, 82480, 82480, 82480, 582192, 82480, 82480, 82480, 82480, 84702, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84606, 84608, 82480, 82480, 84610, 82480, 1069616, 1077808, 29254, 582214, 29254, 29254, 29254, 29254, 31472, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 30526, 82480, 82480, 2737, 2818, 0, 0, 0, 0, 0, 737280, 0, 0, 0, 0, 0, 0, 29210, 29210, 406042, 29210, 29210, 29210, 29210, 31622, 29210, 29210, 2737, 0, 2880, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30932, 29210, 29210, 29210, 31568, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 1110576, 82480, 84831, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30098, 29254, 31598, 29254, 29254, 29254, 29254, 29254, 29210, 0, 405504, 0, 0, 913408, 0, 2737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31498, 29210, 29210, 29210, 913946, 29210, 29210, 82480, 82480, 406064, 82480, 82480, 82480, 82480, 84883, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 29210, 561690, 877082, 82480, 913968, 82480, 82480, 29254, 29254, 406086, 29254, 29254, 29254, 29254, 31648, 29254, 29254, 29254, 29254, 29254, 29254, 30780, 29254, 29254, 434758, 29254, 29254, 29254, 30787, 29254, 29254, 913990, 29254, 29254, 29210, 0, 0, 0, 2987, 0, 0, 2989, 0, 0, 0, 0, 29210, 29210, 29210, 30689, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30955, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 84935, 82480, 84937, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30069, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31049, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31699, 29254, 31701, 29210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2219, 0, 0, 0, 0, 0, 0, 85012, 82480, 82480, 29254, 29254, 31767, 31768, 29254, 29254, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 30322, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31154, 29210, 29210, 31156, 889414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 339, 340, 341, 342, 343, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41692, 46182, 0, 0, 0, 0, 0, 0, 388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1570, 0, 0, 0, 342, 342, 0, 343, 342, 0, 341, 342, 452, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 484, 493, 493, 501, 493, 503, 493, 493, 503, 503, 493, 503, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 29223, 29223, 29223, 82492, 29267, 29223, 82492, 29223, 29223, 82492, 82492, 82492, 29278, 29278, 29278, 29223, 29267, 29267, 29267, 29267, 29267, 29267, 29267, 29267, 29267, 29223, 82492, 29223, 29223, 82492, 29267, 29223, 29267, 1, 12290, 3, 78112, 0, 0, 0, 643, 0, 0, 0, 0, 647, 648, 649, 650, 651, 652, 653, 0, 0, 0, 0, 0, 1952, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2207, 2208, 0, 0, 0, 0, 0, 1019904, 0, 0, 0, 0, 0, 0, 691, 362, 362, 362, 0, 0, 0, 0, 0, 0, 328, 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, 69632, 73728, 0, 416, 416, 0, 0, 65536, 416, 713, 0, 715, 0, 0, 0, 0, 0, 0, 0, 0, 0, 725, 0, 0, 0, 0, 0, 0, 2189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2740, 0, 0, 0, 0, 0, 0, 0, 643, 744, 745, 746, 0, 0, 0, 0, 0, 752, 753, 0, 755, 756, 670, 671, 0, 0, 0, 0, 0, 675, 0, 0, 0, 0, 0, 0, 0, 0, 1493, 1494, 0, 0, 0, 0, 0, 0, 0, 0, 778, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, 0, 0, 0, 0, 0, 0, 2203, 0, 0, 2206, 0, 0, 0, 2210, 0, 0, 0, 0, 790, 0, 0, 1019904, 0, 0, 667, 0, 1019904, 0, 793, 670, 715, 0, 0, 0, 0, 0, 1962, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1026, 1030, 0, 0, 1034, 1038, 1019904, 794, 0, 0, 0, 0, 753, 0, 0, 0, 0, 0, 0, 0, 0, 746, 802, 803, 0, 0, 0, 0, 0, 0, 746, 0, 0, 806, 691, 0, 0, 0, 0, 0, 0, 2232, 0, 0, 0, 0, 2237, 0, 0, 0, 0, 0, 0, 0, 528384, 0, 528384, 0, 0, 0, 0, 0, 0, 0, 1607, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 106496, 0, 0, 0, 0, 106496, 811, 0, 0, 0, 813, 0, 0, 0, 1019904, 691, 0, 0, 1019904, 811, 811, 0, 0, 0, 0, 0, 2177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98304, 0, 0, 0, 53248, 0, 0, 29517, 29210, 29210, 29527, 29528, 29530, 29210, 29210, 29210, 29541, 1020442, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84970, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30822, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 1045062, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 82480, 82810, 82814, 82817, 82480, 82824, 82480, 82480, 82834, 82835, 82837, 82480, 82480, 82480, 82848, 1020464, 29649, 29651, 29254, 29254, 29254, 29662, 1020486, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29541, 0, 0, 0, 0, 0, 2216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1967, 0, 0, 0, 0, 0, 0, 0, 29254, 29682, 29683, 82932, 29503, 29210, 29541, 1020442, 29688, 82810, 82480, 82848, 1020464, 82940, 0, 29624, 29254, 29662, 1020486, 29696, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 1542, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1059, 0, 0, 0, 1063, 0, 0, 1065, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 422, 65536, 0, 0, 0, 0, 362, 362, 1090, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1495, 1496, 0, 0, 0, 0, 1189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 29210, 29934, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29946, 29210, 29210, 29210, 29210, 29210, 30323, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30330, 29210, 82480, 83245, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83254, 82480, 82480, 83261, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 31772, 29210, 29210, 29254, 29254, 29254, 29254, 30106, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 30116, 29210, 29210, 0, 0, 0, 0, 0, 2231, 0, 0, 0, 0, 0, 0, 0, 2238, 0, 0, 0, 0, 0, 383, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 1502, 671744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 0, 0, 0, 0, 0, 29874, 0, 29210, 30290, 29210, 29210, 29210, 29210, 30295, 29210, 29210, 29210, 29210, 29210, 29210, 29918, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29927, 29210, 82480, 82480, 83643, 82480, 82480, 82480, 83646, 82480, 82480, 672304, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84249, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83252, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 30473, 29254, 29254, 29254, 30476, 29254, 29254, 672326, 29254, 29254, 29254, 29254, 29254, 29254, 29668, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 0, 1032, 0, 0, 0, 1868, 0, 1036, 0, 0, 0, 1870, 0, 1040, 0, 0, 0, 0, 0, 435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 1887, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 0, 0, 1898, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 815104, 0, 0, 0, 1961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1896, 0, 0, 0, 82480, 82480, 82480, 82480, 82480, 82480, 83989, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84240, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 30806, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30050, 29254, 29254, 29254, 29254, 0, 0, 0, 2214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1944, 0, 1946, 1947, 0, 0, 2251, 0, 1615, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31153, 29210, 29210, 29210, 29210, 82480, 84446, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83683, 82480, 29254, 31236, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 688666, 29210, 29210, 84588, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84598, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 0, 0, 3099, 0, 29210, 29210, 29210, 29210, 30662, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 305768, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 31377, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 705094, 29254, 29254, 0, 0, 2727, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 29210, 29210, 29210, 31502, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30682, 29210, 29210, 29210, 84761, 82480, 82480, 82480, 82480, 84765, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84769, 84770, 84771, 82480, 82480, 82480, 2737, 2879, 0, 0, 0, 0, 0, 0, 0, 29210, 29210, 31561, 29210, 29210, 29210, 31565, 82480, 82480, 82480, 82480, 84834, 82480, 82480, 29254, 29254, 31591, 29254, 29254, 29254, 31595, 29254, 29254, 29210, 29210, 29210, 29210, 29254, 30782, 30658, 83965, 29210, 29210, 29210, 29210, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31535, 29254, 29254, 29254, 29254, 29254, 29254, 31367, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31062, 29254, 29254, 29210, 29210, 29210, 29254, 29254, 29254, 29254, 31601, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 2737, 0, 2938, 386, 0, 0, 0, 390, 386, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1556, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 344, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 2244, 0, 0, 0, 0, 0, 0, 0, 2248, 0, 0, 0, 0, 0, 660, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1918, 0, 1920, 0, 0, 0, 0, 0, 433, 0, 0, 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1597, 0, 0, 0, 0, 0, 519, 519, 519, 519, 0, 0, 0, 0, 0, 0, 0, 0, 519, 519, 519, 519, 519, 519, 519, 29224, 29224, 29224, 82493, 29268, 29224, 82493, 29224, 29224, 82493, 82493, 82493, 29224, 29224, 29224, 29224, 29268, 29268, 29268, 29268, 29268, 29268, 29268, 29268, 29268, 29224, 82493, 29224, 29288, 82541, 29268, 29288, 29299, 1, 12290, 3, 78112, 0, 0, 0, 0, 672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 672, 743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 962560, 82856, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30051, 29254, 29254, 29254, 29254, 29254, 29254, 29653, 29254, 29254, 29254, 29254, 29670, 29254, 29254, 29254, 29210, 29210, 29532, 29210, 0, 0, 0, 0, 0, 2411, 0, 0, 0, 2415, 0, 0, 0, 0, 0, 0, 0, 1565, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327680, 0, 0, 0, 0, 0, 0, 0, 0, 29681, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83619, 82480, 82480, 82480, 82480, 82480, 0, 1058, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1907, 1908, 0, 0, 0, 1119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1128, 0, 0, 0, 0, 0, 2435, 0, 0, 0, 0, 2440, 0, 0, 0, 0, 0, 0, 0, 114688, 0, 241664, 258048, 0, 0, 0, 0, 0, 0, 0, 25157, 25157, 25157, 25157, 25157, 25157, 25157, 25157, 25157, 0, 0, 1133, 0, 0, 0, 0, 1053, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328454, 0, 0, 0, 0, 0, 1162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1968, 0, 0, 0, 29210, 29210, 29891, 29210, 29210, 29210, 29210, 29900, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 84823, 82480, 84825, 82480, 82480, 82480, 82480, 29210, 29912, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29929, 82480, 82480, 83227, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83239, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 3098, 0, 0, 0, 29210, 29210, 29210, 29210, 30690, 29210, 29210, 29210, 29210, 30694, 29210, 29210, 29210, 29210, 30697, 29210, 82480, 82480, 82480, 82480, 82480, 83271, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 25938, 29874, 944, 30060, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30072, 29254, 29254, 29254, 29254, 29254, 29254, 30042, 29254, 29254, 29254, 29254, 29254, 30054, 29254, 29254, 29254, 29254, 29254, 29254, 30104, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 0, 0, 0, 0, 2627, 2628, 0, 0, 0, 0, 409600, 0, 0, 0, 0, 0, 0, 661, 0, 0, 663, 0, 0, 0, 0, 0, 0, 0, 2413, 0, 0, 0, 2417, 0, 0, 0, 0, 30119, 30051, 29891, 83218, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 0, 0, 29210, 29210, 82480, 82480, 29254, 87041, 0, 1466, 0, 0, 0, 1472, 0, 0, 0, 1478, 0, 0, 0, 1484, 0, 0, 0, 0, 0, 2730, 0, 0, 757760, 0, 0, 0, 0, 0, 0, 946176, 0, 0, 0, 1538, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1969, 0, 0, 0, 0, 0, 958464, 0, 0, 0, 0, 0, 0, 0, 0, 1134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 671744, 0, 0, 0, 0, 0, 0, 0, 0, 1479, 0, 0, 0, 0, 0, 1485, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 418, 0, 65536, 0, 30672, 29210, 610842, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 942618, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 83976, 82480, 82480, 82480, 83979, 82480, 610864, 82480, 82480, 82480, 29277, 29277, 29277, 29210, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30113, 29254, 29210, 29210, 29210, 29210, 0, 29254, 29254, 29254, 29254, 30793, 29254, 29254, 29254, 30796, 29254, 610886, 29254, 29254, 29254, 29254, 29254, 29254, 30068, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31230, 29254, 29254, 31232, 29254, 29254, 0, 1972, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31317, 82480, 82480, 82480, 84246, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84441, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 31046, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30074, 29254, 30077, 29254, 29254, 0, 2635, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29552, 29210, 82480, 2737, 0, 0, 0, 0, 2883, 0, 2885, 0, 29210, 31560, 29210, 31562, 29210, 29210, 29210, 29210, 30938, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31167, 29210, 29210, 29210, 29210, 0, 0, 0, 2942, 0, 892928, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31325, 31326, 29210, 29210, 29210, 29210, 0, 0, 528384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335872, 0, 0, 0, 0, 0, 528384, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 528922, 82480, 82480, 82480, 82480, 528944, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83637, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82861, 0, 29254, 29254, 29254, 29254, 29254, 29254, 528966, 29254, 29254, 29254, 29254, 29254, 29254, 30808, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30823, 29254, 30825, 29254, 29254, 29254, 29254, 0, 29254, 29254, 29254, 29254, 29254, 78112, 87041, 0, 0, 1029, 1033, 0, 0, 1037, 1041, 0, 29874, 1616, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29908, 29210, 29210, 82480, 82480, 82480, 84698, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 725552, 82480, 82480, 82480, 345, 345, 0, 347, 345, 0, 0, 345, 345, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 438, 0, 0, 329, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 0, 0, 0, 345, 345, 347, 345, 345, 345, 345, 345, 345, 510, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 29225, 29225, 29225, 82494, 29269, 29225, 82494, 29225, 29225, 82494, 82494, 82494, 29225, 29225, 29225, 29225, 29269, 29269, 29269, 29269, 29269, 29269, 29269, 29269, 29269, 29225, 82494, 29225, 29225, 82494, 29269, 29225, 29269, 1, 12290, 3, 78112, 0, 714, 0, 716, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2222, 0, 0, 0, 0, 731, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1922, 0, 758, 0, 0, 0, 763, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2418, 2419, 0, 0, 0, 0, 0, 0, 823296, 791, 0, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 417, 417, 0, 0, 65536, 417, 791, 0, 0, 823296, 0, 0, 0, 0, 0, 747, 0, 0, 824094, 0, 0, 0, 0, 0, 0, 2465, 0, 0, 0, 0, 29210, 31141, 29210, 29210, 29210, 29210, 30649, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30658, 0, 0, 0, 0, 823970, 0, 824094, 0, 660, 0, 0, 0, 0, 0, 0, 0, 657, 0, 657, 0, 0, 0, 0, 808, 0, 0, 0, 0, 0, 0, 823969, 0, 0, 0, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 2614, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 297, 0, 0, 0, 0, 0, 29210, 29520, 29210, 29210, 29210, 29210, 824157, 29535, 29210, 29210, 29545, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 447024, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83275, 82480, 82480, 82480, 82480, 25938, 29874, 944, 82480, 82811, 82480, 82480, 82480, 82480, 82827, 82480, 82480, 82480, 82480, 824216, 82842, 82480, 82480, 82852, 29254, 29254, 824278, 29656, 29254, 29254, 29666, 29254, 29254, 29254, 29254, 29676, 29210, 824157, 29210, 0, 0, 0, 0, 0, 2748, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 31619, 29210, 29210, 29210, 29210, 29210, 0, 0, 29254, 29254, 29210, 82480, 29504, 29535, 29210, 29545, 29210, 82811, 82842, 82480, 82852, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 467504, 82480, 82480, 82480, 82480, 82480, 84772, 82480, 82480, 29254, 29254, 29254, 29254, 1863, 0, 1865, 0, 1867, 0, 1869, 0, 0, 0, 0, 0, 0, 823, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29625, 29656, 29254, 29666, 29254, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 1879, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1089, 362, 362, 0, 0, 1092, 0, 0, 0, 1095, 0, 1097, 0, 1099, 0, 0, 0, 0, 1120, 0, 0, 0, 0, 1124, 0, 0, 0, 0, 0, 0, 0, 1903, 0, 0, 1904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1124, 29874, 823, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31675, 29210, 31677, 82480, 82480, 82480, 82480, 83266, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83276, 83277, 82480, 82480, 82480, 25938, 29874, 944, 29254, 29254, 29254, 29254, 30066, 565830, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30812, 29254, 29254, 29254, 29254, 29254, 0, 1523, 0, 0, 0, 0, 0, 1529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1926, 0, 0, 0, 0, 0, 593920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 397312, 0, 0, 0, 0, 0, 29874, 0, 29210, 29210, 29210, 29210, 30293, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 356890, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30347, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30354, 29210, 29210, 29210, 29210, 30360, 29210, 29210, 29210, 30937, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30670, 29210, 29210, 83669, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83676, 82480, 82480, 82480, 82480, 83682, 82480, 82480, 29254, 31529, 29254, 29254, 31531, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31229, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30499, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30506, 29254, 29254, 29254, 29254, 30512, 29254, 29254, 29254, 29254, 29254, 30779, 29254, 30781, 29254, 29254, 29254, 29254, 29254, 29254, 30788, 29254, 29210, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 83208, 82480, 82480, 82480, 83212, 82480, 82480, 83223, 82480, 0, 0, 0, 827392, 1888, 0, 1890, 1891, 0, 0, 0, 0, 0, 0, 0, 0, 1955, 0, 0, 0, 0, 0, 0, 0, 0, 1910, 0, 1912, 0, 0, 0, 0, 0, 0, 0, 1919, 0, 0, 0, 0, 0, 0, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2250, 0, 29210, 29210, 29210, 29210, 29210, 290816, 0, 1949, 0, 0, 0, 0, 0, 0, 0, 1957, 0, 0, 0, 1957, 0, 0, 0, 0, 0, 29874, 823, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29543, 29210, 29210, 29210, 29210, 29210, 82480, 0, 1960, 829304, 0, 0, 0, 1963, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2453, 0, 0, 0, 0, 0, 0, 291354, 29210, 29210, 29210, 29210, 29210, 30651, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 344624, 82480, 82480, 83958, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84244, 82480, 83985, 82480, 82480, 82480, 82480, 82480, 829462, 82480, 82480, 82480, 82480, 82480, 83996, 82480, 82480, 29254, 332358, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 559853, 82480, 82480, 82480, 84011, 0, 0, 0, 0, 291398, 29254, 29254, 29254, 29254, 29254, 30775, 29254, 29254, 29254, 29254, 29254, 30794, 29254, 29254, 29254, 29254, 29254, 30798, 29254, 30799, 29254, 30802, 29254, 29254, 29254, 29254, 29254, 829527, 29254, 29254, 29254, 29254, 29254, 30813, 29254, 29254, 29254, 29254, 29254, 29254, 31037, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31370, 29254, 29254, 29254, 29254, 29254, 29254, 30828, 29210, 29210, 29210, 29210, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 30531, 29254, 29254, 29254, 0, 1863, 0, 0, 0, 0, 0, 1865, 0, 0, 0, 0, 0, 0, 684032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1893, 1894, 0, 0, 0, 0, 0, 0, 0, 2174, 2175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2430, 0, 0, 0, 0, 0, 0, 2229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2620, 0, 0, 0, 31032, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31372, 29254, 29254, 29254, 31044, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31384, 29254, 31386, 29254, 31145, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30345, 82480, 82480, 84460, 82480, 82480, 82480, 82480, 0, 0, 29254, 29254, 29254, 29254, 31220, 31221, 29254, 29254, 29254, 29254, 29254, 31058, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29254, 29254, 29254, 29254, 29254, 31240, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30047, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31250, 29254, 29254, 29254, 29254, 29210, 29210, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 30840, 29254, 29254, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 835584, 0, 0, 0, 305795, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 639558, 29254, 29254, 29254, 2735, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2195, 0, 2737, 0, 0, 0, 2882, 0, 0, 0, 0, 31559, 29210, 29210, 29210, 31563, 29210, 29210, 29210, 29210, 1073690, 29210, 29210, 1094170, 1098266, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83647, 83648, 83650, 82480, 82480, 82480, 82480, 83653, 788166, 82480, 82480, 82480, 82480, 82480, 84835, 82480, 31589, 29254, 29254, 29254, 31593, 29254, 29254, 29254, 29254, 29254, 29254, 31048, 29254, 29254, 29254, 29254, 29254, 29254, 31053, 29254, 29254, 29254, 29254, 29254, 29254, 31602, 29254, 29210, 0, 0, 0, 0, 0, 0, 2737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2825, 0, 29210, 29210, 29210, 29210, 29210, 31670, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 84880, 82480, 82480, 82480, 82480, 82480, 82480, 84930, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 31694, 29254, 29254, 29210, 29210, 29210, 30348, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 29254, 29254, 29254, 29254, 1863, 0, 1865, 0, 1867, 0, 1869, 0, 0, 2171, 82480, 85013, 82480, 29254, 29254, 29254, 29254, 31769, 29254, 0, 442368, 0, 851968, 29210, 29210, 29210, 29210, 30950, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 664090, 29210, 29210, 29210, 29210, 365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2432, 0, 0, 0, 0, 0, 391, 392, 0, 393, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 673, 674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2439, 0, 0, 0, 0, 0, 0, 398, 0, 0, 0, 0, 0, 365, 373, 401, 0, 0, 0, 0, 0, 365, 0, 0, 393, 0, 0, 0, 0, 348, 0, 0, 365, 0, 393, 0, 406, 408, 0, 0, 365, 373, 0, 69632, 73728, 0, 0, 0, 0, 424, 65536, 0, 0, 0, 0, 0, 29874, 823, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29884, 424, 424, 434, 0, 424, 0, 408, 424, 453, 0, 0, 0, 0, 0, 0, 0, 704, 0, 0, 0, 708, 0, 0, 711, 0, 0, 406, 0, 494, 494, 0, 494, 494, 494, 494, 494, 494, 494, 494, 520, 520, 520, 520, 453, 453, 453, 528, 453, 529, 453, 453, 520, 534, 520, 520, 520, 520, 536, 29226, 29226, 29226, 82495, 29270, 29226, 82495, 29226, 29226, 82495, 82495, 82495, 29279, 29279, 29279, 29226, 29270, 29270, 29270, 29270, 29270, 29270, 29270, 29270, 29270, 29226, 82495, 29226, 29289, 82542, 29270, 29289, 29300, 1, 12290, 3, 78112, 327680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2443, 0, 0, 0, 0, 686, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 345, 346, 347, 0, 0, 0, 0, 0, 0, 0, 646, 0, 0, 0, 0, 0, 0, 0, 0, 340, 0, 0, 0, 0, 0, 0, 0, 675840, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2611, 0, 0, 0, 675840, 0, 0, 328454, 0, 0, 0, 0, 675840, 0, 0, 0, 0, 0, 0, 0, 675840, 0, 0, 0, 0, 0, 0, 328454, 0, 675840, 0, 0, 0, 0, 29210, 29210, 328507, 29210, 29210, 29210, 29210, 29210, 30336, 30337, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30680, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 676378, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 84587, 82480, 328566, 82480, 82480, 82480, 82480, 82480, 82480, 676400, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 760540, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 328628, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83618, 82480, 82480, 82480, 82480, 82480, 82480, 0, 1042, 0, 1044, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31423, 29210, 29210, 31424, 1057, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24576, 944, 0, 0, 1073, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1064960, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1098, 0, 0, 0, 0, 0, 29874, 823, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29883, 29210, 29210, 29210, 30949, 29210, 29210, 29210, 29210, 29210, 819738, 29210, 29210, 29210, 29210, 29210, 29210, 29898, 29210, 29210, 29902, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 750106, 29210, 29210, 30953, 29210, 29210, 29210, 897562, 29210, 0, 0, 0, 0, 1104, 0, 1106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1176, 0, 0, 0, 0, 0, 1176, 1183, 0, 0, 0, 0, 0, 0, 445, 0, 0, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 29228, 29228, 29228, 82497, 29272, 29228, 82497, 29228, 29228, 1176, 1200, 1201, 0, 0, 29874, 823, 29210, 29210, 29210, 29210, 29210, 29881, 29210, 29210, 29210, 29210, 31148, 29210, 29210, 31151, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29942, 29210, 29210, 29210, 29210, 29210, 29210, 29951, 29885, 29210, 29210, 29896, 29210, 29210, 29899, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 84429, 82480, 82480, 82480, 29210, 29210, 29914, 29210, 29917, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 377370, 29210, 29210, 29210, 29210, 29210, 82480, 83226, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83241, 82480, 83244, 1537, 0, 0, 0, 1539, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528384, 0, 0, 0, 0, 0, 0, 0, 29210, 30303, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30957, 29210, 30319, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 83625, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84705, 83641, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 705072, 29254, 30455, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 1053254, 29210, 29210, 29210, 29254, 30471, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 1073734, 29254, 29254, 1094214, 1886, 790528, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61440, 0, 0, 1122304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225706, 0, 1933, 0, 0, 0, 0, 0, 0, 1939, 0, 0, 0, 0, 0, 0, 0, 0, 1965, 0, 0, 1015808, 0, 0, 0, 0, 29210, 29210, 30647, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29925, 29210, 29210, 82480, 82480, 82480, 82480, 83988, 791088, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83998, 29254, 29254, 30805, 791110, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30815, 29254, 29254, 29210, 29210, 29210, 30518, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 31459, 29254, 29254, 31460, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31467, 29254, 29254, 0, 0, 0, 0, 0, 0, 0, 2599, 0, 0, 0, 0, 0, 0, 0, 944, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1016368, 1122864, 29254, 29254, 1016390, 1122886, 0, 1467, 0, 1473, 0, 1479, 0, 1485, 0, 0, 0, 0, 0, 694, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31316, 29210, 0, 0, 0, 2200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 131072, 0, 0, 0, 0, 0, 0, 2243, 0, 0, 0, 0, 0, 802816, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 313, 314, 314, 419, 420, 65536, 427, 84245, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84250, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 2344, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29254, 29210, 82480, 29210, 31260, 82480, 84510, 29254, 31045, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31050, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 2936, 2737, 0, 0, 0, 0, 0, 0, 2424, 0, 0, 0, 0, 2428, 0, 0, 0, 0, 0, 0, 0, 1964, 0, 0, 0, 0, 0, 0, 1972, 0, 0, 0, 0, 2448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163840, 0, 0, 0, 0, 0, 884736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163264, 0, 0, 29210, 29210, 922138, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 487984, 954906, 82480, 954928, 29254, 954950, 2809, 0, 0, 0, 2811, 0, 0, 0, 0, 0, 0, 0, 2179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 700416, 0, 0, 0, 0, 0, 0, 2737, 0, 0, 0, 0, 0, 2823, 0, 0, 0, 471040, 0, 0, 843776, 29210, 31499, 29210, 29210, 31501, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30316, 29210, 29210, 82480, 84762, 82480, 82480, 84764, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83994, 82480, 82480, 82480, 82480, 29210, 31567, 29210, 31569, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83216, 82480, 82480, 84830, 82480, 84832, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31597, 29254, 31599, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 0, 2737, 0, 0, 0, 0, 0, 0, 0, 0, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 0, 82480, 82480, 82480, 82480, 82480, 82480, 84969, 82480, 82480, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31536, 31537, 31538, 29254, 29254, 29254, 31728, 29254, 29254, 29210, 430080, 0, 0, 0, 0, 0, 29210, 430618, 31737, 29210, 29210, 29210, 31160, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30669, 29210, 29210, 29210, 407, 353, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 29874, 823, 29210, 29210, 29210, 29210, 29210, 29210, 29882, 29210, 29210, 29210, 29210, 31628, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 2092, 2344, 0, 0, 0, 0, 0, 351, 0, 0, 0, 353, 0, 0, 470, 470, 470, 470, 470, 470, 470, 475, 470, 470, 470, 470, 470, 470, 470, 470, 470, 475, 470, 470, 481, 470, 0, 0, 470, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 525, 525, 525, 525, 470, 470, 470, 470, 470, 475, 470, 470, 525, 521, 525, 525, 525, 525, 537, 29227, 29227, 29227, 82496, 29271, 29227, 82496, 29227, 29227, 82496, 82496, 82496, 29227, 29227, 29227, 29227, 29271, 29271, 29271, 29271, 29271, 29271, 29271, 29271, 29271, 29227, 82496, 29227, 29290, 82543, 29271, 29290, 29301, 1, 12290, 3, 78112, 0, 335872, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 0, 0, 0, 0, 0, 701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 720896, 0, 0, 0, 0, 730, 0, 0, 0, 335872, 730, 0, 736, 737, 335872, 0, 0, 0, 0, 0, 0, 0, 2426, 2427, 0, 0, 0, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 618496, 0, 733184, 0, 0, 0, 0, 0, 0, 733184, 0, 0, 0, 0, 0, 0, 733184, 0, 0, 0, 661, 0, 0, 0, 0, 801, 0, 0, 0, 0, 0, 335872, 0, 0, 0, 618496, 0, 733184, 0, 781, 0, 801, 781, 0, 335872, 0, 0, 781, 733184, 821, 0, 29210, 29210, 336700, 29210, 29210, 29210, 29210, 29210, 30650, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29547, 29210, 29210, 29210, 29210, 82480, 29518, 619034, 29524, 733722, 29210, 29210, 29210, 29210, 29210, 29542, 29210, 29210, 29210, 29210, 29210, 82480, 84878, 82480, 84879, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 29254, 29254, 336759, 82480, 82480, 82480, 82480, 82825, 619056, 82831, 733744, 82480, 82480, 82480, 82480, 82480, 82849, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 494195, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84599, 0, 0, 336821, 29254, 29210, 82480, 29210, 29210, 29542, 29210, 29210, 82480, 82480, 82849, 82480, 82480, 31528, 29254, 29254, 29254, 29254, 31532, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 541254, 29254, 29254, 31041, 29254, 631366, 655942, 29254, 0, 29254, 29254, 29663, 29254, 29254, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 2234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1045, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 831488, 0, 0, 0, 0, 0, 0, 0, 1074, 1075, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1011712, 1101824, 0, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 1093, 0, 0, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 0, 0, 0, 2218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134, 0, 1137, 0, 0, 0, 0, 0, 716800, 0, 0, 0, 0, 0, 0, 689, 690, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 0, 991232, 0, 0, 0, 0, 0, 0, 0, 0, 1583, 1584, 1585, 1586, 0, 0, 0, 0, 0, 1145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1156, 0, 0, 0, 0, 0, 702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1110, 1111, 0, 0, 0, 0, 0, 0, 0, 0, 1163, 0, 0, 1045, 0, 0, 0, 1169, 0, 1171, 0, 0, 0, 0, 0, 718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 0, 0, 0, 0, 1177, 0, 0, 0, 0, 0, 1181, 0, 1184, 0, 1169, 1187, 0, 794624, 0, 0, 0, 0, 1074, 0, 0, 0, 0, 1196, 0, 0, 0, 0, 0, 0, 703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 695, 0, 0, 1196, 0, 0, 1093, 0, 29874, 823, 29876, 29210, 29210, 29210, 29880, 29210, 29210, 29210, 29210, 29210, 30691, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30698, 29886, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29905, 29210, 29210, 29210, 29210, 29210, 29210, 455194, 29210, 30941, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30311, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30339, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29915, 29210, 29210, 717338, 29210, 29210, 29210, 29210, 29210, 29923, 29210, 29210, 29210, 29930, 29932, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30361, 29953, 29210, 83203, 82480, 82480, 82480, 83207, 82480, 82480, 82480, 82480, 83213, 82480, 82480, 82480, 82480, 0, 0, 2096, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30087, 29254, 29254, 30094, 29254, 29254, 29254, 29254, 29254, 82480, 82480, 82480, 82480, 82480, 83232, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83242, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29635, 29254, 29254, 29254, 29254, 29254, 29254, 31379, 31380, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30088, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 717360, 82480, 82480, 82480, 82480, 82480, 83250, 82480, 82480, 82480, 83257, 83259, 82480, 82480, 82480, 82480, 0, 2094, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30783, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30036, 29254, 29254, 29254, 30040, 29254, 29254, 29254, 29254, 30046, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 0, 0, 0, 0, 0, 3032, 0, 0, 0, 29254, 29254, 29254, 30065, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30075, 29254, 29254, 717382, 29254, 29254, 29254, 29254, 29254, 31253, 29254, 29210, 29210, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 29254, 29254, 29254, 29254, 389702, 31461, 29254, 29254, 29254, 31465, 31466, 29254, 29254, 29254, 29254, 29254, 30041, 29254, 29254, 29254, 30045, 29254, 29254, 30056, 29254, 29254, 30059, 29254, 29254, 29254, 29254, 30083, 29254, 29254, 29254, 30090, 30092, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 2933, 0, 2934, 0, 0, 0, 2737, 0, 0, 87041, 0, 0, 1467, 0, 0, 0, 1473, 0, 0, 0, 1479, 0, 0, 0, 1485, 0, 1501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528384, 0, 0, 753664, 770048, 0, 0, 0, 0, 0, 0, 1543, 0, 0, 0, 0, 0, 0, 0, 2437, 0, 0, 0, 0, 0, 0, 0, 0, 721, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1577, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 0, 0, 0, 0, 0, 0, 370231, 1592, 0, 0, 1594, 0, 0, 0, 1598, 0, 0, 1601, 0, 0, 0, 0, 0, 29874, 823, 29210, 29210, 311834, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 84689, 82480, 82480, 84690, 82480, 82480, 82480, 82480, 82480, 370231, 29874, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 370266, 29210, 29210, 29210, 29210, 31149, 29210, 31150, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 447002, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30304, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30314, 29210, 29210, 29210, 545306, 83626, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83636, 82480, 82480, 82480, 545328, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 541232, 82480, 82480, 84241, 82480, 631344, 655920, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29636, 29254, 29254, 29254, 29254, 29254, 29254, 31702, 0, 0, 438272, 933888, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 221184, 0, 0, 0, 0, 65536, 0, 82480, 82480, 83671, 1004080, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84006, 82480, 84008, 82480, 82480, 29254, 30456, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30466, 29254, 29254, 29254, 545350, 29254, 29254, 29254, 30501, 1004102, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30509, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 1875, 1876, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2416, 0, 0, 0, 0, 0, 0, 0, 0, 1899, 0, 0, 0, 0, 974848, 552960, 0, 1905, 712704, 0, 0, 0, 0, 0, 0, 2731, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1080, 0, 0, 0, 0, 0, 0, 0, 0, 589824, 0, 0, 0, 0, 1927, 434176, 0, 0, 0, 0, 0, 0, 0, 727, 0, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 479232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1024000, 0, 0, 0, 0, 29210, 434714, 29210, 29210, 29210, 30663, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 553498, 29210, 29210, 29210, 31173, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 84428, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 29254, 30770, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 447046, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30491, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 30673, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 1040922, 29210, 29210, 30700, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83622, 83623, 82480, 82480, 82480, 82480, 82480, 975408, 82480, 82480, 1024560, 82480, 82480, 82480, 82480, 84007, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29642, 29254, 29254, 29254, 975430, 29254, 29254, 1024582, 29254, 29254, 29254, 29254, 30824, 29254, 29254, 29254, 29254, 29254, 29254, 30108, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 2172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2182, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 163840, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 2201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 630784, 0, 0, 0, 0, 0, 29874, 823, 29210, 29877, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30677, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30952, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 0, 0, 987136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 1085440, 0, 0, 0, 0, 0, 0, 0, 2451, 0, 0, 0, 0, 2456, 0, 2458, 0, 29210, 631322, 655898, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 848410, 29210, 29210, 29210, 29210, 29210, 30702, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83218, 82480, 82480, 82480, 84219, 82480, 82480, 82480, 82480, 82480, 82480, 84225, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82828, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 516656, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 848432, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84439, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 987696, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 167936, 0, 0, 0, 0, 65536, 0, 0, 29254, 31019, 29254, 29254, 29254, 29254, 29254, 29254, 31025, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31241, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31061, 29254, 29254, 29254, 29210, 29210, 29210, 29254, 29254, 29254, 987718, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 799258, 31065, 29254, 29254, 29254, 29254, 29254, 31378, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31040, 29254, 29254, 29254, 29254, 29254, 417792, 0, 0, 450560, 499712, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 647168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2454, 2455, 0, 0, 0, 0, 0, 0, 2447, 0, 0, 0, 860160, 0, 2452, 0, 0, 0, 0, 0, 0, 0, 749, 0, 0, 0, 0, 754, 0, 0, 0, 0, 0, 0, 0, 0, 1114112, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31313, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 397850, 29210, 418330, 29210, 29210, 29210, 29210, 451098, 29210, 29210, 500250, 29210, 29210, 29210, 29525, 29210, 29529, 29210, 29534, 29210, 29537, 29210, 29210, 29550, 29210, 29210, 82480, 83204, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83215, 83222, 82480, 82480, 397872, 82480, 418352, 82480, 82480, 82480, 82480, 451120, 82480, 82480, 500272, 82480, 82480, 82480, 82480, 0, 2095, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 836166, 29254, 29254, 29254, 29254, 29254, 29254, 1032774, 82480, 82480, 82480, 82480, 84462, 82480, 82480, 0, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30490, 29254, 29254, 30493, 29254, 29254, 29254, 29254, 29254, 29254, 397894, 29254, 418374, 29254, 29254, 29254, 29254, 451142, 29254, 29254, 500294, 29254, 29254, 29254, 29254, 29254, 29254, 31228, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 30492, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31252, 29254, 29254, 31254, 29210, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29624, 29628, 29631, 29254, 29638, 29254, 29254, 29648, 0, 0, 0, 0, 2613, 0, 0, 2615, 2616, 0, 0, 0, 0, 0, 0, 0, 777, 0, 602112, 0, 709356, 0, 0, 0, 0, 29210, 494168, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31324, 29210, 29210, 29210, 29210, 29210, 29210, 30310, 29210, 29210, 29210, 504346, 29210, 29210, 29210, 30317, 29210, 29254, 29254, 31365, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 494222, 29254, 29254, 29210, 29210, 30830, 30831, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 401408, 0, 0, 0, 0, 778240, 0, 0, 0, 0, 0, 0, 1122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 694, 0, 0, 0, 31388, 29254, 29254, 29254, 29254, 29210, 29210, 29254, 29210, 82480, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 0, 0, 2407, 0, 0, 0, 0, 0, 0, 2729, 0, 0, 0, 0, 0, 2732, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 172032, 0, 0, 0, 0, 65536, 0, 29210, 29210, 31426, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 668186, 29210, 29210, 29210, 29210, 31161, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 84926, 82480, 82480, 82480, 29210, 31437, 29210, 31438, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 84692, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29625, 29254, 29254, 29254, 29254, 29641, 29254, 29254, 29210, 29210, 29210, 29210, 30832, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 29254, 30532, 29254, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2220, 0, 0, 0, 0, 0, 29254, 29254, 668230, 29254, 29254, 29254, 29254, 31473, 29254, 31474, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 29254, 29254, 29210, 82480, 29210, 29210, 1016346, 1122842, 82480, 82480, 2737, 0, 0, 0, 2821, 0, 0, 0, 0, 1130496, 0, 0, 0, 0, 29210, 29210, 29210, 29893, 29210, 29897, 29210, 29210, 29901, 29210, 29903, 29210, 29210, 29210, 29210, 29210, 29210, 30703, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 83956, 82480, 401946, 29210, 29210, 29210, 461583, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31511, 29210, 29210, 29210, 29894, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30968, 29210, 29210, 82480, 82480, 401968, 82480, 82480, 82480, 461598, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84774, 29254, 31541, 29254, 29254, 29210, 29210, 82480, 29254, 0, 0, 0, 0, 0, 0, 0, 0, 2414, 0, 0, 0, 0, 0, 2420, 0, 438832, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 934448, 29254, 29254, 29254, 438854, 29254, 29254, 29254, 29254, 29254, 30461, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29675, 29210, 29210, 29210, 29210, 0, 29254, 29254, 29254, 29254, 934470, 29210, 0, 3059, 3060, 3061, 0, 3063, 29210, 29210, 29210, 29210, 29210, 30939, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30681, 791066, 29210, 29210, 29210, 29210, 29210, 31740, 31741, 82480, 82480, 82480, 82480, 82480, 84994, 84995, 29254, 29254, 29254, 29254, 29254, 31752, 31753, 29210, 0, 0, 0, 3084, 0, 29210, 29210, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29254, 29254, 29254, 29633, 29254, 29254, 29643, 29254, 355, 356, 0, 0, 0, 0, 0, 0, 0, 362, 0, 86306, 0, 0, 0, 0, 0, 0, 719, 0, 0, 0, 723, 0, 0, 0, 0, 0, 0, 0, 29211, 29211, 29211, 82480, 29255, 29211, 82480, 29211, 29211, 0, 0, 0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348160, 0, 0, 0, 471, 471, 485, 0, 0, 485, 356, 356, 356, 507, 356, 356, 356, 356, 471, 471, 82497, 82497, 82497, 29228, 29228, 29228, 29228, 29272, 29272, 29272, 29272, 29272, 29272, 29272, 29272, 29272, 29228, 82497, 29228, 29228, 82497, 29272, 29228, 29272, 1, 12290, 3, 78112, 0, 0, 0, 695, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 507904, 0, 0, 0, 29519, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29546, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 668208, 82480, 82480, 82480, 82480, 84703, 82480, 84704, 82480, 82480, 82480, 82480, 82480, 82480, 83233, 565808, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 553520, 82480, 82480, 83980, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82826, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82853, 0, 0, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29546, 29210, 82480, 82480, 82480, 82853, 82480, 82480, 82480, 82480, 82480, 82480, 83273, 82480, 82480, 82480, 82480, 82480, 82480, 25938, 29874, 944, 0, 29254, 29254, 29254, 29667, 29254, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 2606, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1043, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 749568, 0, 0, 0, 0, 0, 0, 0, 1135, 0, 0, 0, 1139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643072, 0, 29210, 29210, 29892, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30344, 29210, 29210, 29210, 29954, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83210, 82480, 82480, 82480, 83219, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29617, 29254, 29254, 29254, 29254, 29254, 29254, 627270, 29254, 29254, 30052, 29892, 83219, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 29254, 29254, 29254, 29254, 0, 0, 463386, 29210, 463408, 82480, 463430, 87041, 0, 0, 0, 1468, 0, 0, 0, 1474, 0, 0, 0, 1480, 0, 0, 0, 0, 0, 0, 31616, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29540, 29210, 29210, 29210, 29210, 29210, 82480, 1486, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 745472, 0, 0, 1511, 1512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1519, 0, 0, 0, 0, 0, 0, 37268, 37268, 37268, 37268, 37268, 37268, 37268, 37268, 37268, 37268, 0, 0, 0, 0, 0, 0, 37268, 0, 37268, 1, 12290, 3, 78112, 0, 0, 0, 1562, 0, 0, 0, 0, 0, 0, 1568, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 266240, 0, 0, 0, 0, 65536, 0, 1574, 0, 1576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1138688, 0, 0, 0, 82480, 82480, 82480, 82480, 83645, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83652, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29618, 29254, 29254, 29254, 29632, 29254, 29254, 29254, 29254, 29210, 844314, 844336, 844358, 0, 0, 0, 0, 0, 0, 0, 0, 2180, 0, 0, 0, 0, 0, 0, 0, 82480, 82480, 82480, 82480, 84222, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84228, 82480, 82480, 82480, 82480, 0, 29254, 29254, 29254, 29254, 31022, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31063, 29254, 29210, 29210, 29210, 29254, 82480, 82480, 84435, 82480, 84436, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84597, 82480, 598576, 82480, 82480, 29254, 29254, 31225, 29254, 31226, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31051, 29254, 29254, 29254, 29254, 0, 2604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1073152, 0, 29254, 29254, 29254, 31729, 29254, 29210, 0, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 30928, 29210, 29210, 29210, 29210, 29210, 29210, 31773, 82480, 82480, 82480, 85023, 29254, 29254, 29254, 31777, 0, 0, 29210, 29210, 82480, 82480, 29254, 29254, 0, 0, 0, 2810, 0, 0, 2813, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 362, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 192969, 0, 0, 357, 0, 0, 0, 0, 0, 0, 362, 0, 86306, 0, 0, 0, 0, 0, 0, 735, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2608, 0, 0, 0, 0, 0, 357, 0, 367, 0, 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82498, 82498, 82498, 29229, 29229, 29229, 29229, 29273, 29273, 29273, 29273, 29273, 29273, 29273, 29273, 29273, 29229, 82498, 29229, 29229, 82498, 29273, 29229, 29273, 1, 12290, 3, 78112, 82480, 82480, 82480, 82480, 82821, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 549424, 82480, 82480, 82480, 82480, 82480, 0, 487424, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 1553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2741, 0, 0, 0, 0, 0, 82480, 82480, 82480, 82480, 82480, 623152, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 680496, 82480, 82480, 82480, 82480, 82480, 0, 0, 0, 358, 359, 360, 361, 0, 0, 362, 0, 86306, 0, 0, 0, 0, 0, 0, 748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 751, 0, 0, 0, 0, 0, 0, 0, 359, 0, 358, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 425, 65536, 0, 0, 0, 0, 0, 30924, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30668, 29210, 29210, 29210, 29210, 29210, 425, 425, 0, 0, 425, 0, 359, 425, 454, 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 495, 495, 0, 502, 502, 502, 502, 508, 509, 502, 502, 522, 522, 522, 522, 454, 454, 454, 454, 454, 454, 454, 454, 522, 522, 522, 522, 522, 522, 522, 29230, 29230, 29230, 82499, 29274, 29230, 82499, 29230, 29230, 82499, 82499, 82499, 29230, 29230, 29230, 29230, 29274, 29274, 29274, 29274, 29274, 29274, 29274, 29274, 29274, 29230, 82499, 29230, 29291, 82544, 29274, 29291, 29302, 1, 12290, 3, 78112, 0, 0, 29254, 29254, 29210, 82480, 29210, 29210, 29543, 29210, 29210, 82480, 82480, 82850, 82480, 82480, 82480, 82480, 0, 29254, 29254, 328628, 29254, 29254, 29254, 29254, 29254, 29254, 676422, 29254, 0, 29254, 29254, 29664, 29254, 29254, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2750, 0, 29210, 29210, 29210, 29210, 0, 1925, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37268, 0, 0, 0, 0, 0, 29210, 30646, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 1126938, 82480, 82480, 82480, 82480, 84258, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 0, 0, 0, 0, 0, 274432, 274432, 274432, 274432, 274432, 274432, 274432, 274432, 274432, 82500, 82500, 82500, 29231, 29231, 29231, 29231, 29275, 29275, 29275, 29275, 29275, 29275, 29275, 29275, 29275, 29231, 82500, 29231, 29231, 82500, 29275, 29231, 29275, 1, 12290, 3, 78112, 697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57344, 0, 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 820, 0, 0, 0, 0, 0, 29210, 29210, 29210, 29210, 29210, 29210, 29515, 82480, 82480, 82480, 82480, 82822, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 1045040, 82480, 82480, 82480, 82480, 82480, 0, 1131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1150976, 0, 0, 0, 0, 0, 0, 0, 0, 82480, 82480, 83268, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 25938, 29874, 944, 30101, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 0, 0, 0, 0, 46182, 0, 0, 0, 1130, 1556, 0, 0, 0, 0, 0, 0, 0, 2738, 0, 0, 0, 0, 2743, 0, 0, 0, 87041, 1464, 0, 0, 0, 1470, 0, 0, 0, 1476, 0, 0, 0, 1482, 0, 0, 0, 0, 0, 747, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1928, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 638976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1155072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30934, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30671, 0, 0, 0, 0, 360448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 111048, 1, 12290, 3, 0, 0, 360448, 0, 0, 0, 0, 0, 0, 735, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 31573, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83991, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 0, 0, 29254, 29254, 29210, 82480, 360986, 29210, 29210, 29547, 29210, 361008, 82480, 82480, 82854, 82480, 82480, 82480, 82480, 82480, 82480, 83633, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83236, 82480, 82480, 82480, 82480, 82480, 82480, 0, 361030, 29254, 29254, 29668, 29254, 78112, 87041, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 0, 0, 0, 0, 0, 0, 0, 82480, 82480, 82480, 1028656, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 25938, 29874, 944, 29254, 1028678, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 0, 0, 0, 0, 90406, 94503, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 654, 29210, 29210, 427617, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 30359, 29210, 29210, 29210, 815642, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29210, 29554, 82480, 82480, 427691, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 83969, 82480, 815664, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 963120, 29254, 29254, 427769, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31371, 29254, 29254, 29254, 29254, 29254, 815686, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 31476, 29254, 29210, 29210, 29210, 82480, 82480, 82480, 509958, 82480, 533040, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 1126960, 0, 0, 0, 0, 0, 29254, 510023, 29254, 533062, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 328507, 29677, 29210, 29210, 0, 29254, 29254, 324122, 29210, 29210, 29210, 29254, 29254, 29210, 82480, 29210, 29210, 29210, 29210, 82480, 82480, 82480, 82480, 0, 29254, 29254, 336821, 29254, 29254, 29254, 29254, 29639, 619078, 29645, 733766, 82480, 746032, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84457, 82480, 29254, 29254, 746054, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 680518, 29254, 29254, 29254, 29254, 0, 0, 0, 0, 536576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 122880, 122880, 29254, 29254, 29254, 29254, 31366, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 1126982, 29210, 29210, 29210, 29254, 0, 0, 0, 0, 663552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 82480, 82480, 82480, 82480, 82480, 82480, 664112, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 82480, 84453, 82480, 82480, 82480, 82480, 82480, 82480, 29254, 664134, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29254, 29210, 29210, 29210, 29210, 0, 0, 1134592, 0, 0, 0, 1134592, 1134592, 0, 0, 0, 0, 0, 1134592, 1134592, 1134592, 0, 1134592, 0, 0, 0, 1134592, 1135005, 1135005, 0, 0, 0, 0, 0, 1135005, 0, 0, 1134592, 1134592, 0, 0, 0, 1135201, 1135201, 1135201, 1135201, 1135201, 1135201, 1135201, 1135201, 1135201, 1135201, 0, 1134592, 1134592, 1134592, 1134592, 1134592, 1135201, 1134592, 1135201, 1, 12290, 3, 0, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 1147352, 455, 455, 1147352, 455, 455, 455, 455, 455, 455, 455, 455, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 1147403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225738, 225738, 225738, 225738, 225738, 225738, 225738, 0, 0, 0, 1147352, 1147352, 1147352, 1147352, 1147403, 1147403, 1147352, 1147403, 1147403, 1, 12290, 3, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 455, 1142784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233472, 0, 0, 0, 0, 0, 0, 1159168, 0, 0, 1159168, 0, 1159168, 1159168, 0, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237568, 0, 0, 0, 0, 0, 0, 1159168, 1159168, 0, 1159168, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1, 12290, 3, 0, 0, 0, 0, 0, 155648, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, 106496, 0, 106496, 106496, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 106496, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 0, 0, 0, 0, 0, 0, 0
+];
+
+XQueryParser.EXPECTED =
+[ 878, 886, 887, 885, 881, 891, 895, 899, 903, 907, 1832, 950, 2776, 2367, 913, 1832, 1202, 918, 924, 930, 942, 975, 1833, 934, 1832, 1400, 989, 991, 920, 1014, 969, 926, 940, 1832, 1832, 947, 1832, 1203, 989, 989, 956, 920, 958, 969, 969, 1034, 962, 1832, 964, 1832, 2110, 989, 990, 920, 920, 968, 969, 1032, 973, 1832, 2675, 1361, 989, 1363, 920, 1030, 969, 979, 1832, 2367, 1204, 2112, 920, 996, 1016, 983, 935, 988, 2114, 995, 1000, 2636, 2110, 919, 1004, 1008, 1363, 1020, 1027, 1038, 1011, 1042, 1049, 1055, 1051, 1059, 1063, 1067, 1071, 1073, 1078, 1074, 1082, 1086, 1090, 1094, 1098, 1102, 943, 1107, 984, 1103, 1832, 1832, 1832, 1832, 1167, 1112, 1832, 1832, 2665, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1118, 1832, 1832, 1832, 2018, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 2121, 1123, 1832, 1129, 1330, 1141, 1145, 1149, 1153, 1157, 1832, 1832, 1766, 1161, 1165, 1171, 1178, 1459, 1182, 1186, 1328, 1832, 1692, 1394, 1193, 1197, 1201, 2410, 1832, 2420, 1832, 1884, 1326, 1832, 1832, 2133, 2672, 1426, 2500, 1832, 1208, 1832, 2397, 2500, 1832, 2784, 1638, 1832, 2229, 2724, 2752, 1832, 2097, 1224, 1832, 2753, 1832, 2782, 2798, 1832, 1952, 1230, 1832, 1490, 1832, 2223, 1832, 2302, 1832, 1437, 1234, 2222, 1241, 1239, 1832, 1246, 1251, 1235, 1239, 2440, 1832, 1255, 1440, 1457, 1259, 2309, 1265, 1272, 1292, 1477, 1856, 1276, 1290, 1479, 1859, 1296, 1219, 1832, 1226, 1300, 1832, 1305, 1309, 1313, 1317, 1320, 1324, 1410, 1832, 1467, 2454, 1334, 1338, 1342, 1352, 1367, 1920, 1226, 1300, 1466, 1609, 1371, 1375, 1114, 1832, 2248, 1832, 2263, 1832, 1379, 1407, 1420, 2369, 1384, 1388, 1845, 1832, 1832, 1392, 1832, 1845, 1832, 1220, 1832, 1398, 1606, 1547, 1404, 1826, 1832, 1301, 1419, 1832, 1827, 1832, 1616, 1424, 1983, 1430, 909, 1832, 1782, 1832, 1023, 1832, 1434, 1447, 1451, 1463, 1979, 2583, 1981, 1914, 1590, 1471, 1483, 1488, 1279, 1939, 1708, 1494, 1512, 1501, 1505, 1509, 1516, 1520, 1524, 1741, 1738, 1528, 1532, 1536, 1540, 1544, 1832, 1624, 1832, 1551, 2443, 1555, 1559, 1563, 1567, 1832, 2210, 2526, 1595, 1571, 2716, 1575, 1579, 1583, 1587, 1832, 2212, 2171, 1594, 1599, 2157, 1603, 1613, 1832, 1946, 1832, 1622, 1832, 1832, 1628, 1633, 1642, 1682, 1649, 2740, 1832, 1832, 1655, 1832, 2740, 1832, 1832, 1832, 1661, 1665, 2734, 1669, 1496, 1832, 1687, 1675, 1832, 1497, 1832, 914, 2266, 1680, 1686, 1618, 1832, 2332, 1832, 2269, 1832, 2082, 1862, 1832, 1691, 2662, 1832, 2664, 1443, 2733, 1247, 1242, 1696, 1691, 2063, 1701, 1877, 1671, 2044, 1949, 2132, 2046, 1705, 1712, 2541, 1718, 1724, 1720, 1727, 1731, 1832, 1832, 1735, 2660, 2710, 1745, 1749, 1753, 1757, 1761, 2092, 1770, 2075, 1775, 1779, 1786, 1790, 1794, 2272, 1798, 1832, 2207, 2074, 1804, 1808, 2246, 1812, 1818, 1832, 1824, 1832, 1831, 1837, 1771, 2310, 1843, 1849, 1853, 1871, 2297, 1832, 1108, 1876, 1832, 2297, 2584, 1832, 2465, 2569, 1211, 1881, 1832, 1413, 1832, 1125, 1832, 1832, 1414, 2335, 2512, 1891, 1895, 1832, 1865, 1832, 1899, 1832, 1905, 1800, 2544, 1911, 1380, 1832, 1918, 1839, 1636, 1924, 1214, 1345, 1867, 1380, 1645, 1928, 1901, 2130, 1474, 1932, 2677, 1936, 1943, 1956, 1958, 1962, 1968, 1966, 1972, 1832, 1832, 1832, 1832, 1977, 1987, 1991, 1995, 1999, 2003, 2007, 2011, 2691, 1225, 2016, 1907, 2344, 2024, 2028, 1764, 2034, 2038, 1832, 2042, 2651, 2053, 2057, 2079, 1838, 2086, 1415, 2091, 2337, 2139, 2096, 1657, 1973, 2101, 2107, 2118, 1832, 2127, 1832, 952, 1832, 1832, 2127, 2770, 1832, 2137, 2767, 2143, 2731, 1832, 2150, 1832, 2648, 1832, 1872, 2151, 2155, 2161, 2186, 2746, 1676, 2165, 2012, 2170, 2087, 2175, 2060, 2179, 2300, 2183, 2217, 2192, 2190, 2197, 2204, 2216, 2221, 2227, 2233, 2239, 2243, 2252, 2235, 2256, 2260, 2278, 2282, 2286, 2290, 2294, 2321, 2306, 2314, 2318, 2325, 2329, 1832, 1832, 2341, 1268, 2348, 2352, 2356, 2360, 2364, 1832, 2792, 2373, 2383, 2200, 2387, 2391, 2395, 2401, 1887, 2408, 2489, 2414, 2376, 2418, 2424, 2431, 2697, 2170, 2379, 1832, 2404, 2437, 1832, 2447, 1045, 1454, 2451, 2458, 1832, 2463, 1832, 2427, 1832, 1832, 2469, 2567, 1832, 2473, 2477, 2481, 2488, 1813, 2493, 1832, 2498, 1832, 1814, 2565, 2193, 1189, 2505, 2048, 1119, 2583, 1261, 1832, 2786, 2510, 2516, 2520, 1832, 2524, 1820, 1832, 2530, 2534, 2538, 2494, 2459, 2550, 2556, 2573, 1714, 2552, 2703, 2590, 2580, 2588, 2146, 1137, 1132, 2596, 1135, 2602, 2654, 2606, 1832, 1832, 1832, 936, 2610, 2614, 2618, 2622, 2626, 2630, 2634, 1832, 1282, 2640, 2645, 2658, 2546, 2669, 2103, 2681, 2685, 1832, 2123, 1285, 1217, 2764, 2689, 1832, 2030, 1832, 2066, 1832, 1348, 2695, 1832, 2701, 2166, 1174, 2707, 1832, 1832, 2714, 1832, 2484, 1832, 1832, 2720, 1832, 2274, 1286, 2728, 2738, 1832, 2019, 2744, 1832, 2750, 1832, 2020, 2722, 2559, 2757, 2598, 1832, 2562, 1832, 1355, 1832, 2069, 2592, 2761, 2774, 1484, 2336, 2072, 1629, 2049, 2576, 1832, 1358, 2433, 1697, 1651, 2780, 2506, 2790, 2641, 2796, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 2501, 2869, 4383, 2802, 2810, 2814, 2810, 2817, 2809, 2810, 2810, 2810, 2810, 4356, 2805, 2821, 2810, 2825, 2829, 2832, 2836, 2839, 2841, 2845, 2847, 2851, 2855, 2859, 2863, 2867, 2910, 5238, 4528, 4528, 2877, 3761, 4762, 4528, 4528, 4528, 3014, 3388, 3389, 3393, 3393, 3393, 3393, 2889, 2934, 2934, 3034, 2900, 2945, 2899, 3391, 2907, 4125, 2922, 3210, 4528, 4528, 4528, 3190, 2950, 4127, 5087, 4528, 4528, 4528, 3172, 3852, 2955, 4524, 4528, 2873, 4528, 4528, 2918, 4664, 2903, 3393, 3393, 3393, 2933, 2934, 2966, 4128, 4528, 4528, 2970, 3211, 2945, 2934, 2934, 2934, 2934, 2946, 2982, 4528, 4528, 2974, 4528, 2934, 3029, 3009, 3013, 2892, 4528, 4528, 4528, 3194, 3386, 3388, 3388, 3388, 3388, 2903, 3393, 3393, 3394, 2934, 2934, 2934, 2934, 2934, 3019, 3023, 3027, 2934, 2934, 3033, 3011, 4528, 2993, 4188, 3388, 3390, 3393, 2931, 2934, 2934, 2935, 3022, 3027, 2934, 2962, 4528, 2875, 2879, 3763, 2993, 3387, 3388, 3393, 3050, 2934, 2934, 2959, 2901, 2946, 2951, 3394, 2934, 3052, 4525, 2945, 2934, 2937, 3384, 4528, 4936, 5116, 3388, 2902, 3393, 3051, 2936, 4189, 3052, 4528, 3387, 3390, 3391, 3027, 2938, 3390, 3050, 3038, 3049, 3042, 3046, 3046, 3056, 3068, 3078, 3082, 3157, 3157, 3157, 3157, 3100, 3157, 3092, 3086, 3096, 3089, 3104, 3108, 3112, 3116, 3120, 3124, 3128, 3131, 3135, 3139, 3142, 3146, 3156, 3161, 3165, 3168, 3149, 5085, 3212, 3879, 4528, 4528, 4528, 3201, 3186, 4528, 4528, 4528, 3230, 3216, 3059, 4528, 4528, 3152, 3660, 4097, 4528, 4528, 4528, 3311, 3295, 3791, 4528, 4528, 3196, 3179, 4540, 3221, 3228, 4528, 2895, 4528, 4176, 2893, 4528, 4105, 5101, 4008, 3238, 3242, 4274, 3246, 3248, 3248, 3250, 3254, 3258, 3261, 3265, 3269, 3271, 3275, 3279, 3283, 3001, 4528, 3294, 3790, 3307, 4896, 3061, 4943, 3317, 5076, 4528, 4528, 3208, 4528, 3323, 3336, 3327, 4528, 2926, 4109, 4844, 3335, 5253, 3341, 5020, 4528, 5022, 4528, 5041, 4676, 3362, 3363, 4528, 2940, 5099, 3914, 4597, 3378, 3383, 3398, 3355, 3404, 3417, 3424, 3430, 4528, 4528, 4528, 3387, 3388, 3388, 4720, 3453, 3500, 4528, 2996, 4588, 4262, 4860, 4417, 4528, 3001, 3852, 4528, 4528, 4528, 3696, 3457, 3500, 4528, 4528, 4528, 3467, 3511, 4528, 4184, 3462, 4288, 4986, 3498, 4528, 4528, 4528, 4987, 3499, 4528, 4528, 4528, 3561, 4912, 4528, 4528, 4528, 3564, 4185, 4113, 4528, 3510, 3518, 4528, 4528, 4532, 5058, 3500, 4528, 4528, 3358, 5004, 4002, 4528, 4001, 4528, 3015, 4784, 5268, 4000, 4528, 4528, 5251, 3999, 4528, 3880, 4528, 3182, 3825, 4528, 3189, 5182, 5190, 4528, 5089, 4528, 2994, 3555, 3999, 4528, 3554, 4528, 4001, 3852, 4308, 4528, 3854, 3608, 4528, 4528, 4528, 3727, 3692, 3500, 4528, 5231, 3559, 4389, 4528, 3527, 3572, 3576, 3578, 3584, 3580, 3588, 3592, 3593, 3597, 3598, 3598, 3599, 3603, 4528, 4528, 3367, 3791, 4528, 4528, 3234, 3224, 3612, 4530, 3616, 3187, 4428, 3831, 3319, 4894, 4419, 3623, 3632, 4528, 3203, 3756, 4528, 3286, 3290, 4539, 3640, 4528, 5033, 4528, 3329, 5295, 4528, 3329, 5303, 4528, 3384, 3388, 3388, 3393, 3393, 3074, 4528, 4528, 5031, 3656, 3877, 4112, 4035, 4426, 4150, 3494, 4872, 3766, 4528, 4528, 4528, 3754, 3567, 3646, 3878, 4113, 4702, 3318, 3721, 3680, 3685, 3689, 4528, 4528, 3371, 5102, 2994, 3711, 4528, 4528, 3385, 3388, 3400, 3062, 3720, 4528, 3467, 3674, 4528, 3466, 3607, 4528, 3197, 4528, 4528, 4528, 4637, 3771, 4528, 4528, 4528, 3764, 3466, 3742, 4528, 4528, 3449, 3426, 5086, 4531, 3750, 3721, 4938, 4528, 3782, 4528, 3483, 4528, 3909, 5057, 3526, 4528, 3014, 4539, 4170, 3832, 4528, 3514, 3645, 3058, 4112, 3786, 4528, 3503, 4304, 4528, 3531, 4528, 4528, 3349, 4528, 3927, 3800, 3763, 4528, 3546, 4528, 4528, 3502, 4529, 4541, 3812, 3180, 3756, 3815, 4528, 3555, 4528, 4194, 3554, 3851, 3823, 4528, 4528, 4528, 3818, 3181, 3824, 4528, 4528, 3471, 3499, 3344, 3861, 4528, 2994, 4155, 4160, 4528, 3862, 4528, 4528, 3345, 5054, 4204, 3374, 3849, 3373, 3848, 2994, 3847, 4528, 4528, 3858, 4528, 5241, 5054, 5240, 3885, 5316, 3869, 5177, 3862, 5317, 2978, 4135, 3884, 3505, 3869, 3889, 3904, 3908, 3906, 3505, 3908, 4202, 4985, 4982, 3842, 3913, 5224, 3057, 3919, 3921, 3925, 4528, 3568, 3303, 4110, 4540, 3064, 3932, 3939, 3949, 3957, 3961, 3971, 3974, 3974, 3975, 3979, 3983, 3984, 3988, 3991, 3993, 3993, 3993, 3993, 4015, 4021, 4528, 4026, 3723, 5198, 4033, 4336, 4022, 4299, 3337, 4042, 4625, 4528, 4528, 4048, 4528, 5103, 4627, 4528, 3715, 4528, 2977, 5215, 3500, 4587, 4007, 3900, 3900, 4055, 4528, 3777, 5283, 4528, 3796, 4528, 3715, 4528, 3502, 4528, 4528, 3650, 4528, 4916, 4059, 4528, 3732, 4528, 4528, 3409, 4528, 4615, 4064, 4528, 4528, 3501, 3998, 4076, 4528, 4528, 4528, 3819, 3400, 4438, 4074, 4528, 3814, 4528, 4528, 3789, 4528, 4080, 3900, 4091, 4528, 3815, 4528, 3897, 4027, 3926, 4528, 4528, 3514, 5308, 4119, 4132, 4528, 4528, 3522, 4596, 4183, 4528, 4539, 4140, 4074, 4587, 4144, 4092, 4528, 4845, 4528, 4528, 3550, 4528, 4159, 4528, 4528, 4528, 4114, 4080, 4528, 3778, 4528, 4528, 4096, 3060, 4528, 4528, 4528, 4154, 3562, 4528, 4528, 4528, 4184, 3565, 4528, 4528, 4528, 4340, 5252, 4528, 4528, 3549, 3793, 4528, 4186, 4528, 3836, 4530, 3840, 4043, 4528, 3794, 4528, 4528, 5045, 4194, 3794, 4184, 4528, 4186, 3880, 3793, 4528, 4193, 4186, 3794, 4187, 4200, 4186, 5012, 5247, 5249, 4528, 4704, 4259, 4528, 3875, 3506, 3850, 5178, 4528, 4136, 3399, 3843, 4906, 4208, 4548, 4216, 4223, 4219, 4227, 4231, 4234, 4236, 4240, 4243, 4245, 4249, 4245, 4245, 4253, 4528, 3892, 4528, 4528, 4003, 3299, 4258, 4528, 4528, 4528, 4353, 5085, 4528, 3002, 4029, 4087, 3746, 3870, 4528, 3928, 3770, 3776, 4017, 4278, 4282, 4098, 4286, 4528, 4528, 4293, 4298, 4312, 3379, 4718, 4716, 4528, 5191, 4528, 4528, 3898, 4528, 5085, 4528, 3003, 4845, 3560, 4458, 3880, 4333, 4528, 4528, 4528, 4409, 5000, 4862, 4344, 4528, 4528, 3702, 3764, 4348, 4366, 4528, 4528, 3728, 3772, 4528, 4349, 4528, 4528, 4528, 4528, 2914, 5191, 4528, 4528, 4528, 4533, 3755, 4360, 3492, 4528, 4528, 3738, 2881, 2995, 4528, 3744, 4459, 4193, 4398, 4375, 4528, 4002, 3851, 5252, 3554, 4528, 4307, 4008, 3871, 4528, 3177, 4528, 4528, 3753, 4528, 4306, 4528, 4528, 4528, 4559, 4371, 4528, 4528, 4528, 4614, 4460, 4397, 4374, 4528, 4028, 3442, 4528, 2985, 5064, 3681, 3863, 4389, 4528, 3003, 4590, 4858, 4193, 4407, 3204, 3756, 4528, 4528, 3755, 4528, 3175, 3179, 4528, 4528, 3757, 3540, 2999, 4413, 4507, 4528, 4037, 4528, 3805, 4533, 3755, 4528, 4528, 3765, 3644, 5056, 3864, 3500, 2997, 4423, 3071, 4433, 3352, 4442, 4262, 4528, 5304, 2999, 4528, 4446, 4528, 4038, 3180, 3830, 4587, 4528, 5304, 4528, 4063, 4068, 4528, 3793, 4528, 3792, 4112, 4528, 5225, 4588, 4528, 2998, 4528, 4589, 4528, 2999, 5304, 4528, 2998, 3000, 4588, 4528, 3560, 5304, 4528, 4588, 4528, 4528, 4528, 4650, 4736, 4513, 4528, 4528, 3928, 3801, 3764, 4528, 2924, 3301, 3735, 4528, 4528, 3064, 4376, 4450, 4528, 4591, 4300, 4457, 4464, 4468, 4475, 4477, 4472, 4481, 4485, 4494, 4491, 4487, 4500, 4498, 4500, 4502, 4506, 4528, 4528, 4528, 4686, 4294, 4517, 4299, 4528, 4528, 4528, 3331, 5273, 5089, 4538, 4545, 4552, 4564, 4573, 4528, 4528, 3967, 5229, 4579, 4528, 4533, 3894, 5083, 3486, 4585, 4586, 3521, 4595, 4528, 4528, 4075, 5251, 4185, 4528, 4528, 4528, 5301, 4097, 4528, 4528, 3898, 4603, 4528, 5303, 4528, 4178, 3500, 4528, 4182, 4389, 4528, 3817, 3289, 4528, 3817, 5289, 4528, 3819, 4528, 4528, 4787, 4271, 4528, 4608, 5070, 4182, 4528, 4183, 5048, 5052, 4619, 4528, 4528, 4528, 4694, 3895, 4528, 4528, 4528, 4703, 4644, 4528, 4528, 4528, 4720, 4528, 5095, 4528, 4528, 4083, 4528, 5055, 4604, 2939, 4528, 4189, 3388, 3388, 3388, 3392, 3393, 3393, 4289, 5035, 4654, 4528, 4210, 4528, 4528, 3188, 5212, 4646, 4560, 3500, 4528, 4212, 4528, 4528, 3795, 4528, 4531, 4533, 4513, 4528, 4528, 4108, 4642, 3896, 4195, 4861, 4528, 4267, 4528, 2894, 4559, 4690, 4528, 4528, 4265, 4575, 3209, 4528, 4528, 4161, 4429, 5291, 4596, 4528, 4629, 4696, 4528, 4528, 4528, 4786, 4690, 4528, 4528, 4528, 4794, 4666, 4528, 4108, 3964, 4631, 4301, 5054, 4700, 4528, 4846, 4708, 4528, 4302, 3898, 4680, 4528, 4847, 4709, 4528, 4528, 4528, 4797, 4931, 4528, 4713, 4528, 4306, 4528, 4856, 4622, 4097, 4403, 4528, 4318, 4322, 4528, 3997, 4528, 4528, 3501, 3209, 4009, 4528, 4528, 4528, 4847, 4725, 4528, 4528, 4528, 4987, 3464, 4528, 4726, 4528, 4528, 4186, 4110, 4528, 4746, 4727, 4528, 4528, 4970, 4932, 3863, 3500, 2972, 4196, 4587, 3209, 4528, 4329, 4528, 4528, 3669, 4528, 4969, 4528, 4528, 4254, 4975, 4183, 4075, 3899, 4011, 4528, 4757, 4528, 4367, 3670, 4528, 3400, 5050, 4528, 3407, 3411, 4528, 3413, 4528, 4528, 3652, 4122, 4756, 4528, 4755, 4731, 4389, 4740, 4528, 4744, 4528, 4757, 4043, 4745, 5053, 4750, 4069, 3500, 4044, 4528, 4755, 4528, 4408, 4364, 4528, 4010, 4528, 4528, 4183, 3479, 4528, 4761, 4766, 4043, 3722, 4528, 4528, 4307, 5056, 5014, 4043, 2976, 4754, 5013, 4070, 4767, 4069, 4528, 5014, 4771, 4772, 3951, 3953, 4776, 4779, 4780, 4528, 4453, 4165, 4528, 3816, 4528, 4528, 4528, 4638, 4852, 4528, 4524, 4528, 4523, 4528, 3794, 3534, 3420, 3433, 4791, 3915, 4801, 4807, 4805, 4811, 4815, 4819, 4823, 4827, 4829, 4836, 4833, 4836, 4837, 4841, 4528, 4527, 4528, 4528, 2924, 4528, 4526, 4182, 5183, 4115, 4891, 4900, 4528, 4528, 4924, 3474, 3676, 3445, 4528, 3513, 4528, 5297, 4866, 4870, 5109, 4528, 4075, 4887, 4876, 3619, 4528, 4528, 4314, 3426, 2987, 4528, 5310, 4528, 4528, 4925, 3475, 4880, 4881, 4528, 4528, 4324, 3437, 4885, 3211, 4182, 5183, 3503, 3662, 4528, 4528, 4325, 3438, 4904, 3489, 4534, 4528, 4528, 4955, 4959, 4656, 4910, 4528, 4528, 4339, 4528, 3707, 3626, 3628, 4528, 4528, 4988, 3500, 5304, 3807, 3943, 4528, 5025, 4886, 4929, 4533, 4942, 4993, 4528, 4528, 5204, 3808, 3635, 4528, 4528, 4528, 4994, 4947, 4951, 4528, 4528, 4380, 4528, 4947, 4951, 4528, 3699, 4967, 4974, 3384, 4115, 4979, 4528, 3504, 3664, 4528, 5089, 4992, 4528, 4528, 5261, 4532, 4658, 4528, 4528, 4528, 5024, 5000, 4528, 4528, 4528, 5039, 4408, 4999, 4596, 4528, 4528, 4528, 3399, 3662, 4528, 5088, 4528, 4528, 4111, 5009, 4528, 4528, 4402, 4528, 5018, 3384, 5097, 3062, 4303, 4528, 4534, 4184, 4994, 3705, 4528, 4528, 4436, 5215, 3702, 3826, 4050, 3795, 4027, 4428, 2941, 3063, 4305, 4528, 5029, 4187, 4528, 3795, 4528, 3865, 4528, 3002, 3665, 4668, 5005, 4528, 4528, 4528, 4508, 4528, 4995, 4111, 4051, 4528, 4528, 5277, 4528, 4528, 5287, 4528, 4530, 4963, 3636, 4528, 4528, 4387, 4528, 4567, 3062, 4109, 4534, 2995, 4528, 4263, 4391, 4528, 2893, 3764, 4528, 4528, 4528, 3816, 4528, 5062, 3060, 4108, 4528, 4528, 4519, 3815, 4528, 5068, 4265, 4528, 5281, 4528, 3537, 4528, 2895, 2893, 4266, 5074, 4108, 5315, 5080, 4569, 3716, 3945, 3566, 5093, 5107, 4581, 5113, 5120, 5124, 5128, 5132, 5136, 5140, 5144, 5147, 5150, 5154, 5156, 5160, 5164, 5167, 5171, 5175, 4528, 4528, 4528, 4525, 4528, 4528, 5089, 4528, 4528, 4528, 2989, 3004, 2916, 4528, 4558, 4689, 4528, 4294, 4517, 4528, 4173, 4528, 4109, 4264, 4660, 4528, 3896, 4528, 4528, 3563, 4528, 4528, 4528, 4299, 5187, 4528, 5196, 4528, 4598, 3543, 4528, 2993, 4528, 4528, 3000, 4528, 4528, 5202, 4528, 3005, 4085, 4428, 5208, 4682, 4166, 5222, 4528, 4528, 4533, 4512, 3934, 4528, 4528, 4528, 4533, 4920, 3189, 5235, 4528, 4533, 4393, 5011, 4528, 5245, 3926, 4528, 4633, 5218, 3757, 5257, 5229, 4528, 4528, 4555, 3217, 5257, 5229, 4540, 3935, 4528, 4528, 4599, 3512, 3853, 4528, 2927, 4528, 4672, 4528, 4528, 4148, 4528, 3061, 4528, 5265, 4528, 4528, 4611, 4102, 5273, 4528, 4528, 4528, 4674, 4528, 3330, 5272, 4528, 4528, 4721, 3458, 4528, 5029, 3001, 4528, 4261, 5089, 4528, 3004, 2925, 4108, 4028, 4528, 4631, 5192, 4528, 4265, 4643, 4645, 4108, 4752, 4528, 4528, 4734, 2885, 4528, 5314, 4528, 4528, 4843, 3209, 4528, 4528, 3309, 3313, 4528, 5308, 4528, 4528, 4851, 4260, 3841, 4528, 4528, 4528, 4914, 4528, 5357, 5843, 5368, 5994, 5358, 5994, 5371, 5360, 5994, 5994, 5994, 5994, 5881, 5366, 5359, 5994, 5370, 5994, 5994, 5373, 5994, 5994, 5383, 5397, 5430, 5398, 5399, 5430, 5425, 5431, 5425, 5425, 5401, 5401, 5425, 5426, 5428, 5427, 5427, 5427, 5427, 5400, 5400, 5400, 5425, 5433, 5429, 5425, 5402, 5435, 5437, 5436, 5439, 5441, 5442, 5444, 5446, 5447, 5448, 5447, 5447, 5448, 5450, 5452, 5455, 5453, 5456, 5997, 5321, 5339, 5323, 6092, 6093, 5323, 5323, 5324, 5344, 5421, 5572, 5682, 5491, 5901, 6298, 5323, 5580, 5323, 5683, 5676, 5676, 5379, 5564, 5323, 5323, 5323, 5335, 5323, 5323, 5816, 5564, 5911, 5403, 5403, 5676, 5676, 5676, 5563, 5564, 5564, 5561, 5342, 5884, 5374, 5323, 5816, 5385, 5323, 5323, 5323, 5324, 5406, 5989, 5894, 5573, 5323, 5323, 5323, 5780, 5323, 5334, 5676, 5676, 5677, 5564, 5564, 5564, 5564, 5405, 5323, 5323, 5420, 5323, 5323, 6221, 5676, 5676, 5564, 5564, 5407, 5928, 5407, 5407, 5407, 5407, 5989, 5810, 5894, 5573, 5564, 5403, 5403, 5564, 5564, 5403, 5804, 5407, 5480, 5480, 5480, 5323, 5989, 5573, 5323, 5323, 6092, 6028, 5323, 6092, 5323, 5801, 5323, 5407, 5480, 5480, 5323, 5323, 5978, 5342, 5323, 5323, 5701, 5323, 5353, 5323, 5323, 5323, 5326, 5323, 5323, 6106, 5323, 5323, 5323, 5327, 5323, 5323, 5323, 5328, 5405, 5932, 5911, 5804, 5380, 5323, 5323, 5323, 5333, 5323, 5564, 5564, 5405, 5404, 5911, 5403, 5676, 5564, 5676, 5564, 5564, 5564, 5403, 5404, 5564, 5564, 5405, 5403, 6038, 5380, 5323, 5420, 5403, 5380, 5420, 5911, 5804, 5380, 5911, 5380, 5911, 5676, 5804, 5564, 5564, 5564, 6038, 5380, 5323, 5323, 5801, 5323, 5323, 5323, 5336, 5323, 5323, 5323, 5345, 5799, 5323, 5799, 5326, 5323, 6105, 5323, 5323, 5991, 5774, 6040, 6034, 5460, 6041, 5503, 5518, 5469, 5486, 6040, 5516, 5500, 5502, 5510, 5506, 6040, 5496, 5499, 5461, 5511, 5505, 5508, 5470, 6040, 6040, 6042, 6041, 6040, 6040, 6044, 5513, 6040, 6043, 6040, 6043, 5326, 5515, 5377, 5497, 5517, 5488, 5487, 5470, 5520, 5522, 5525, 5525, 5523, 5526, 5524, 5552, 5527, 5527, 5527, 5527, 5528, 5530, 5529, 5530, 5530, 5530, 5531, 5532, 5532, 5533, 5539, 5539, 5534, 5536, 5540, 5538, 5555, 5539, 5554, 5557, 5323, 5323, 5991, 5993, 5323, 6040, 6040, 6040, 6040, 6282, 6041, 5542, 5544, 5546, 5548, 5549, 5548, 5549, 5551, 5552, 5323, 6039, 5322, 5323, 5323, 5996, 6017, 5969, 5323, 5323, 5323, 5997, 5421, 5490, 5387, 5323, 5323, 5323, 5350, 6014, 5895, 5927, 5323, 5578, 5323, 5323, 5324, 5821, 5969, 5672, 5665, 5323, 5323, 5324, 5997, 5845, 5582, 5333, 5323, 5323, 5323, 5353, 5323, 5675, 6227, 5323, 5323, 5323, 5354, 5325, 5672, 5672, 5466, 5323, 5323, 5586, 5673, 6081, 5323, 5323, 5324, 6013, 5477, 5323, 5925, 5926, 5595, 5323, 6080, 5671, 5323, 5597, 6000, 5906, 5603, 5605, 5606, 5606, 5606, 5606, 5608, 5609, 5611, 5611, 5611, 5612, 5611, 5614, 5616, 5618, 5618, 5618, 5625, 5624, 5625, 5624, 5624, 5619, 5620, 5620, 5620, 5621, 5622, 5632, 5633, 5628, 5629, 5627, 5628, 5630, 5631, 5635, 5636, 5638, 5323, 5323, 5996, 6284, 6007, 5322, 5323, 5323, 5323, 5926, 5704, 5875, 5719, 5323, 5670, 5323, 5323, 5324, 6028, 5323, 5808, 5323, 5905, 5323, 5323, 5324, 6216, 5559, 5868, 5800, 5323, 5643, 5323, 5323, 5323, 5394, 5323, 5323, 6002, 5323, 6290, 5323, 6002, 5323, 5323, 5324, 6300, 6037, 5571, 5648, 5645, 5323, 5323, 5323, 5395, 5653, 6078, 5656, 5323, 5323, 5997, 5566, 5323, 5323, 5764, 5766, 5323, 5323, 5998, 5323, 5323, 6001, 5323, 5323, 6010, 5572, 6087, 5323, 6086, 5323, 5323, 5323, 5780, 5885, 5719, 5999, 5699, 5323, 5323, 5326, 5830, 5475, 5662, 5323, 5323, 5323, 5415, 5664, 5323, 5323, 5323, 5420, 5403, 5403, 5403, 5403, 5911, 5676, 5676, 5676, 5676, 5804, 5323, 5999, 5323, 5323, 5323, 5466, 5570, 5667, 5342, 5323, 5323, 6036, 5934, 5590, 6001, 5323, 5323, 5416, 5418, 5323, 6139, 6213, 5323, 5323, 6039, 5935, 5420, 5831, 5560, 5781, 5845, 5718, 5845, 5693, 5342, 5323, 5323, 6039, 6279, 5803, 5797, 5692, 5924, 5323, 5323, 5698, 5728, 5323, 5323, 6049, 6174, 6139, 6213, 5420, 5575, 5803, 5797, 6212, 5923, 5803, 5797, 6296, 5923, 5342, 5725, 5803, 5797, 5902, 5323, 5323, 5326, 6033, 5391, 5323, 5575, 5560, 5781, 5922, 6131, 5323, 5323, 5323, 5780, 5840, 6001, 5392, 5323, 5322, 5323, 5323, 6103, 5323, 5323, 6105, 5342, 6001, 5323, 5323, 5483, 5323, 5803, 5705, 5342, 5323, 5323, 5323, 5558, 5323, 5323, 5323, 5566, 5726, 6167, 5323, 6095, 5323, 5323, 5323, 5573, 5323, 5323, 5840, 6001, 5323, 5323, 6109, 5685, 6112, 5700, 5342, 5323, 5323, 5583, 5813, 5560, 5840, 5323, 5323, 6138, 5350, 5323, 5998, 5323, 5323, 6141, 5323, 5323, 6165, 5323, 5323, 6083, 5323, 5323, 6096, 5333, 5323, 5323, 5813, 5349, 5323, 5323, 5579, 6105, 5323, 5323, 5323, 5678, 5465, 5323, 5323, 5323, 5684, 5323, 5323, 5409, 6014, 5732, 5584, 5734, 5736, 5739, 5739, 5739, 5739, 5740, 5743, 5739, 5738, 5739, 5739, 5742, 5743, 5743, 5743, 5744, 5745, 5745, 5745, 5745, 5745, 5747, 5747, 5747, 5747, 5749, 5749, 5749, 5749, 5750, 5391, 5892, 5901, 5869, 5323, 5753, 5323, 5323, 5758, 5323, 6015, 5770, 5323, 5323, 6185, 6189, 5323, 5762, 5762, 5323, 5323, 6199, 5323, 6199, 5323, 5323, 5689, 5769, 5323, 5323, 6206, 5323, 5323, 5690, 5323, 5323, 5770, 5779, 5323, 5323, 5323, 5753, 5323, 5323, 5890, 5323, 5323, 5350, 6294, 5323, 6014, 5324, 6028, 5921, 5975, 5323, 5323, 5362, 5323, 5323, 5323, 6275, 5992, 5918, 5974, 5976, 5323, 5892, 5901, 5707, 5323, 5336, 5646, 5785, 5323, 5323, 5323, 5786, 5323, 5791, 5679, 5681, 5833, 5493, 6297, 5800, 5579, 5897, 5730, 5323, 5794, 5795, 5323, 5323, 6208, 5323, 5323, 6218, 6197, 5800, 5323, 5323, 5771, 5323, 6033, 5391, 5892, 6129, 5806, 5323, 5323, 5323, 5796, 5394, 5704, 6001, 5323, 5323, 5323, 5582, 5323, 5820, 5565, 5891, 5895, 5323, 5823, 5824, 5323, 5323, 6276, 5323, 5324, 5792, 5680, 5391, 5892, 6106, 5323, 5323, 5780, 5323, 5657, 5466, 5323, 5336, 5323, 5324, 5997, 6289, 5323, 5323, 5323, 6028, 5682, 5491, 6136, 5800, 5323, 5323, 5323, 5778, 5779, 5566, 5895, 5833, 5493, 6298, 5323, 5799, 5323, 5323, 5323, 5798, 5323, 5997, 5378, 5566, 5865, 5466, 5350, 5323, 5704, 5719, 5340, 5323, 5323, 5323, 5392, 5323, 5323, 5323, 5393, 6037, 5566, 5895, 5491, 6136, 5326, 5830, 5385, 5323, 5323, 5390, 5409, 5780, 5349, 5323, 5323, 5375, 5323, 5323, 5323, 5996, 5471, 5375, 5421, 5490, 6181, 5800, 5323, 5323, 6107, 5566, 5323, 5323, 5323, 5800, 5323, 5323, 6028, 5323, 5569, 5466, 5780, 5323, 5323, 5323, 5801, 5707, 5830, 5475, 6081, 5877, 5323, 5323, 5323, 5813, 5323, 5323, 5813, 5323, 5997, 5566, 5476, 5876, 5323, 5323, 5323, 5806, 5323, 5342, 5726, 5877, 5323, 5323, 5884, 5877, 5566, 6092, 5323, 5801, 5562, 5323, 5323, 5323, 5349, 5574, 5814, 5876, 5323, 5323, 5323, 5574, 5385, 5323, 5324, 6100, 6102, 5323, 5323, 5323, 6092, 5323, 5323, 5688, 5323, 5801, 5323, 5323, 5566, 6049, 5323, 5323, 5323, 5815, 5323, 6167, 5323, 5323, 5573, 5558, 5815, 5323, 5815, 5323, 5323, 5815, 5815, 5815, 5323, 5323, 5323, 5820, 6037, 5323, 6095, 5323, 6080, 5323, 6080, 5323, 5323, 6037, 5703, 6124, 5837, 6095, 5323, 5323, 5375, 5562, 5323, 6095, 5323, 5688, 5884, 6028, 5884, 6093, 6095, 5688, 5323, 6187, 5825, 6186, 5826, 5579, 5579, 5579, 5323, 5324, 6281, 6110, 5842, 5825, 5827, 5828, 5828, 5828, 5828, 5848, 5854, 5853, 5850, 5853, 5852, 5856, 5856, 5856, 5856, 5860, 5856, 5860, 5856, 5857, 5858, 5858, 5858, 5858, 5558, 5835, 5323, 5323, 5323, 5839, 5323, 5323, 5323, 5640, 5385, 5998, 5323, 5323, 5323, 5864, 5323, 5323, 5323, 6175, 5323, 5323, 5376, 5972, 5862, 5323, 5323, 5323, 5874, 5798, 5323, 5323, 5323, 5878, 5323, 5323, 5323, 5654, 5323, 5767, 5323, 5323, 5351, 5336, 5323, 5883, 5323, 5323, 5323, 5884, 5727, 5411, 5413, 5323, 5323, 5392, 5392, 5392, 6175, 5323, 5684, 5562, 5464, 5927, 5900, 5592, 5909, 5463, 5465, 5809, 5591, 5591, 5323, 5323, 5323, 5885, 5323, 5806, 5599, 5323, 5323, 5323, 5895, 5323, 5866, 5334, 5323, 5328, 5330, 5322, 5323, 5323, 5888, 5323, 5323, 6175, 5323, 5796, 5323, 5350, 5990, 5323, 5323, 5323, 5386, 5927, 5900, 6176, 5323, 5334, 5321, 5323, 5334, 5323, 5323, 5323, 6107, 5323, 5323, 5323, 5570, 5474, 6035, 5378, 5933, 5465, 5323, 6038, 5570, 5407, 5929, 5480, 5480, 5480, 5323, 5809, 6129, 6001, 5323, 5334, 5566, 5726, 5877, 5390, 5323, 5420, 5703, 5385, 5998, 5323, 5688, 5884, 5877, 5323, 5323, 5394, 5696, 5326, 6036, 5933, 5465, 5863, 5863, 6176, 5323, 5323, 5323, 5899, 5494, 5323, 5323, 5323, 5907, 5390, 5780, 5599, 5323, 5335, 5322, 5334, 5336, 5323, 5323, 5801, 5915, 5323, 5579, 5323, 5323, 5323, 5574, 5323, 5323, 5323, 5403, 5403, 5323, 5884, 5323, 5323, 5323, 5674, 5323, 5884, 5323, 5574, 5323, 5569, 5323, 6107, 5466, 5707, 5937, 5323, 5326, 5323, 5326, 6019, 5323, 5886, 5943, 6008, 5946, 5946, 5947, 5945, 5947, 5946, 5946, 5951, 5946, 5950, 5949, 5953, 5956, 5955, 5956, 5956, 5957, 5959, 5959, 5960, 5960, 5961, 5959, 5959, 5959, 5962, 5966, 5966, 5966, 5966, 5964, 5965, 5966, 5966, 5967, 5323, 5323, 5323, 5938, 6025, 5880, 5723, 5323, 5323, 5323, 5912, 5323, 5998, 5323, 5323, 5334, 5336, 5800, 5989, 5869, 5999, 5599, 5695, 5600, 6095, 5323, 5759, 6140, 5986, 5981, 5983, 5381, 5988, 5323, 6123, 5323, 5323, 5323, 5576, 6004, 5323, 5323, 5323, 5968, 5389, 5323, 5323, 5323, 5989, 5323, 5323, 5323, 5363, 5323, 5323, 5323, 5385, 5323, 5388, 5751, 5323, 5323, 5420, 5575, 5323, 6036, 5421, 5674, 6027, 6001, 5323, 5323, 5421, 6286, 5803, 5337, 5562, 5986, 5346, 6219, 5323, 5364, 5323, 5337, 5873, 5323, 5324, 6300, 6038, 5323, 6006, 5879, 6288, 6001, 5323, 6030, 6007, 6287, 6170, 5350, 6037, 5674, 6027, 5721, 5367, 5359, 5579, 5806, 5323, 6200, 6196, 6168, 6170, 5323, 5323, 5323, 5992, 5814, 6169, 6001, 5323, 5343, 5323, 5323, 5323, 5995, 5323, 5672, 6027, 5323, 5348, 5844, 5720, 5579, 5806, 5323, 5342, 5323, 5323, 5335, 5800, 6107, 5574, 5884, 5323, 5323, 6032, 5323, 6026, 6028, 5323, 5323, 5674, 6032, 5323, 5323, 5323, 6010, 5489, 5912, 5323, 5323, 5589, 5324, 5998, 5323, 5323, 5484, 5323, 5323, 5800, 5599, 5323, 5350, 5361, 5323, 5323, 5323, 5707, 5323, 5912, 5323, 6080, 5323, 5345, 5323, 6038, 5703, 5806, 5599, 5323, 6105, 5323, 5599, 5323, 6105, 5813, 6295, 5877, 5323, 5350, 5678, 5465, 5989, 5780, 5323, 5323, 5589, 5323, 5323, 5323, 5755, 5570, 6022, 5754, 5756, 6021, 6024, 6047, 5422, 5423, 5422, 6046, 5422, 5422, 5422, 5422, 6097, 6051, 6054, 6053, 6055, 6057, 6059, 6059, 6060, 6061, 6065, 6059, 6059, 6059, 6066, 6066, 6066, 6062, 6063, 6061, 6061, 6061, 6061, 6068, 6069, 6071, 5323, 5323, 5323, 6032, 6223, 5378, 5408, 5703, 5799, 5342, 6073, 5558, 5323, 5323, 5558, 5420, 5913, 5323, 5323, 5323, 6039, 5323, 5323, 5323, 5323, 5322, 5323, 5323, 5323, 5324, 5323, 6096, 5323, 5323, 5323, 6080, 5323, 5336, 5323, 6075, 5323, 5327, 5683, 5940, 5887, 5323, 6077, 6085, 5323, 5355, 5990, 5323, 5324, 6285, 6126, 6094, 6130, 5323, 6090, 6107, 5323, 5361, 5323, 6038, 5562, 5323, 5323, 5818, 5333, 5323, 5333, 5323, 6099, 6101, 5323, 5323, 5562, 5323, 5323, 6104, 5323, 5323, 5323, 6105, 5323, 5323, 5780, 5989, 6112, 5924, 5323, 5323, 5323, 5472, 5562, 5323, 5323, 5672, 6114, 5323, 5323, 5323, 5816, 6001, 5326, 5352, 6037, 5934, 5323, 5323, 5323, 5909, 5406, 5832, 6120, 5323, 5361, 5573, 5323, 5410, 5412, 5414, 5323, 5323, 5384, 5558, 5323, 5323, 5385, 5333, 5323, 6117, 6285, 6119, 6102, 5323, 6122, 5323, 6122, 5323, 5323, 5323, 6117, 5323, 5995, 5385, 5573, 5322, 5333, 5323, 5323, 5574, 5990, 5323, 5323, 5593, 6106, 5832, 5722, 5706, 6131, 5323, 5323, 5641, 5323, 5817, 5323, 6128, 5332, 5323, 5323, 5659, 5660, 5672, 5473, 5323, 5323, 5668, 5323, 5323, 6110, 6126, 6094, 6130, 5342, 5323, 5323, 5323, 5570, 6007, 5722, 5706, 6131, 5323, 5674, 5466, 5323, 5323, 5350, 6037, 6025, 5722, 5923, 5342, 5323, 5323, 5323, 5703, 5924, 5323, 5415, 5417, 5419, 5323, 5323, 5421, 5725, 5803, 5323, 6133, 6082, 5342, 5323, 5323, 5323, 5579, 5896, 5323, 5458, 5323, 5323, 5324, 5378, 6092, 5323, 5672, 6106, 5884, 5727, 5323, 5323, 5323, 6133, 5323, 6135, 5323, 5323, 5672, 5323, 5323, 5885, 5342, 5323, 5323, 5885, 5323, 5323, 5323, 6175, 5323, 6028, 5323, 5688, 5323, 5885, 5323, 5323, 5885, 6092, 5323, 6028, 6028, 6093, 6093, 6093, 6093, 6028, 6039, 5420, 5326, 5323, 5813, 5323, 5333, 5985, 6039, 5333, 5323, 5466, 5345, 5323, 5326, 6211, 6001, 5783, 5558, 5984, 5811, 6145, 6150, 6146, 6146, 6146, 6146, 6143, 6144, 6150, 6146, 6149, 5709, 6147, 5709, 6152, 5709, 5710, 5711, 5715, 5712, 5713, 6154, 6156, 5714, 6158, 5715, 5716, 6162, 6162, 6160, 6161, 6162, 6162, 6162, 6162, 6172, 6163, 6164, 5323, 5323, 5683, 5323, 5323, 5323, 5568, 5722, 5323, 5940, 5587, 5845, 5723, 5323, 5708, 5323, 5323, 5684, 5466, 5323, 5323, 5323, 6029, 6209, 5323, 5323, 6178, 5323, 5599, 5323, 5323, 5689, 5323, 5323, 6115, 5323, 6183, 5788, 5323, 5787, 5323, 5323, 5797, 5846, 5323, 5323, 5323, 6180, 5707, 5323, 5336, 5684, 5761, 5323, 5323, 5341, 5322, 5815, 5323, 6276, 6174, 5323, 6191, 5323, 5323, 5702, 5323, 5323, 5649, 5323, 5323, 5704, 5340, 5323, 5323, 5326, 5910, 6195, 5568, 5931, 5973, 5323, 6194, 6196, 5930, 5781, 5353, 5323, 5323, 5333, 5333, 5333, 5323, 6202, 6197, 5323, 5350, 5351, 5323, 5482, 5323, 5323, 5323, 6214, 5323, 6010, 5378, 5568, 6192, 5781, 6129, 6131, 5324, 6011, 6196, 5481, 5675, 5863, 6130, 5342, 5323, 6206, 5323, 6206, 5940, 5846, 5323, 5323, 5722, 5924, 5323, 6039, 5323, 5323, 5579, 5579, 5707, 5323, 5336, 5815, 5323, 5323, 6048, 5323, 5323, 5574, 5725, 5803, 5705, 5323, 6204, 5323, 5323, 5323, 6218, 5923, 5489, 5895, 5675, 6129, 5924, 5675, 5923, 5323, 5323, 5323, 5323, 5574, 5574, 5574, 5323, 5323, 5884, 6028, 5323, 5323, 6211, 5323, 5323, 5763, 5765, 5323, 5323, 5326, 5687, 5797, 5325, 5323, 5323, 5323, 5773, 5775, 5323, 5323, 5350, 6105, 6218, 5923, 5323, 5323, 5776, 5323, 5324, 5335, 5800, 5323, 5466, 5345, 5801, 5915, 5599, 5323, 5323, 6028, 5323, 5323, 5323, 5814, 5700, 5335, 5694, 5323, 5323, 5789, 5323, 5335, 5322, 5323, 5336, 6091, 6107, 5322, 5998, 5323, 5323, 5801, 6166, 6095, 5323, 5796, 5323, 5467, 5323, 5323, 5569, 5323, 5323, 5323, 5325, 5323, 5323, 6031, 5323, 5990, 5323, 5323, 5570, 6197, 5323, 5350, 5323, 5323, 5323, 5410, 6079, 5796, 5323, 5323, 5812, 5323, 5684, 5796, 5323, 5684, 5815, 5323, 5877, 5782, 5588, 5323, 6225, 6226, 6230, 5813, 6229, 5567, 5323, 5867, 5838, 6232, 5920, 5492, 6234, 5920, 5919, 5919, 6235, 5920, 6238, 6237, 6237, 6240, 6242, 6243, 6245, 6247, 6245, 6249, 6249, 6257, 6256, 6257, 6258, 6250, 6249, 6250, 6251, 6252, 6252, 6260, 6254, 6253, 6254, 6252, 6262, 6262, 6262, 6263, 6265, 6267, 6269, 6270, 6271, 6273, 5323, 5323, 5830, 5814, 5876, 5466, 5323, 5323, 6038, 5323, 5323, 5601, 6278, 5323, 5570, 5323, 5323, 5323, 5990, 6088, 6289, 5323, 5323, 5871, 5323, 5329, 5331, 5323, 5323, 5889, 5409, 5323, 5669, 5323, 5668, 5895, 5466, 5323, 5420, 5801, 5912, 5800, 5917, 5869, 6000, 5323, 5574, 6167, 5323, 5323, 6167, 5562, 5941, 5323, 5323, 5323, 5893, 5323, 5466, 5420, 5323, 5375, 5479, 5569, 5323, 5323, 5830, 5385, 5323, 6174, 5323, 5392, 5323, 5392, 5323, 5349, 5323, 5323, 5323, 5651, 5324, 6292, 5406, 5568, 5996, 5462, 5571, 5686, 5323, 5672, 5574, 5323, 5570, 5466, 6138, 5571, 5802, 5323, 5323, 5323, 5895, 5420, 5323, 5375, 5478, 5323, 5323, 5323, 5904, 5323, 5323, 5996, 5471, 6302, 5323, 5323, 5929, 6112, 5406, 5322, 5323, 5323, 5970, 5323, 5323, 5573, 6038, 5323, 5323, 5323, 6106, 5324, 5323, 5323, 5323, 5977, 5979, 5912, 5334, 5323, 5323, 5334, 5566, 5323, 8, 262144, 0, 0, 1, 0, 2, 0, 3, 240, 19456, 262144, 8192, 0, 4, 8, 0, 5, 1048576, 1073741824, 0x80000000, 1073741824, 0, 6, 32, 0, 7, 1075838976, 2097152, 0, 8, 8, 16, 0, 9, 4456448, 4194560, 4196352, -2143289344, -2143289344, 4194304, 0, 12, 0, 13, 37748736, 541065216, 541065216, -2143289344, 4198144, 4196352, 276901888, 8540160, 4194304, 128, 0, 21, 16, 32, 96, 0, 23, 8425488, 4194304, 1024, 0, 24, 0, 29, 0, 32, 256, 0, 40, 0, 41, 37748736, 742391808, 742391808, 775946240, -1371537408, 775946240, 64, 64, 96, 64, 128, 128, 512, 0, 59, 140224, 5505024, -1887436800, 0, 63, 351232, 7340032, -2030043136, 0, 64, 256, 256, 257, 775946240, 775946240, 171966464, 171966464, 775946240, 239075328, -1405091840, -1371537408, 239075328, 171966464, 2097216, 4194368, 4718592, 4194400, 541065280, 4194368, 4720640, 541589504, 4194368, -2143289280, 4194368, -2143285440, -2143285408, -2143285408, -2109730976, -2143285408, 775946336, 775946304, 776470528, -1908404384, 775946304, 775946304, -1908404384, 1536, 1792, 536936448, 16, 48, 64, 896, 8192, 131072, 0, 4036, 1048592, 2097168, 16, 64, 65536, 131072, 1024, 98304, 131072, 32768, 256, 2048, 2048, 12288, 0, 300, 4203520, 268435472, 16, 528, 16, 1024, 229376, 25165824, 25165824, 33554432, 0x80000000, 262160, 16, 163577856, 536936448, 20, 24, 560, 48, 80, 1048592, 1048592, 16, 2097168, 2097168, 3146256, 2097680, 3145744, 3146256, 16, 2098064, 17, 17, 528, 524304, 1049104, 2228784, -161430188, -161429680, -161429676, -161430188, -161430188, -161429676, -161429676, -161429675, -161349072, -161349072, -161347728, -161347728, -161298572, -161298576, -160299088, -161298576, -160299084, -161298572, -161298572, -160774288, 21, 21, 53, 146804757, 146812949, 146862101, 146863389, 146863389, 146863421, -161429740, -161429676, -160905388, -18860267, -160774284, -160774284, -18729163, 0, 4096, 65536, 262144, 1048576, 0, 96, 96, 256, 1024, 1024, 2048, 0, 128, 1024, 4096, 0, 256, 1536, 0x80000000, 159383552, 0, 8192, 8392704, 142606336, 0, 9476, 134218240, 1, 32768, 1048576, 512, 131072, 33554432, -2013265920, 0, 17408, 131328, 131072, 0, 1073741825, 0, 1073741824, 8, 124160, 16777216, 1073774592, 1226014816, 100665360, 100665360, -2046818288, 1091799136, -2044196848, 1091799136, 1091799136, 1091803360, 1091799136, 1158908000, 1158908001, 1192462432, 1192462448, 1192462448, 1870630720, 1870630720, 1870647104, 1870647104, 1200851056, 1200851056, 1091799393, 1870638964, 1870638932, 1870638932, 1870638933, 1870630736, 1870630736, 1870630740, 1870630740, 1870630736, 1879019376, 1870630740, 1879019376, 1879019380, 131328, 0, 58624, 1048576, 1224736768, 1090519040, 0, 66048, 235712, 0, 77824, 0, 1157627904, 1191182336, 0, 82432, 231744, 0, 131584, 503616, 1862270976, 1862270976, 1048576, 150994944, 2048, 100663296, -1073741824, 6144, 0, 150528, 0, 164096, 0, 32768, 32768, 65536, 524288, 524288, 32, 384, 512, 5120, 8192, 16384, 0, 512, 2048, 16384, 32768, 0, 520, 520, 4194304, 251658240, 536870912, 262144, 2621440, -1073741824, 8192, 1073741824, 262144, 2097152, 134217728, 2048, 524288, 2097152, 67108864, 134217728, 0, 12289, 12289, 1098920193, 1132474625, 1124085761, 1124085761, 1132474625, 1132474625, 1400975617, 117440512, 134217728, 268435456, 4194432, 3145728, 16777216, 0x80000000, 1536, 65536, 16777216, 1073741824, 1073741824, 33554432, 536870912, 512, 50331649, 1050624, 262144, 512, 1275208192, 541065224, 4194312, 4194312, 4194344, 4203820, -869654016, -869654016, 1279402504, 1279402504, 2143549415, 2143549415, 2143549423, 2143549423, 0, 284672, 1, 16777216, 1073743872, 268435968, 229376, 1050624, 0, 331776, 2760704, -872415232, 0, 495424, 7864320, 1862270976, 0, 139264, 4333568, 1275068416, 0, 339968, 999, 29619200, 2113929216, 0, 511808, 1007, 1007, 0, 524288, 1048576, 4096, 1048588, 44, 0, 605503, 1066401792, 0, 867391, 1, 102, 384, 110, 110, 0, 1048576, 2097152, 268435456, 536870912, 0, 2048, 262144, 524288, 96, 0, 536870912, 2048, 1048576, 8388608, 4096, 12289, 0, 1024, 65536, 0, 1536, 0, 832, 1, 6, 2097152, 104, 104, 0, 1049088, 1049088, 12845065, 12845065, 4, 256, 3584, 16384, 229376, 8192, 67108864, 32, 4100, 1024, 2097152, 1073741824, 1049088, 270532608, 2097152, 2097152, 4194304, 0x80000000, 147193865, 5505537, 5591557, 5587465, 5591557, 5587457, 5587457, 147202057, 13894153, 13894153, -1881791493, -1881791493, 13894153, 81003049, 512, 1048576, 33554432, 8192, 33554432, 1024, 524288, 134217728, 1073741824, 1, 5505024, 86528, 9, 8388608, 16777216, 268435456, 0, 16384, 65536, 4194304, 4194432, 75497472, 0, 2097152, 16777216, 16384, -2113929216, 0, 260, 512, 1024, 8192, 4096, 4096, 8192, 8192, 9216, 8, 8388608, 33554432, 67108864, 1073741824, 81920, 0, 2621440, 0, 57344, 2, 56, 64, 524288, 0, 576, 524288, 536870912, 8396800, 4194304, 25165824, 92274688, 25165824, 100663296, 134217728, 536870912, 1073741824, 32768, 131072, 1048576, 128, 2048, 77824, 524288, 64, 384, 8192, 66048, 8396800, 0, 3145728, 2, 16384, 262144, 524288, 268567040, 72618005, 68423701, 68423701, 68489237, -2079059883, -2079059883, 68423701, 85200917, 68425749, 68423703, 85200919, 69488664, 69488664, 70537244, 70537245, 70537245, -2076946339, 70537245, 70539293, -2022351681, -2022351681, -2022351809, -2022351809, 0, 4194304, 50331648, 1073741824, 266240, 1048576, 100663296, 402653184, 1610612736, 0, 605247, 1058013184, 1073741824, -2080374784, -2080374784, 268288, 0, 4243456, 0, 5242880, 282624, 0, 8388608, 0, 999, 259072, 4194304, 4194304, 1, 2, 4, 0, 0x80000000, 0x80000000, 0, -2046820352, 28, 3145728, 32, 3072, 16384, 2113544, 1, 14, 16, 14, 32, 512, 139264, 4, 2097152, 4, 50331648, 128, 268435968, 268435968, 268436032, 256, 32768, 4194304, 16777216, 0, 15, 32, 1, 4, 16, 2, 8, 32, 64, 0, 16, 16, 20, 16, 28, 2097552, 256, 536871168, 256, 65536, 268435456, -1879046334, 1073744256, -1879046334, -1879046334, -1879046326, -1879046326, -1845491902, -1878784182, 268444480, 268444480, 2100318145, 2100318145, 2100318149, 2100318149, 268436289, 268436288, 268436288, 2100318145, 2100326337, 2100318145, 2100326337, 2100326337, 1, 1024, 1856, 0x80000000, 2432, 0, 9437184, 0, 131072, 16777216, 536870912, 9216, 1864, 0, 16252928, 0, 148480, 0, 301989888, 0, 16777216, 16777216, 67108864, 0, 384, -1879046336, 1, 4032, 19939328, 2080374784, 0, 19947520, 0, 33554432, 0, 262144, 1, 128, 3072, 524288, 268435456, 196608, 0, 58720256, 1, 64, 16384, 19922944, 2080374784, 24576, 0, 67108864, 536870912, 16384, 3145728, 8, 33554432, 134217728, 805306368, 1073741824, 2048, 3145728, 32768, 33554432, 268435456, 134218752, 0, 83886080, 0, 229376, 1124073474, 1124073472, 1124073488, 1124073472, 1124073472, 12289, 1392574464, 1124073472, 1258292224, 1073754113, 12289, 1124085777, 1124085761, 1258304513, 1124085761, 1098920209, 1132474625, 2132622399, 2132622399, 2132360255, 2132360255, 2140749119, 0, 100663296, 0, 65536, 6291456, 50331648, 0x80000000, 2140749119, 2140749119, 49152, 0, 134217728, 0x80000000, 0, 318767104, 12545, 25165824, 268435456, 12305, 13313, 12561, 0, 134348800, 134348800, 78081, 327155712, 1, 12288, 65536, 1, 30, 32, 1024, 134217728, 288, 8388608, 134217728, 128, 131072, 33554432, 1073741824, 256, 8388608, 327680, 0, 184549376, 16384, 4194304, 117440512, 0, 229440, 14, 1024, 1, 12, 3145728, 128, 134217728, 8, 536870912, 68157440, 137363456, 0, 243269632, 137363456, 66, 66, 100680704, 25165824, 26214400, 92274688, 25165952, 92274688, 92274688, 93323264, 92274720, 93323264, 25165890, 100721664, 25165890, 100721928, 100721928, 100787464, 100853000, 125977600, 125977600, 127026176, 281843, 281843, 1330419, 281843, 126895104, 125846528, 125846528, 125846560, 1330419, 1330419, 5524723, 5524723, 39079155, 72633587, 72633587, 5524723, 92556531, 93605107, 93605107, 127290611, 97799411, 127290611, 131484915, 58368, 0, 268435456, 189696, 0, 268500992, 2, 112, 48, 112, 128, 3584, 65536, 7340032, 50331648, 0, 231488, 2, 48, 32, 4096, 4194304, 67108864, 402653184, 536870912, 2, 16, 128, 262144
+];
+
+XQueryParser.TOKEN =
+[
+ "(0)",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSection",
+ "Wildcard",
+ "EQName",
+ "URILiteral",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "StringLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "PITarget",
+ "NCName",
+ "QName",
+ "S",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "EOF",
+ "'!'",
+ "'!='",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "'$'",
+ "'%'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "')'",
+ "'*'",
+ "'*'",
+ "'+'",
+ "','",
+ "'-'",
+ "'-->'",
+ "'.'",
+ "'..'",
+ "'/'",
+ "'//'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "'::'",
+ "':='",
+ "';'",
+ "'<'",
+ "'<!--'",
+ "'</'",
+ "'<<'",
+ "'<='",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'>='",
+ "'>>'",
+ "'?'",
+ "'?>'",
+ "'@'",
+ "'NaN'",
+ "'['",
+ "']'",
+ "'after'",
+ "'all'",
+ "'allowing'",
+ "'ancestor'",
+ "'ancestor-or-self'",
+ "'and'",
+ "'any'",
+ "'append'",
+ "'array'",
+ "'as'",
+ "'ascending'",
+ "'at'",
+ "'attribute'",
+ "'base-uri'",
+ "'before'",
+ "'boundary-space'",
+ "'break'",
+ "'by'",
+ "'case'",
+ "'cast'",
+ "'castable'",
+ "'catch'",
+ "'check'",
+ "'child'",
+ "'collation'",
+ "'collection'",
+ "'comment'",
+ "'constraint'",
+ "'construction'",
+ "'contains'",
+ "'content'",
+ "'context'",
+ "'continue'",
+ "'copy'",
+ "'copy-namespaces'",
+ "'count'",
+ "'decimal-format'",
+ "'decimal-separator'",
+ "'declare'",
+ "'default'",
+ "'delete'",
+ "'descendant'",
+ "'descendant-or-self'",
+ "'descending'",
+ "'diacritics'",
+ "'different'",
+ "'digit'",
+ "'distance'",
+ "'div'",
+ "'document'",
+ "'document-node'",
+ "'element'",
+ "'else'",
+ "'empty'",
+ "'empty-sequence'",
+ "'encoding'",
+ "'end'",
+ "'entire'",
+ "'eq'",
+ "'every'",
+ "'exactly'",
+ "'except'",
+ "'exit'",
+ "'external'",
+ "'first'",
+ "'following'",
+ "'following-sibling'",
+ "'for'",
+ "'foreach'",
+ "'foreign'",
+ "'from'",
+ "'ft-option'",
+ "'ftand'",
+ "'ftnot'",
+ "'ftor'",
+ "'function'",
+ "'ge'",
+ "'greatest'",
+ "'group'",
+ "'grouping-separator'",
+ "'gt'",
+ "'idiv'",
+ "'if'",
+ "'import'",
+ "'in'",
+ "'index'",
+ "'infinity'",
+ "'inherit'",
+ "'insensitive'",
+ "'insert'",
+ "'instance'",
+ "'integrity'",
+ "'intersect'",
+ "'into'",
+ "'is'",
+ "'item'",
+ "'json'",
+ "'json-item'",
+ "'key'",
+ "'language'",
+ "'last'",
+ "'lax'",
+ "'le'",
+ "'least'",
+ "'let'",
+ "'levels'",
+ "'loop'",
+ "'lowercase'",
+ "'lt'",
+ "'minus-sign'",
+ "'mod'",
+ "'modify'",
+ "'module'",
+ "'most'",
+ "'namespace'",
+ "'namespace-node'",
+ "'ne'",
+ "'next'",
+ "'no'",
+ "'no-inherit'",
+ "'no-preserve'",
+ "'node'",
+ "'nodes'",
+ "'not'",
+ "'object'",
+ "'occurs'",
+ "'of'",
+ "'on'",
+ "'only'",
+ "'option'",
+ "'or'",
+ "'order'",
+ "'ordered'",
+ "'ordering'",
+ "'paragraph'",
+ "'paragraphs'",
+ "'parent'",
+ "'pattern-separator'",
+ "'per-mille'",
+ "'percent'",
+ "'phrase'",
+ "'position'",
+ "'preceding'",
+ "'preceding-sibling'",
+ "'preserve'",
+ "'previous'",
+ "'processing-instruction'",
+ "'relationship'",
+ "'rename'",
+ "'replace'",
+ "'return'",
+ "'returning'",
+ "'revalidation'",
+ "'same'",
+ "'satisfies'",
+ "'schema'",
+ "'schema-attribute'",
+ "'schema-element'",
+ "'score'",
+ "'self'",
+ "'sensitive'",
+ "'sentence'",
+ "'sentences'",
+ "'skip'",
+ "'sliding'",
+ "'some'",
+ "'stable'",
+ "'start'",
+ "'stemming'",
+ "'stop'",
+ "'strict'",
+ "'strip'",
+ "'structured-item'",
+ "'switch'",
+ "'text'",
+ "'then'",
+ "'thesaurus'",
+ "'times'",
+ "'to'",
+ "'treat'",
+ "'try'",
+ "'tumbling'",
+ "'type'",
+ "'typeswitch'",
+ "'union'",
+ "'unique'",
+ "'unordered'",
+ "'updating'",
+ "'uppercase'",
+ "'using'",
+ "'validate'",
+ "'value'",
+ "'variable'",
+ "'version'",
+ "'weight'",
+ "'when'",
+ "'where'",
+ "'while'",
+ "'wildcards'",
+ "'window'",
+ "'with'",
+ "'without'",
+ "'word'",
+ "'words'",
+ "'xquery'",
+ "'zero-digit'",
+ "'{'",
+ "'{{'",
+ "'{|'",
+ "'|'",
+ "'||'",
+ "'|}'",
+ "'}'",
+ "'}}'"
+];
+
+});
+
+define('ace/mode/xquery/visitors/SyntaxHighlighter', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+var SyntaxHighlighter = exports.SyntaxHighlighter = function(source, tree)
+{
+ var keywords = ['after', 'ancestor', 'ancestor-or-self', 'and', 'as', 'ascending', 'attribute', 'before', 'case', 'cast', 'castable', 'child', 'collation', 'comment', 'copy', 'count', 'declare', 'default', 'delete', 'descendant', 'descendant-or-self', 'descending', 'div', 'document', 'document-node', 'element', 'else', 'empty', 'empty-sequence', 'end', 'eq', 'every', 'except', 'first', 'following', 'following-sibling', 'for', 'function', 'ge', 'group', 'gt', 'idiv', 'if', 'then', 'import', 'insert', 'instance', 'intersect', 'into', 'is', 'item', 'last', 'le', 'let', 'lt', 'mod', 'modify', 'module', 'namespace', 'namespace-node', 'ne', 'node', 'only', 'or', 'order', 'ordered', 'parent', 'preceding', 'preceding-sibling', 'processing-instruction', 'rename', 'replace', 'return', 'satisfies', 'schema-attribute', 'schema-element', 'self', 'some', 'stable', 'start', 'switch', 'text', 'to', 'treat', 'try', 'typeswitch', 'union', 'unordered', 'validate', 'where', 'with', 'xquery', 'contains', 'paragraphs', 'sentences', 'times', 'words', 'by', 'collection', 'allowing', 'at', 'base-uri', 'boundary-space', 'break', 'catch', 'construction', 'context', 'continue', 'copy-namespaces', 'decimal-format', 'encoding', 'exit', 'external', 'ft-option', 'in', 'index', 'integrity', 'lax', 'nodes', 'option', 'ordering', 'revalidation', 'schema', 'score', 'sliding', 'strict', 'tumbling', 'type', 'updating', 'value', 'variable', 'version', 'while', 'constraint', 'loop', 'returning', 'append', 'array', 'json-item', 'object', 'structured-item', 'when', 'next', 'previous', 'window'];
+ var states = ["cdata", "comment", "tag"];
+ var info = { lines: [ [] ], states: [] };
+
+ this.getTokens = function() {
+ this.visit(tree);
+ return info;
+ };
+
+ this.addTokens = function(value, type)
+ {
+ var tokens = value.split("\n");
+ var lastState = "start";
+ for(var i in tokens)
+ {
+ if(i > 0) {
+ info.lines.push([]);
+ info.states.push(lastState);
+ }
+ var value = tokens[i];
+ var linesLength = info.lines.length - 1;
+ var linesIdx = info.lines[linesLength];
+ linesIdx.push({ value: value, type: type });
+ lastState = states.indexOf(type) != -1 ? type : "start";
+ }
+ };
+
+ this.getNodeValue = function(node)
+ {
+ return source.substring(node.begin, node.end);
+ };
+
+ this.DirPIConstructor = function(node)
+ {
+ var value = this.getNodeValue(node);
+ this.addTokens(value, "xml_pe");
+ return true;
+ };
+
+ this.DirElemConstructor = function(node)
+ {
+ for(var i in node.children)
+ {
+ var child = node.children[i];
+ if(child.name === "TOKEN" || child.name === "QName") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "meta.tag");
+ } else {
+ this.visit(child);
+ }
+ }
+ return true;
+ };
+
+ this.DirAttributeList = function(node)
+ {
+ for(var i in node.children)
+ {
+ var child = node.children[i];
+ if(child.name === "QName") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "meta.tag");
+ } else {
+ this.visit(child);
+ }
+ }
+ return true;
+ };
+
+ this.DirAttributeValue = function(node)
+ {
+ for(var i in node.children)
+ {
+ var child = node.children[i];
+ if(child.name === "TOKEN") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "string");
+ } else {
+ this.visit(child);
+ }
+ }
+ return true;
+ };
+
+ this.QuotAttrContentChar = function(node)
+ {
+ var value = this.getNodeValue(node);
+ this.addTokens(value, "string");
+ return true;
+ };
+
+ this.StringConcatExpr = function(node)
+ {
+ for(var i in node.children) {
+ var child = node.children[i];
+ if(child.name === "TOKEN") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "keyword.operator");
+ } else {
+ this.visit(child);
+ }
+ }
+ return true;
+ };
+
+ this.AdditiveExpr = function(node)
+ {
+ for(var i in node.children) {
+ var child = node.children[i];
+ if(child.name === "TOKEN") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "keyword.operator");
+ } else {
+ this.visit(child);
+ }
+ }
+ return true;
+ };
+
+ this.MultiplicativeExpr = function(node)
+ {
+ for(var i in node.children) {
+ var child = node.children[i];
+ if(child.name === "TOKEN") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "keyword.operator");
+ } else {
+ this.visit(child);
+ }
+ }
+ return true;
+ };
+
+ this.UnaryExpr = function(node)
+ {
+ for(var i in node.children) {
+ var child = node.children[i];
+ if(child.name === "TOKEN") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "keyword.operator");
+ } else {
+ this.visit(child);
+ }
+ }
+ return true;
+ };
+
+ this.GeneralComp = function(node)
+ {
+ for(var i in node.children) {
+ var child = node.children[i];
+ if(child.name === "TOKEN") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "keyword.operator");
+ } else {
+ this.visit(child);
+ }
+ }
+ return true;
+ };
+
+ this.NumericLiteral = function(node)
+ {
+ for(var i in node.children) {
+ var child = node.children[i];
+ if(child.name != "TEXT") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "constant");
+ } else {
+ this.visit(child);
+ }
+ }return true;
+ }
+
+ this.DirCommentConstructor = function(node)
+ {
+ for(var i in node.children) {
+ var child = node.children[i];
+ if(child.name != "TEXT") {
+ var value = this.getNodeValue(child);
+ this.addTokens(value, "comment");
+ } else {
+ this.visit(child);
+ }
+ }return true;
+ }
+
+ this.Comment = function(node)
+ {
+ return true;
+ };
+
+ this.URILiteral = function(node)
+ {
+ var value = this.getNodeValue(node);
+ this.addTokens(value, "string");
+ return true;
+ };
+
+ this.StringLiteral = function(node)
+ {
+ var value = this.getNodeValue(node);
+ this.addTokens(value, "string");
+ return true;
+ };
+
+ this.EQName = function(node)
+ {
+ var value = this.getNodeValue(node);
+ this.addTokens(value, "support.function");
+ return true;
+ };
+
+ this.TOKEN = function(node)
+ {
+ var value = this.getNodeValue(node);
+ if(keywords.indexOf(value) > -1 ) {
+ this.addTokens(value, "keyword");
+ } else if(value === "$") {
+
+ } else {
+ this.addTokens(value, "text");
+ }
+ return true;
+ };
+
+ this.WS = function(node) {
+ var value = this.getNodeValue(node);
+ var openingIdx = value.indexOf("(:");
+ while(openingIdx > -1) {
+ var text = value.substring(0, openingIdx);
+ this.addTokens(text, "text");
+ var closingIdx = value.substring(openingIdx).indexOf(":)") + 3;
+ var comment = value.substring(openingIdx, closingIdx);
+ this.addTokens(comment, "comment");
+ value = value.substring(closingIdx);
+ openingIdx = value.indexOf("(:");
+ }
+ this.addTokens(value, "text");
+ };
+
+ this.EverythingElse = function(node)
+ {
+ if(node.children.length === 0) {
+ var value = this.getNodeValue(node);
+ this.addTokens(value, "text");
+ return true;
+ }
+ return false;
+ };
+
+ this.visit = function(node){
+ var name = node.name;
+ var skip = false;
+
+ if(typeof this[name] === "function")
+ skip = this[name](node) === true ? true : false ;
+ else
+ skip = this.EverythingElse(node) === true ? true : false;
+
+ if(!skip && typeof node.children === "object")
+ {
+ var isVarEQName = false;
+ for(var i = 0; i < node.children.length; i++)
+ {
+ var child = node.children[i];
+ var value = this.getNodeValue(child);
+ if(child.name === "TOKEN" && value === "$")
+ {
+ isVarEQName = true;
+ } else if(isVarEQName) {
+ this.addTokens("$" + value, "variable");
+ isVarEQName = false;
+ } else {
+ this.visit(child);
+ }
+ }
+ }
+ };
+};
+
+});
diff --git a/tools/addon-sdk b/tools/addon-sdk
index 23c4d91..b60d920 120000
--- a/tools/addon-sdk
+++ b/tools/addon-sdk
@@ -1 +1 @@
-addon-sdk-1.5/ \ No newline at end of file
+addon-sdk-1.12/ \ No newline at end of file